From 97aee2580b9c3af8399125974db54aceab524295 Mon Sep 17 00:00:00 2001 From: Jean-Paul Chaput Date: Tue, 18 Feb 2014 14:53:05 +0100 Subject: [PATCH] Code cleanup with cppcheck & gcc 4.4.6 (RHEL6). This commit is way too big. Next time split it tool by tool. All tool sources have been checked with cppcheck & gcc. All correctables errors/warning have been removed: * Now uses correct conversion specifiers in printf(), mostly 'u' instead of 'd' for unsigneds. * In scanf(), uses systematically a maximum field width, 11 for int, 22 for long int and the appropriate length for char*. * In strcpy(), no longer uses same array for source & dest, but uses an intermediate array. * Remove (or comment) unused variables. * In C++ files, correct constructors attribute initialisation and disable copy constructors. * When possible, correct memory leaks. Some corrections would need a more intimate knowledge of the source than I do. * Removed some "gets()" calls. * In parsers, undeclare yyunput & yyinput when necessary. * NOT correct variable scope as it may clutter the code (my opinion). Specific tools remark: * In , comment beginning with "FRAGILE" signals a very ugly trick: structs passed as losig_list but with only the two first fields identical. * In & for char used as table index, uses a cast toward int, but in , , & simply declares the variables int. * In , dp_nmux_x1.ap, shrink the ALU2 part of the ALU3 terminals so they do not collide with neighboring track. Has do to it manually as Graal refuse to shrink them. The same correction must be done on other cells for nero/kite dual compliance. --- .gitignore | 8 + alliance/src/abe/src/beh_rmv.c | 20 +- alliance/src/abe/src/main.c | 8 +- alliance/src/abl/src/main.c | 1 - alliance/src/abt/src/bhl_makgex.c | 12 +- alliance/src/abt/src/bhl_orderbdd.c | 2 +- alliance/src/abv/src/bvl_bcomp_l.l | 4 + alliance/src/abv/src/bvl_bcomp_y.y | 12 +- alliance/src/abv/src/bvl_bspec.c | 10 +- alliance/src/abv/src/bvl_drive.c | 30 +- alliance/src/abv/src/bvl_util.c | 4 +- alliance/src/abv/src/main.c | 4 +- alliance/src/alcban/src/alcbanner.c | 8 +- alliance/src/asimut/src/Makefile.am | 4 +- alliance/src/asimut/src/beh_delay.h | 41 +-- alliance/src/asimut/src/beh_setdelay.c | 14 +- alliance/src/asimut/src/c_hada_repondeur.c | 20 +- alliance/src/asimut/src/c_sr1k_8a.c | 4 +- alliance/src/asimut/src/c_sr1k_8b.c | 8 +- alliance/src/asimut/src/c_sr8k_8a.c | 4 +- alliance/src/asimut/src/sch.h | 3 +- alliance/src/asimut/src/sch_GetCTra.c | 12 +- alliance/src/asimut/src/sch_GetNTim.c | 1 - alliance/src/asimut/src/sch_debug.c | 32 +-- alliance/src/asimut/src/sch_debug.h | 68 ++--- alliance/src/asimut/src/vh_debug.c | 10 +- alliance/src/asimut/src/vh_debug.h | 32 ++- alliance/src/asimut/src/vh_init.h | 22 ++ alliance/src/asimut/src/vh_lspec.c | 5 +- alliance/src/asimut/src/vh_simulad.c | 23 +- alliance/src/asimut/src/vh_xcomm.c | 29 +- alliance/src/asimut/src/vh_xcomm.h | 6 +- alliance/src/asimut/src/vh_xspec.c | 31 ++- alliance/src/asimut/src/vh_xspec.h | 1 + alliance/src/aut/src/auterror.h | 3 +- alliance/src/aut/src/autfree.c | 4 +- alliance/src/aut/src/autgraph.c | 1 - alliance/src/b2f/src/b2f_beh2fsm.c | 10 +- alliance/src/b2f/src/b2f_error.h | 3 + alliance/src/bdd/src/bddcircuit.c | 4 +- alliance/src/bdd/src/bdddump.c | 10 +- alliance/src/bdd/src/bddmark.c | 3 - alliance/src/bdd/src/bddnode.c | 2 +- alliance/src/bdd/src/bddreorder.c | 10 +- alliance/src/bdd/src/bddsystem.c | 4 +- alliance/src/beh/src/beh_rmvbeaux.c | 2 +- alliance/src/beh/src/beh_rmvbebus.c | 2 +- alliance/src/beh/src/beh_rmvbebux.c | 2 +- alliance/src/beh/src/beh_rmvbeder.c | 2 +- alliance/src/beh/src/beh_rmvbefig.c | 2 +- alliance/src/beh/src/beh_rmvbegen.c | 2 +- alliance/src/beh/src/beh_rmvbemsg.c | 2 +- alliance/src/beh/src/beh_rmvbeout.c | 2 +- alliance/src/beh/src/beh_rmvbepor.c | 2 +- alliance/src/beh/src/beh_rmvbereg.c | 2 +- alliance/src/beh/src/beh_rmvberin.c | 2 +- alliance/src/bhl/src/beh_clrdepend.c | 10 +- alliance/src/bhl/src/beh_debug.c | 36 +-- alliance/src/bhl/src/beh_debug.h | 128 ++++----- alliance/src/bhl/src/beh_makbdd.c | 1 + alliance/src/bhl/src/beh_makderiv.c | 2 - alliance/src/bhl/src/beh_makgex.c | 11 +- alliance/src/bhl/src/beh_makquad.c | 2 - alliance/src/bhl/src/beh_makvarlist.c | 3 +- alliance/src/bhl/src/bhl.h | 1 + alliance/src/boog/src/bog_lax_param.c | 1 - alliance/src/boog/src/bog_lib_complete.c | 4 +- alliance/src/boog/src/bog_lib_negativ.c | 48 ++-- alliance/src/boog/src/bog_lib_permute.c | 4 +- alliance/src/boog/src/bog_lib_reader.c | 3 +- alliance/src/boog/src/bog_map_adapt.c | 34 +-- alliance/src/boog/src/bog_map_pattern.c | 8 +- alliance/src/boog/src/bog_normalize_ARITY.c | 2 +- alliance/src/boog/src/bog_normalize_DAG.c | 4 +- .../src/boog/src/bog_normalize_simplify.c | 6 +- alliance/src/boog/src/bog_signal_delay.c | 2 +- alliance/src/boog/src/bog_unflatten_befig.c | 2 + alliance/src/boog/src/bog_xsch_driver.c | 2 +- alliance/src/boom/src/boom_aux.c | 6 +- alliance/src/boom/src/boom_bdd.c | 8 +- alliance/src/boom/src/boom_burgun.c | 4 +- alliance/src/boom/src/boom_gradient.c | 4 +- alliance/src/boom/src/boom_logic.c | 56 ++-- alliance/src/boom/src/boom_one.c | 10 +- alliance/src/boom/src/boom_procrast.c | 8 +- alliance/src/boom/src/boom_random.c | 4 +- alliance/src/boom/src/boom_shared.c | 2 - alliance/src/boom/src/boom_top.c | 8 +- alliance/src/boom/src/boom_window.c | 12 +- alliance/src/btr/src/main.c | 3 - alliance/src/bvl/src/bvl_bcomp_l.l | 4 + alliance/src/bvl/src/bvl_bcomp_y.y | 9 +- alliance/src/bvl/src/bvl_drive.c | 30 +- alliance/src/bvl/src/bvl_parse.c | 17 +- alliance/src/bvl/src/bvl_util.c | 18 +- alliance/src/cells/src/dp_sxlib/dp_nmux_x1.ap | 4 +- alliance/src/ctl/src/ctl.h | 2 + alliance/src/ctl/src/ctladd.c | 6 +- alliance/src/ctl/src/ctldel.c | 3 + alliance/src/ctl/src/ctlfree.h | 2 + alliance/src/ctp/src/ctp_bspec.c | 9 +- alliance/src/ctp/src/ctp_byacc.h | 7 +- alliance/src/ctp/src/ctp_l.l | 4 + alliance/src/ctp/src/ctp_parse.c | 1 - alliance/src/ctp/src/ctp_util.h | 2 + alliance/src/ctp/src/ctp_y.y | 37 +-- alliance/src/ctp/src/main.c | 1 - alliance/src/distrib/etc/alc_env.sh.in | 4 +- alliance/src/dreal/src/GMC_menu.c | 4 +- alliance/src/dreal/src/GMC_message.c | 6 +- alliance/src/dreal/src/GMC_panel.c | 3 +- alliance/src/dreal/src/GME_dialog.c | 1 + alliance/src/dreal/src/GME_edit.c | 5 +- alliance/src/dreal/src/GME_menu.c | 8 +- alliance/src/dreal/src/GME_message.c | 6 +- alliance/src/dreal/src/GME_modify.c | 2 + alliance/src/dreal/src/GME_panel.c | 6 +- alliance/src/dreal/src/GME_panel.h | 1 + alliance/src/dreal/src/GME_search.c | 5 +- alliance/src/dreal/src/GME_select.c | 32 ++- alliance/src/dreal/src/GME_select.h | 5 +- alliance/src/dreal/src/GMF_dialog.c | 2 +- alliance/src/dreal/src/GMF_file.c | 5 +- alliance/src/dreal/src/GMF_menu.c | 5 +- alliance/src/dreal/src/GMF_panel.c | 9 +- alliance/src/dreal/src/GMH_menu.c | 4 +- alliance/src/dreal/src/GMH_panel.c | 16 +- alliance/src/dreal/src/GMS_menu.c | 5 +- alliance/src/dreal/src/GMS_panel.c | 2 + alliance/src/dreal/src/GMS_setup.c | 40 +-- alliance/src/dreal/src/GMT_menu.c | 4 +- alliance/src/dreal/src/GMT_panel.c | 1 + alliance/src/dreal/src/GMT_tools.c | 1 + alliance/src/dreal/src/GMV_map.c | 8 +- alliance/src/dreal/src/GMV_map.h | 1 + alliance/src/dreal/src/GMV_menu.c | 5 +- alliance/src/dreal/src/GMV_message.c | 3 - alliance/src/dreal/src/GMV_panel.c | 12 +- alliance/src/dreal/src/GMV_view.c | 1 + alliance/src/dreal/src/GMX_color.c | 4 +- alliance/src/dreal/src/GMX_cursor.c | 4 +- alliance/src/dreal/src/GMX_dialog.c | 2 + alliance/src/dreal/src/GMX_event.c | 37 +-- alliance/src/dreal/src/GMX_graphic.h | 3 +- alliance/src/dreal/src/GMX_grid.c | 6 +- alliance/src/dreal/src/GMX_grid.h | 3 + alliance/src/dreal/src/GMX_menu.c | 4 +- alliance/src/dreal/src/GMX_message.c | 2 +- alliance/src/dreal/src/GMX_motif.c | 3 + alliance/src/dreal/src/GMX_panel.c | 1 + alliance/src/dreal/src/GMX_panel.h | 1 + alliance/src/dreal/src/GMX_view.c | 23 +- alliance/src/dreal/src/GRD_error.c | 6 +- alliance/src/dreal/src/GRD_error.h | 2 + alliance/src/dreal/src/GRD_rds.c | 30 +- alliance/src/dreal/src/GRD_select.h | 2 + alliance/src/dreal/src/GRD_window.c | 57 ++-- alliance/src/dreal/src/GSB_error.h | 2 + alliance/src/dreal/src/GSB_parse.c | 32 +-- alliance/src/dreal/src/GTB_cursor.c | 13 +- alliance/src/dreal/src/GTB_dialog.c | 3 +- alliance/src/dreal/src/GTB_dialog.h | 2 + alliance/src/dreal/src/dreal.c | 19 +- alliance/src/druc/src/defdefin.c | 1 + alliance/src/druc/src/defresiz.c | 2 - alliance/src/druc/src/deftools.c | 6 - alliance/src/druc/src/deftools.h | 1 + alliance/src/druc/src/defunion.h | 1 + alliance/src/druc/src/drucbath.c | 13 +- alliance/src/druc/src/drucgral_test.c | 7 - alliance/src/druc/src/druchier.c | 8 - alliance/src/druc/src/druchier.h | 4 + alliance/src/druc/src/drucompi.c | 2 + alliance/src/druc/src/drucompi.h | 7 +- alliance/src/druc/src/drucompi_l.l | 7 + alliance/src/druc/src/drucompi_y.y | 3 +- alliance/src/druc/src/drucring.c | 23 +- alliance/src/druc/src/drucring.h | 4 + alliance/src/druc/src/drucutil.h | 11 +- alliance/src/druc/src/vmcasmld.c | 6 +- alliance/src/druc/src/vmcasmld.h | 1 + alliance/src/druc/src/vmcerror.c | 2 +- alliance/src/druc/src/vmcerror.h | 2 + alliance/src/druc/src/vmcmesur.c | 2 - alliance/src/druc/src/vmcmesur.h | 8 +- alliance/src/druc/src/vmctools.h | 37 ++- alliance/src/druc/src/vmcunify.c | 18 +- alliance/src/druc/src/vmcunify.h | 1 + alliance/src/elp/src/elp.c | 18 +- alliance/src/elp/src/elp_l.l | 4 + alliance/src/elp/src/elp_y.y | 7 +- alliance/src/exp/src/expl.l | 6 +- alliance/src/exp/src/expy.y | 13 +- alliance/src/exp/src/ht.c | 2 +- alliance/src/exp/src/ht.h | 2 + alliance/src/fks/src/fksparse.c | 8 +- alliance/src/flatbeh/src/abstract.c | 4 + alliance/src/flatbeh/src/utils.c | 13 +- alliance/src/flatlo/src/flatlo.c | 6 +- alliance/src/flatph/src/flatph.c | 7 +- alliance/src/fmi/src/fmi_optim.c | 10 +- alliance/src/fsm/src/fsmview.c | 2 +- alliance/src/fsp/src/fsp_proof.c | 3 +- alliance/src/fvh/src/fbh_rmv.c | 20 +- alliance/src/fvh/src/fbh_uti.c | 3 - alliance/src/fvh/src/fbl_bcomp_l.l | 4 + alliance/src/fvh/src/fbl_bcomp_y.y | 16 +- alliance/src/fvh/src/fbl_bspec.c | 6 +- alliance/src/fvh/src/fbl_drive.c | 9 +- alliance/src/fvh/src/fvhfbh2fsm.c | 11 +- alliance/src/genlib/src/dpgen_Adder.c | 5 +- alliance/src/genlib/src/dpgen_Nul.c | 18 +- alliance/src/genlib/src/dpgen_RAM.c | 5 +- alliance/src/genlib/src/dpgen_RF1.c | 17 +- alliance/src/genlib/src/dpgen_RF2.c | 9 +- alliance/src/genlib/src/dpgen_ROM.c | 11 +- alliance/src/genlib/src/dpgen_ROM_code.y | 3 +- alliance/src/genlib/src/dpgen_Shifter.c | 7 +- alliance/src/genlib/src/genlib.c | 29 +- alliance/src/genpat/src/ARRAY.c | 11 +- alliance/src/genpat/src/libpat_l.c | 9 +- alliance/src/graal/src/GMC_create.c | 13 +- alliance/src/graal/src/GMC_dialog.c | 7 +- alliance/src/graal/src/GMC_menu.c | 10 +- alliance/src/graal/src/GMC_message.c | 18 +- alliance/src/graal/src/GMC_panel.c | 6 +- alliance/src/graal/src/GME_dialog.c | 7 +- alliance/src/graal/src/GME_dialog.h | 2 + alliance/src/graal/src/GME_edit.c | 24 +- alliance/src/graal/src/GME_menu.c | 8 +- alliance/src/graal/src/GME_message.c | 20 +- alliance/src/graal/src/GME_message.h | 2 + alliance/src/graal/src/GME_modify.c | 6 +- alliance/src/graal/src/GME_panel.c | 12 +- alliance/src/graal/src/GME_panel.h | 2 + alliance/src/graal/src/GME_search.c | 16 +- alliance/src/graal/src/GME_search.h | 1 + alliance/src/graal/src/GME_select.c | 44 +-- alliance/src/graal/src/GME_select.h | 4 + alliance/src/graal/src/GMF_dialog.c | 1 + alliance/src/graal/src/GMF_file.c | 2 + alliance/src/graal/src/GMF_menu.c | 5 +- alliance/src/graal/src/GMF_panel.c | 1 + alliance/src/graal/src/GMH_menu.c | 4 +- alliance/src/graal/src/GMH_panel.c | 1 + alliance/src/graal/src/GMS_menu.c | 4 +- alliance/src/graal/src/GMS_panel.c | 2 + alliance/src/graal/src/GMS_setup.c | 39 +-- alliance/src/graal/src/GMT_druc.c | 23 +- alliance/src/graal/src/GMT_druc.h | 5 + alliance/src/graal/src/GMT_menu.c | 4 +- alliance/src/graal/src/GMT_panel.c | 2 + alliance/src/graal/src/GMT_tools.c | 13 +- alliance/src/graal/src/GMV_menu.c | 5 +- alliance/src/graal/src/GMV_panel.c | 16 +- alliance/src/graal/src/GMV_view.c | 1 + alliance/src/graal/src/GMX_color.c | 4 +- alliance/src/graal/src/GMX_cursor.c | 4 +- alliance/src/graal/src/GMX_event.c | 33 ++- alliance/src/graal/src/GMX_graphic.h | 1 + alliance/src/graal/src/GMX_grid.h | 3 + alliance/src/graal/src/GMX_menu.c | 4 +- alliance/src/graal/src/GMX_message.c | 2 +- alliance/src/graal/src/GMX_motif.c | 2 + alliance/src/graal/src/GMX_panel.c | 1 + alliance/src/graal/src/GMX_panel.h | 1 + alliance/src/graal/src/GMX_view.c | 18 +- alliance/src/graal/src/GRM_druc.c | 2 +- alliance/src/graal/src/GRM_equi.c | 15 +- alliance/src/graal/src/GRM_error.c | 6 +- alliance/src/graal/src/GRM_error.h | 3 +- alliance/src/graal/src/GRM_mbkrds.c | 24 +- alliance/src/graal/src/GRM_peek.c | 11 +- alliance/src/graal/src/GRM_select.h | 2 + alliance/src/graal/src/GRM_window.c | 56 ++-- alliance/src/graal/src/GSB_error.h | 2 + alliance/src/graal/src/GSB_parse.c | 101 ++++--- alliance/src/graal/src/GSB_share.c | 2 +- alliance/src/graal/src/GTB_cursor.c | 9 +- alliance/src/graal/src/GTB_dialog.c | 4 +- alliance/src/graal/src/graal.c | 19 +- alliance/src/l2p/src/drive_ps.c | 23 +- alliance/src/l2p/src/l2p.c | 4 +- alliance/src/l2p/src/tmp_dict.c | 2 +- alliance/src/l2p/src/tmp_man.c | 3 +- alliance/src/log/src/log_bdd0.c | 18 +- alliance/src/log/src/log_bdd1.c | 5 +- alliance/src/log/src/log_prefbib.c | 25 +- alliance/src/log/src/log_thash.c | 6 +- alliance/src/log/src/log_thashbdd.c | 4 +- alliance/src/log/src/log_thashloc.c | 2 +- alliance/src/loon/src/lon_lib_negativ.c | 85 +++--- alliance/src/loon/src/lon_lib_reader.c | 1 + .../src/loon/src/lon_lib_specifications.c | 17 +- alliance/src/loon/src/lon_lib_utils.c | 11 +- alliance/src/loon/src/lon_normalize_DAG.c | 17 +- alliance/src/loon/src/lon_normalize_message.c | 1 + .../src/loon/src/lon_normalize_register.c | 1 + .../src/loon/src/lon_normalize_simplify.c | 21 +- alliance/src/loon/src/lon_optim_stats.c | 3 +- alliance/src/loon/src/lon_signal_critical.c | 2 +- alliance/src/loon/src/lon_xsch_driver.c | 4 +- alliance/src/lvx/src/lvx.c | 58 ++-- alliance/src/lynx/src/cutelbow.c | 3 +- alliance/src/lynx/src/flatrds.c | 1 + alliance/src/lynx/src/interval.c | 6 +- alliance/src/lynx/src/mbkrds.c | 7 +- alliance/src/lynx/src/netlist.c | 2 - alliance/src/lynx/src/parse.c | 2 +- alliance/src/lynx/src/znc.c | 2 - alliance/src/m2e/src/m2e.c | 10 +- alliance/src/mbk/src/mbk_lo.c | 67 ++--- alliance/src/mbk/src/mbk_lo_util.c | 17 +- alliance/src/mbk/src/mbk_ph_util.c | 11 +- alliance/src/mbk/src/mbk_util.c | 4 +- alliance/src/mbkal/src/alc_pars_l.c | 2 +- alliance/src/mbkal/src/alc_pars_l6.c | 50 +--- alliance/src/mbkap/src/alc_driv_p.c | 1 + alliance/src/mbkap/src/alc_pars_p.c | 16 +- alliance/src/mbkedif/src/driver.c | 56 ++-- alliance/src/mbkedif/src/parser_l.l | 4 + alliance/src/mbkedif/src/parser_y.y | 46 ++-- alliance/src/mbkedif/src/time.c | 3 +- alliance/src/mbkhilo/src/drive_hilo.c | 24 +- alliance/src/mbkmg/src/mbk2mg.c | 33 +-- alliance/src/mbkmg/src/mg2mbk_l.l | 3 + alliance/src/mbkmg/src/mg2mbk_y.y | 45 +-- alliance/src/mbkspice/src/spi_drive.c | 15 +- alliance/src/mbkspice/src/spi_hash.c | 1 + alliance/src/mbkspice/src/spi_msg.c | 1 + alliance/src/mbkspice/src/spi_parse.c | 11 +- alliance/src/mbkvhdl/src/mvl_parse.h | 1 + alliance/src/mbkvhdl/src/mvl_scomp_l.l | 4 + alliance/src/mbkvhdl/src/mvl_scomp_y.y | 6 +- alliance/src/mbkvhdl/src/mvl_sspec.c | 4 +- alliance/src/mbkvhdl/src/mvl_util.c | 14 +- alliance/src/mbkvhdlg/src/gen_generic.c | 2 +- alliance/src/mbkvhdlg/src/gen_generic.h | 1 + alliance/src/mbkvhdlg/src/mvl_drive.c | 6 +- alliance/src/mbkvhdlg/src/mvl_parse.c | 2 + alliance/src/mbkvhdlg/src/mvl_scomp_l.l | 4 + alliance/src/mbkvhdlg/src/mvl_scomp_y.y | 11 +- alliance/src/mbkvhdlg/src/mvl_sspec.c | 4 +- alliance/src/mbkvhdlg/src/mvl_util.c | 14 +- alliance/src/mbkvhdlg/src/vel_drive.c | 20 +- alliance/src/mbkvhdlg/src/vel_o.c | 4 +- alliance/src/mbkvhdlg/src/vel_sort.c | 2 - alliance/src/mbkvhdlg/src/vel_util.c | 18 +- alliance/src/mbkvhdlg/src/vel_vect.c | 3 + alliance/src/mbkvhdlg/src/x2vy_main.c | 3 + alliance/src/mbkvrlog/src/drive_vlog.c | 5 +- alliance/src/mbkvti/src/drive_vti_l.c | 41 +-- alliance/src/mbkvti/src/drive_vti_p.c | 37 +-- alliance/src/mbkvti/src/parse_vti_l.c | 15 +- alliance/src/mbkvti/src/parse_vti_p.c | 7 +- alliance/src/mips_asm/src/mips_l.l | 3 + alliance/src/mips_asm/src/mips_util.c | 1 + alliance/src/mips_asm/src/mips_y.y | 17 +- alliance/src/mips_asm/src/mips_yacc.h | 2 - alliance/src/mocha/src/mocha_check.c | 19 -- alliance/src/mocha/src/mocha_fsm.c | 5 +- alliance/src/mocha/src/mocha_syf.c | 25 +- alliance/src/nero/src/AAstar.cpp | 75 +++-- alliance/src/nero/src/ADefs.h | 11 +- alliance/src/nero/src/ASimple.cpp | 19 +- alliance/src/nero/src/MDRGrid.cpp | 20 +- alliance/src/nero/src/MDefs.h | 60 ++-- alliance/src/nero/src/MMBK.cpp | 27 +- alliance/src/nero/src/MMBK.h | 28 +- alliance/src/nero/src/MNet.cpp | 25 +- alliance/src/nero/src/MNodes.cpp | 21 +- alliance/src/nero/src/MPower.cpp | 27 +- alliance/src/nero/src/MPri.cpp | 13 +- alliance/src/nero/src/RBox.cpp | 71 ++--- alliance/src/nero/src/RDefs.h | 12 +- alliance/src/nero/src/RMBK.cpp | 16 +- alliance/src/nero/src/UConst.cpp | 8 +- alliance/src/nero/src/UDefs.h | 21 +- alliance/src/nero/src/UGrid.cpp | 8 +- alliance/src/nero/src/UInter.cpp | 16 +- alliance/src/nero/src/UOpts.cpp | 13 +- alliance/src/nero/src/USys.cpp | 21 +- alliance/src/nero/src/debug.cpp | 26 +- alliance/src/nero/src/nero.cpp | 12 +- alliance/src/nero/src/pdv.c | 10 +- alliance/src/ocp/src/common/Makefile.am | 2 +- alliance/src/ocp/src/common/PContainer.h | 2 +- alliance/src/ocp/src/placer/Makefile.am | 2 +- alliance/src/ocp/src/placer/Ocp.cpp | 18 +- alliance/src/ocp/src/placer/PBin.cpp | 15 +- alliance/src/ocp/src/placer/PCon.h | 2 +- .../src/ocp/src/placer/PDetToPlaceIns.cpp | 15 +- alliance/src/ocp/src/placer/PDetToPlaceIns.h | 2 +- alliance/src/ocp/src/placer/PPlacement.cpp | 30 +- alliance/src/ocp/src/placer/PPlacement.h | 259 ++++++++++-------- .../src/ocp/src/placer/PPlacementFinal.cpp | 19 +- .../src/ocp/src/placer/PPlacementGlobal.cpp | 17 +- alliance/src/ocp/src/placer/PSubRow.cpp | 10 +- alliance/src/ocp/src/placer/iocscan.l | 4 + alliance/src/pat/src/pat_error.c | 2 +- alliance/src/pat/src/pat_warning.c | 2 +- alliance/src/pat2spi/src/pat2spi.c | 32 +-- alliance/src/phl/src/pat_debug.c | 11 +- alliance/src/ppt/src/pat_decl_l.l | 4 + alliance/src/ppt/src/pat_decl_y.y | 4 + alliance/src/ppt/src/pat_desc_y.y | 22 +- alliance/src/ppt/src/pat_drvpat.c | 57 ++-- alliance/src/proof/src/proof_compile.c | 3 - alliance/src/proof/src/proof_main.c | 6 +- alliance/src/proof/src/proof_util.c | 9 +- alliance/src/proof/src/proof_util.h | 17 +- alliance/src/rds/src/rpr.h | 5 +- alliance/src/rds/src/rprparse.c | 16 +- alliance/src/rds/src/rprparse.h | 1 + alliance/src/rdscif/src/cif_parse.c | 12 +- alliance/src/rdsgds/src/gds_drive.c | 5 +- alliance/src/rdsgds/src/gds_parse.c | 6 +- alliance/src/rdsgds/src/gds_swap.c | 2 +- alliance/src/ring/src/deport.c | 42 ++- alliance/src/ring/src/distance.c | 8 +- alliance/src/ring/src/lireplace.c | 2 + alliance/src/ring/src/placement.c | 32 +-- alliance/src/ring/src/posercircuit.c | 1 + alliance/src/ring/src/ringram.y | 7 +- alliance/src/ring/src/rinscan.l | 4 + alliance/src/ring/src/sesame.c | 2 +- alliance/src/ring/src/struct.c | 8 +- alliance/src/ring/src/struct2.c | 14 +- alliance/src/rtd/src/rtd_parse.c | 26 +- alliance/src/s2r/src/postrat.c | 3 - alliance/src/scapin/src/scan_insert.c | 24 +- alliance/src/scl/src/scpbuild.c | 28 +- alliance/src/sea/src/DEF_grammar_lex.l | 3 + alliance/src/sea/src/LEF_drive_sxlib.c | 3 +- alliance/src/sea/src/MAC_drive.c | 4 +- alliance/src/sea/src/a2DEF.c | 12 +- alliance/src/sea/src/util_Defs.h | 1 + alliance/src/sea/src/util_Floorplan.c | 7 - alliance/src/sea/src/util_LEFDEF.c | 14 +- alliance/src/sea/src/util_MBK.c | 12 +- alliance/src/syf/src/syf_cost.c | 2 + alliance/src/syf/src/syf_jedi.c | 6 +- alliance/src/syf/src/syf_synth.c | 18 +- alliance/src/syf/src/syf_user.c | 2 +- alliance/src/syf/src/syf_verify.c | 4 +- alliance/src/vasy/src/vasy_drvalc.c | 14 +- alliance/src/vasy/src/vasy_drvsyn.c | 6 +- alliance/src/vasy/src/vasy_drvvlog.c | 6 +- alliance/src/vasy/src/vasy_dynfunc.c | 15 +- alliance/src/vasy/src/vasy_mulwait.c | 6 +- alliance/src/vasy/src/vasy_parse.c | 9 +- alliance/src/vasy/src/vasy_redinst.c | 2 +- alliance/src/vasy/src/vasy_redwait.c | 4 +- alliance/src/vasy/src/vasy_support.c | 2 +- alliance/src/vasy/src/vasy_synth.c | 21 +- alliance/src/vbh/src/vbh_add.c | 6 +- alliance/src/vbl/src/main.c | 4 +- alliance/src/vbl/src/vbl_bcomp_l.l | 17 +- alliance/src/vbl/src/vbl_bcomp_y.y | 68 ++--- alliance/src/vbl/src/vbl_bspec.c | 9 +- alliance/src/vbl/src/vbl_byacc.h | 2 - alliance/src/vbl/src/vbl_parse.c | 2 +- alliance/src/vbl/src/vbl_util.c | 28 +- alliance/src/vbl/src/vbl_util.h | 2 + alliance/src/vex/src/vexget.c | 2 +- alliance/src/vex/src/vexshift.c | 2 - alliance/src/vex/src/vexsimp.c | 2 +- alliance/src/vpd/src/vpd_parse.c | 42 +-- alliance/src/vvh/src/vvh_vbh2vpn.c | 4 +- alliance/src/x2y/src/x2y.c | 2 + alliance/src/xfsm/src/XFS_error.c | 5 +- alliance/src/xfsm/src/XFS_error.h | 1 + alliance/src/xfsm/src/XFS_fsm.c | 2 +- alliance/src/xfsm/src/XME_dialog.c | 1 + alliance/src/xfsm/src/XME_edit.c | 6 +- alliance/src/xfsm/src/XME_menu.c | 4 +- alliance/src/xfsm/src/XME_panel.c | 15 +- alliance/src/xfsm/src/XME_panel.h | 1 + alliance/src/xfsm/src/XME_search.c | 3 + alliance/src/xfsm/src/XME_select.c | 2 + alliance/src/xfsm/src/XME_select.h | 3 + alliance/src/xfsm/src/XMF_file.c | 2 + alliance/src/xfsm/src/XMF_menu.c | 6 +- alliance/src/xfsm/src/XMF_panel.c | 1 + alliance/src/xfsm/src/XMH_menu.c | 4 +- alliance/src/xfsm/src/XMH_panel.c | 1 + alliance/src/xfsm/src/XMS_menu.c | 4 +- alliance/src/xfsm/src/XMS_panel.c | 6 +- alliance/src/xfsm/src/XMS_setup.c | 15 +- alliance/src/xfsm/src/XMT_menu.c | 4 +- alliance/src/xfsm/src/XMT_panel.c | 5 +- alliance/src/xfsm/src/XMV_menu.c | 5 +- alliance/src/xfsm/src/XMV_panel.c | 20 +- alliance/src/xfsm/src/XMV_panel.h | 1 + alliance/src/xfsm/src/XMV_view.c | 1 + alliance/src/xfsm/src/XMX.h | 4 +- alliance/src/xfsm/src/XMX_color.c | 3 - alliance/src/xfsm/src/XMX_color.h | 2 + alliance/src/xfsm/src/XMX_cursor.c | 12 +- alliance/src/xfsm/src/XMX_dialog.c | 1 + alliance/src/xfsm/src/XMX_event.c | 37 +-- alliance/src/xfsm/src/XMX_graphic.h | 1 + alliance/src/xfsm/src/XMX_grid.h | 3 + alliance/src/xfsm/src/XMX_menu.c | 4 +- alliance/src/xfsm/src/XMX_message.c | 2 +- alliance/src/xfsm/src/XMX_motif.c | 3 + alliance/src/xfsm/src/XMX_view.c | 4 + alliance/src/xfsm/src/XSB_error.h | 2 + alliance/src/xfsm/src/XSB_parse.c | 18 +- alliance/src/xfsm/src/XTB_cursor.c | 3 +- alliance/src/xfsm/src/XTB_dialog.c | 3 +- alliance/src/xfsm/src/XTB_dialog.h | 2 + alliance/src/xfsm/src/xfsm.c | 1 + alliance/src/xgra/src/XGR_error.c | 1 + alliance/src/xgra/src/XGR_error.h | 1 + alliance/src/xgra/src/XGR_graph.c | 1 + alliance/src/xgra/src/XGR_place.c | 4 - alliance/src/xgra/src/XME_dialog.c | 1 + alliance/src/xgra/src/XME_edit.c | 7 +- alliance/src/xgra/src/XME_menu.c | 4 +- alliance/src/xgra/src/XME_panel.c | 17 +- alliance/src/xgra/src/XME_search.c | 1 + alliance/src/xgra/src/XME_select.c | 1 + alliance/src/xgra/src/XME_select.h | 4 + alliance/src/xgra/src/XMF_menu.c | 6 +- alliance/src/xgra/src/XMF_panel.c | 7 +- alliance/src/xgra/src/XMF_panel.h | 1 + alliance/src/xgra/src/XMH_menu.c | 4 +- alliance/src/xgra/src/XMH_panel.c | 1 + alliance/src/xgra/src/XMS_menu.c | 4 +- alliance/src/xgra/src/XMS_panel.c | 6 +- alliance/src/xgra/src/XMS_setup.c | 15 +- alliance/src/xgra/src/XMT_menu.c | 4 +- alliance/src/xgra/src/XMT_panel.c | 5 +- alliance/src/xgra/src/XMV_map.c | 6 - alliance/src/xgra/src/XMV_menu.c | 5 +- alliance/src/xgra/src/XMV_panel.c | 16 +- alliance/src/xgra/src/XMV_panel.h | 1 + alliance/src/xgra/src/XMV_view.c | 1 + alliance/src/xgra/src/XMX.h | 4 +- alliance/src/xgra/src/XMX_color.c | 1 - alliance/src/xgra/src/XMX_cursor.c | 16 +- alliance/src/xgra/src/XMX_cursor.h | 4 +- alliance/src/xgra/src/XMX_event.c | 32 ++- alliance/src/xgra/src/XMX_graphic.h | 1 + alliance/src/xgra/src/XMX_grid.c | 3 + alliance/src/xgra/src/XMX_grid.h | 3 + alliance/src/xgra/src/XMX_menu.c | 4 +- alliance/src/xgra/src/XMX_message.c | 2 +- alliance/src/xgra/src/XMX_motif.c | 2 + alliance/src/xgra/src/XMX_view.c | 10 +- alliance/src/xgra/src/XMX_view.h | 4 +- alliance/src/xgra/src/XSB_error.h | 2 + alliance/src/xgra/src/XSB_parse.c | 24 +- alliance/src/xgra/src/XTB_cursor.c | 3 +- alliance/src/xgra/src/XTB_dialog.c | 2 +- alliance/src/xgra/src/XTB_dialog.h | 2 + alliance/src/xgra/src/xgra.c | 1 + alliance/src/xpat/src/XME_dialog.c | 1 + alliance/src/xpat/src/XME_edit.c | 13 +- alliance/src/xpat/src/XME_menu.c | 4 +- alliance/src/xpat/src/XME_panel.c | 15 +- alliance/src/xpat/src/XME_search.c | 3 + alliance/src/xpat/src/XME_select.c | 3 +- alliance/src/xpat/src/XME_select.h | 4 + alliance/src/xpat/src/XMF_file.c | 2 + alliance/src/xpat/src/XMF_menu.c | 6 +- alliance/src/xpat/src/XMF_panel.c | 1 + alliance/src/xpat/src/XMH_menu.c | 4 +- alliance/src/xpat/src/XMH_panel.c | 1 + alliance/src/xpat/src/XMS_menu.c | 4 +- alliance/src/xpat/src/XMS_panel.c | 6 +- alliance/src/xpat/src/XMS_setup.c | 17 +- alliance/src/xpat/src/XMT_menu.c | 4 +- alliance/src/xpat/src/XMT_panel.c | 5 +- alliance/src/xpat/src/XMV_map.c | 6 - alliance/src/xpat/src/XMV_menu.c | 5 +- alliance/src/xpat/src/XMV_panel.c | 21 +- alliance/src/xpat/src/XMV_panel.h | 1 + alliance/src/xpat/src/XMV_view.c | 1 + alliance/src/xpat/src/XMX.h | 4 +- alliance/src/xpat/src/XMX_color.c | 3 - alliance/src/xpat/src/XMX_cursor.c | 12 +- alliance/src/xpat/src/XMX_cursor.h | 4 +- alliance/src/xpat/src/XMX_dialog.c | 1 + alliance/src/xpat/src/XMX_event.c | 18 +- alliance/src/xpat/src/XMX_graphic.h | 1 + alliance/src/xpat/src/XMX_grid.c | 3 + alliance/src/xpat/src/XMX_grid.h | 3 + alliance/src/xpat/src/XMX_menu.c | 4 +- alliance/src/xpat/src/XMX_message.c | 2 +- alliance/src/xpat/src/XMX_motif.c | 3 + alliance/src/xpat/src/XMX_view.c | 18 +- alliance/src/xpat/src/XPT_error.c | 2 +- alliance/src/xpat/src/XPT_error.h | 1 + alliance/src/xpat/src/XPT_pat.c | 15 +- alliance/src/xpat/src/XPT_pat.h | 1 + alliance/src/xpat/src/XPT_place.c | 8 +- alliance/src/xpat/src/XSB_error.h | 2 + alliance/src/xpat/src/XSB_parse.c | 24 +- alliance/src/xpat/src/XTB_cursor.c | 3 +- alliance/src/xpat/src/XTB_dialog.c | 3 +- alliance/src/xpat/src/XTB_dialog.h | 2 + alliance/src/xpat/src/xpat.c | 1 + alliance/src/xsch/src/XME_menu.c | 4 +- alliance/src/xsch/src/XME_panel.c | 12 +- alliance/src/xsch/src/XME_select.c | 1 + alliance/src/xsch/src/XMF_menu.c | 6 +- alliance/src/xsch/src/XMH_menu.c | 4 +- alliance/src/xsch/src/XMH_panel.c | 18 +- alliance/src/xsch/src/XMS_menu.c | 4 +- alliance/src/xsch/src/XMS_panel.c | 4 +- alliance/src/xsch/src/XMS_setup.c | 10 +- alliance/src/xsch/src/XMT_menu.c | 4 +- alliance/src/xsch/src/XMT_panel.c | 8 +- alliance/src/xsch/src/XMT_tools.c | 91 +++--- alliance/src/xsch/src/XMV_menu.c | 4 +- alliance/src/xsch/src/XMV_panel.c | 20 +- alliance/src/xsch/src/XMX_event.c | 3 - alliance/src/xsch/src/XMX_grid.c | 3 + alliance/src/xsch/src/XMX_menu.c | 4 +- alliance/src/xsch/src/XMX_view.c | 51 ++-- alliance/src/xsch/src/XSB_parse.c | 11 +- alliance/src/xsch/src/XSC_error.c | 1 + alliance/src/xsch/src/XSC_place.c | 2 +- alliance/src/xsch/src/XTB_dialog.c | 2 +- alliance/src/xsch/src/icone.c | 3 +- alliance/src/xsch/src/xsch.c | 2 + alliance/src/xvpn/src/XMF_menu.c | 2 +- alliance/src/xvpn/src/XMS_setup.c | 10 +- alliance/src/xvpn/src/XMV_map.c | 6 - alliance/src/xvpn/src/XMV_panel.c | 5 +- alliance/src/xvpn/src/XMX_color.h | 1 + alliance/src/xvpn/src/XMX_event.c | 3 - alliance/src/xvpn/src/XMX_grid.c | 3 + alliance/src/xvpn/src/XMX_motif.c | 1 + alliance/src/xvpn/src/XMX_motif.h | 2 + alliance/src/xvpn/src/XSB_parse.c | 8 +- alliance/src/xvpn/src/XTB_dialog.c | 2 +- alliance/src/xvpn/src/xvpn.c | 2 + dev/scripts/cppcheck.sh | 31 +++ 641 files changed, 3476 insertions(+), 3170 deletions(-) create mode 100644 alliance/src/asimut/src/vh_init.h diff --git a/.gitignore b/.gitignore index 8f47a8e4..cff00806 100644 --- a/.gitignore +++ b/.gitignore @@ -11,5 +11,13 @@ install-sh ltmain.sh missing depcomp +alliance/src/configure.in dev/scripts/cppcheck/* +*.eps +*.aux +*.dvi +*.pdf +*.log +*.lst +archives/ diff --git a/alliance/src/abe/src/beh_rmv.c b/alliance/src/abe/src/beh_rmv.c index a6e1293e..6cfa2444 100644 --- a/alliance/src/abe/src/beh_rmv.c +++ b/alliance/src/abe/src/beh_rmv.c @@ -57,7 +57,7 @@ char mode; /* recursive delete or not (Y or N) */ { struct beaux headaux; - struct beaux *ptlastaux; + struct beaux *ptlastaux = NULL; struct beaux *ptbeaux; if (listbeaux != NULL) @@ -131,7 +131,7 @@ char mode; /* recursive delete or not (Y or N) */ { struct bebus headbus; - struct bebus *ptlastbus; + struct bebus *ptlastbus = NULL; struct bebus *ptbebus; if (listbebus != NULL) @@ -210,7 +210,7 @@ char mode; /* recursive delete or not (Y or N) */ { struct bebux headbux; - struct bebux *ptlastbux; + struct bebux *ptlastbux = NULL; struct bebux *ptbebux; if (listbebux != NULL) @@ -292,7 +292,7 @@ char mode; /* recursive delete or not (Y or N) */ { struct befig headfig; - struct befig *ptlastfig; + struct befig *ptlastfig = NULL; struct befig *ptbefig; struct ptype *ptptype; @@ -395,7 +395,7 @@ char mode; /* recursive delete or not (Y or N) */ { struct begen headgen; - struct begen *ptlastgen; + struct begen *ptlastgen = NULL; struct begen *ptbegen; if (listbegen != NULL) @@ -470,7 +470,7 @@ char mode; /* recursive delete or not (Y or N) */ { struct bemsg headmsg; - struct bemsg *ptlastmsg; + struct bemsg *ptlastmsg = NULL; struct bemsg *ptbemsg; if (listbemsg != NULL) @@ -545,7 +545,7 @@ char mode; /* recursive delete or not (Y or N) */ { struct beout headout; - struct beout *ptlastout; + struct beout *ptlastout = NULL; struct beout *ptbeout; if (listbeout != NULL) @@ -618,7 +618,7 @@ char *beporname; /* name of the BEPOR to be deleted */ { struct bepor headpor; - struct bepor *ptlastpor; + struct bepor *ptlastpor = NULL; struct bepor *ptbepor; if (listbepor != NULL) @@ -681,7 +681,7 @@ char mode; /* recursive delete or not (Y or N) */ { struct bereg headreg; - struct bereg *ptlastreg; + struct bereg *ptlastreg = NULL; struct bereg *ptbereg; if (listbereg != NULL) @@ -758,7 +758,7 @@ char *berinname; /* name of the BERIN to be deleted */ { struct berin headrin; - struct berin *ptlastrin; + struct berin *ptlastrin = NULL; struct berin *ptberin; if (listberin != NULL) diff --git a/alliance/src/abe/src/main.c b/alliance/src/abe/src/main.c index bcde9852..385b360f 100644 --- a/alliance/src/abe/src/main.c +++ b/alliance/src/abe/src/main.c @@ -112,8 +112,8 @@ int main( argc, argv ) int FlagVerbose = 0; int FlagSave = 0; int FlagDisplay = 0; - int FlagErase = 0; - int FlagBdd = 0; +/*int FlagErase = 0;*/ +/*int FlagBdd = 0;*/ mbkenv(); autenv(); @@ -135,9 +135,9 @@ int main( argc, argv ) switch ( Option ) { - case 'E' : FlagErase = 1; + case 'E' : /*FlagErase = 1;*/ break; - case 'B' : FlagBdd = 1; + case 'B' : /*FlagBdd = 1;*/ break; case 'D' : FlagDisplay = 1; break; diff --git a/alliance/src/abl/src/main.c b/alliance/src/abl/src/main.c index ae984fcb..ad6513a3 100644 --- a/alliance/src/abl/src/main.c +++ b/alliance/src/abl/src/main.c @@ -106,7 +106,6 @@ int main( argc, argv ) char **argv; { ablexpr *Expr1; - ablexpr *Expr2; mbkenv(); autenv(); diff --git a/alliance/src/abt/src/bhl_makgex.c b/alliance/src/abt/src/bhl_makgex.c index 38ec47cc..1a0c0178 100644 --- a/alliance/src/abt/src/bhl_makgex.c +++ b/alliance/src/abt/src/bhl_makgex.c @@ -354,7 +354,6 @@ struct begex *gexpnt; case ABL_NOR : case ABL_NXOR : freflag = 1; break; - break; } } @@ -370,13 +369,10 @@ struct begex *gexpnt; case ABL_NAND : case ABL_AND : freflag = 1; break; - break; case ABL_XOR : gexpnt->TERM = ABL_NXOR; freflag = 1; break; - break; case ABL_NXOR : gexpnt->TERM = ABL_XOR ; freflag = 1; break; - break; } } @@ -465,10 +461,10 @@ struct chain *expr; { char delayed [128]; - static char *str_zero = NULL; - static char *str_dc = NULL; - static char *str_one = NULL; - struct begex *resgex ; + static char *str_zero = NULL; + static char *str_dc = NULL; + static char *str_one = NULL; + struct begex *resgex = NULL; struct begex *gex_elt ; struct chain *oper_list ; struct chain *operand ; diff --git a/alliance/src/abt/src/bhl_orderbdd.c b/alliance/src/abt/src/bhl_orderbdd.c index 63243b77..570d4e73 100644 --- a/alliance/src/abt/src/bhl_orderbdd.c +++ b/alliance/src/abt/src/bhl_orderbdd.c @@ -401,7 +401,7 @@ void bhl_orderbdd( BehFigure, AuxFlag, OrderFlag ) BehReg = BehReg->NEXT; } - BehRin = BehFigure->BERIN; +/*BehRin = BehFigure->BERIN;*/ # ifdef BHL_ORDER_DEBUG viewauthtable( BhlHashTableOrder, viewauthelem ); diff --git a/alliance/src/abv/src/bvl_bcomp_l.l b/alliance/src/abv/src/bvl_bcomp_l.l index 51d7aa64..bbcc0e0b 100644 --- a/alliance/src/abv/src/bvl_bcomp_l.l +++ b/alliance/src/abv/src/bvl_bcomp_l.l @@ -1,3 +1,7 @@ + +%option noinput +%option nounput + /*------------------------------------------------------------\ | | | This file is part of the Alliance CAD System Copyright | diff --git a/alliance/src/abv/src/bvl_bcomp_y.y b/alliance/src/abv/src/bvl_bcomp_y.y index 1cd32721..5a8faa4f 100644 --- a/alliance/src/abv/src/bvl_bcomp_y.y +++ b/alliance/src/abv/src/bvl_bcomp_y.y @@ -49,6 +49,10 @@ #include "bvl_util.h" #include "bvl_byacc.h" #include "bvl_bedef.h" +#include "bvl_bspec.h" + +extern int yylex ( ); +extern void yyerror ( ); %} @@ -300,7 +304,7 @@ design_file { if (beaux_pnt->ABL == NULL) { - fprintf (stderr,"`%s` Warning %d line %d :",BVL_CURFIL,40,BVL_LINNUM); + fprintf (stderr,"`%s` Warning %d line %ld :",BVL_CURFIL,40,BVL_LINNUM); fprintf (stderr,"signal `%s` never assigned\n",beaux_pnt->NAME); /*removing signal*/ @@ -1459,7 +1463,7 @@ choices Bar choice { - if ($3 == "others") + if (!strncmp($3,"others",7)) bvl_error (30,NULL); BVL_NM1LST = addchain (BVL_NM1LST ,$3); } @@ -2039,8 +2043,8 @@ short right ) char auxflg = 0; char buxflg = 0; char regflg = 0; - char lclmod; - char lcltyp; + char lclmod = 0; + char lcltyp = 0; char extname[100]; short i; short inc = 1; diff --git a/alliance/src/abv/src/bvl_bspec.c b/alliance/src/abv/src/bvl_bspec.c index 52a1a7f6..2c57568c 100644 --- a/alliance/src/abv/src/bvl_bspec.c +++ b/alliance/src/abv/src/bvl_bspec.c @@ -114,7 +114,7 @@ short right; /* array's right bound (= -1 if scalar) */ { for (i=left ; i!=(right+inc) ; i+=inc) { - sprintf (extname,"%s %d",(char *)ptauxnam->DATA,i); + sprintf (extname,"%s %ld",(char *)ptauxnam->DATA,i); name = namealloc(extname); if (ptauxnat != NULL) { @@ -213,11 +213,13 @@ long right ) char lcl_buffer[256]; long inc; long i; +#if 0 char true_flag_un = 0; char true_flag_zero = 0; struct chain *abl_un = createablatom("'1'"); struct chain *abl_zero = createablatom("'0'"); +#endif result.IDENT = NULL; result.LIST_ABL = NULL; result.WIDTH = 0; @@ -273,7 +275,7 @@ long right ) for (i=left ; i!=(right+inc) ; i+=inc) { - sprintf (name,"%s %i",expr1.IDENT,i); + sprintf (name,"%s %li",expr1.IDENT,i); name2 = namealloc (name); result.LIST_ABL = addchain (result.LIST_ABL,createablatom(name2)); } @@ -770,7 +772,7 @@ bvl_ablstr pt_ablstr ) /* tested expression */ { for (; last_widthDATA); ---------*/ diff --git a/alliance/src/abv/src/bvl_drive.c b/alliance/src/abv/src/bvl_drive.c index 6fd4b862..cc52afc3 100644 --- a/alliance/src/abv/src/bvl_drive.c +++ b/alliance/src/abv/src/bvl_drive.c @@ -67,14 +67,14 @@ long trace_mode; { char *suffix; char *str; - char *mode; - char *type_mark; - long nrlabel = 0; + char *mode = NULL; + char *type_mark = NULL; + long nrlabel = 0; FILE *fd; time_t clock; - long left,right; + long left,right; char *name; - char *bus; + char *bus = NULL; struct begen *ptgeneric = NULL; /* current ptype pnt (generic) */ struct bereg *ptbereg = NULL; /* current BEREG pointer */ @@ -192,7 +192,7 @@ long trace_mode; default : beh_error (68, ptbepor->NAME); } - (void)fprintf(fd," %s : %s %s(%d %s %d) %s",vhdlablname(name), mode, + (void)fprintf(fd," %s : %s %s(%ld %s %ld) %s",vhdlablname(name), mode, type_mark, left, (left>=right)?"DOWNTO":"TO",right,bus); } else @@ -245,7 +245,7 @@ long trace_mode; ptbereg = (bereg_list *)bvl_vectnam(ptbereg,&left,&right,&name,2); if(left != -1) { - (void)fprintf(fd," SIGNAL %s : REG_VECTOR(%d %s %d) REGISTER;\t-- %s\n", + (void)fprintf(fd," SIGNAL %s : REG_VECTOR(%ld %s %ld) REGISTER;\t-- %s\n", vhdlablname(name),left,(left>=right)?"DOWNTO":"TO", right,name); } @@ -278,7 +278,7 @@ long trace_mode; type_mark = namealloc("MUX_VECTOR"); break; } - (void)fprintf(fd," SIGNAL %s : %s(%d %s %d) BUS;\t-- %s\n", + (void)fprintf(fd," SIGNAL %s : %s(%ld %s %ld) BUS;\t-- %s\n", vhdlablname(name),type_mark,left,(left>=right)?"DOWNTO":"TO", right,name); } @@ -307,7 +307,7 @@ long trace_mode; ptbeaux = (beaux_list *)bvl_vectnam(ptbeaux,&left,&right,&name,3); if(left != -1) { - (void)fprintf(fd," SIGNAL %s : BIT_VECTOR(%d %s %d);\t-- %s\n", + (void)fprintf(fd," SIGNAL %s : BIT_VECTOR(%ld %s %ld);\t-- %s\n", vhdlablname(name),left,(left>=right)?"DOWNTO":"TO", right,name); } @@ -389,7 +389,7 @@ long trace_mode; ptbiabl = ptbereg->BIABL; while (ptbiabl != NULL) { - (void) fprintf (fd," label%d : BLOCK ",nrlabel); + (void) fprintf (fd," label%ld : BLOCK ",nrlabel); if (ptbiabl->CNDABL != NULL) { (void) fprintf (fd,"(" ); @@ -419,7 +419,7 @@ long trace_mode; else beh_toolbug (20,"bvl_decomp",ptbereg->NAME,0); - (void) fprintf ( fd," END BLOCK label%d;\n",nrlabel); + (void) fprintf ( fd," END BLOCK label%ld;\n",nrlabel); ptbiabl = ptbiabl->NEXT; nrlabel++; } @@ -438,7 +438,7 @@ long trace_mode; ptbiabl = ptbebux->BIABL; while (ptbiabl != NULL) { - (void) fprintf (fd," label%d : BLOCK (",nrlabel); + (void) fprintf (fd," label%ld : BLOCK (",nrlabel); if (ptbiabl->CNDABL != NULL) { bvl_printablfile( fd, ptbiabl->CNDABL ); @@ -468,7 +468,7 @@ long trace_mode; else beh_toolbug (20,"bvl_decomp",ptbebux->NAME,0); - (void) fprintf (fd," END BLOCK label%d;\n",nrlabel); + (void) fprintf (fd," END BLOCK label%ld;\n",nrlabel); ptbiabl = ptbiabl->NEXT; nrlabel++; } @@ -487,7 +487,7 @@ long trace_mode; ptbiabl = ptbebus->BIABL; while (ptbiabl != NULL) { - (void) fprintf (fd,"\tlabel%d : BLOCK (",nrlabel); + (void) fprintf (fd,"\tlabel%ld : BLOCK (",nrlabel); if (ptbiabl->CNDABL != NULL) { bvl_printablfile ( fd, ptbiabl->CNDABL ); @@ -516,7 +516,7 @@ long trace_mode; else beh_toolbug (20,"bvl_decomp",ptbebus->NAME,0); - (void) fprintf (fd,"\tEND BLOCK label%d;\n",nrlabel); + (void) fprintf (fd,"\tEND BLOCK label%ld;\n",nrlabel); ptbiabl = ptbiabl->NEXT; nrlabel++; } diff --git a/alliance/src/abv/src/bvl_util.c b/alliance/src/abv/src/bvl_util.c index 6e7f4ce8..f3a5d79d 100644 --- a/alliance/src/abv/src/bvl_util.c +++ b/alliance/src/abv/src/bvl_util.c @@ -55,7 +55,7 @@ void bvl_error ( long code, char *str1 ) { BVL_ERRFLG++; - (void)fprintf (stderr,"`%s` Error %d line %d :",BVL_CURFIL,code,BVL_LINNUM); + (void)fprintf (stderr,"`%s` Error %ld line %ld :",BVL_CURFIL,code,BVL_LINNUM); switch (code) { @@ -194,7 +194,7 @@ void bvl_y_error (str) char *str; { BVL_ERRFLG++; - (void)fprintf (stderr,"`%s` Error line %d : %s\n",BVL_CURFIL,BVL_LINNUM,str); + (void)fprintf (stderr,"`%s` Error line %ld : %s\n",BVL_CURFIL,BVL_LINNUM,str); } /* ###--------------------------------------------------------------### */ diff --git a/alliance/src/abv/src/main.c b/alliance/src/abv/src/main.c index ef2c2150..51fe20e0 100644 --- a/alliance/src/abv/src/main.c +++ b/alliance/src/abv/src/main.c @@ -66,8 +66,6 @@ int main( argc, argv ) char Option; long Value; - int FlagVerbose = 0; - mbkenv(); autenv(); ablenv(); @@ -88,7 +86,7 @@ int main( argc, argv ) switch ( Option ) { - case 'V' : FlagVerbose = 1; + case 'V' : break; default : BvlUsage(); } diff --git a/alliance/src/alcban/src/alcbanner.c b/alliance/src/alcban/src/alcbanner.c index 9b1058c1..7883d42a 100644 --- a/alliance/src/alcban/src/alcbanner.c +++ b/alliance/src/alcban/src/alcbanner.c @@ -119,10 +119,10 @@ main (argc, argv) int parsed_option; int arguments_left; - char * ToolName; - char * ToolVersion; - char * ToolPurpose; - char * ToolDate; + char * ToolName = NULL; + char * ToolVersion = NULL; + char * ToolPurpose = NULL; + char * ToolDate = NULL; diff --git a/alliance/src/asimut/src/Makefile.am b/alliance/src/asimut/src/Makefile.am index 99649b64..808219c9 100644 --- a/alliance/src/asimut/src/Makefile.am +++ b/alliance/src/asimut/src/Makefile.am @@ -48,10 +48,10 @@ asimut_LDADD = \ -lMlu \ -lMal \ -lMcl -lMel -lMhl -lMgl -lMsl \ - -lMvg -lMlo -lRcn -lBvl -lBeh -lPpt -lPhl -lPat -lLog -lMut + -lMvg -lMlo -lRcn -lBvl -lBhl -lBeh -lPpt -lPhl -lPat -lLog -lMut asimut_SOURCES = \ -beh_delay.h c_fsyn_sr1k_56.c vh_debug.c vh_lspec.c vh_util.h \ +beh_delay.h c_fsyn_sr1k_56.c vh_debug.c vh_lspec.c vh_util.h vh_init.h \ beh_setdelay.c c_fsyn_sr4k_10.c vh_debug.h vh_lspec.h vh_xcomm.c \ c_fsyn_sr1k_10.c c_hada_repondeur.c vh_dtype.h vh_ltype.h vh_xcomm.h \ c_fsyn_sr1k_1.c c_sr1k_8a.c vh_globals.c vh_simulad.c vh_xspec.c \ diff --git a/alliance/src/asimut/src/beh_delay.h b/alliance/src/asimut/src/beh_delay.h index 956bf8cf..ade2ae46 100644 --- a/alliance/src/asimut/src/beh_delay.h +++ b/alliance/src/asimut/src/beh_delay.h @@ -1,24 +1,31 @@ /* ###--------------------------------------------------------------### */ -/* file : beh_delay.h */ -/* date : Oct 30 1995 */ -/* version : v109 */ -/* author : Pirouz BAZARGAN SABET & Julien DUNOYER */ -/* contents : defines delay definitions used in BEH library */ +/* file : beh_delay.h */ +/* date : Oct 30 1995 */ +/* version : v109 */ +/* author : Pirouz BAZARGAN SABET & Julien DUNOYER */ +/* contents : defines delay definitions used in BEH library */ /* ###--------------------------------------------------------------### */ - /* ###------------------------------------------------------### */ - /* defines */ - /* ###------------------------------------------------------### */ + /* ###------------------------------------------------------### */ + /* defines */ + /* ###------------------------------------------------------### */ -#define BEH_DELAY_FIXED 0x01 /* Fixed delay behavior */ -#define BEH_DELAY_RANDOM 0x02 /* Random delay behavior */ -#define BEH_DELAY_BACKANOTATED 0x04 /* Backanotated delay behavior */ -#define BEH_DELAY_BUFREG 0x08 /* Add Buffer delay after reg */ -#define BEH_DELAY_DEFAULT 0x10 /* Default delay behavior */ -#define BEH_DELAY_MIN 0x20 /* Minimum delay mode */ -#define BEH_DELAY_MAX 0x40 /* Maximum delay mode */ -#define BEH_DELAY_TYP 0x80 /* Typical delay mode */ +#define BEH_DELAY_FIXED 0x01 /* Fixed delay behavior */ +#define BEH_DELAY_RANDOM 0x02 /* Random delay behavior */ +#define BEH_DELAY_BACKANOTATED 0x04 /* Backanotated delay behavior */ +#define BEH_DELAY_BUFREG 0x08 /* Add Buffer delay after reg */ +#define BEH_DELAY_DEFAULT 0x10 /* Default delay behavior */ +#define BEH_DELAY_MIN 0x20 /* Minimum delay mode */ +#define BEH_DELAY_MAX 0x40 /* Maximum delay mode */ +#define BEH_DELAY_TYP 0x80 /* Typical delay mode */ -#define BEH_DELAY_FIELD 7 /* delay dico field */ +#define BEH_DELAY_FIELD 7 /* delay dico field */ + /* ###------------------------------------------------------### */ + /* functions */ + /* ###------------------------------------------------------### */ + +extern char beh_backdelay (); +extern void beh_setdelay (); +extern void beh_chkregdly (); diff --git a/alliance/src/asimut/src/beh_setdelay.c b/alliance/src/asimut/src/beh_setdelay.c index e0ff12ac..1fde6a51 100644 --- a/alliance/src/asimut/src/beh_setdelay.c +++ b/alliance/src/asimut/src/beh_setdelay.c @@ -123,7 +123,7 @@ unsigned char mode; char new_name [256]; char *name ; char error_flag ; - unsigned int time = 0 ; + unsigned int time = 0 ; /* ###------------------------------------------------------### */ /* create a dictionary that will associate to each element */ @@ -305,7 +305,7 @@ unsigned char mode; pt_binode = pt_binode->NEXT; } - printf("WARNING : Buffer %s with delay %d %s is created after register %s.\n", + printf("WARNING : Buffer %s with delay %u %s is created after register %s.\n", name, time, beh_gettimeunit(pt_fig->TIME_UNIT), pt_reg->NAME); } @@ -331,7 +331,7 @@ unsigned char mode; pt_binode = pt_binode->NEXT; } - printf("WARNING : Register %s with delay %d %s becomes a null-delay Register.\n", + printf("WARNING : Register %s with delay %u %s becomes a null-delay Register.\n", pt_reg->NAME, time, beh_gettimeunit(pt_fig->TIME_UNIT)); } @@ -343,7 +343,7 @@ unsigned char mode; if (mode == 0) { - printf("WARNING : Register %s with delay %d %s becomes a null-delay Register.\n", + printf("WARNING : Register %s with delay %u %s becomes a null-delay Register.\n", pt_reg->NAME, time, beh_gettimeunit(pt_fig->TIME_UNIT)); } } @@ -426,7 +426,7 @@ unsigned char delay_mode; while ( fgets(line, 256, delay_file) != NULL) { - if ( sscanf( line, "%s : %d : %d : %d : %d", signame, + if ( sscanf( line, "%255s : %11d : %11d : %11d : %11d", signame, &typ_delay, &min_delay, &max_delay, &nbr_delay ) == 5 ) { if ((delay_mode & BEH_DELAY_MAX) == BEH_DELAY_MAX) @@ -436,7 +436,7 @@ unsigned char delay_mode; else if ((delay_mode & BEH_DELAY_TYP) == BEH_DELAY_TYP) beh_addtab (delay_dict, namealloc(signame), NULL, BEH_DELAY_FIELD, typ_delay); } - else if ( sscanf( line, "%s %d : %d : %d : %d : %d", vector_radical, &index, + else if ( sscanf( line, "%255s %11d : %11d : %11d : %11d : %11d", vector_radical, &index, &typ_delay, &min_delay, &max_delay, &nbr_delay ) == 6 ) { sprintf(signame, "%s %d", vector_radical, index); @@ -449,7 +449,7 @@ unsigned char delay_mode; } else { - sscanf( line, "%s", signame ); + sscanf( line, "%255s", signame ); printf("WARNING : invalid line in file %s.%s : \n",delay_filename,(char *)(suffix->DATA)); printf(" : %s\n", line); } diff --git a/alliance/src/asimut/src/c_hada_repondeur.c b/alliance/src/asimut/src/c_hada_repondeur.c index 32185a59..30f82221 100644 --- a/alliance/src/asimut/src/c_hada_repondeur.c +++ b/alliance/src/asimut/src/c_hada_repondeur.c @@ -15,6 +15,7 @@ #include "vh_ltype.h" #include "vh_xspec.h" +#include "vh_xcomm.h" #define MAX 64 #define ENTREE "fic_entree" @@ -31,7 +32,6 @@ struct lkdins *pt_lkdins; #define PROB 900 static int deja_ouvert=0; - static int deja_ouvert2=0; static int nb_entrees=0; static int nb_sorties=0; static int ck_old=0; @@ -48,8 +48,6 @@ struct lkdins *pt_lkdins; char read ; char write ; int hadout; /* Entree sur 14 bits */ - char vdd ; - char vss ; char empty ; char full ; @@ -104,12 +102,12 @@ struct lkdins *pt_lkdins; { empty=0; full=0; - if (fscanf(fouvrir,"%d",&data) == EOF) + if (fscanf(fouvrir,"%11d",&data) == EOF) { rewind(fouvrir); - fscanf(fouvrir,"%d",&data); + fscanf(fouvrir,"%11d",&data); } - fprintf(stderr,"NEW INPUT FIFO VALUE : %d\n", data); + fprintf(stderr,"NEW INPUT FIFO VALUE : %u\n", data); vhx_writeout(data,pt_lkdins,POSO_data,8); nb_entrees--; } @@ -132,12 +130,12 @@ struct lkdins *pt_lkdins; if ((empty_old == 0) && (read == 1) && (nb_entrees != 0)) { - if (fscanf(fouvrir,"%d",&data) == EOF) + if (fscanf(fouvrir,"%11d",&data) == EOF) { rewind(fouvrir); - fscanf(fouvrir,"%d",&data); + fscanf(fouvrir,"%11d",&data); } - fprintf(stderr,"NEW INPUT FIFO VALUE : %d\n", data); + fprintf(stderr,"NEW INPUT FIFO VALUE : %u\n", data); vhx_writeout(data,pt_lkdins,POSO_data,8); nb_entrees--; } @@ -147,12 +145,12 @@ struct lkdins *pt_lkdins; fprintf(stderr,"NEW OUPUT FIFO VALUE : %d\n", hadout); fprintf(fecrire,"0x%x\t",hadout); nb_sorties--; - if ( (nb_sorties%8) == 0 ) fprintf(fecrire,"\n",hadout); + if ( (nb_sorties%8) == 0 ) fprintf(fecrire,"\n"); if ( (nb_sorties == 0)) { nb_entrees=MAX; - fprintf(fecrire,"\n",hadout); + fprintf(fecrire,"\n"); fflush(fecrire); } } diff --git a/alliance/src/asimut/src/c_sr1k_8a.c b/alliance/src/asimut/src/c_sr1k_8a.c index 88dbb124..65902549 100644 --- a/alliance/src/asimut/src/c_sr1k_8a.c +++ b/alliance/src/asimut/src/c_sr1k_8a.c @@ -45,10 +45,8 @@ struct lkdins *pt_lkdins; { char e_n ; /* chip select */ char w_n ; /* write enable */ - unsigned int dat ; /* input-output 8-bit data */ + unsigned int dat = 0; /* input-output 8-bit data */ unsigned int adr ; /* 10-bit address */ - char vdd ; /* power supply */ - char vss ; /* power supply */ #define POSI_vss 0 #define POSI_vdd POSI_vss + 1 diff --git a/alliance/src/asimut/src/c_sr1k_8b.c b/alliance/src/asimut/src/c_sr1k_8b.c index 9b57ac06..72017e39 100644 --- a/alliance/src/asimut/src/c_sr1k_8b.c +++ b/alliance/src/asimut/src/c_sr1k_8b.c @@ -58,10 +58,8 @@ unsigned int *byt_pnt ; { unsigned int state = 0; unsigned int i = 0; - unsigned int j = 0; unsigned int l_idx = 0; unsigned int adr = 0; - unsigned int byt = 0; strcpy (fil_name, name); @@ -151,7 +149,7 @@ unsigned char *pt_mem ; exit (1); } - printf ("loading RAM initialization file: %s.ini , %.8x , %d\n", + printf ("loading RAM initialization file: %s.ini , %.8x , %u\n", fil_name, fil_addr, fil_byte); @@ -208,10 +206,8 @@ struct lkdins *pt_lkdins; { char e_n ; /* chip select */ char w_n ; /* write enable */ - unsigned int dat ; /* input-output 8-bit data */ + unsigned int dat = 0; /* input-output 8-bit data */ unsigned int adr ; /* 10-bit address */ - char vdd ; /* power supply */ - char vss ; /* power supply */ #define POSI_vss 0 #define POSI_vdd POSI_vss + 1 diff --git a/alliance/src/asimut/src/c_sr8k_8a.c b/alliance/src/asimut/src/c_sr8k_8a.c index 57d2477e..dc583109 100644 --- a/alliance/src/asimut/src/c_sr8k_8a.c +++ b/alliance/src/asimut/src/c_sr8k_8a.c @@ -45,10 +45,8 @@ struct lkdins *pt_lkdins; { char e_n ; /* chip select */ char w_n ; /* write enable */ - unsigned int dat ; /* input-output 8-bit data */ + unsigned int dat = 0; /* input-output 8-bit data */ unsigned int adr ; /* 13-bit address */ - char vdd ; /* power supply */ - char vss ; /* power supply */ #define POSI_vss 0 #define POSI_vdd POSI_vss + 1 diff --git a/alliance/src/asimut/src/sch.h b/alliance/src/asimut/src/sch.h index 2ff47741..869ab8f4 100644 --- a/alliance/src/asimut/src/sch.h +++ b/alliance/src/asimut/src/sch.h @@ -100,11 +100,12 @@ extern void sch_insentry (); extern void sch_inswave (); extern struct shdul *sch_CreateScheduler (); -extern void sch_AddTranscation (); +extern void sch_AddTransaction (); extern struct shtra *sch_GetCurrentTransactions (); extern int sch_GotoNextTime (); extern int sch_GetNextTime (); extern void sch_FreeTransactions (); extern unsigned int sch_GetCurrentTime (); +extern void sch_SetCurrentTime (); #endif diff --git a/alliance/src/asimut/src/sch_GetCTra.c b/alliance/src/asimut/src/sch_GetCTra.c index a5d74a37..1c5bed2d 100644 --- a/alliance/src/asimut/src/sch_GetCTra.c +++ b/alliance/src/asimut/src/sch_GetCTra.c @@ -47,7 +47,7 @@ struct shdul *pt_shdul; pt_shtra = pt_shent->TRANS [wind_offset]; if (pt_shtra == NULL) { - printf ("sch_bug amar 2 : %x\n", pt_shtra); + printf ("sch_bug amar 2 : %x\n", (unsigned int)pt_shtra); sch_bug (1, "sch_GetCurrentTranscations", NULL); } else @@ -62,12 +62,12 @@ struct shdul *pt_shdul; pt_shwav = pt_shwav->NEXT; if ((pt_shwav == NULL) || (pt_shwav->TRANS != pt_shtra)) -{ -printf ("wav : %x, tra : %x\n", pt_shwav->TRANS, pt_shtra); -sch_debug (pt_shtra, "shtra"); -sch_debug (pt_shwav, "shwav"); + { + printf ("wav : %x, tra : %x\n", (unsigned int)pt_shwav->TRANS, (unsigned int)pt_shtra); + sch_debug (pt_shtra, "shtra"); + sch_debug (pt_shwav, "shwav"); sch_bug (2, "sch_GetCurrentTranscations", NULL); -} + } else pt_shwav->TRANS = pt_shtra->WAVE; diff --git a/alliance/src/asimut/src/sch_GetNTim.c b/alliance/src/asimut/src/sch_GetNTim.c index 099a02a1..2f148a16 100644 --- a/alliance/src/asimut/src/sch_GetNTim.c +++ b/alliance/src/asimut/src/sch_GetNTim.c @@ -25,7 +25,6 @@ struct shdul *pt_shdul; unsigned int *pt_date ; { - struct shtra *pt_shtra ; struct shent *pt_shent ; struct shent *pt_nxtent ; unsigned int min_window = 0; diff --git a/alliance/src/asimut/src/sch_debug.c b/alliance/src/asimut/src/sch_debug.c index 92df7064..f99016a6 100644 --- a/alliance/src/asimut/src/sch_debug.c +++ b/alliance/src/asimut/src/sch_debug.c @@ -8,6 +8,7 @@ /* ###--------------------------------------------------------------### */ #include +#include #include "mut.h" #include "sch.h" #include "sch_debug.h" @@ -227,24 +228,24 @@ char **str ; /* recognized strings */ { case s_DFN : if (pnt[i].dat != NULL) - printf ("%s", pnt[i].dat); + printf ("%s", (char*)pnt[i].dat); printf ("\n"); break; case f_DFN : - printf ("%f\n", pnt[i].imd); + printf ("%ld\n", pnt[i].imd); break; case u_DFN : - printf ("%u\n", pnt[i].imd); + printf ("%ld\n", pnt[i].imd); break; case c_DFN : - printf ("%c\n", pnt[i].imd); + printf ("%c\n", (char)pnt[i].imd); break; case d_DFN : - printf ("%d\n", pnt[i].imd); + printf ("%ld\n", pnt[i].imd); break; case l_DFN : @@ -252,7 +253,7 @@ char **str ; /* recognized strings */ break; case x_DFN : - printf ("0x%x\n", pnt[i].imd); + printf ("0x%x\n", (unsigned int)pnt[i].imd); break; } @@ -492,8 +493,6 @@ union value pnt ; int type ; { - char *lcl_str; - printf (" %-15s: ", str [type]); switch (type) { @@ -504,17 +503,17 @@ int type ; break; case float_DFN : - printf ("%f\n", pnt.imd); + printf ("%ld\n", pnt.imd); break; case character_DFN : - printf ("%c\n", pnt.imd); + printf ("%c\n", (char)pnt.imd); break; case short_DFN : case integer_DFN : case long_DFN : - printf ("0x%x\n", pnt.imd); + printf ("0x%x\n", (unsigned int)pnt.imd); break; default : @@ -535,8 +534,9 @@ void *head_pnt; /* structure's pointer */ char *type; /* structure's type */ { - char line [128]; /* buffer to read a cmd line */ - char buffer [128]; /* buffer to split the cmd line */ + size_t lline = 128; + char *line = NULL; /* buffer to read a cmd line */ + char buffer [lline]; /* buffer to split the cmd line */ char *words [ 10]; /* number of words on a line */ int nmbrs [ 10]; /* words translated into number */ @@ -544,9 +544,8 @@ char *type; /* structure's type */ int indxs [ 10]; /* index of words */ struct stack jtab [ 10]; /* list of memorized addresses */ - int idx, i; + int idx; int readflg = 0; - int code; unsigned int size; char *pntr = NULL; long pshtype; @@ -582,6 +581,7 @@ char *type; /* structure's type */ /* - search that words among recognized strings */ /* ###------------------------------------------------------### */ + line = (char*)malloc( lline*sizeof(char) ); words [0] = buffer; get_size (siz); @@ -831,7 +831,7 @@ char *type; /* structure's type */ printf ("\n\nCOMMAND > "); - gets (line); + getline (&line, &lline, stdin); if (strcmp (line ,".")) { wrdcnt = splitline (words, line); diff --git a/alliance/src/asimut/src/sch_debug.h b/alliance/src/asimut/src/sch_debug.h index 7a07372f..45330672 100644 --- a/alliance/src/asimut/src/sch_debug.h +++ b/alliance/src/asimut/src/sch_debug.h @@ -43,41 +43,41 @@ union value #define TYPE_DFN 0x0000ffff #define _back_DFN 0 -#define _exit_DFN _back_DFN + 1 -#define _jump_DFN _exit_DFN + 1 -#define _save_DFN _jump_DFN + 1 -#define _stop_DFN _save_DFN + 1 -#define _top_DFN _stop_DFN + 1 -#define _up_DFN _top_DFN + 1 -#define _display_DFN _up_DFN + 1 +#define _exit_DFN (_back_DFN + 1) +#define _jump_DFN (_exit_DFN + 1) +#define _save_DFN (_jump_DFN + 1) +#define _stop_DFN (_save_DFN + 1) +#define _top_DFN (_stop_DFN + 1) +#define _up_DFN (_top_DFN + 1) +#define _display_DFN (_up_DFN + 1) -#define character_DFN _display_DFN + 1 -#define short_DFN character_DFN + 1 -#define integer_DFN short_DFN + 1 -#define long_DFN integer_DFN + 1 -#define float_DFN long_DFN + 1 -#define void_DFN float_DFN + 1 -#define string_DFN void_DFN + 1 +#define character_DFN (_display_DFN + 1) +#define short_DFN (character_DFN + 1) +#define integer_DFN (short_DFN + 1) +#define long_DFN (integer_DFN + 1) +#define float_DFN (long_DFN + 1) +#define void_DFN (float_DFN + 1) +#define string_DFN (void_DFN + 1) -#define shdul_DFN string_DFN + 1 -#define shent_DFN shdul_DFN + 1 -#define shtra_DFN shent_DFN + 1 -#define shwav_DFN shtra_DFN + 1 +#define shdul_DFN (string_DFN + 1) +#define shent_DFN (shdul_DFN + 1) +#define shtra_DFN (shent_DFN + 1) +#define shwav_DFN (shtra_DFN + 1) -#define cond_DFN shwav_DFN + 1 -#define curtime_DFN cond_DFN + 1 -#define date_DFN curtime_DFN + 1 -#define flags_DFN date_DFN + 1 -#define ident_DFN flags_DFN + 1 -#define itable_DFN ident_DFN + 1 -#define label_DFN itable_DFN + 1 -#define next_DFN label_DFN + 1 -#define prev_DFN next_DFN + 1 -#define scdid_DFN prev_DFN + 1 -#define trans_DFN scdid_DFN + 1 -#define ttable_DFN trans_DFN + 1 -#define uflag_DFN ttable_DFN + 1 -#define valu_DFN uflag_DFN + 1 -#define wave_DFN valu_DFN + 1 +#define cond_DFN (shwav_DFN + 1) +#define curtime_DFN (cond_DFN + 1) +#define date_DFN (curtime_DFN + 1) +#define flags_DFN (date_DFN + 1) +#define ident_DFN (flags_DFN + 1) +#define itable_DFN (ident_DFN + 1) +#define label_DFN (itable_DFN + 1) +#define next_DFN (label_DFN + 1) +#define prev_DFN (next_DFN + 1) +#define scdid_DFN (prev_DFN + 1) +#define trans_DFN (scdid_DFN + 1) +#define ttable_DFN (trans_DFN + 1) +#define uflag_DFN (ttable_DFN + 1) +#define valu_DFN (uflag_DFN + 1) +#define wave_DFN (valu_DFN + 1) -#define MAXCMD_DFN wave_DFN + 1 +#define MAXCMD_DFN (wave_DFN + 1) diff --git a/alliance/src/asimut/src/vh_debug.c b/alliance/src/asimut/src/vh_debug.c index 1d6123e8..32ab290f 100644 --- a/alliance/src/asimut/src/vh_debug.c +++ b/alliance/src/asimut/src/vh_debug.c @@ -8,6 +8,7 @@ /* ###--------------------------------------------------------------### */ #include +#include #include "mut.h" #include "mlo.h" #include "log.h" @@ -16,6 +17,7 @@ #include "sch.h" #include "vh_ltype.h" #include "vh_debug.h" +#include "vh_util.h" /* ###--------------------------------------------------------------### */ @@ -1478,7 +1480,7 @@ int *indxs ; /* words' index in strgs table */ for (i=0 ; i "); - gets (line); + getline (&line, &lline, stdin); if (strcmp (line ,".")) { wrdcnt = splitline (words, line); diff --git a/alliance/src/asimut/src/vh_debug.h b/alliance/src/asimut/src/vh_debug.h index d4046ea7..a58035b2 100644 --- a/alliance/src/asimut/src/vh_debug.h +++ b/alliance/src/asimut/src/vh_debug.h @@ -1,18 +1,22 @@ /* ###--------------------------------------------------------------### */ -/* file : vh_debug.h */ -/* date : Aug 20 1997 */ -/* version : v3.0 */ -/* author : Pirouz BAZARGAN SABET */ -/* description : declaration of diefines, global variables and, */ -/* functions used in the debugger */ +/* file : vh_debug.h */ +/* date : Aug 20 1997 */ +/* version : v3.0 */ +/* author : Pirouz BAZARGAN SABET */ +/* description : declaration of diefines, global variables and, */ +/* functions used in the debugger */ /* ###--------------------------------------------------------------### */ -struct stack /* debugger's stack's structure */ + /* ###------------------------------------------------------### */ + /* defines */ + /* ###------------------------------------------------------### */ + +struct stack /* debugger's stack's structure */ { - short type; /* type of the current ponter */ - short mark; /* stop mark */ - void *data; /* current pointer */ + short type; /* type of the current ponter */ + short mark; /* stop mark */ + void *data; /* current pointer */ }; union value @@ -21,7 +25,7 @@ union value long imd; }; -#define STKSIZ_DFN 500 /* debugger's stack size */ +#define STKSIZ_DFN 500 /* debugger's stack size */ #define KIND_DFN 0xff000000 #define COMMAND_DFN 0x01000000 @@ -203,3 +207,9 @@ union value #define wave_DFN (value_DFN + 1) #define MAXCMD_DFN (wave_DFN + 1) + + /* ###------------------------------------------------------### */ + /* functions */ + /* ###------------------------------------------------------### */ + +extern void dast_dbg (); diff --git a/alliance/src/asimut/src/vh_init.h b/alliance/src/asimut/src/vh_init.h new file mode 100644 index 00000000..5de76e08 --- /dev/null +++ b/alliance/src/asimut/src/vh_init.h @@ -0,0 +1,22 @@ + + +/* ###--------------------------------------------------------------### */ +/* file : vh_init.h */ +/* date : Jan 11 2014 */ +/* version : v3.0 */ +/* authors : J.-P. CHAPUT , P. BAZARGAN */ +/* content : contains defines, external variables and funtions */ +/* used by init functions */ +/* ###--------------------------------------------------------------### */ + + /* ###------------------------------------------------------### */ + /* defines */ + /* ###------------------------------------------------------### */ + + + /* ###------------------------------------------------------### */ + /* functions */ + /* ###------------------------------------------------------### */ + +extern void vhi_addcmodel (); +extern void vhi_models (); diff --git a/alliance/src/asimut/src/vh_lspec.c b/alliance/src/asimut/src/vh_lspec.c index 376969b7..6b270ae9 100644 --- a/alliance/src/asimut/src/vh_lspec.c +++ b/alliance/src/asimut/src/vh_lspec.c @@ -569,10 +569,9 @@ struct loins *pt_loins ; { unsigned int count ; struct locon *pt_locon ; - struct losig *pt_losig ; + struct losig *pt_losig = NULL; struct befig *pt_befig ; struct berin *pt_berin ; - struct bepor *pt_bepor ; struct beout *pt_beout ; struct bebus *pt_bebus ; struct bebux *pt_bebux ; @@ -1367,7 +1366,7 @@ struct befig *head_befig; int errflg = 0; int update_flg ; int mode ; - int new_mode ; + int new_mode = 0; int receiv_nbr ; int emettr_nbr ; int connec_nbr ; diff --git a/alliance/src/asimut/src/vh_simulad.c b/alliance/src/asimut/src/vh_simulad.c index bcf61f52..d069fd3a 100644 --- a/alliance/src/asimut/src/vh_simulad.c +++ b/alliance/src/asimut/src/vh_simulad.c @@ -24,9 +24,11 @@ #include "vh_ltype.h" #include "vh_globals.h" #include "vh_util.h" +#include "vh_init.h" #include "vh_lspec.h" #include "vh_xspec.h" #include "vh_xcomm.h" +#include "vh_debug.h" #include "vh_simulad.h" #include "beh_delay.h" @@ -35,10 +37,10 @@ extern char MVL_ERRFLG; static char *VH_TUNIT_TABLE [] = { "vu", "fs", "ps", "ns", "us", "ms" }; -main (argc, argv) +int main (argc, argv) int argc; -char **argv; +char *argv[]; { int i ; @@ -73,7 +75,6 @@ char **argv; char inert_flg = 1 ; /* inertial delays */ char bufreg_flg = 0 ; /* bufreg delays */ char stat_flg = 0 ; /* stat */ - char sav_end ; /* saved end flag */ int max_err = 10 ; /* # of simul. errors */ unsigned int max_pat = 0 ; /* # of patterns */ unsigned int labelsiz = 32 ; /* longest patt. label */ @@ -88,7 +89,7 @@ char **argv; struct befig *ptbef ; struct chain *ptchain ; struct papat *pt_papat ; - struct papat *lst_papat ; + struct papat *lst_papat = NULL; struct paseq *pt_paseq ; struct pains *pt_pains = NULL ; /* inspected instances */ struct lkdspy *pt_lkdspy = NULL ; /* inspected signals */ @@ -490,7 +491,7 @@ char **argv; if (bckdly_flg != 0) { - error_flag += beh_backdelay (delay_dic, argv [bckdly_flg], delay_mode); + error_flag += beh_backdelay (delay_dic, argv [(int)bckdly_flg], delay_mode); } if ((bckdly_flg != 0) || (fixdly_flg != 0) || (randly_flg != 0)) @@ -742,12 +743,12 @@ char **argv; if (init_flg != 0) { - if ((sscanf (argv [init_flg], "%u", &init_val) == 1) && (init_val <= 1)) + if ((sscanf (argv [(int)init_flg], "%u", &init_val) == 1) && (init_val <= 1)) vhx_initval (VHL_HEDLKF, init_val + '0'); else { - if ((filepnt = mbkfopen (argv [init_flg], "sav", READ_TEXT)) == NULL) - vhu_error (116, argv [init_flg], NULL); + if ((filepnt = mbkfopen (argv [(int)init_flg], "sav", READ_TEXT)) == NULL) + vhu_error (116, argv [(int)init_flg], NULL); else { error_flag = vhx_initfig (VHL_HEDLKF, filepnt); @@ -939,9 +940,9 @@ char **argv; { if (stat_flg != 0) { - st_wrtsta (stat_dic, VHL_HEDLKF, pt_paseq, num_cycle, argv [stat_flg]); - st_wrtstadly (stat_dic, VHL_HEDLKF, pt_paseq, cur_date, ref_date, argv [stat_flg]); - st_wrtstabis (stat_dic, VHL_HEDLKF, pt_paseq, cur_date, ref_date, argv [stat_flg]); + st_wrtsta (stat_dic, VHL_HEDLKF, pt_paseq, num_cycle, argv [(int)stat_flg]); + st_wrtstadly (stat_dic, VHL_HEDLKF, pt_paseq, cur_date, ref_date, argv [(int)stat_flg]); + st_wrtstabis (stat_dic, VHL_HEDLKF, pt_paseq, cur_date, ref_date, argv [(int)stat_flg]); } } diff --git a/alliance/src/asimut/src/vh_xcomm.c b/alliance/src/asimut/src/vh_xcomm.c index 753479fc..165f11bc 100644 --- a/alliance/src/asimut/src/vh_xcomm.c +++ b/alliance/src/asimut/src/vh_xcomm.c @@ -25,8 +25,10 @@ #include "log.h" #include "pat.h" #include "sch.h" +#include "vh_util.h" #include "vh_ltype.h" #include "vh_globals.h" +#include "vh_xspec.h" #include "vh_xcomm.h" /* ###--------------------------------------------------------------### */ @@ -194,7 +196,7 @@ struct magex *gex ; { int indexgex; struct chain *expr ; - char result ; + char result = 'u'; char res ; if (gex->OPERAND != NULL) @@ -947,8 +949,8 @@ struct paini *pt_paini; char *sig_name ; char *ins_name ; void *pt_sig ; - struct ptype *pt_depend; - unsigned char *pt_curval; + struct ptype *pt_depend = NULL; + unsigned char *pt_curval = NULL; /* ###------------------------------------------------------### */ /* for each paini structure, first find the pointer of the */ @@ -1011,8 +1013,8 @@ struct papat *pt_papat; { struct paiol *pt_paiol ; - struct bussig *pt_bussig; - struct simsig *pt_simsig; +/*struct bussig *pt_bussig;*/ +/*struct simsig *pt_simsig;*/ struct paevt *pt_paevt ; /* ###------------------------------------------------------### */ @@ -1066,7 +1068,7 @@ struct papat *pt_papat; int max_err = 0; struct paiol *pt_paiol ; struct paevt *pt_paevt ; - char value ; + char value = 'u'; char usrval ; max_iol = pt_paseq->IOLNBR; @@ -1289,7 +1291,7 @@ struct paseq *pt_paseq; struct lkdspy *head_lkdspy; { - char str[200] ; + char str[256] ; struct lkdspy *pt_lkdspy= NULL ; /* ###------------------------------------------------------### */ @@ -1309,7 +1311,9 @@ struct lkdspy *head_lkdspy; if (pt_lkdspy->PAIOL->MODE == 'I') { - sprintf(str, "%s : Warning : this spy is useless (input signal)", str); + char tmp[256]; + sprintf(tmp, "%s : Warning : this spy is useless (input signal)", str); + strncpy(str, tmp, 256); } pt_paseq->CURCOM = pat_addpacom(pt_paseq->CURCOM, namealloc(str), 0); } @@ -1339,13 +1343,12 @@ unsigned int labelsiz; struct wrireg *pt_wrireg= NULL ; struct paevt *pt_paevt = NULL ; struct lkdspy *pt_lkdspy= NULL ; - char value ; + char value = 'u'; char *label ; - char str[200] ; int spy_event_flag = 0 ; label = mbkalloc (labelsiz + 1); - sprintf(label, ""); + label[0] = '\0'; max_iol = pt_paseq->IOLNBR; /* ###------------------------------------------------------### */ @@ -1416,7 +1419,9 @@ unsigned int labelsiz; { if ((strlen (label) + 10) <= labelsiz) { - sprintf(label, "%s_spy%u", label, pt_lkdspy->IOLNBR); + char tmp[2048]; + sprintf(tmp, "%s_spy%u", label, pt_lkdspy->IOLNBR); + strcpy(label, tmp); } } else diff --git a/alliance/src/asimut/src/vh_xcomm.h b/alliance/src/asimut/src/vh_xcomm.h index fdc2f41f..8fbc2bc9 100644 --- a/alliance/src/asimut/src/vh_xcomm.h +++ b/alliance/src/asimut/src/vh_xcomm.h @@ -8,8 +8,8 @@ /* the simulation funciotns */ /* ###--------------------------------------------------------------### */ -extern unsigned long vhx_getvalu (); -extern unsigned long vhx_getsize (); +extern unsigned long vhx_getvalu (); +extern unsigned long vhx_getsize (); extern char vhx_gexeval (); extern char vhx_muxbit (); extern char vhx_worbit (); @@ -29,4 +29,6 @@ extern unsigned int vhx_readinput (); extern void vhx_writeout (); extern void vhx_writebus (); extern char *vhx_GetInstanceName (); +extern void vhx_vectorinit (); extern void vhx_vectorstat (); +extern void vhx_commentspytable (); diff --git a/alliance/src/asimut/src/vh_xspec.c b/alliance/src/asimut/src/vh_xspec.c index a477db26..c252c68a 100644 --- a/alliance/src/asimut/src/vh_xspec.c +++ b/alliance/src/asimut/src/vh_xspec.c @@ -19,6 +19,7 @@ #include "log.h" #include "pat.h" #include "sch.h" +#include "vh_util.h" #include "vh_ltype.h" #include "vh_globals.h" #include "vh_xcomm.h" @@ -862,7 +863,7 @@ unsigned int cur_date; struct simsig *pt_simsig; unsigned int count = 0; unsigned int l_tim = 0; /* Statistics last_time access */ - char resval ; + char resval = 'u'; /* ###------------------------------------------------------### */ /* update simple signals' value */ @@ -1212,7 +1213,8 @@ char *filename; if((fp = mbkfopen(filename, "sta", WRITE_TEXT)) == NULL) { - sprintf(signame, "%s.sta", filename); + signame = (char*)malloc( 1024*sizeof(char) ); + snprintf(signame, 1024, "%s.sta", filename); exit(1); } @@ -1232,7 +1234,8 @@ char *filename; pt_simsig = pt_lkdfig->SIMSIG; while (pt_simsig != NULL) { - signame = (char *)getsigname(pt_simsig); + /* FRAGILE: the cast works because the two first fields are identicals */ + signame = (char *)getsigname((losig_list*)pt_simsig); num_evt = VHX_VECTOR_TRANS[i]; num_prb = VHX_VECTOR_PROBA[i]; pt_paiol = pt_paseq->PAIOL; @@ -1293,7 +1296,8 @@ char *filename; pt_bussig = pt_lkdfig->BUSSIG; while (pt_bussig != NULL) { - signame = (char *)getsigname(pt_bussig); + /* FRAGILE: the cast works because the two first fields are identicals */ + signame = (char *)getsigname((losig_list*)pt_bussig); num_evt = VHX_VECTOR_TRANS[i]; num_prb = VHX_VECTOR_PROBA[i]; @@ -1482,7 +1486,8 @@ char *filename; pt_simsig = pt_lkdfig->SIMSIG; while (pt_simsig != NULL) { - signame = (char *)getsigname(pt_simsig); + /* FRAGILE: the cast works because the two first fields are identicals */ + signame = (char *)getsigname((losig_list*)pt_simsig); num_evt = st_getstat(dict, pt_simsig, CTXEVT, num_time, *(pt_simsig->CURVAL)); num_prb = st_getstat(dict, pt_simsig, CTXPRB, num_time, *(pt_simsig->CURVAL)); pt_paiol = pt_paseq->PAIOL; @@ -1541,7 +1546,8 @@ char *filename; pt_bussig = pt_lkdfig->BUSSIG; while (pt_bussig != NULL) { - signame = (char *)getsigname(pt_bussig); + /* FRAGILE: the cast works because the two first fields are identicals */ + signame = (char *)getsigname((losig_list*)pt_bussig); num_evt = st_getstat(dict, pt_bussig, CTXEVT, num_time, *(pt_bussig->CURVAL)); num_prb = st_getstat(dict, pt_bussig, CTXPRB, num_time, *(pt_bussig->CURVAL)); pt_paiol = pt_paseq->PAIOL; @@ -1684,19 +1690,18 @@ char *filename; unsigned int num_sev = 0; unsigned int num_mev = 0; unsigned int num_cycle = 0; - int found = 0; struct simsig *pt_simsig; struct bussig *pt_bussig; struct lkdins *pt_lkdins; struct wriaux *pt_wriaux; struct wribux *pt_wribux; struct wrireg *pt_wrireg; - struct paiol *pt_paiol; if((fp = mbkfopen(filename, "stb", WRITE_TEXT)) == NULL) { - sprintf(signame, "%s.stb", filename); - exit(1); + signame = (char*)malloc( 512*sizeof(char) ); + snprintf(signame, 512, "%s.stb", filename); + exit(1); } time(&clock); @@ -1715,7 +1720,8 @@ char *filename; pt_simsig = pt_lkdfig->SIMSIG; while (pt_simsig != NULL) { - signame = (char *)getsigname(pt_simsig); + /* FRAGILE: the cast works because the two first fields are identicals */ + signame = (char *)getsigname((losig_list*)pt_simsig); num_sev = (unsigned int) beh_chktab(dict, pt_simsig, CTXSEV, VHL_PNTDFN); num_mev = (unsigned int) beh_chktab(dict, pt_simsig, CTXMEV, VHL_PNTDFN); @@ -1736,7 +1742,8 @@ char *filename; pt_bussig = pt_lkdfig->BUSSIG; while (pt_bussig != NULL) { - signame = (char *)getsigname(pt_bussig); + /* FRAGILE: the cast works because the two first fields are identicals */ + signame = (char *)getsigname((losig_list*)pt_bussig); num_sev = (unsigned int) beh_chktab(dict, pt_bussig, CTXSEV, VHL_PNTDFN); num_mev = (unsigned int) beh_chktab(dict, pt_bussig, CTXMEV, VHL_PNTDFN); diff --git a/alliance/src/asimut/src/vh_xspec.h b/alliance/src/asimut/src/vh_xspec.h index eb012b99..e8e4fa5c 100644 --- a/alliance/src/asimut/src/vh_xspec.h +++ b/alliance/src/asimut/src/vh_xspec.h @@ -21,6 +21,7 @@ extern void vhx_addexec (); extern int vhx_execute (); extern unsigned int vhx_addtra (); extern void vhx_redtra (); +extern void vhx_supdate (); extern void st_wrtsta (); extern void st_wrtstadly (); diff --git a/alliance/src/aut/src/auterror.h b/alliance/src/aut/src/auterror.h index aad1f947..88d8e2fa 100644 --- a/alliance/src/aut/src/auterror.h +++ b/alliance/src/aut/src/auterror.h @@ -92,6 +92,7 @@ | | \------------------------------------------------------------*/ - extern void aut_error __P((int Error, char *Text, char *File, long Line)); + extern void aut_error __P((int Error, char *Text, char *File, long Line)); + extern void aut_warning __P((int Warning, char* Text, char* File, long Line )); # endif diff --git a/alliance/src/aut/src/autfree.c b/alliance/src/aut/src/autfree.c index ffacd0e6..4dd4bb67 100644 --- a/alliance/src/aut/src/autfree.c +++ b/alliance/src/aut/src/autfree.c @@ -118,7 +118,7 @@ void autfree( Pointer, Size ) if ( AllocDebug->POINTER != AllocDebug ) { - fprintf( stdout, "ERROR autfree %lx != %lx !!!!\n", AllocDebug->POINTER, AllocDebug ); + fprintf( stdout, "ERROR autfree %p != %p !!!!\n", AllocDebug->POINTER, AllocDebug ); autexit( 1 ); } @@ -139,7 +139,7 @@ void autfree( Pointer, Size ) if ( ( AllocDebug->HEAP ) && ( AllocDebug->SIZE != Size ) ) { - fprintf( stdout, "ERROR autfree heap mode and size %ld != %ld !!!!\n", + fprintf( stdout, "ERROR autfree heap mode and size %ld != %u !!!!\n", AllocDebug->SIZE, Size ); autexit( 1 ); } diff --git a/alliance/src/aut/src/autgraph.c b/alliance/src/aut/src/autgraph.c index d1445fb4..df8bfe58 100644 --- a/alliance/src/aut/src/autgraph.c +++ b/alliance/src/aut/src/autgraph.c @@ -195,7 +195,6 @@ autarc_list *addautgrapharc( Graph, NodeFrom, NodeTo ) autnode_list *NodeTo; { autarc_list *Arc; - chain_list *ScanArc; Arc = searchautgrapharc( Graph, NodeFrom, NodeTo ); diff --git a/alliance/src/b2f/src/b2f_beh2fsm.c b/alliance/src/b2f/src/b2f_beh2fsm.c index 6c244b29..a1afa4fb 100644 --- a/alliance/src/b2f/src/b2f_beh2fsm.c +++ b/alliance/src/b2f/src/b2f_beh2fsm.c @@ -452,7 +452,7 @@ bddnode *B2fTreatInitialState( BehFigure, FlagInitial, StringInitial ) authtable *HashTable; authelem *Element; char *ScanString; - long Value; + long Value = 0; int Index; int Scan; int Length; @@ -624,7 +624,6 @@ void B2fTreatState( BehFigure, FlagInitial, StringInitial ) bddnode *BddImageSet; bddnode *BddImage; bddvar Variable; - int InitialExist; long NumberIndex; long StateIndex; @@ -738,10 +737,9 @@ void B2fTreatPort( BehFigure ) befig_list *BehFigure; { bepor_list *ScanPort; - char *ClockName; char *Vector; long Index; - int FsmType; + int FsmType = FSM_TYPE_BIT; for ( ScanPort = BehFigure->BEPOR; ScanPort != (bepor_list *)0; @@ -785,18 +783,16 @@ void B2fTreatRegister( BehFigure ) befig_list *BehFigure; { - bddcircuit *BddCircuit; bereg_list *ScanReg; binode_list *BiNode; bddnode *BddNode; chain_list *Expr; chain_list *Support; - char *RegName; + char *RegName = NULL; long Index; B2fNumberRegister = 0; B2fRegisterName = (char *)0; - BddCircuit = BehFigure->CIRCUI; BddNode = (bddnode *)0; Expr = (chain_list *)0; /* diff --git a/alliance/src/b2f/src/b2f_error.h b/alliance/src/b2f/src/b2f_error.h index 98049934..401a0faf 100644 --- a/alliance/src/b2f/src/b2f_error.h +++ b/alliance/src/b2f/src/b2f_error.h @@ -94,4 +94,7 @@ | | \------------------------------------------------------------*/ +extern void B2fDisplayError (); +extern void B2fDisplayWarning(); + # endif diff --git a/alliance/src/bdd/src/bddcircuit.c b/alliance/src/bdd/src/bddcircuit.c index b6298616..b255c4d6 100644 --- a/alliance/src/bdd/src/bddcircuit.c +++ b/alliance/src/bdd/src/bddcircuit.c @@ -110,7 +110,7 @@ char *loc_getbddstablename( Name ) sprintf( BddStableName, "%s'stable", Name ); StableName = namealloc( BddStableName ); - Element = addauthelem( BddHashInvStable, StableName, (long)Name ); + addauthelem( BddHashInvStable, StableName, (long)Name ); Element = addauthelem( BddHashStable , Name, (long)StableName ); } @@ -600,7 +600,7 @@ bddnode *addbddcircuitout( BddCircuit, OutputName, BddNode ) else { BddLocalCircuit->NUMBER_NAME_OUT++; - Element = addauthelem( BddLocalCircuit->HASH_OUT, OutputName, (long)BddNode ); + addauthelem( BddLocalCircuit->HASH_OUT, OutputName, (long)BddNode ); } return( incbddrefext( BddNode ) ); diff --git a/alliance/src/bdd/src/bdddump.c b/alliance/src/bdd/src/bdddump.c index 894baec2..c61d9355 100644 --- a/alliance/src/bdd/src/bdddump.c +++ b/alliance/src/bdd/src/bdddump.c @@ -161,7 +161,7 @@ bddcircuit *undumpbddcircuit( BddSystem, FileName ) Name = BddDumpBuffer + 9; loc_undumpbddgetline(); - Value = sscanf( BddDumpBuffer, ".port %ld %ld", &NumberIn, &NumberOut ); + Value = sscanf( BddDumpBuffer, ".port %22ld %22ld", &NumberIn, &NumberOut ); if ( Value != 2 ) bdderror( BDD_UNDUMP_LINE_ERROR, BddDumpLine ); loc_undumpbddgetline(); @@ -180,7 +180,7 @@ bddcircuit *undumpbddcircuit( BddSystem, FileName ) if ( Scan != (char *)0 ) { *Scan = '\0'; - Value = sscanf( BddDumpBuffer, "%ld", &BddVar ); + Value = sscanf( BddDumpBuffer, "%22ld", &BddVar ); Name = namealloc( Scan + 1 ); } @@ -192,7 +192,7 @@ bddcircuit *undumpbddcircuit( BddSystem, FileName ) } loc_undumpbddgetline(); - Value = sscanf( BddDumpBuffer, ".node %ld %lX %lX", + Value = sscanf( BddDumpBuffer, ".node %22ld %18lX %18lX", &NumberNode, &ZeroAddr, &OneAddr ); if ( Value != 3 ) bdderror( BDD_UNDUMP_LINE_ERROR, BddDumpLine ); @@ -206,7 +206,7 @@ bddcircuit *undumpbddcircuit( BddSystem, FileName ) while ( BddDumpBuffer[ 0 ] != '.' ) { - Value = sscanf( BddDumpBuffer, "%lX %ld %lX %lX", + Value = sscanf( BddDumpBuffer, "%18lX %22ld %18lX %18lX", &NodeAddr, &BddVar, &HighAddr, &LowAddr ); if ( Value != 4 ) bdderror( BDD_UNDUMP_LINE_ERROR, BddDumpLine ); @@ -236,7 +236,7 @@ bddcircuit *undumpbddcircuit( BddSystem, FileName ) if ( Scan != (char *)0 ) { *Scan = '\0'; - Value = sscanf( BddDumpBuffer, "%lX", &NodeAddr ); + Value = sscanf( BddDumpBuffer, "%18lX", &NodeAddr ); Name = namealloc( Scan + 1 ); } diff --git a/alliance/src/bdd/src/bddmark.c b/alliance/src/bdd/src/bddmark.c index 733573f5..34f08dfd 100644 --- a/alliance/src/bdd/src/bddmark.c +++ b/alliance/src/bdd/src/bddmark.c @@ -65,9 +65,6 @@ | Variables | | | \------------------------------------------------------------*/ - - static long BddMarkNumberNode = 0; - /*------------------------------------------------------------\ | | | Functions | diff --git a/alliance/src/bdd/src/bddnode.c b/alliance/src/bdd/src/bddnode.c index e2d1d304..4fcedf16 100644 --- a/alliance/src/bdd/src/bddnode.c +++ b/alliance/src/bdd/src/bddnode.c @@ -135,7 +135,7 @@ bddnode *addbddnode( BddSystem, Index, High, Low ) { if ( ! IsBddSystemExplosion( BddLocalSystem ) ) { - BddLocalSystem->HASH_OPER->TABLE_FREEZE; + //BddLocalSystem->HASH_OPER->TABLE_FREEZE; if ( BddLocalSystem->EXPLOSION_FUNC != NULL ) { diff --git a/alliance/src/bdd/src/bddreorder.c b/alliance/src/bdd/src/bddreorder.c index 6e9dafaf..292a48b9 100644 --- a/alliance/src/bdd/src/bddreorder.c +++ b/alliance/src/bdd/src/bddreorder.c @@ -166,7 +166,7 @@ reorderbddvarwindow3( BddSystem, BddVar ) if ( BddLocalSystem->NUMBER_NODE < NumberNode ) { - NumberNode = BddLocalSystem->NUMBER_NODE; + //BddLocalSystem->NUMBER_NODE; BestOrder = BDD_REORDER_132; } @@ -353,7 +353,7 @@ reorderbddsystemtop( BddSystem ) while ( VarCount > 0 ) { # ifdef BDD_DEBUG - fprintf( stdout, "-> VarFrom %d\n", VarFrom ); + fprintf( stdout, "-> VarFrom %u\n", VarFrom ); # endif BddReorderLevel[ VarFrom ] = 0; @@ -363,7 +363,7 @@ reorderbddsystemtop( BddSystem ) for ( VarTo = VarFrom; VarTo < NumberVar - 1; VarTo++ ) { # ifdef BDD_DEBUG - fprintf( stdout, "-> Swap %d and %d\n", VarTo, VarTo + 1 ); + fprintf( stdout, "-> Swap %u and %d\n", VarTo, VarTo + 1 ); # endif swapbddvar( BddLocalSystem, VarTo ); @@ -379,14 +379,14 @@ reorderbddsystemtop( BddSystem ) } # ifdef BDD_DEBUG - fprintf( stdout, "--> Best one %d\n", BestVar ); + fprintf( stdout, "--> Best one %u\n", BestVar ); fprintf( stdout, "--> Number nodes %d\n", NumberNode ); # endif for ( VarTo = NumberVar - 1; VarTo > BestVar; VarTo-- ) { # ifdef BDD_DEBUG - fprintf( stdout, "-> UnSwap %d and %d\n", VarTo - 1, VarTo ); + fprintf( stdout, "-> UnSwap %d and %u\n", VarTo - 1, VarTo ); # endif SwapReorder = BddReorderLevel[ VarTo - 1 ]; diff --git a/alliance/src/bdd/src/bddsystem.c b/alliance/src/bdd/src/bddsystem.c index 25efeb6a..11ddc287 100644 --- a/alliance/src/bdd/src/bddsystem.c +++ b/alliance/src/bdd/src/bddsystem.c @@ -302,13 +302,13 @@ void viewbddsystem( BddSystem, ViewIndex ) for ( Index = 0; Index < BddSystem->NUMBER_INDEX; Index++ ) { - fprintf( stdout, " INDEX_TO_VAR[ %d ] = %d\n", + fprintf( stdout, " INDEX_TO_VAR[ %u ] = %d\n", Index, IndexToVar[ Index ] ); } for ( Variable = 0; Variable < BddSystem->NUMBER_VAR; Variable++ ) { - fprintf( stdout, " VAR_TO_INDEX[ %d ] = %d\n", + fprintf( stdout, " VAR_TO_INDEX[ %u ] = %d\n", Variable, VarToIndex[ Variable ] ); } } diff --git a/alliance/src/beh/src/beh_rmvbeaux.c b/alliance/src/beh/src/beh_rmvbeaux.c index ff05fbce..46dc55bc 100644 --- a/alliance/src/beh/src/beh_rmvbeaux.c +++ b/alliance/src/beh/src/beh_rmvbeaux.c @@ -50,7 +50,7 @@ char mode; /* recursive delete or not (Y or N) */ { struct beaux headaux; - struct beaux *ptlastaux; + struct beaux *ptlastaux = NULL; struct beaux *ptbeaux; if (listbeaux != NULL) diff --git a/alliance/src/beh/src/beh_rmvbebus.c b/alliance/src/beh/src/beh_rmvbebus.c index fca408f2..97f5a572 100644 --- a/alliance/src/beh/src/beh_rmvbebus.c +++ b/alliance/src/beh/src/beh_rmvbebus.c @@ -50,7 +50,7 @@ char mode; /* recursive delete or not (Y or N) */ { struct bebus headbus; - struct bebus *ptlastbus; + struct bebus *ptlastbus = NULL; struct bebus *ptbebus; if (listbebus != NULL) diff --git a/alliance/src/beh/src/beh_rmvbebux.c b/alliance/src/beh/src/beh_rmvbebux.c index 33e2d0bf..f64fb3ce 100644 --- a/alliance/src/beh/src/beh_rmvbebux.c +++ b/alliance/src/beh/src/beh_rmvbebux.c @@ -50,7 +50,7 @@ char mode; /* recursive delete or not (Y or N) */ { struct bebux headbux; - struct bebux *ptlastbux; + struct bebux *ptlastbux = NULL; struct bebux *ptbebux; if (listbebux != NULL) diff --git a/alliance/src/beh/src/beh_rmvbeder.c b/alliance/src/beh/src/beh_rmvbeder.c index 07c71756..2c1d92c6 100644 --- a/alliance/src/beh/src/beh_rmvbeder.c +++ b/alliance/src/beh/src/beh_rmvbeder.c @@ -48,7 +48,7 @@ short bederindex; /* index of the BEDER to be deleted */ { struct beder headder; - struct beder *ptlastder; + struct beder *ptlastder = NULL; struct beder *ptbeder; if (listbeder != NULL) diff --git a/alliance/src/beh/src/beh_rmvbefig.c b/alliance/src/beh/src/beh_rmvbefig.c index 4605ab7e..743a0e44 100644 --- a/alliance/src/beh/src/beh_rmvbefig.c +++ b/alliance/src/beh/src/beh_rmvbefig.c @@ -53,7 +53,7 @@ char mode; /* recursive delete or not (Y or N) */ { struct befig headfig; - struct befig *ptlastfig; + struct befig *ptlastfig = NULL; struct befig *ptbefig; struct ptype *ptptype; diff --git a/alliance/src/beh/src/beh_rmvbegen.c b/alliance/src/beh/src/beh_rmvbegen.c index fc296b8d..9498e900 100644 --- a/alliance/src/beh/src/beh_rmvbegen.c +++ b/alliance/src/beh/src/beh_rmvbegen.c @@ -50,7 +50,7 @@ char mode; /* recursive delete or not (Y or N) */ { struct begen headgen; - struct begen *ptlastgen; + struct begen *ptlastgen = NULL; struct begen *ptbegen; if (listbegen != NULL) diff --git a/alliance/src/beh/src/beh_rmvbemsg.c b/alliance/src/beh/src/beh_rmvbemsg.c index 3d467120..b9d7a373 100644 --- a/alliance/src/beh/src/beh_rmvbemsg.c +++ b/alliance/src/beh/src/beh_rmvbemsg.c @@ -50,7 +50,7 @@ char mode; /* recursive delete or not (Y or N) */ { struct bemsg headmsg; - struct bemsg *ptlastmsg; + struct bemsg *ptlastmsg = NULL; struct bemsg *ptbemsg; if (listbemsg != NULL) diff --git a/alliance/src/beh/src/beh_rmvbeout.c b/alliance/src/beh/src/beh_rmvbeout.c index 5cbd6c4a..0b66531e 100644 --- a/alliance/src/beh/src/beh_rmvbeout.c +++ b/alliance/src/beh/src/beh_rmvbeout.c @@ -50,7 +50,7 @@ char mode; /* recursive delete or not (Y or N) */ { struct beout headout; - struct beout *ptlastout; + struct beout *ptlastout = NULL; struct beout *ptbeout; if (listbeout != NULL) diff --git a/alliance/src/beh/src/beh_rmvbepor.c b/alliance/src/beh/src/beh_rmvbepor.c index bd8882d1..75e37ad0 100644 --- a/alliance/src/beh/src/beh_rmvbepor.c +++ b/alliance/src/beh/src/beh_rmvbepor.c @@ -48,7 +48,7 @@ char *beporname; /* name of the BEPOR to be deleted */ { struct bepor headpor; - struct bepor *ptlastpor; + struct bepor *ptlastpor = NULL; struct bepor *ptbepor; if (listbepor != NULL) diff --git a/alliance/src/beh/src/beh_rmvbereg.c b/alliance/src/beh/src/beh_rmvbereg.c index f9107601..d021f2b0 100644 --- a/alliance/src/beh/src/beh_rmvbereg.c +++ b/alliance/src/beh/src/beh_rmvbereg.c @@ -50,7 +50,7 @@ char mode; /* recursive delete or not (Y or N) */ { struct bereg headreg; - struct bereg *ptlastreg; + struct bereg *ptlastreg = NULL; struct bereg *ptbereg; if (listbereg != NULL) diff --git a/alliance/src/beh/src/beh_rmvberin.c b/alliance/src/beh/src/beh_rmvberin.c index faba0991..b258101a 100644 --- a/alliance/src/beh/src/beh_rmvberin.c +++ b/alliance/src/beh/src/beh_rmvberin.c @@ -48,7 +48,7 @@ char *berinname; /* name of the BERIN to be deleted */ { struct berin headrin; - struct berin *ptlastrin; + struct berin *ptlastrin = NULL; struct berin *ptberin; if (listberin != NULL) diff --git a/alliance/src/bhl/src/beh_clrdepend.c b/alliance/src/bhl/src/beh_clrdepend.c index 9cf8262a..67b602be 100644 --- a/alliance/src/bhl/src/beh_clrdepend.c +++ b/alliance/src/bhl/src/beh_clrdepend.c @@ -22,11 +22,11 @@ */ /* ###--------------------------------------------------------------### */ -/* file : beh_clrdepend.c */ -/* date : Mar 8 -/* version : v111 */ -/* author : Laurent VUILLEMIN, Pirouz BAZARGAN SABET */ -/* description : beh_clrdepend */ +/* file : beh_clrdepend.c */ +/* date : Mar 8 */ +/* version : v111 */ +/* author : Laurent VUILLEMIN, Pirouz BAZARGAN SABET */ +/* description : beh_clrdepend */ /* ###--------------------------------------------------------------### */ #include diff --git a/alliance/src/bhl/src/beh_debug.c b/alliance/src/bhl/src/beh_debug.c index 9811a398..ff215331 100644 --- a/alliance/src/bhl/src/beh_debug.c +++ b/alliance/src/bhl/src/beh_debug.c @@ -30,13 +30,14 @@ /* ###--------------------------------------------------------------### */ #include +#include #include "mut.h" #include "log.h" #include "beh.h" #include "beh_debug.h" static char *buffer = NULL; -static unsigned long buff_size = 0; +static long buff_size = 0; static struct circuit *circuit_pnt = NULL; @@ -68,7 +69,6 @@ char **str; /* recognized strings */ struct beout *beout_pnt; struct bebus *bebus_pnt; struct beaux *beaux_pnt; - struct beaux *bedly_pnt; struct bebux *bebux_pnt; struct bepor *bepor_pnt; struct begen *begen_pnt; @@ -561,20 +561,20 @@ char **str; /* recognized strings */ { case s_DFN : if (pnt[i].dat != NULL) - printf ("%s", pnt[i].dat); + printf ("%s", (char*)pnt[i].dat); printf ("\n"); break; case u_DFN : - printf ("%u\n", pnt[i].imd); + printf ("%u\n", (unsigned int)pnt[i].imd); break; case c_DFN : - printf ("'%c'\n", pnt[i].imd); + printf ("'%c'\n", (char)pnt[i].imd); break; case d_DFN : - printf ("%d\n", pnt[i].imd); + printf ("%d\n", (int)pnt[i].imd); break; case l_DFN : @@ -582,7 +582,7 @@ char **str; /* recognized strings */ break; case x_DFN : - printf ("0x%x\n", pnt[i].imd); + printf ("0x%x\n", (unsigned int)pnt[i].imd); break; case ABL_DFN : @@ -798,7 +798,7 @@ long *indxs; /* words' index in strgs table */ for (i=0 ; i "); - gets (line); + getline (&line, &lline, stdin); if (strcmp (line ,".")) { wrdcnt = splitline (words, line); idx = translate (words, wrdcnt, str, nmbrs, flags, indxs); } } + free (line); + } diff --git a/alliance/src/bhl/src/beh_debug.h b/alliance/src/bhl/src/beh_debug.h index 3f3ea36e..9aa67476 100644 --- a/alliance/src/bhl/src/beh_debug.h +++ b/alliance/src/bhl/src/beh_debug.h @@ -66,72 +66,72 @@ union value #define TYPE_DFN 0x0000ffff #define _back_DFN 0 -#define _exit_DFN _back_DFN + 1 -#define _jump_DFN _exit_DFN + 1 -#define _save_DFN _jump_DFN + 1 -#define _stop_DFN _save_DFN + 1 -#define _top_DFN _stop_DFN + 1 -#define _up_DFN _top_DFN + 1 -#define _display_DFN _up_DFN + 1 +#define _exit_DFN (_back_DFN + 1) +#define _jump_DFN (_exit_DFN + 1) +#define _save_DFN (_jump_DFN + 1) +#define _stop_DFN (_save_DFN + 1) +#define _top_DFN (_stop_DFN + 1) +#define _up_DFN (_top_DFN + 1) +#define _display_DFN (_up_DFN + 1) -#define character_DFN _display_DFN + 1 -#define short_DFN character_DFN + 1 -#define integer_DFN short_DFN + 1 -#define long_DFN integer_DFN + 1 -#define void_DFN long_DFN + 1 -#define string_DFN void_DFN + 1 +#define character_DFN (_display_DFN + 1) +#define short_DFN (character_DFN + 1) +#define integer_DFN (short_DFN + 1) +#define long_DFN (integer_DFN + 1) +#define void_DFN (long_DFN + 1) +#define string_DFN (void_DFN + 1) -#define chain_DFN string_DFN + 1 -#define ptype_DFN chain_DFN + 1 +#define chain_DFN (string_DFN + 1) +#define ptype_DFN (chain_DFN + 1) -#define befig_DFN ptype_DFN + 1 -#define bereg_DFN befig_DFN + 1 -#define bemsg_DFN bereg_DFN + 1 -#define berin_DFN bemsg_DFN + 1 -#define beout_DFN berin_DFN + 1 -#define bebus_DFN beout_DFN + 1 -#define beaux_DFN bebus_DFN + 1 -#define bedly_DFN beaux_DFN + 1 -#define bebux_DFN bedly_DFN + 1 -#define bepor_DFN bebux_DFN + 1 -#define begen_DFN bepor_DFN + 1 -#define biabl_DFN begen_DFN + 1 -#define binode_DFN biabl_DFN + 1 -#define bequad_DFN binode_DFN + 1 -#define beder_DFN bequad_DFN + 1 +#define befig_DFN (ptype_DFN + 1) +#define bereg_DFN (befig_DFN + 1) +#define bemsg_DFN (bereg_DFN + 1) +#define berin_DFN (bemsg_DFN + 1) +#define beout_DFN (berin_DFN + 1) +#define bebus_DFN (beout_DFN + 1) +#define beaux_DFN (bebus_DFN + 1) +#define bedly_DFN (beaux_DFN + 1) +#define bebux_DFN (bedly_DFN + 1) +#define bepor_DFN (bebux_DFN + 1) +#define begen_DFN (bepor_DFN + 1) +#define biabl_DFN (begen_DFN + 1) +#define binode_DFN (biabl_DFN + 1) +#define bequad_DFN (binode_DFN + 1) +#define beder_DFN (bequad_DFN + 1) -#define next_DFN beder_DFN + 1 -#define name_DFN next_DFN + 1 -#define user_DFN name_DFN + 1 -#define errflg_DFN user_DFN + 1 -#define type_DFN errflg_DFN + 1 -#define level_DFN type_DFN + 1 -#define label_DFN level_DFN + 1 -#define message_DFN label_DFN + 1 -#define abl_DFN message_DFN + 1 -#define node_DFN abl_DFN + 1 -#define direction_DFN node_DFN + 1 -#define cndabl_DFN direction_DFN + 1 -#define valabl_DFN cndabl_DFN + 1 -#define cndnode_DFN valabl_DFN + 1 -#define valnode_DFN cndnode_DFN + 1 -#define out_ref_DFN valnode_DFN + 1 -#define bus_ref_DFN out_ref_DFN + 1 -#define aux_ref_DFN bus_ref_DFN + 1 -#define reg_ref_DFN aux_ref_DFN + 1 -#define bux_ref_DFN reg_ref_DFN + 1 -#define msg_ref_DFN bux_ref_DFN + 1 -#define dly_ref_DFN msg_ref_DFN + 1 -#define value_DFN dly_ref_DFN + 1 -#define data_DFN value_DFN + 1 -#define time_DFN data_DFN + 1 -#define bdd_DFN time_DFN + 1 -#define gex_DFN bdd_DFN + 1 -#define varlist_DFN gex_DFN + 1 -#define derivate_DFN varlist_DFN + 1 -#define index_DFN derivate_DFN + 1 -#define flag_DFN index_DFN + 1 -#define time_unit_DFN flag_DFN + 1 -#define time_step_DFN time_unit_DFN + 1 +#define next_DFN (beder_DFN + 1) +#define name_DFN (next_DFN + 1) +#define user_DFN (name_DFN + 1) +#define errflg_DFN (user_DFN + 1) +#define type_DFN (errflg_DFN + 1) +#define level_DFN (type_DFN + 1) +#define label_DFN (level_DFN + 1) +#define message_DFN (label_DFN + 1) +#define abl_DFN (message_DFN + 1) +#define node_DFN (abl_DFN + 1) +#define direction_DFN (node_DFN + 1) +#define cndabl_DFN (direction_DFN + 1) +#define valabl_DFN (cndabl_DFN + 1) +#define cndnode_DFN (valabl_DFN + 1) +#define valnode_DFN (cndnode_DFN + 1) +#define out_ref_DFN (valnode_DFN + 1) +#define bus_ref_DFN (out_ref_DFN + 1) +#define aux_ref_DFN (bus_ref_DFN + 1) +#define reg_ref_DFN (aux_ref_DFN + 1) +#define bux_ref_DFN (reg_ref_DFN + 1) +#define msg_ref_DFN (bux_ref_DFN + 1) +#define dly_ref_DFN (msg_ref_DFN + 1) +#define value_DFN (dly_ref_DFN + 1) +#define data_DFN (value_DFN + 1) +#define time_DFN (data_DFN + 1) +#define bdd_DFN (time_DFN + 1) +#define gex_DFN (bdd_DFN + 1) +#define varlist_DFN (gex_DFN + 1) +#define derivate_DFN (varlist_DFN + 1) +#define index_DFN (derivate_DFN + 1) +#define flag_DFN (index_DFN + 1) +#define time_unit_DFN (flag_DFN + 1) +#define time_step_DFN (time_unit_DFN + 1) -#define MAXCMD_DFN time_step_DFN + 1 +#define MAXCMD_DFN (time_step_DFN + 1) diff --git a/alliance/src/bhl/src/beh_makbdd.c b/alliance/src/bhl/src/beh_makbdd.c index c50af254..a435c3b8 100644 --- a/alliance/src/bhl/src/beh_makbdd.c +++ b/alliance/src/bhl/src/beh_makbdd.c @@ -36,6 +36,7 @@ /* ###--------------------------------------------------------------### */ #include +#include #include "mut.h" #include "log.h" #include "beh.h" diff --git a/alliance/src/bhl/src/beh_makderiv.c b/alliance/src/bhl/src/beh_makderiv.c index abf4cfcc..7f36af69 100644 --- a/alliance/src/bhl/src/beh_makderiv.c +++ b/alliance/src/bhl/src/beh_makderiv.c @@ -72,7 +72,6 @@ struct bequad *pt_bequad; { pNode pt_node ; struct chain *pt_varidx ; - struct chain *suppor ; struct beder *list_derive = NULL; pt_varidx = pt_bequad->VARLIST; @@ -105,7 +104,6 @@ struct befig *pt_befig; struct bereg *pt_bereg; struct bemsg *pt_bemsg; struct binode *pt_binod; - struct chain *list_der; /* ###------------------------------------------------------### */ /* check that the BEFIG is ready to support the derivation */ diff --git a/alliance/src/bhl/src/beh_makgex.c b/alliance/src/bhl/src/beh_makgex.c index 39916b14..837a4f31 100644 --- a/alliance/src/bhl/src/beh_makgex.c +++ b/alliance/src/bhl/src/beh_makgex.c @@ -149,13 +149,12 @@ unsigned int oper; /* called func. : none */ /* ###--------------------------------------------------------------### */ -void *mad_fregex (ptgex, mode) +void mad_fregex (ptgex, mode) struct begex *ptgex; char mode ; { - struct begex *tmpgex; struct chain *tmpchn; if (ptgex != NULL) @@ -348,7 +347,6 @@ struct begex *gexpnt; case NOR : case NXOR : freflag = 1; break; - break; } } @@ -364,13 +362,10 @@ struct begex *gexpnt; case NAND : case AND : freflag = 1; break; - break; case XOR : gexpnt->TERM = NXOR; freflag = 1; break; - break; case NXOR : gexpnt->TERM = XOR ; freflag = 1; break; - break; } } @@ -458,12 +453,10 @@ struct befig *ptr_befig; struct chain *expr; { -struct chain *my_operand; - char delayed [128]; static char *str_zero = NULL; static char *str_one = NULL; - struct begex *resgex ; + struct begex *resgex = NULL; struct begex *gex_elt ; struct chain *oper_list ; struct chain *operand ; diff --git a/alliance/src/bhl/src/beh_makquad.c b/alliance/src/bhl/src/beh_makquad.c index 947a0213..49a0249c 100644 --- a/alliance/src/bhl/src/beh_makquad.c +++ b/alliance/src/bhl/src/beh_makquad.c @@ -45,14 +45,12 @@ void beh_makquad ( struct befig *pt_befig ) { struct beaux *pt_beaux; - struct berin *pt_berin; struct beout *pt_beout; struct bebus *pt_bebus; struct bebux *pt_bebux; struct bereg *pt_bereg; struct bemsg *pt_bemsg; struct binode *pt_binod; - struct biabl *pt_biabl; /* ###------------------------------------------------------### */ /* simple output ports */ diff --git a/alliance/src/bhl/src/beh_makvarlist.c b/alliance/src/bhl/src/beh_makvarlist.c index 978801d2..493ba959 100644 --- a/alliance/src/bhl/src/beh_makvarlist.c +++ b/alliance/src/bhl/src/beh_makvarlist.c @@ -58,7 +58,6 @@ struct chain *expr ; /* pointer abl expression */ int index ; char *atom ; static char buffer [128] ; - short oper ; struct chain *cst_AddSetElement (); struct chain *cst_CreateUnionSet (); @@ -92,7 +91,7 @@ struct chain *expr ; /* pointer abl expression */ /* if the expression is not a terminal (is a complex expr.) */ /* ###------------------------------------------------------### */ - if ((oper = OPER(expr)) != STABLE) + if (OPER(expr) != STABLE) { while ((expr = CDR(expr)) != NULL) { diff --git a/alliance/src/bhl/src/bhl.h b/alliance/src/bhl/src/bhl.h index 35aba7ca..2daae043 100644 --- a/alliance/src/bhl/src/bhl.h +++ b/alliance/src/bhl/src/bhl.h @@ -55,6 +55,7 @@ extern int beh_chkbefig (); extern void beh_debug (); extern void beh_makbdd (); extern void beh_makgex (); +extern void beh_makquad (); extern void beh_makderiv (); extern void beh_makvarlist (); extern void beh_freabl (); diff --git a/alliance/src/boog/src/bog_lax_param.c b/alliance/src/boog/src/bog_lax_param.c index 29ce3d4e..a9c6235c 100644 --- a/alliance/src/boog/src/bog_lax_param.c +++ b/alliance/src/boog/src/bog_lax_param.c @@ -183,7 +183,6 @@ loc_addnamelist( lax_name_list *head, char *name ) int loc_getdouble( FILE *Pfile, int c, double *PValue ) { - double Value = 0.0; char Buffer[ 32 ]; int Index = 0; diff --git a/alliance/src/boog/src/bog_lib_complete.c b/alliance/src/boog/src/bog_lib_complete.c index e57bc707..044f4344 100644 --- a/alliance/src/boog/src/bog_lib_complete.c +++ b/alliance/src/boog/src/bog_lib_complete.c @@ -78,7 +78,7 @@ static dual_list* add_dual(dual_list* top, cell_list* cell) if (dual->OPER!=ABL_OPER(cell->ABL) && (!dual->CELL || ABL_OPER(cell->ABL)!=ABL_OPER(dual->CELL->ABL))){ fprintf(stderr, - "add_dual: computing error on cell with oper %s and %s (arity %d)\n", + "add_dual: computing error on cell with oper %s and %s (arity %ld)\n", getabloperuppername(ABL_OPER(cell->ABL)), getabloperuppername(dual->OPER),ABL_ARITY(cell->ABL)); exit(1); @@ -543,7 +543,7 @@ extern void control_lib() } /*if xor doesn't exist, build*/ - if (!xor) { + if (xor == NULL) { fprintf(stderr, "Mapping Warning: 'xor' is missing in cell library...Generating\n"); cell=complete_xor_lib(); diff --git a/alliance/src/boog/src/bog_lib_negativ.c b/alliance/src/boog/src/bog_lib_negativ.c index cff7ce2a..863f49e1 100644 --- a/alliance/src/boog/src/bog_lib_negativ.c +++ b/alliance/src/boog/src/bog_lib_negativ.c @@ -55,7 +55,7 @@ extern chain_list* inv_oper(chain_list* abl, int negativ) else { if (negativ) { abl=createablnotexpr(abl); - ABL_ARITY_L(abl)=1; + ABL_ARITY_L(abl)=(chain_list*)1; } } return abl; @@ -63,30 +63,30 @@ extern chain_list* inv_oper(chain_list* abl, int negativ) switch (ABL_OPER(abl)) { case ABL_AND: - if (negativ) ABL_OPER_L(abl)=ABL_NAND; - else ABL_OPER_L(abl)=ABL_NOR; + if (negativ) ABL_OPER_L(abl)=(chain_list*)ABL_NAND; + else ABL_OPER_L(abl)=(chain_list*)ABL_NOR; negativ=!negativ; break; case ABL_NAND: - if (negativ) ABL_OPER_L(abl)=ABL_NOR; - else ABL_OPER_L(abl)=ABL_NAND; + if (negativ) ABL_OPER_L(abl)=(chain_list*)ABL_NOR; + else ABL_OPER_L(abl)=(chain_list*)ABL_NAND; break; case ABL_OR: - if (negativ) ABL_OPER_L(abl)=ABL_NOR; - else ABL_OPER_L(abl)=ABL_NAND; + if (negativ) ABL_OPER_L(abl)=(chain_list*)ABL_NOR; + else ABL_OPER_L(abl)=(chain_list*)ABL_NAND; negativ=!negativ; break; case ABL_NOR: - if (negativ) ABL_OPER_L(abl)=ABL_NAND; - else ABL_OPER_L(abl)=ABL_NOR; + if (negativ) ABL_OPER_L(abl)=(chain_list*)ABL_NAND; + else ABL_OPER_L(abl)=(chain_list*)ABL_NOR; break; case ABL_XOR: - if (negativ) ABL_OPER_L(abl)=ABL_NXOR; + if (negativ) ABL_OPER_L(abl)=(chain_list*)ABL_NXOR; negativ=0; /*nothing to do: same size XOR and NXOR*/ break; case ABL_NXOR: - if (negativ) ABL_OPER_L(abl)=ABL_XOR; + if (negativ) ABL_OPER_L(abl)=(chain_list*)ABL_XOR; negativ=0; /*nothing to do*/ break; @@ -98,7 +98,7 @@ extern chain_list* inv_oper(chain_list* abl, int negativ) case ABL_STABLE: if (negativ) { abl=createablnotexpr(abl); - ABL_ARITY_L(abl)=1; + ABL_ARITY_L(abl)=(chain_list*)1; } return abl; default: @@ -187,22 +187,22 @@ extern chain_list* build_negativ(chain_list* abl) ABL_CAR_L(leaf)=getablatomzero(); else { ABL_CAR_L(chain)=createablnotexpr(ABL_CAR(chain)); - ABL_ARITY_L(ABL_CAR(chain))=1; + ABL_ARITY_L(ABL_CAR(chain))=(chain_list*)1; } continue; } else if (ABL_OPER(leaf)==ABL_STABLE) { ABL_CAR_L(chain)=createablnotexpr(ABL_CAR(chain)); - ABL_ARITY_L(ABL_CAR(chain))=1; + ABL_ARITY_L(ABL_CAR(chain))=(chain_list*)1; continue; } switch (ABL_OPER(leaf)) { - case ABL_AND: ABL_OPER_L(leaf)=ABL_NAND; break; - case ABL_OR: ABL_OPER_L(leaf)=ABL_NOR; break; - case ABL_NAND: ABL_OPER_L(leaf)=ABL_AND; break; - case ABL_NOR: ABL_OPER_L(leaf)=ABL_OR; break; - case ABL_XOR: ABL_OPER_L(leaf)=ABL_NXOR; break; - case ABL_NXOR: ABL_OPER_L(leaf)=ABL_XOR; break; + case ABL_AND: ABL_OPER_L(leaf)=(chain_list*)ABL_NAND; break; + case ABL_OR: ABL_OPER_L(leaf)=(chain_list*)ABL_NOR; break; + case ABL_NAND: ABL_OPER_L(leaf)=(chain_list*)ABL_AND; break; + case ABL_NOR: ABL_OPER_L(leaf)=(chain_list*)ABL_OR; break; + case ABL_XOR: ABL_OPER_L(leaf)=(chain_list*)ABL_NXOR; break; + case ABL_NXOR: ABL_OPER_L(leaf)=(chain_list*)ABL_XOR; break; case ABL_NOT: ABL_CAR_L(chain)=ABL_CADR(leaf); freechain(leaf); @@ -214,10 +214,10 @@ extern chain_list* build_negativ(chain_list* abl) } switch (ABL_OPER(abl)) { - case ABL_AND: ABL_OPER_L(abl)=ABL_NOR; break; - case ABL_OR: ABL_OPER_L(abl)=ABL_NAND; break; - case ABL_NAND: ABL_OPER_L(abl)=ABL_OR; break; - case ABL_NOR: ABL_OPER_L(abl)=ABL_AND; break; + case ABL_AND: ABL_OPER_L(abl)=(chain_list*)ABL_NOR; break; + case ABL_OR: ABL_OPER_L(abl)=(chain_list*)ABL_NAND; break; + case ABL_NAND: ABL_OPER_L(abl)=(chain_list*)ABL_OR; break; + case ABL_NOR: ABL_OPER_L(abl)=(chain_list*)ABL_AND; break; case ABL_NOT: chain=abl; abl=ABL_CADR(abl); diff --git a/alliance/src/boog/src/bog_lib_permute.c b/alliance/src/boog/src/bog_lib_permute.c index e6bbe757..2a1e8661 100644 --- a/alliance/src/boog/src/bog_lib_permute.c +++ b/alliance/src/boog/src/bog_lib_permute.c @@ -248,7 +248,7 @@ static chain_list *permutations_abl(chain_list* abl) /*put the operator*/ for (chain=list_abl; chain; chain=chain->NEXT) { head=createabloper(ABL_OPER(abl)); - ABL_ARITY_L(head)=ABL_ARITY(abl); + ABL_ARITY_L(head)=(chain_list*)ABL_ARITY(abl); ABL_CDR(head)=dupablchain(chain->DATA); chain->DATA=head; } @@ -266,6 +266,7 @@ static chain_list *permutations_abl(chain_list* abl) } +#if THIS_IS_DISABLED /******************************************************************************/ /* return 1 if abl1 and abl2 heave the same properties */ /******************************************************************************/ @@ -302,6 +303,7 @@ static int same_properties(chain_list* abl1, chain_list* abl2, befig_list* befig return 0; /*equality*/ } +#endif /******************************************************************************/ diff --git a/alliance/src/boog/src/bog_lib_reader.c b/alliance/src/boog/src/bog_lib_reader.c index b39c6df6..fca9bd2b 100644 --- a/alliance/src/boog/src/bog_lib_reader.c +++ b/alliance/src/boog/src/bog_lib_reader.c @@ -64,7 +64,7 @@ extern chain_list *getfiles_with_ext (char *path, char *ext) struct dirent *entry; char *filename; char *completefilename; - int filenamelength, extensionlength, pathlength; + int filenamelength, extensionlength; chain_list *head; if (!path || !ext) return NULL; @@ -73,7 +73,6 @@ extern chain_list *getfiles_with_ext (char *path, char *ext) if (!dir) return NULL; extensionlength = strlen (ext); - pathlength = strlen (path); head=NULL; while ((entry = readdir (dir)) != NULL) { diff --git a/alliance/src/boog/src/bog_map_adapt.c b/alliance/src/boog/src/bog_map_adapt.c index fb58c302..efbf59b6 100644 --- a/alliance/src/boog/src/bog_map_adapt.c +++ b/alliance/src/boog/src/bog_map_adapt.c @@ -85,7 +85,7 @@ extern void invert_port(port_list* port) { /*add a not*/ not=createabloper(ABL_NOT); - ABL_ARITY_L(not)=1; + ABL_ARITY_L(not)=(chain_list*)1; /*swap pointers references*/ swap_pointers(port->ABL,not); ABL_CDR(port->ABL)=addchain(NULL,not); @@ -94,12 +94,12 @@ extern void invert_port(port_list* port) else { switch (ABL_OPER(port->ABL)) { - case ABL_AND: ABL_OPER_L(port->ABL)=ABL_NAND; break; - case ABL_NAND: ABL_OPER_L(port->ABL)=ABL_AND; break; - case ABL_OR: ABL_OPER_L(port->ABL)=ABL_NOR; break; - case ABL_NOR: ABL_OPER_L(port->ABL)=ABL_OR; break; - case ABL_XOR: ABL_OPER_L(port->ABL)=ABL_NXOR; break; - case ABL_NXOR: ABL_OPER_L(port->ABL)=ABL_XOR; break; + case ABL_AND: ABL_OPER_L(port->ABL)=(chain_list*)ABL_NAND; break; + case ABL_NAND: ABL_OPER_L(port->ABL)=(chain_list*)ABL_AND; break; + case ABL_OR: ABL_OPER_L(port->ABL)=(chain_list*)ABL_NOR; break; + case ABL_NOR: ABL_OPER_L(port->ABL)=(chain_list*)ABL_OR; break; + case ABL_XOR: ABL_OPER_L(port->ABL)=(chain_list*)ABL_NXOR; break; + case ABL_NXOR: ABL_OPER_L(port->ABL)=(chain_list*)ABL_XOR; break; case ABL_NOT: /*no need to insert*/ port->ABL=ABL_CADR_L(port->ABL); continue; default: @@ -112,7 +112,7 @@ extern void invert_port(port_list* port) /*insert a NOT to match perfectly with cell*/ not=createabloper(ABL_NOT); - ABL_ARITY_L(not)=1; + ABL_ARITY_L(not)=(chain_list*)1; /*swap pointers references*/ swap_pointers(port->ABL,not); ABL_CDR(port->ABL)=addchain(NULL,not); @@ -160,17 +160,17 @@ static chain_list* loc_adapt_abl(chain_list* expr, float C) /*evaluate with the biggest oper*/ int arity=ABL_ARITY(expr); /*memorize arity*/ /*search the biggest arity which matches expr*/ - for (ABL_ARITY_L(expr)=ABL_ARITY(expr)-1 ; ABL_ARITY(expr)>0; - ABL_ARITY_L(expr)=ABL_ARITY(expr)-1) { + for (ABL_ARITY_L(expr)=(chain_list*)(ABL_ARITY(expr)-1) ; ABL_ARITY(expr)>0; + ABL_ARITY_L(expr)=(chain_list*)(ABL_ARITY(expr)-1) ) { cell=cell_prepare(expr); if (cell) break; } - ABL_ARITY_L(expr)=arity; /*put back arity*/ + ABL_ARITY_L(expr)=(chain_list*)arity; /*put back arity*/ if (!cell) { fprintf(stderr,"Library Error: No cell could match '"); display_abl(expr); if (ABL_ATOM(expr)) fprintf(stderr,"'\n"); - else fprintf(stderr,"' (oper arity=%d)\n",ABL_ARITY(expr)); + else fprintf(stderr,"' (oper arity=%ld)\n",ABL_ARITY(expr)); exit(1); } @@ -241,16 +241,16 @@ extern chain_list* adapt_abl(chain_list* expr) /*evaluate with the biggest oper*/ arity=ABL_ARITY(expr); /*memorize arity*/ /*search the biggest arity which matches expr*/ - for (ABL_ARITY_L(expr)=ABL_ARITY(expr)-1 ; ABL_ARITY(expr)>0; - ABL_ARITY_L(expr)=ABL_ARITY(expr)-1) { + for (ABL_ARITY_L(expr)=(chain_list*)(ABL_ARITY(expr)-1) ; ABL_ARITY(expr)>0; + ABL_ARITY_L(expr)=(chain_list*)(ABL_ARITY(expr)-1) ) { cell=cell_prepare(expr); if (cell) break; } - ABL_ARITY_L(expr)=arity; /*put back arity*/ + ABL_ARITY_L(expr)=(chain_list*)arity; /*put back arity*/ if (!cell) { fprintf(stderr,"Library Error: No cell could match '"); display_abl(expr); - fprintf(stderr,"' (oper arity=%d)\n",ABL_ARITY(expr)); + fprintf(stderr,"' (oper arity=%ld)\n",ABL_ARITY(expr)); exit(1); } @@ -315,7 +315,7 @@ extern biabl_list* adapt_bus(biabl_list* biabl) biabl->VALABL=build_negativ(biabl->VALABL); biabl->VALABL=createablnotexpr(biabl->VALABL); /* createablnotexpr() can simplify*/ - if (!ABL_ATOM(biabl->VALABL)) ABL_ARITY_L(biabl->VALABL)=1; + if (!ABL_ATOM(biabl->VALABL)) ABL_ARITY_L(biabl->VALABL)=(chain_list*)1; } cell=cell_prepare_bus(biabl); diff --git a/alliance/src/boog/src/bog_map_pattern.c b/alliance/src/boog/src/bog_map_pattern.c index bb2e11b6..9ffed7c7 100644 --- a/alliance/src/boog/src/bog_map_pattern.c +++ b/alliance/src/boog/src/bog_map_pattern.c @@ -406,7 +406,7 @@ extern cell_list* cell_pattern(chain_list* expr) /*create a temporary NOT to match perfectly with cell*/ not=createabloper(ABL_NOT); ABL_CDR(not)=addchain(NULL,NULL); - ABL_ARITY_L(not)=1; + ABL_ARITY_L(not)=(chain_list*)1; /*take those are biggest*/ for (cell=getcell_logic_lib(); cell; cell=cell->NEXT) { @@ -525,7 +525,7 @@ extern cell_list* cell_pattern(chain_list* expr) fprintf(stderr,"Library Error: No cell could match '"); display_abl(expr); if (ABL_ATOM(expr)) fprintf(stderr,"'\n"); - else fprintf(stderr,"' (oper arity=%d)\n",ABL_ARITY(expr)); + else fprintf(stderr,"' (oper arity=%ld)\n",ABL_ARITY(expr)); exit(1); } @@ -566,7 +566,7 @@ extern cell_list* cell_pattern_bus(biabl_list* biabl) /*create a temporary NOT to match perfectly with cell*/ not=createabloper(ABL_NOT); ABL_CDR(not)=addchain(NULL,NULL); - ABL_ARITY_L(not)=1; + ABL_ARITY_L(not)=(chain_list*)1; for (cell=getcell_tristate_lib(); cell; cell=cell->NEXT) { /*prepare for use*/ @@ -713,7 +713,7 @@ extern cell_list* cell_pattern_reg(biabl_list* biabl) /*create a temporary NOT to match perfectly with cell*/ not=createabloper(ABL_NOT); ABL_CDR(not)=addchain(NULL,NULL); - ABL_ARITY_L(not)=1; + ABL_ARITY_L(not)=(chain_list*)1; cell=getcell_register_lib(); diff --git a/alliance/src/boog/src/bog_normalize_ARITY.c b/alliance/src/boog/src/bog_normalize_ARITY.c index 5c71b53a..56dad07e 100644 --- a/alliance/src/boog/src/bog_normalize_ARITY.c +++ b/alliance/src/boog/src/bog_normalize_ARITY.c @@ -54,7 +54,7 @@ extern void put_arity_abl (chain_list* abl) put_arity_abl((chain_list*)ABL_CAR(pattern)); } - ABL_ARITY_L(abl)=arity; + ABL_ARITY_L(abl)=(chain_list*)arity; return ; } diff --git a/alliance/src/boog/src/bog_normalize_DAG.c b/alliance/src/boog/src/bog_normalize_DAG.c index 6c2f83cf..02ce3aea 100644 --- a/alliance/src/boog/src/bog_normalize_DAG.c +++ b/alliance/src/boog/src/bog_normalize_DAG.c @@ -41,8 +41,8 @@ #include "bog_normalize_DAG.h" -#define USING(node) {node=-mark;} -#define USED(node) {node=(long)((((long)node<0)?0L:(long)node)+1L);} +#define USING(node) {node=(void*)(((long)node)-mark);} +#define USED(node) {node=(void*)((((long)node<0)?0L:(long)node)+1L);} #define IS_USING(node) ((long)node==-mark) #define IS_USED(node) ((long)node!=0) #define IS_UNUSED(node) ((long)node==0) diff --git a/alliance/src/boog/src/bog_normalize_simplify.c b/alliance/src/boog/src/bog_normalize_simplify.c index ba1927a2..2ee21fd8 100644 --- a/alliance/src/boog/src/bog_normalize_simplify.c +++ b/alliance/src/boog/src/bog_normalize_simplify.c @@ -57,13 +57,13 @@ static chain_list* unflatnegexpr(chain_list* abl) switch(ABL_OPER(abl)) { case ABL_NAND: - ABL_OPER_L(abl)=ABL_AND; + ABL_OPER_L(abl)=(chain_list*)ABL_AND; return createablnotexpr(abl); case ABL_NOR: - ABL_OPER_L(abl)=ABL_OR; + ABL_OPER_L(abl)=(chain_list*)ABL_OR; return createablnotexpr(abl); case ABL_NXOR: - ABL_OPER_L(abl)=ABL_XOR; + ABL_OPER_L(abl)=(chain_list*)ABL_XOR; return createablnotexpr(abl); default: return abl; } diff --git a/alliance/src/boog/src/bog_signal_delay.c b/alliance/src/boog/src/bog_signal_delay.c index b6b8f15c..cca103c9 100644 --- a/alliance/src/boog/src/bog_signal_delay.c +++ b/alliance/src/boog/src/bog_signal_delay.c @@ -192,7 +192,7 @@ extern ptype_list* max_delay_path(befig_list* befig, lofig_list* lofig) { ptype_list* head, *path; loins_list* loins; - char *insname; + char *insname = NULL; if (!befig) { fprintf(stderr,"max_delay_path: NULL pointer\n"); diff --git a/alliance/src/boog/src/bog_unflatten_befig.c b/alliance/src/boog/src/bog_unflatten_befig.c index 7c087bb9..4904f4bd 100644 --- a/alliance/src/boog/src/bog_unflatten_befig.c +++ b/alliance/src/boog/src/bog_unflatten_befig.c @@ -58,6 +58,7 @@ static void search_name(char* name); /******************************************************************************/ /* change all leaf expressions from 'mbk_not_a' to 'NOT (a)' */ /******************************************************************************/ +#if THIS_IS_DISABLED static chain_list* change_atom(chain_list* abl,int invert) { chain_list* chain; @@ -79,6 +80,7 @@ static chain_list* change_atom(chain_list* abl,int invert) return abl; } +#endif /***************************************************************************/ diff --git a/alliance/src/boog/src/bog_xsch_driver.c b/alliance/src/boog/src/bog_xsch_driver.c index 9306cca8..f00b6bd3 100644 --- a/alliance/src/boog/src/bog_xsch_driver.c +++ b/alliance/src/boog/src/bog_xsch_driver.c @@ -183,7 +183,7 @@ extern void save_xsch(FILE* xsch_stream, lofig_list* lofig, ptype_list* long_pat ptype_list* ptype, *ptype2=NULL; float delay=0, delay_out=0; char mes[1024]; - char* signame; + char* signame = NULL; locon_list* locon; losig_list* losig; float gradient=1; diff --git a/alliance/src/boom/src/boom_aux.c b/alliance/src/boom/src/boom_aux.c index 4ec87cfc..d34d7bf1 100644 --- a/alliance/src/boom/src/boom_aux.c +++ b/alliance/src/boom/src/boom_aux.c @@ -101,6 +101,7 @@ | | \------------------------------------------------------------*/ +#if THIS_IS_DISABLED static long BoomGetAblDepth( Expr ) ablexpr *Expr; @@ -141,6 +142,7 @@ static long BoomGetAblDepth( Expr ) return( MaxDepth + NumberOper ); } +#endif /*------------------------------------------------------------\ | | @@ -533,7 +535,7 @@ void BoomBehCreateAux( BehFigure ) befig_list *BehFigure; { - beaux_list *InitialAux; +/*beaux_list *InitialAux;*/ bddcircuit *BddCircuit; bddsystem *BddSystem; long Reverse; @@ -551,7 +553,7 @@ fprintf( stdout, "Before BoomBehMakeBddNode\n" ); testbddcircuit( (bddcircuit *)0 ); # endif - InitialAux = BehFigure->BEAUX; +/*InitialAux = BehFigure->BEAUX;*/ BoomAuxNumber = 0; if ( BoomAuxHashTable == (authtable *)0 ) diff --git a/alliance/src/boom/src/boom_bdd.c b/alliance/src/boom/src/boom_bdd.c index dc709204..097ff828 100644 --- a/alliance/src/boom/src/boom_bdd.c +++ b/alliance/src/boom/src/boom_bdd.c @@ -540,7 +540,7 @@ static long BoomBddSetExprKeepAux( Expr ) addauthelem( BoomBddHashKeepAux, BehAux->NAME, 0 ); SetBoomBehAuxKeep( BehAux ); - BddNode = addbddcircuitin( (bddcircuit *)0, BehAux->NAME, 0, BDD_IN_MODE_LAST ); + /*BddNode =*/ addbddcircuitin( (bddcircuit *)0, BehAux->NAME, 0, BDD_IN_MODE_LAST ); Number++; } @@ -677,7 +677,7 @@ void BoomBehMakeBddNodeNoExplosion( BehFigure ) } else { - BddNode = addbddcircuitin( (bddcircuit *)0, BehAux->NAME, 0, BDD_IN_MODE_LAST ); + /*BddNode =*/ addbddcircuitin( (bddcircuit *)0, BehAux->NAME, 0, BDD_IN_MODE_LAST ); if ( IsBoomBehAuxKeep( BehAux ) ) { @@ -1780,7 +1780,7 @@ void BoomBehRandomBddOrder( BehFigure, Amplitude ) befig_list *BehFigure; long Amplitude; { - boombefiginfo *FigInfo; +/*boombefiginfo *FigInfo;*/ long NumberVar; long MaxNode; long BddVar; @@ -1790,7 +1790,7 @@ void BoomBehRandomBddOrder( BehFigure, Amplitude ) static unsigned char InitRandom = 1; - FigInfo = GetBoomBehFigInfo( BehFigure ); +/*FigInfo = GetBoomBehFigInfo( BehFigure );*/ if ( InitRandom ) { diff --git a/alliance/src/boom/src/boom_burgun.c b/alliance/src/boom/src/boom_burgun.c index 5a0c1bb0..ebcbfed9 100644 --- a/alliance/src/boom/src/boom_burgun.c +++ b/alliance/src/boom/src/boom_burgun.c @@ -168,7 +168,7 @@ chain_list *BoomBehBurgunBddOrder( BehFigure ) befig_list *BehFigure; { - boombefiginfo *FigInfo; +/*boombefiginfo *FigInfo;*/ chain_list *OrderList; long NumberIndex; long NumberVar; @@ -182,7 +182,7 @@ chain_list *BoomBehBurgunBddOrder( BehFigure ) char *Name; char Buffer[ 32 ]; - FigInfo = GetBoomBehFigInfo( BehFigure ); +/*FigInfo = GetBoomBehFigInfo( BehFigure );*/ NumberIndex = BddLocalSystem->NUMBER_INDEX; NumberVar = BddLocalSystem->NUMBER_VAR; diff --git a/alliance/src/boom/src/boom_gradient.c b/alliance/src/boom/src/boom_gradient.c index 72080c83..1812ec4f 100644 --- a/alliance/src/boom/src/boom_gradient.c +++ b/alliance/src/boom/src/boom_gradient.c @@ -166,7 +166,7 @@ chain_list *BoomBehGradientBddOrder( BehFigure ) befig_list *BehFigure; { - boombefiginfo *FigInfo; +/*boombefiginfo *FigInfo;*/ chain_list *OrderList; long NumberVar; long VarIndex; @@ -175,7 +175,7 @@ chain_list *BoomBehGradientBddOrder( BehFigure ) long MaxNode; char *Name; - FigInfo = GetBoomBehFigInfo( BehFigure ); +/*FigInfo = GetBoomBehFigInfo( BehFigure );*/ VarIndex = getbddvarindex( BddLocalSystem, 0 ); BoomBddTopVarNode = addbddcircuitin( BddLocalCircuit, "_top_", VarIndex, diff --git a/alliance/src/boom/src/boom_logic.c b/alliance/src/boom/src/boom_logic.c index 7b4dcdbc..06ce4fc4 100644 --- a/alliance/src/boom/src/boom_logic.c +++ b/alliance/src/boom/src/boom_logic.c @@ -150,7 +150,7 @@ int BoomLogicReorderWindow2( BehFigure, BehAux, BddVar, PCost ) swapbddvar( (bddsystem *)0, BddVar ); - BehAux = BoomLogicComputeAux( BehFigure, BehAux ); +//BehAux = BoomLogicComputeAux( BehFigure, BehAux ); NewCost = BoomBehGiveCost( BehFigure ); if ( NewCost < *PCost ) @@ -197,7 +197,7 @@ int BoomLogicReorderWindow3( BehFigure, BehAux, BddVar, PCost ) swapbddvar( (bddsystem *)0, BddVar ); - BehAux = BoomLogicComputeAux( BehFigure, BehAux ); +//BehAux = BoomLogicComputeAux( BehFigure, BehAux ); NewCost = BoomBehGiveCost( BehFigure ); if ( IsBoomDebugLevel0() ) @@ -218,7 +218,7 @@ int BoomLogicReorderWindow3( BehFigure, BehAux, BddVar, PCost ) swapbddvar( (bddsystem *)0, BddVar ); - BehAux = BoomLogicComputeAux( BehFigure, BehAux ); +//BehAux = BoomLogicComputeAux( BehFigure, BehAux ); NewCost = BoomBehGiveCost( BehFigure ); if ( IsBoomDebugLevel0() ) @@ -239,7 +239,7 @@ int BoomLogicReorderWindow3( BehFigure, BehAux, BddVar, PCost ) swapbddvar( (bddsystem *)0, BddVar ); - BehAux = BoomLogicComputeAux( BehFigure, BehAux ); +//BehAux = BoomLogicComputeAux( BehFigure, BehAux ); NewCost = BoomBehGiveCost( BehFigure ); if ( IsBoomDebugLevel0() ) @@ -260,7 +260,7 @@ int BoomLogicReorderWindow3( BehFigure, BehAux, BddVar, PCost ) swapbddvar( (bddsystem *)0, BddVar ); - BehAux = BoomLogicComputeAux( BehFigure, BehAux ); +//BehAux = BoomLogicComputeAux( BehFigure, BehAux ); NewCost = BoomBehGiveCost( BehFigure ); if ( IsBoomDebugLevel0() ) @@ -281,7 +281,7 @@ int BoomLogicReorderWindow3( BehFigure, BehAux, BddVar, PCost ) swapbddvar( (bddsystem *)0, BddVar ); - BehAux = BoomLogicComputeAux( BehFigure, BehAux ); +//BehAux = BoomLogicComputeAux( BehFigure, BehAux ); NewCost = BoomBehGiveCost( BehFigure ); if ( IsBoomDebugLevel0() ) @@ -340,15 +340,11 @@ void BoomLogicOptimizeWindow( BehFigure ) beaux_list *BehAux; short *ReorderLevel; bddvar NumberChild; - bddvar BestChild; bddvar ChildCount; - bddvar ChildTo; bddvar ChildFrom; - int SwapReorder; int AnySwap; int Moved; long Cost; - long NewCost; NumberChild = BddLocalSystem->NUMBER_VAR; ReorderLevel = (short *)autallocblock( sizeof( short ) * NumberChild ); @@ -465,7 +461,7 @@ void BoomLogicOptimizeTop( BehFigure ) if ( IsBoomDebugLevel2() ) { - BoomPrintf( stdout, "-> ChildFrom %d\n", ChildFrom ); + BoomPrintf( stdout, "-> ChildFrom %u\n", ChildFrom ); } ReorderLevel[ ChildFrom ] = 0; @@ -476,7 +472,7 @@ void BoomLogicOptimizeTop( BehFigure ) { if ( IsBoomDebugLevel2() ) { - BoomPrintf( stdout, "-> Swap %d and %d\n", ChildTo, ChildTo + 1 ); + BoomPrintf( stdout, "-> Swap %u and %u\n", ChildTo, ChildTo + 1 ); } swapbddvar( (bddsystem *)0, ChildTo ); @@ -501,7 +497,7 @@ void BoomLogicOptimizeTop( BehFigure ) if ( IsBoomDebugLevel1() ) { - BoomPrintf( stdout, "--> Best child %d\n", BestChild ); + BoomPrintf( stdout, "--> Best child %u\n", BestChild ); BoomPrintf( stdout, "--> Best cost %ld\n", Cost ); } @@ -510,7 +506,7 @@ void BoomLogicOptimizeTop( BehFigure ) # ifdef BDD_DEBUG if ( IsBoomDebugLevel1() ) { -fprintf( stdout, "-> UnSwap %d and %d\n", ChildTo - 1, ChildTo ); +fprintf( stdout, "-> UnSwap %d and %u\n", ChildTo - 1, ChildTo ); } # endif @@ -555,7 +551,6 @@ void BoomLogicOptimizeProcrast( BehFigure ) bddvar NumberChild; bddvar ChildTo; bddvar ChildFrom; - char SwapReorder; long Cost; long NumberNode; long NewCost; @@ -588,14 +583,14 @@ void BoomLogicOptimizeProcrast( BehFigure ) { if ( IsBoomDebugLevel1() ) { - BoomPrintf( stdout, "-> ChildFrom %d\n", ChildFrom ); + BoomPrintf( stdout, "-> ChildFrom %u\n", ChildFrom ); } for ( ChildTo = ChildFrom; ChildTo < ( NumberChild - 1 ); ChildTo++ ) { if ( IsBoomDebugLevel1() ) { - BoomPrintf( stdout, "-> Swap %d and %d\n", ChildTo, ChildTo + 1 ); + BoomPrintf( stdout, "-> Swap %u and %d\n", ChildTo, ChildTo + 1 ); } swapbddvar( (bddsystem *)0, ChildTo ); @@ -629,7 +624,7 @@ void BoomLogicOptimizeProcrast( BehFigure ) { if ( IsBoomDebugLevel1() ) { - BoomPrintf( stdout, "-> UnSwap %d and %d\n", ChildTo, ChildTo - 1 ); + BoomPrintf( stdout, "-> UnSwap %u and %d\n", ChildTo, ChildTo - 1 ); } swapbddvar( (bddsystem *)0, ChildTo - 1 ); @@ -668,7 +663,6 @@ void BoomLogicOptimizeBest( BehFigure ) bddvar NumberChild; bddvar ChildTo; bddvar ChildFrom; - char SwapReorder; long Cost; long NewCost; long Iteration; @@ -700,14 +694,14 @@ void BoomLogicOptimizeBest( BehFigure ) { if ( IsBoomDebugLevel1() ) { - BoomPrintf( stdout, "-> ChildFrom %d\n", ChildFrom ); + BoomPrintf( stdout, "-> ChildFrom %u\n", ChildFrom ); } for ( ChildTo = ChildFrom; ChildTo < ( NumberChild - 1 ); ChildTo++ ) { if ( IsBoomDebugLevel1() ) { - BoomPrintf( stdout, "-> Swap %d and %d\n", ChildTo, ChildTo + 1 ); + BoomPrintf( stdout, "-> Swap %u and %d\n", ChildTo, ChildTo + 1 ); } swapbddvar( (bddsystem *)0, ChildTo ); @@ -734,7 +728,7 @@ void BoomLogicOptimizeBest( BehFigure ) { if ( IsBoomDebugLevel1() ) { - BoomPrintf( stdout, "-> UnSwap %d and %d\n", ChildTo, ChildTo - 1 ); + BoomPrintf( stdout, "-> UnSwap %u and %d\n", ChildTo, ChildTo - 1 ); } swapbddvar( (bddsystem *)0, ChildTo - 1 ); @@ -847,7 +841,7 @@ void BoomLogicOptimizeRandom( BehFigure ) if ( IsBoomDebugLevel0() ) { - BoomPrintf( stdout, "Initial cost %ld, NumberVar %d\n", Cost, NumberVar ); + BoomPrintf( stdout, "Initial cost %ld, NumberVar %u\n", Cost, NumberVar ); } if ( MaxIteration <= 0 ) MaxIteration = NumberVar; @@ -858,7 +852,7 @@ void BoomLogicOptimizeRandom( BehFigure ) if ( IsBoomDebugLevel0() ) { - BoomPrintf( stdout, "Swap %d\n", BddVar ); + BoomPrintf( stdout, "Swap %u\n", BddVar ); } BoomLogicReorderWindow2( BehFigure, BehAux, BddVar, &Cost ); @@ -964,16 +958,16 @@ void BoomLogicOptimizeOne( BehFigure ) befig_list *BehFigure; { - beaux_list *BehAux; - bddvar NumberVar; - bddvar BddVar; +//beaux_list *BehAux; +//bddvar NumberVar; +//bddvar BddVar; long Cost; reorderbddsystemwindow( BddLocalSystem ); - NumberVar = BddLocalSystem->NUMBER_VAR; +//NumberVar = BddLocalSystem->NUMBER_VAR; - BehAux = BoomLogicComputeAux( BehFigure, BehFigure->BEAUX ); +//BehAux = BoomLogicComputeAux( BehFigure, BehFigure->BEAUX ); Cost = BoomBehGiveCost( BehFigure ); if ( IsBoomDebugLevel0() ) @@ -995,7 +989,7 @@ void BoomLogicOptimization( BehFigure ) boombefiginfo *FigInfo; bddsystem *BddSystem; bddcircuit *BddCircuit; - beaux_list *BehAux; +//beaux_list *BehAux; FigInfo = GetBoomBehFigInfo( BehFigure ); @@ -1015,7 +1009,7 @@ void BoomLogicOptimization( BehFigure ) BoomBehAbl2BddNode( BehFigure, FigInfo->KEEP_AUX, FigInfo->INIT_BDD_ORDER ); reorderbddsystemdynamic( BddSystem, garbagebddsystem, 200000, 50 ); - BehAux = BehFigure->BEAUX; +//BehAux = BehFigure->BEAUX; if ( IsBoomDebugLevel1() ) { diff --git a/alliance/src/boom/src/boom_one.c b/alliance/src/boom/src/boom_one.c index a8300757..7051d006 100644 --- a/alliance/src/boom/src/boom_one.c +++ b/alliance/src/boom/src/boom_one.c @@ -94,16 +94,12 @@ void BoomBehOptimizeOne( BehFigure ) befig_list *BehFigure; { - beaux_list *BehAux; - bddvar NumberVar; - long Cost; + long Cost; reorderbddsystemwindow( BddLocalSystem ); - NumberVar = BddLocalSystem->NUMBER_VAR; - - BehAux = BoomBehComputeAux( BehFigure, BehFigure->BEAUX ); - Cost = BoomBehGiveCost( BehFigure ); + BoomBehComputeAux( BehFigure, BehFigure->BEAUX ); + Cost = BoomBehGiveCost( BehFigure ); if ( IsBoomDebugLevel0() ) { diff --git a/alliance/src/boom/src/boom_procrast.c b/alliance/src/boom/src/boom_procrast.c index 95db6d32..80f496ab 100644 --- a/alliance/src/boom/src/boom_procrast.c +++ b/alliance/src/boom/src/boom_procrast.c @@ -104,7 +104,7 @@ void BoomBehOptimizeProcrast( BehFigure ) long NewCost; long NumberNode; long NewNumberNode; - long LastNewNumberNode; + long LastNewNumberNode = 0; long Iteration; long MaxIteration; int Level; @@ -152,14 +152,14 @@ void BoomBehOptimizeProcrast( BehFigure ) { if ( IsBoomDebugLevel1() ) { - BoomPrintf( stdout, "-> ChildFrom %d\n", ChildFrom ); + BoomPrintf( stdout, "-> ChildFrom %u\n", ChildFrom ); } for ( ChildTo = ChildFrom; ChildTo < ( NumberChild - 1 ); ChildTo++ ) { if ( IsBoomDebugLevel1() ) { - BoomPrintf( stdout, "-> Swap %d and %d\n", ChildTo, ChildTo + 1 ); + BoomPrintf( stdout, "-> Swap %u and %d\n", ChildTo, ChildTo + 1 ); } swapbddvar( (bddsystem *)0, ChildTo ); @@ -220,7 +220,7 @@ void BoomBehOptimizeProcrast( BehFigure ) { if ( IsBoomDebugLevel1() ) { - BoomPrintf( stdout, "-> UnSwap %d and %d\n", ChildTo, ChildTo - 1 ); + BoomPrintf( stdout, "-> UnSwap %u and %d\n", ChildTo, ChildTo - 1 ); } swapbddvar( (bddsystem *)0, ChildTo - 1 ); diff --git a/alliance/src/boom/src/boom_random.c b/alliance/src/boom/src/boom_random.c index 4ae56fae..4f93a2cd 100644 --- a/alliance/src/boom/src/boom_random.c +++ b/alliance/src/boom/src/boom_random.c @@ -121,7 +121,7 @@ void BoomBehOptimizeRandom( BehFigure ) if ( IsBoomDebugLevel0() ) { - BoomPrintf( stdout, "Initial cost %ld, NumberVar %d\n", Cost, NumberVar ); + BoomPrintf( stdout, "Initial cost %ld, NumberVar %u\n", Cost, NumberVar ); } if ( MaxIteration <= 0 ) MaxIteration = NumberVar; @@ -139,7 +139,7 @@ void BoomBehOptimizeRandom( BehFigure ) if ( IsBoomDebugLevel0() ) { - BoomPrintf( stdout, "Swap %d\n", BddVar ); + BoomPrintf( stdout, "Swap %u\n", BddVar ); } BoomBehReorderWindow2( BehFigure, BehAux, BddVar, &Cost ); diff --git a/alliance/src/boom/src/boom_shared.c b/alliance/src/boom/src/boom_shared.c index bc766f3b..e7e0f9d7 100644 --- a/alliance/src/boom/src/boom_shared.c +++ b/alliance/src/boom/src/boom_shared.c @@ -490,10 +490,8 @@ long BoomComputeLog2( Value ) unsigned long Value; { - unsigned long Mask; unsigned long Log2; - Mask = 1; Log2 = 0; while ( Value != 0 ) diff --git a/alliance/src/boom/src/boom_top.c b/alliance/src/boom/src/boom_top.c index 8462157a..e7264383 100644 --- a/alliance/src/boom/src/boom_top.c +++ b/alliance/src/boom/src/boom_top.c @@ -136,7 +136,7 @@ void BoomBehOptimizeTop( BehFigure ) { if ( IsBoomDebugLevel2() ) { - BoomPrintf( stdout, "-> ChildFrom %d\n", ChildFrom ); + BoomPrintf( stdout, "-> ChildFrom %u\n", ChildFrom ); } ReorderLevel[ ChildFrom ] = 0; @@ -147,7 +147,7 @@ void BoomBehOptimizeTop( BehFigure ) { if ( IsBoomDebugLevel2() ) { - BoomPrintf( stdout, "-> Swap %d and %d\n", ChildTo, ChildTo + 1 ); + BoomPrintf( stdout, "-> Swap %u and %u\n", ChildTo, ChildTo + 1 ); } swapbddvar( (bddsystem *)0, ChildTo ); @@ -172,7 +172,7 @@ void BoomBehOptimizeTop( BehFigure ) if ( IsBoomDebugLevel1() ) { - BoomPrintf( stdout, "--> Best child %d\n", BestChild ); + BoomPrintf( stdout, "--> Best child %u\n", BestChild ); BoomPrintf( stdout, "--> Best cost %ld\n", Cost ); } @@ -181,7 +181,7 @@ void BoomBehOptimizeTop( BehFigure ) # ifdef BDD_DEBUG if ( IsBoomDebugLevel1() ) { -fprintf( stdout, "-> UnSwap %d and %d\n", ChildTo - 1, ChildTo ); +fprintf( stdout, "-> UnSwap %u and %u\n", ChildTo - 1, ChildTo ); } # endif diff --git a/alliance/src/boom/src/boom_window.c b/alliance/src/boom/src/boom_window.c index c0e357b1..9fa6dd16 100644 --- a/alliance/src/boom/src/boom_window.c +++ b/alliance/src/boom/src/boom_window.c @@ -99,7 +99,7 @@ int BoomBehReorderWindow2( BehFigure, BehAux, BddVar, PCost ) swapbddvar( (bddsystem *)0, BddVar ); - BehAux = BoomBehComputeAux( BehFigure, BehAux ); +//BehAux = BoomBehComputeAux( BehFigure, BehAux ); NewCost = BoomBehGiveCost( BehFigure ); if ( NewCost < *PCost ) @@ -147,7 +147,7 @@ int BoomBehReorderWindow3( BehFigure, BehAux, BddVar, PCost ) swapbddvar( (bddsystem *)0, BddVar ); - BehAux = BoomBehComputeAux( BehFigure, BehAux ); +//BehAux = BoomBehComputeAux( BehFigure, BehAux ); NewCost = BoomBehGiveCost( BehFigure ); if ( IsBoomDebugLevel0() ) @@ -168,7 +168,7 @@ int BoomBehReorderWindow3( BehFigure, BehAux, BddVar, PCost ) swapbddvar( (bddsystem *)0, BddVar ); - BehAux = BoomBehComputeAux( BehFigure, BehAux ); +//BehAux = BoomBehComputeAux( BehFigure, BehAux ); NewCost = BoomBehGiveCost( BehFigure ); if ( IsBoomDebugLevel0() ) @@ -189,7 +189,7 @@ int BoomBehReorderWindow3( BehFigure, BehAux, BddVar, PCost ) swapbddvar( (bddsystem *)0, BddVar ); - BehAux = BoomBehComputeAux( BehFigure, BehAux ); +//BehAux = BoomBehComputeAux( BehFigure, BehAux ); NewCost = BoomBehGiveCost( BehFigure ); if ( IsBoomDebugLevel0() ) @@ -210,7 +210,7 @@ int BoomBehReorderWindow3( BehFigure, BehAux, BddVar, PCost ) swapbddvar( (bddsystem *)0, BddVar ); - BehAux = BoomBehComputeAux( BehFigure, BehAux ); +//BehAux = BoomBehComputeAux( BehFigure, BehAux ); NewCost = BoomBehGiveCost( BehFigure ); if ( IsBoomDebugLevel0() ) @@ -231,7 +231,7 @@ int BoomBehReorderWindow3( BehFigure, BehAux, BddVar, PCost ) swapbddvar( (bddsystem *)0, BddVar ); - BehAux = BoomBehComputeAux( BehFigure, BehAux ); +//BehAux = BoomBehComputeAux( BehFigure, BehAux ); NewCost = BoomBehGiveCost( BehFigure ); if ( IsBoomDebugLevel0() ) diff --git a/alliance/src/btr/src/main.c b/alliance/src/btr/src/main.c index 9b5a176c..1994090e 100644 --- a/alliance/src/btr/src/main.c +++ b/alliance/src/btr/src/main.c @@ -345,9 +345,6 @@ int main( argc, argv ) bddnode *BddInitial; bddsystem *BddSystem; - bddcircuit *BddCircuit; - - long BtrNumReg; btrtransfunc *BtrTransFunc; btrtransrel *BtrTransRel; diff --git a/alliance/src/bvl/src/bvl_bcomp_l.l b/alliance/src/bvl/src/bvl_bcomp_l.l index e3668497..bf810a8f 100644 --- a/alliance/src/bvl/src/bvl_bcomp_l.l +++ b/alliance/src/bvl/src/bvl_bcomp_l.l @@ -1,3 +1,7 @@ + +%option noinput +%option nounput + %{ #include #include diff --git a/alliance/src/bvl/src/bvl_bcomp_y.y b/alliance/src/bvl/src/bvl_bcomp_y.y index 29df2c14..fe18eb56 100644 --- a/alliance/src/bvl/src/bvl_bcomp_y.y +++ b/alliance/src/bvl/src/bvl_bcomp_y.y @@ -25,6 +25,7 @@ /* called func. : none */ /* ###--------------------------------------------------------------### */ +extern int bvl_y_lex (void); static void bvl_y_error (str) char *str; @@ -611,7 +612,7 @@ short right ; /* array's right bound (= -1 if scalar) */ { for (i=left ; i!=(right+inc) ; i+=inc) { - sprintf (extname, "%s %d", (char *)ptauxnam->DATA, i); + sprintf (extname, "%s %ld", (char *)ptauxnam->DATA, i); name = namealloc (extname); if (ptauxnat != NULL) @@ -1275,7 +1276,7 @@ bvl_ablstr pt_ablstr; /* tested expression */ { for (; last_widthDATA); ---------*/ @@ -2833,7 +2834,7 @@ choices Bar choice { - if ($3 == "others") + if (!strncmp($3,"others",7)) bvl_error (30, NULL); BVL_NM1LST = addchain (BVL_NM1LST, $3); } diff --git a/alliance/src/bvl/src/bvl_drive.c b/alliance/src/bvl/src/bvl_drive.c index be008512..b94add8b 100644 --- a/alliance/src/bvl/src/bvl_drive.c +++ b/alliance/src/bvl/src/bvl_drive.c @@ -179,7 +179,7 @@ long trace_mode; else direct = "TO" ; - fprintf (fp, " SIGNAL %s : %s %s (%d %s %d) %s", beh_vhdlname (name), + fprintf (fp, " SIGNAL %s : %s %s (%ld %s %ld) %s", beh_vhdlname (name), mode, type, left, direct, right, kind); } else @@ -239,7 +239,7 @@ long trace_mode; else direct = "TO" ; - fprintf (fp, " SIGNAL %s : REG_VECTOR (%d %s %d) REGISTER;\t-- %s\n", + fprintf (fp, " SIGNAL %s : REG_VECTOR (%ld %s %ld) REGISTER;\t-- %s\n", beh_vhdlname (name), left, direct, right, name); } else @@ -283,7 +283,7 @@ long trace_mode; else direct = "TO" ; - fprintf (fp, " SIGNAL %s : %s (%d %s %d) BUS;\t-- %s\n", + fprintf (fp, " SIGNAL %s : %s (%ld %s %ld) BUS;\t-- %s\n", beh_vhdlname (name), type, left, direct, right, name); } else @@ -327,7 +327,7 @@ long trace_mode; else direct = "TO" ; - fprintf (fp, " SIGNAL %s : BIT_VECTOR (%d %s %d);\t-- %s\n", + fprintf (fp, " SIGNAL %s : BIT_VECTOR (%ld %s %ld);\t-- %s\n", beh_vhdlname (name), left, direct, right, name); } else @@ -398,7 +398,7 @@ long trace_mode; if (pt_aux->TIME == 0) fprintf (fp, ";\n"); else - fprintf (fp, " after %u %s;\n", pt_aux->TIME*time_step, time_unit); + fprintf (fp, " after %lu %s;\n", pt_aux->TIME*time_step, time_unit); buffer [0] = '\0'; } @@ -416,7 +416,7 @@ long trace_mode; ptbiabl = pt_reg->BIABL; while (ptbiabl != NULL) { - fprintf (fp, " label%d : BLOCK ", nrlabel); + fprintf (fp, " label%ld : BLOCK ", nrlabel); if (ptbiabl->CNDABL == NULL) beh_toolbug (19, "vhdlsavebefig", pt_reg->NAME, 0); @@ -445,12 +445,12 @@ long trace_mode; if (ptbiabl->TIME == 0) fprintf (fp, ";\n"); else - fprintf (fp, "after %u %s;\n", ptbiabl->TIME*time_step, time_unit); + fprintf (fp, "after %lu %s;\n", ptbiabl->TIME*time_step, time_unit); buffer[0] = '\0'; } - fprintf (fp, " END BLOCK label%d;\n", nrlabel); + fprintf (fp, " END BLOCK label%ld;\n", nrlabel); ptbiabl = ptbiabl->NEXT; nrlabel++; } @@ -469,7 +469,7 @@ long trace_mode; ptbiabl = pt_bux->BIABL; while (ptbiabl != NULL) { - fprintf (fp, " label%d : BLOCK ", nrlabel); + fprintf (fp, " label%ld : BLOCK ", nrlabel); if (ptbiabl->CNDABL == NULL) beh_toolbug (19, "vhdlsavebefig", pt_bux->NAME, 0); @@ -498,12 +498,12 @@ long trace_mode; if (ptbiabl->TIME == 0) fprintf (fp, ";\n"); else - fprintf (fp, "after %u %s;\n", ptbiabl->TIME*time_step, time_unit); + fprintf (fp, "after %lu %s;\n", ptbiabl->TIME*time_step, time_unit); buffer[0] = '\0'; } - fprintf (fp, " END BLOCK label%d;\n",nrlabel); + fprintf (fp, " END BLOCK label%ld;\n",nrlabel); ptbiabl = ptbiabl->NEXT; nrlabel++; } @@ -523,7 +523,7 @@ long trace_mode; ptbiabl = pt_bus->BIABL; while (ptbiabl != NULL) { - fprintf (fp, " label%d : BLOCK ", nrlabel); + fprintf (fp, " label%ld : BLOCK ", nrlabel); if (ptbiabl->CNDABL == NULL) beh_toolbug (19, "vhdlsavebefig", pt_bus->NAME, 0); @@ -551,11 +551,11 @@ long trace_mode; if (ptbiabl->TIME == 0) fprintf (fp, ";\n"); else - fprintf (fp, "after %u %s;\n", ptbiabl->TIME*time_step, time_unit); + fprintf (fp, "after %lu %s;\n", ptbiabl->TIME*time_step, time_unit); buffer [0] = '\0'; } - fprintf (fp, "\tEND BLOCK label%d;\n", nrlabel); + fprintf (fp, "\tEND BLOCK label%ld;\n", nrlabel); ptbiabl = ptbiabl->NEXT; nrlabel++; } @@ -587,7 +587,7 @@ long trace_mode; if (pt_out->TIME == 0) fprintf (fp, ";\n"); else - fprintf (fp, " after %u %s;\n", pt_out->TIME*time_step, time_unit); + fprintf (fp, " after %lu %s;\n", pt_out->TIME*time_step, time_unit); buffer [0] = '\0'; } diff --git a/alliance/src/bvl/src/bvl_parse.c b/alliance/src/bvl/src/bvl_parse.c index 70c04d77..fc60d405 100644 --- a/alliance/src/bvl/src/bvl_parse.c +++ b/alliance/src/bvl/src/bvl_parse.c @@ -31,14 +31,15 @@ char *figname ; unsigned long trace_mode; { - extern FILE *bvl_y_in ; - extern long bvl_y_parse (); - char *tok ; - char *str ; - unsigned long check_mode ; - struct chain *behsfx_lst = NULL; - struct chain *suffix = NULL; - static unsigned long call_nbr = 0 ; + extern FILE *bvl_y_in ; + extern long bvl_y_parse (); + extern void bvl_y_restart(); + char *tok ; + char *str ; + unsigned long check_mode ; + struct chain *behsfx_lst = NULL; + struct chain *suffix = NULL; + static unsigned long call_nbr = 0 ; /* ###------------------------------------------------------### */ /* read the environment variable VH_BEHSFX to create a list */ diff --git a/alliance/src/bvl/src/bvl_util.c b/alliance/src/bvl/src/bvl_util.c index 847efa00..071aac57 100644 --- a/alliance/src/bvl/src/bvl_util.c +++ b/alliance/src/bvl/src/bvl_util.c @@ -42,7 +42,7 @@ char *str1; { BVL_ERRFLG++; - fprintf (stderr, "`%s` Error %d line %d :", BVL_CURFIL, code, BEH_LINNUM); + fprintf (stderr, "`%s` Error %ld line %u :", BVL_CURFIL, code, BEH_LINNUM); switch (code) { @@ -202,7 +202,7 @@ char *name ; prv_por = pt_por; if (pt_por != NULL) { - if (sscanf (pt_por->NAME, "%s %u", name, &left) == 1) + if (sscanf (pt_por->NAME, "%255s %22ld", name, &left) == 1) left = -1; else { @@ -211,7 +211,7 @@ char *name ; while (pt_por != NULL) { - if (sscanf (pt_por->NAME, "%s %u", tmp_nam, &index) == 1) + if (sscanf (pt_por->NAME, "%255s %22ld", tmp_nam, &index) == 1) break; else { @@ -255,7 +255,7 @@ char *name ; prv_aux = pt_aux; if (pt_aux != NULL) { - if (sscanf (pt_aux->NAME, "%s %u", name, &left) == 1) + if (sscanf (pt_aux->NAME, "%255s %22ld", name, &left) == 1) left = -1; else { @@ -264,7 +264,7 @@ char *name ; while (pt_aux != NULL) { - if (sscanf (pt_aux->NAME, "%s %u", tmp_nam, &index) == 1) + if (sscanf (pt_aux->NAME, "%255s %22ld", tmp_nam, &index) == 1) break; else { @@ -308,7 +308,7 @@ char *name ; prv_bux = pt_bux; if (pt_bux != NULL) { - if (sscanf (pt_bux->NAME, "%s %u", name, &left) == 1) + if (sscanf (pt_bux->NAME, "%255s %22ld", name, &left) == 1) left = -1; else { @@ -317,7 +317,7 @@ char *name ; while (pt_bux != NULL) { - if (sscanf (pt_bux->NAME, "%s %u", tmp_nam, &index) == 1) + if (sscanf (pt_bux->NAME, "%255s %22ld", tmp_nam, &index) == 1) break; else { @@ -361,7 +361,7 @@ char *name ; prv_reg = pt_reg; if (pt_reg != NULL) { - if (sscanf (pt_reg->NAME, "%s %u", name, &left) == 1) + if (sscanf (pt_reg->NAME, "%255s %22ld", name, &left) == 1) left = -1; else { @@ -370,7 +370,7 @@ char *name ; while (pt_reg != NULL) { - if (sscanf (pt_reg->NAME, "%s %u", tmp_nam, &index) == 1) + if (sscanf (pt_reg->NAME, "%255s %22ld", tmp_nam, &index) == 1) break; else { diff --git a/alliance/src/cells/src/dp_sxlib/dp_nmux_x1.ap b/alliance/src/cells/src/dp_sxlib/dp_nmux_x1.ap index 58087f35..5d516046 100644 --- a/alliance/src/cells/src/dp_sxlib/dp_nmux_x1.ap +++ b/alliance/src/cells/src/dp_sxlib/dp_nmux_x1.ap @@ -23,8 +23,8 @@ R 1500,1500,ref_ref,nq_15 R 1500,1000,ref_ref,nq_10 R 500,1000,ref_ref,i1_10 R 500,1500,ref_ref,i1_15 -S 1800,2000,2000,2000,200,sel0,LEFT,ALU2 -S 1000,2000,1200,2000,200,sel1,RIGHT,ALU2 +S 2000,2000,2000,2000,200,sel0,LEFT,CALU2 +S 1000,2000,1000,2000,200,sel1,RIGHT,CALU2 S 1500,1000,1500,3500,200,nq,UP,CALU1 S 500,1000,500,4000,200,i1,UP,CALU1 S 2500,1000,2500,4000,200,i0,UP,CALU1 diff --git a/alliance/src/ctl/src/ctl.h b/alliance/src/ctl/src/ctl.h index bfe8c398..6951cea3 100644 --- a/alliance/src/ctl/src/ctl.h +++ b/alliance/src/ctl/src/ctl.h @@ -306,6 +306,8 @@ extern ctlfig_list *addctlfig __P((char *Name)); extern ctlform_list *addctlform __P((ctlfig_list *Figure, char *Name, vexexpr *Expr)); extern ctltype_list *addctltype __P((ctlfig_list *Figure, char *Name, unsigned long Index, long Left, long Right, unsigned long Size, char **Value, char Class, ctltype_list *Base)); + extern void addctlpredefinedtype __P(( ctlfig_list *Figure )); + extern ctldecl_list *addctldecl __P((ctlfig_list *Figure, vexexpr *Atom, unsigned char Type )); extern ctldecl_list *addctldeclvar __P((ctlfig_list *Figure, vexexpr *Atom)); diff --git a/alliance/src/ctl/src/ctladd.c b/alliance/src/ctl/src/ctladd.c index 09b6d0f0..2484154a 100644 --- a/alliance/src/ctl/src/ctladd.c +++ b/alliance/src/ctl/src/ctladd.c @@ -521,10 +521,6 @@ void addctlpredefinedtype( Figure ) static char *std_ulogic_vl[9]; ctltype_list *TypeBit; - ctltype_list *TypeReg; - ctltype_list *TypeMux; - ctltype_list *TypeWor; - ctltype_list *TypeInt; ctltype_list *TypeStd_logic; ctltype_list *TypeStd_ulogic; ctltype_list *TypeCharacter; @@ -564,7 +560,7 @@ void addctlpredefinedtype( Figure ) addctltype( Figure, "string", VEX_TYPE_STRING, 0, 0x7fffffff, 0, NULL, 'U', TypeCharacter ); - TypeInt = addctltype( Figure, "integer", + addctltype( Figure, "integer", VEX_TYPE_INTEGER, 0x80000000, 0x7fffffff, 0, NULL, 'I', NULL ); addctltype( Figure, "natural", diff --git a/alliance/src/ctl/src/ctldel.c b/alliance/src/ctl/src/ctldel.c index 64d340b6..fa7de544 100644 --- a/alliance/src/ctl/src/ctldel.c +++ b/alliance/src/ctl/src/ctldel.c @@ -48,6 +48,7 @@ # include # include "ctldel.h" +# include "ctlfree.h" # include "ctlerror.h" /*------------------------------------------------------------\ @@ -102,6 +103,7 @@ static void loc_delallctlline( ScanLine ) | | \------------------------------------------------------------*/ +#if THIS_IS_DISABLED static void loc_delctldecl( Figure, Declar ) ctlfig_list *Figure; @@ -125,6 +127,7 @@ static void loc_delctldecl( Figure, Declar ) freevexexpr( Declar->VEX_INIT ); freectldecl( Declar ); } +#endif /*------------------------------------------------------------\ | | diff --git a/alliance/src/ctl/src/ctlfree.h b/alliance/src/ctl/src/ctlfree.h index 0825f557..cbde3a89 100644 --- a/alliance/src/ctl/src/ctlfree.h +++ b/alliance/src/ctl/src/ctlfree.h @@ -72,4 +72,6 @@ | | \------------------------------------------------------------*/ +extern void freectltype __P(( ctltype_list *Type )); + # endif diff --git a/alliance/src/ctp/src/ctp_bspec.c b/alliance/src/ctp/src/ctp_bspec.c index e8721b38..52b5aafd 100644 --- a/alliance/src/ctp/src/ctp_bspec.c +++ b/alliance/src/ctp/src/ctp_bspec.c @@ -34,6 +34,7 @@ #include "ctp_bedef.h" #include "ctp_bspec.h" +#include "ctp_util.h" static int CtpEvalError = 0; @@ -163,9 +164,11 @@ long right; ctltype_list *BaseType2; ctltype_list *CtlType; - result.IDENT = NULL; - result.VEX = NULL; - result.WIDTH = 0; + result.IDENT = NULL; + result.VEX = NULL; + result.TYPE = 0; + result.WIDTH = 0; + result.SIGNED = 0; result.AGGREG = 0; switch (oper) diff --git a/alliance/src/ctp/src/ctp_byacc.h b/alliance/src/ctp/src/ctp_byacc.h index 843a164f..16ef8da5 100644 --- a/alliance/src/ctp/src/ctp_byacc.h +++ b/alliance/src/ctp/src/ctp_byacc.h @@ -44,8 +44,7 @@ static long chktab (); static void fretab (); static void *ctp_addstr (); static ctltype_list *val_type(); -static ctltype_list *get_type(); -static struct ptype *reversetype(); +/*static ctltype_list *get_type();*/ extern char CTP_ERRFLG; /* set to 1 in case of error */ extern ctlfig_list *CTP_HEADFIG; /* head of vbfigs */ @@ -62,12 +61,14 @@ ctp_vexstr CTP_EMPSTR; /* empty structure used with NOT*/ static long CTP_NUMTYP = 0; /* nombre de type */ static struct chain *CTP_NM1LST = NULL; /* 1-st name liste */ -static struct chain *CTP_NM2LST = NULL; /* 2-st name liste */ +/*static struct chain *CTP_NM2LST = NULL;*/ /* 2-st name liste */ static struct chain *CTP_INSLST = NULL; /* 3-st name liste */ static struct chain *CTP_LINLST = NULL; /* list of line */ static struct chain *CTP_VALLST = NULL; /* list of waveforms (ABL) */ +/* static struct ptype *CTP_PTYPE = NULL; +*/ static struct dct_entry *CTP_DCEHED; /* free dct_entry's head */ static struct dct_recrd *CTP_DCRHED; /* free dct_recrd's head */ diff --git a/alliance/src/ctp/src/ctp_l.l b/alliance/src/ctp/src/ctp_l.l index 4203cd53..5833d6ef 100644 --- a/alliance/src/ctp/src/ctp_l.l +++ b/alliance/src/ctp/src/ctp_l.l @@ -1,3 +1,7 @@ + +%option noinput +%option nounput + /*------------------------------------------------------------\ | | | This file is part of the Alliance CAD System Copyright | diff --git a/alliance/src/ctp/src/ctp_parse.c b/alliance/src/ctp/src/ctp_parse.c index 0d7bd8e1..2cd42f24 100644 --- a/alliance/src/ctp/src/ctp_parse.c +++ b/alliance/src/ctp/src/ctp_parse.c @@ -84,7 +84,6 @@ ctlfig_list *loadctlfig( InputFileName ) char *InputFileName; { int Value; - int Index; ctp_y_in = mbkfopen( InputFileName, "ctl", "r" ); diff --git a/alliance/src/ctp/src/ctp_util.h b/alliance/src/ctp/src/ctp_util.h index b90ad0b8..07bd2907 100644 --- a/alliance/src/ctp/src/ctp_util.h +++ b/alliance/src/ctp/src/ctp_util.h @@ -40,3 +40,5 @@ extern long CTP_LINNUM; /* file's line number */ extern char CTP_ERRFLG; /* Error flag */ extern char CTP_CURFIL[]; /* current file name */ + + extern void ctp_toolbug (); diff --git a/alliance/src/ctp/src/ctp_y.y b/alliance/src/ctp/src/ctp_y.y index 1b9b6f2b..4ec5d63b 100644 --- a/alliance/src/ctp/src/ctp_y.y +++ b/alliance/src/ctp/src/ctp_y.y @@ -53,6 +53,9 @@ # define my_ctp_error ctp_error #endif +extern int ctp_y_lex (void); +extern void ctp_y_error (char*); + #ifdef CTP_DEBUG #define YYDEBUG 1 #endif @@ -359,13 +362,9 @@ constant_declaration ctltype_list *Type; ctldecl_list *CtlCst; vexexpr *VexValue; - chain_list *HeadChain; - chain_list *ScanChain; - ctp_vexstr *VexStr; short Signed; long Left; long Right; - short Width; long AttrLeft; long AttrRight; @@ -424,13 +423,9 @@ assumption_declaration ctltype_list *Type; ctldecl_list *CtlAss; vexexpr *VexValue; - chain_list *HeadChain; - chain_list *ScanChain; - ctp_vexstr *VexStr; short Signed; long Left; long Right; - short Width; long AttrLeft; long AttrRight; @@ -469,13 +464,9 @@ initial_declaration ctltype_list *Type; ctldecl_list *CtlAss; vexexpr *VexValue; - chain_list *HeadChain; - chain_list *ScanChain; - ctp_vexstr *VexStr; short Signed; long Left; long Right; - short Width; long AttrLeft; long AttrRight; @@ -514,13 +505,9 @@ reset_cond_declaration ctltype_list *Type; ctldecl_list *CtlAss; vexexpr *VexValue; - chain_list *HeadChain; - chain_list *ScanChain; - ctp_vexstr *VexStr; short Signed; long Left; long Right; - short Width; long AttrLeft; long AttrRight; @@ -567,8 +554,6 @@ variable_declaration { char *LocalName; char *signame; - char *codedsigname; - char buffer[ 128 ]; ctltype_list *Type; ctldecl_list *CtlVar; short Signed; @@ -576,9 +561,6 @@ variable_declaration long Right; long AttrLeft; long AttrRight; - char StrFlag; - vexexpr *VexInit; - struct ctp_expr expr1; LocalName = CTP_MODNAM; Type = val_type( $4.NAME ); @@ -753,10 +735,8 @@ enumeration_type_definition RightParen_ERR { char *enumname; - char *enumval; long size; long indice; - long numbit; char **pnt; chain_list *nm1lst; @@ -862,7 +842,7 @@ constrained_array_definition my_ctp_error(123,NULL); } - sprintf( buffer, "_subtype_%d", CTP_NUMTYP ); + sprintf( buffer, "_subtype_%ld", CTP_NUMTYP ); name = namealloc( buffer ); NewType = addctltype(CTP_HEADFIG,name,$4.INDEX, $4.LEFT, @@ -1337,8 +1317,6 @@ primary long right; long left_bnd; long right_bnd; - long in_bound; - long out_bound; long mode; long flag; @@ -1577,10 +1555,7 @@ element_association name : simple_name { - authelem *valbitstr; - char *codedsigname; char *LocalName; - char buffer[128]; LocalName = CTP_MODNAM; @@ -1607,8 +1582,6 @@ indexed_name char *LocalName; ctp_vexstr *VexStr; chain_list *ScanChain; - vexexpr *VexExpr; - vexexpr *VexRet; long Index; long Error; long Def; @@ -2264,6 +2237,7 @@ static ctltype_list *val_type(name) return( searchctltype( CTP_HEADFIG, name ) ); } +#if THIS_IS_DISABLED static ctltype_list *get_type(val) long val; @@ -2279,6 +2253,7 @@ static ctltype_list *get_type(val) return( Type ); } +#endif int ctp_y_wrap () { diff --git a/alliance/src/ctp/src/main.c b/alliance/src/ctp/src/main.c index 1e9875fe..1b725b29 100644 --- a/alliance/src/ctp/src/main.c +++ b/alliance/src/ctp/src/main.c @@ -98,7 +98,6 @@ int main( argc, argv ) char Option; int FlagVerbose = 0; - int FlagSave = 0; mbkenv(); autenv(); diff --git a/alliance/src/distrib/etc/alc_env.sh.in b/alliance/src/distrib/etc/alc_env.sh.in index 354b8ba6..ee283b7e 100644 --- a/alliance/src/distrib/etc/alc_env.sh.in +++ b/alliance/src/distrib/etc/alc_env.sh.in @@ -82,14 +82,14 @@ export PATH # Only needed on Solaris (included in /etc/ld.so.conf under Linux). - if [ "`uname -o`" != "GNU/Linux" ]; then + #if [ "`uname -o`" != "GNU/Linux" ]; then if [ -z "${LD_LIBRARY_PATH}" ]; then LD_LIBRARY_PATH=$ALLIANCE_TOP/lib else LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$ALLIANCE_TOP/lib fi export LD_LIBRARY_PATH - fi + #fi if [ -z "${MANPATH}" ]; then MANPATH=:$ALLIANCE_TOP/man:$(manpath) diff --git a/alliance/src/dreal/src/GMC_menu.c b/alliance/src/dreal/src/GMC_menu.c index 289862fc..13d6c2b0 100644 --- a/alliance/src/dreal/src/GMC_menu.c +++ b/alliance/src/dreal/src/GMC_menu.c @@ -112,7 +112,9 @@ (DrealMenuItem *)NULL } , - NULL + { + NULL + } }; /*------------------------------------------------------------\ diff --git a/alliance/src/dreal/src/GMC_message.c b/alliance/src/dreal/src/GMC_message.c index 536e58b3..3d35a54d 100644 --- a/alliance/src/dreal/src/GMC_message.c +++ b/alliance/src/dreal/src/GMC_message.c @@ -94,19 +94,19 @@ void DrealPromptCreateRectangle() { char StaticLayer; - StaticLayer = RDS_STATIC_LAYER[ DrealRectangleLayer ]; + StaticLayer = RDS_STATIC_LAYER[ (int)DrealRectangleLayer ]; DrealDisplayMessage( DREAL_MESSAGE_MODE, "Create Rectangle" ); if ( DrealRectangleName == (char *)NULL ) { sprintf( MessageBuffer, "Layer: %s Name: none", - DREAL_RDS_LAYER_NAME_TABLE[ StaticLayer ][0] ); + DREAL_RDS_LAYER_NAME_TABLE[ (int)StaticLayer ][0] ); } else { sprintf( MessageBuffer, "Layer: %s Name: %s", - DREAL_RDS_LAYER_NAME_TABLE[ StaticLayer ][0] , + DREAL_RDS_LAYER_NAME_TABLE[ (int)StaticLayer ][0] , DrealRectangleName ); } diff --git a/alliance/src/dreal/src/GMC_panel.c b/alliance/src/dreal/src/GMC_panel.c index e259820f..9e4927ab 100644 --- a/alliance/src/dreal/src/GMC_panel.c +++ b/alliance/src/dreal/src/GMC_panel.c @@ -1110,12 +1110,11 @@ void DrealChangeRectangleLayer( LayerUp ) { int RdsLayer; int Step; - long RdsWidth; if ( LayerUp ) Step = 1; else Step = -1; - RdsLayer = RDS_STATIC_LAYER[ DrealRectangleLayer ]; + RdsLayer = RDS_STATIC_LAYER[ (int)DrealRectangleLayer ]; do { diff --git a/alliance/src/dreal/src/GME_dialog.c b/alliance/src/dreal/src/GME_dialog.c index 8f23c2d4..b00531d2 100644 --- a/alliance/src/dreal/src/GME_dialog.c +++ b/alliance/src/dreal/src/GME_dialog.c @@ -64,6 +64,7 @@ # include "GME_modify.h" # include "GME_search.h" # include "GME_edit.h" +# include "GME_message.h" /*------------------------------------------------------------\ | | diff --git a/alliance/src/dreal/src/GME_edit.c b/alliance/src/dreal/src/GME_edit.c index c83a56ab..fba9473a 100644 --- a/alliance/src/dreal/src/GME_edit.c +++ b/alliance/src/dreal/src/GME_edit.c @@ -59,6 +59,7 @@ # include "GTB.h" # include "GSB.h" # include "GME.h" +# include "GMV.h" # include "GME_edit.h" # include "GME_panel.h" @@ -259,7 +260,7 @@ char DrealAddIdentify( Rectangle ) "INSTANCE :\n\n NAME : %s\n MODEL : %s\n TRANSF : %s\n X : %.3f\n Y : %.3f\n\n", Instance->INSNAME, Instance->FIGNAME, - RDS_TRANSF_NAME[ Instance->TRANSF ], + RDS_TRANSF_NAME[ (int)(Instance->TRANSF) ], Instance->X * DREAL_RDS_UNIT_TO_MICRON, Instance->Y * DREAL_RDS_UNIT_TO_MICRON ); } @@ -281,7 +282,7 @@ char DrealAddIdentify( Rectangle ) sprintf( DrealIdentifyBuffer, "RECTANGLE :\n\n NAME : %s\n LAYER : %s\n X : %.3f\n Y : %.3f\n DX : %.3f\n DY : %.3f\n\n", ( Rectangle->NAME != (char *)NULL ) ? Rectangle->NAME : "None", - DREAL_RDS_LAYER_NAME_TABLE[ StaticLayer ][0], + DREAL_RDS_LAYER_NAME_TABLE[ (int)StaticLayer ][0], Rectangle->X * DREAL_RDS_UNIT_TO_MICRON, Rectangle->Y * DREAL_RDS_UNIT_TO_MICRON, Rectangle->DX * DREAL_RDS_UNIT_TO_MICRON, diff --git a/alliance/src/dreal/src/GME_menu.c b/alliance/src/dreal/src/GME_menu.c index fe68b7e3..d42d64b5 100644 --- a/alliance/src/dreal/src/GME_menu.c +++ b/alliance/src/dreal/src/GME_menu.c @@ -226,7 +226,9 @@ (DrealMenuItem *)NULL } , - NULL + { + NULL + } }; DrealMenuItem DrealWindowMenu[] = @@ -344,7 +346,9 @@ (DrealMenuItem *)NULL } , - NULL + { + NULL + } }; /*------------------------------------------------------------\ diff --git a/alliance/src/dreal/src/GME_message.c b/alliance/src/dreal/src/GME_message.c index b0ee7603..04be8d10 100644 --- a/alliance/src/dreal/src/GME_message.c +++ b/alliance/src/dreal/src/GME_message.c @@ -447,17 +447,17 @@ void DrealPromptModifyRectangle() DrealDisplayMessage( DREAL_MESSAGE_MODE, "Modify Rectangle" ); - StaticLayer = RDS_STATIC_LAYER[ DrealRectangleMLayer ]; + StaticLayer = RDS_STATIC_LAYER[ (int)DrealRectangleMLayer ]; if ( DrealRectangleMName == (char *)NULL ) { sprintf( MessageBuffer, "Layer: %s Name: none", - DREAL_RDS_LAYER_NAME_TABLE[ StaticLayer ][0] ); + DREAL_RDS_LAYER_NAME_TABLE[ (int)StaticLayer ][0] ); } else { sprintf( MessageBuffer, "Layer: %s Name: %s", - DREAL_RDS_LAYER_NAME_TABLE[ StaticLayer ][0] , + DREAL_RDS_LAYER_NAME_TABLE[ (int)StaticLayer ][0] , DrealRectangleMName ); } diff --git a/alliance/src/dreal/src/GME_modify.c b/alliance/src/dreal/src/GME_modify.c index 27d62954..db0c6630 100644 --- a/alliance/src/dreal/src/GME_modify.c +++ b/alliance/src/dreal/src/GME_modify.c @@ -57,7 +57,9 @@ # include "GMX.h" # include "GTB.h" # include "GME.h" +# include "GMV.h" +# include "GTB_dialog.h" # include "GME_modify.h" # include "GME_panel.h" # include "GME_edit.h" diff --git a/alliance/src/dreal/src/GME_panel.c b/alliance/src/dreal/src/GME_panel.c index cf665f17..e04d2872 100644 --- a/alliance/src/dreal/src/GME_panel.c +++ b/alliance/src/dreal/src/GME_panel.c @@ -45,6 +45,8 @@ # include # include # include +# include +# include # include # include # include @@ -1538,7 +1540,9 @@ (Widget)NULL } , - NULL + { + NULL + } }; DrealPanelItem DrealWindowGlobalPanel = diff --git a/alliance/src/dreal/src/GME_panel.h b/alliance/src/dreal/src/GME_panel.h index 24b13a28..0fed716b 100644 --- a/alliance/src/dreal/src/GME_panel.h +++ b/alliance/src/dreal/src/GME_panel.h @@ -117,5 +117,6 @@ extern void DrealDisplayIdentifyMessage(); extern void DrealDisplaySelectList(); + extern void DrealBuildPanelModify(); # endif diff --git a/alliance/src/dreal/src/GME_search.c b/alliance/src/dreal/src/GME_search.c index b897e6d7..76a3d1ea 100644 --- a/alliance/src/dreal/src/GME_search.c +++ b/alliance/src/dreal/src/GME_search.c @@ -65,6 +65,7 @@ # include "GME_panel.h" # include "GME_edit.h" # include "GME_message.h" +# include "GTB_dialog.h" /*------------------------------------------------------------\ | | @@ -157,8 +158,6 @@ void DrealEditSearchRectangle( RectangleName ) char *RectangleName; { drealsearch *Search; - rdsins_list *Instance; - rdsfig_list *Figure; rdsrec_list *Rec; char Layer; long X1; @@ -172,7 +171,7 @@ void DrealEditSearchRectangle( RectangleName ) for ( Layer = 0; Layer < RDS_MAX_LAYER; Layer++ ) { - for ( Rec = DrealFigureRds->LAYERTAB[ Layer ]; + for ( Rec = DrealFigureRds->LAYERTAB[ (int)Layer ]; Rec != (rdsrec_list *)NULL; Rec = Rec->NEXT ) { diff --git a/alliance/src/dreal/src/GME_select.c b/alliance/src/dreal/src/GME_select.c index 5ba7c689..5d8c9b36 100644 --- a/alliance/src/dreal/src/GME_select.c +++ b/alliance/src/dreal/src/GME_select.c @@ -60,9 +60,13 @@ # include "GSB.h" # include "GME.h" # include "GMT.h" +# include "GMV.h" +# include "GME_panel.h" # include "GME_select.h" # include "GME_message.h" +# include "GRD_select.h" +# include "GTB_dialog.h" /*------------------------------------------------------------\ | | @@ -111,7 +115,7 @@ void DrealAddSelectList( Rectangle ) if ( IsRdsInstance( Rectangle ) ) { sprintf( DrealSelectBuffer, - " INSTANCE %s : %s", Rectangle->NAME ); + " INSTANCE %s", Rectangle->NAME ); } else if ( IsRdsFigure( Rectangle ) ) @@ -126,7 +130,7 @@ void DrealAddSelectList( Rectangle ) sprintf( DrealSelectBuffer, " RECTANGLE %s : %s", ( Rectangle->NAME != (char *)NULL ) ? Rectangle->NAME : "None", - DREAL_RDS_LAYER_NAME_TABLE[ StaticLayer ][0] ); + DREAL_RDS_LAYER_NAME_TABLE[ (int)StaticLayer ][0] ); } DrealDisplaySelectList( DrealSelectBuffer ); @@ -280,17 +284,17 @@ void DrealEditSelectPoint( LambdaX1, LambdaY1 ) { for ( Layer = 0; Layer < RDS_MAX_LAYER; Layer++ ) { - StaticLayer = RDS_STATIC_LAYER[ Layer ]; + StaticLayer = RDS_STATIC_LAYER[ (int)Layer ]; - if ( DREAL_RDS_ACTIVE_LAYER_TABLE[ StaticLayer ] != 1 ) continue; + if ( DREAL_RDS_ACTIVE_LAYER_TABLE[ (int)StaticLayer ] != 1 ) continue; - for ( ScanWinRec = ScanWin->LAYERTAB[ Layer ]; + for ( ScanWinRec = ScanWin->LAYERTAB[ (int)Layer ]; ScanWinRec != (drealwinrec *)NULL; ScanWinRec = ScanWinRec->NEXT ) { for ( ScanRec = 0; ScanRec < DREAL_MAX_REC ; ScanRec++ ) { - Rec = ScanWinRec->RECTAB[ ScanRec ]; + Rec = ScanWinRec->RECTAB[ (int)ScanRec ]; if ( ( Rec != (rdsrec_list *)NULL ) && ( ! IsDrealDeleted( Rec ) ) && @@ -419,9 +423,9 @@ void DrealEditSelectWindow( LambdaX1, LambdaY1, LambdaX2, LambdaY2 ) for ( Layer = 0; Layer < RDS_MAX_LAYER; Layer++ ) { - StaticLayer = RDS_STATIC_LAYER[ Layer ]; + StaticLayer = RDS_STATIC_LAYER[ (int)Layer ]; - if ( DREAL_RDS_ACTIVE_LAYER_TABLE[ StaticLayer ] != 1 ) continue; + if ( DREAL_RDS_ACTIVE_LAYER_TABLE[ (int)StaticLayer ] != 1 ) continue; Y = Ymin; @@ -437,13 +441,13 @@ void DrealEditSelectWindow( LambdaX1, LambdaY1, LambdaX2, LambdaY2 ) if ( ScanWin->LAYERTAB != (drealwinrec **)NULL ) { - for ( ScanWinRec = ScanWin->LAYERTAB[ Layer ]; + for ( ScanWinRec = ScanWin->LAYERTAB[ (int)Layer ]; ScanWinRec != (drealwinrec *)NULL; ScanWinRec = ScanWinRec->NEXT ) { for ( ScanRec = 0; ScanRec < DREAL_MAX_REC ; ScanRec++ ) { - Rec = ScanWinRec->RECTAB[ ScanRec ]; + Rec = ScanWinRec->RECTAB[ (int)ScanRec ]; if ( ( Rec != (rdsrec_list *)NULL ) && ( ! IsDrealDeleted( Rec ) ) && @@ -551,9 +555,9 @@ void DrealEditSelectFence( LambdaX1, LambdaY1, LambdaX2, LambdaY2 ) for ( Layer = 0; Layer < RDS_MAX_LAYER; Layer++ ) { - StaticLayer = RDS_STATIC_LAYER[ Layer ]; + StaticLayer = RDS_STATIC_LAYER[ (int)Layer ]; - if ( DREAL_RDS_ACTIVE_LAYER_TABLE[ StaticLayer ] != 1 ) continue; + if ( DREAL_RDS_ACTIVE_LAYER_TABLE[ (int)StaticLayer ] != 1 ) continue; Y = Ymin; @@ -569,13 +573,13 @@ void DrealEditSelectFence( LambdaX1, LambdaY1, LambdaX2, LambdaY2 ) if ( ScanWin->LAYERTAB != (drealwinrec **)NULL ) { - for ( ScanWinRec = ScanWin->LAYERTAB[ Layer ]; + for ( ScanWinRec = ScanWin->LAYERTAB[ (int)Layer ]; ScanWinRec != (drealwinrec *)NULL; ScanWinRec = ScanWinRec->NEXT ) { for ( ScanRec = 0; ScanRec < DREAL_MAX_REC ; ScanRec++ ) { - Rec = ScanWinRec->RECTAB[ ScanRec ]; + Rec = ScanWinRec->RECTAB[ (int)ScanRec ]; if ( ( Rec != (rdsrec_list *)NULL ) && ( ! IsDrealDeleted( Rec ) ) && diff --git a/alliance/src/dreal/src/GME_select.h b/alliance/src/dreal/src/GME_select.h index 00814a62..880860e8 100644 --- a/alliance/src/dreal/src/GME_select.h +++ b/alliance/src/dreal/src/GME_select.h @@ -64,6 +64,9 @@ | | \------------------------------------------------------------*/ - extern void DrealEditSelectRectangle(); + extern void DrealEditSelectRectangle (); + extern void DrealEditSelectAccept (); + extern void DrealEditSelectCancel (); + extern void DrealEditSelectPointStretch(); # endif diff --git a/alliance/src/dreal/src/GMF_dialog.c b/alliance/src/dreal/src/GMF_dialog.c index c659085c..f8ab84ef 100644 --- a/alliance/src/dreal/src/GMF_dialog.c +++ b/alliance/src/dreal/src/GMF_dialog.c @@ -59,7 +59,7 @@ # include "GTB.h" # include "GSB.h" # include "GMF.h" - +# include "GMF_menu.h" # include "GMF_dialog.h" # include "GMF_file.h" diff --git a/alliance/src/dreal/src/GMF_file.c b/alliance/src/dreal/src/GMF_file.c index 1e633dbe..a4fa7825 100644 --- a/alliance/src/dreal/src/GMF_file.c +++ b/alliance/src/dreal/src/GMF_file.c @@ -59,7 +59,8 @@ # include "GTB.h" # include "GSB.h" # include "GMF.h" - +# include "GMV.h" +# include "GMT.h" # include "GMF_file.h" /*------------------------------------------------------------\ @@ -232,8 +233,6 @@ void DrealFileOpen( FileName ) char *FileName; { - char *Directory; - char *File; int Index; char *SWAP_WORK_LIB = WORK_LIB; diff --git a/alliance/src/dreal/src/GMF_menu.c b/alliance/src/dreal/src/GMF_menu.c index 1682b009..a9a5433d 100644 --- a/alliance/src/dreal/src/GMF_menu.c +++ b/alliance/src/dreal/src/GMF_menu.c @@ -169,7 +169,9 @@ (DrealMenuItem *)NULL } , - NULL + { + NULL + } }; /*------------------------------------------------------------\ @@ -283,7 +285,6 @@ void CallbackFileSaveAs( MyWidget, ClientData, CallData ) caddr_t ClientData; caddr_t CallData; { - Arg Args; XmString SaveAsString; rdsbegin(); diff --git a/alliance/src/dreal/src/GMF_panel.c b/alliance/src/dreal/src/GMF_panel.c index 09a25ada..1edde62f 100644 --- a/alliance/src/dreal/src/GMF_panel.c +++ b/alliance/src/dreal/src/GMF_panel.c @@ -66,9 +66,9 @@ # include "GTB.h" # include "GSB.h" # include "GMF.h" - # include "GMF_panel.h" # include "GMF_dialog.h" +# include "GTB_dialog.h" /*------------------------------------------------------------\ | | @@ -120,13 +120,6 @@ static char DrealFirstLibrary = 1; -/*------------------------------------------------------------\ -| | -| Buffer | -| | -\------------------------------------------------------------*/ - - static char *LibraryBuffer = (char *)NULL; /*------------------------------------------------------------\ | | diff --git a/alliance/src/dreal/src/GMH_menu.c b/alliance/src/dreal/src/GMH_menu.c index b59526a6..a02a60bb 100644 --- a/alliance/src/dreal/src/GMH_menu.c +++ b/alliance/src/dreal/src/GMH_menu.c @@ -98,7 +98,9 @@ (DrealMenuItem *)NULL } , - NULL + { + NULL + } }; /*------------------------------------------------------------\ diff --git a/alliance/src/dreal/src/GMH_panel.c b/alliance/src/dreal/src/GMH_panel.c index 73ff4940..7090c26b 100644 --- a/alliance/src/dreal/src/GMH_panel.c +++ b/alliance/src/dreal/src/GMH_panel.c @@ -64,8 +64,8 @@ # include "GTB.h" # include "GMX.h" # include "GMH.h" - # include "GMH_panel.h" +# include "GTB_dialog.h" # include "LIP6bw.h" /*------------------------------------------------------------\ @@ -208,13 +208,13 @@ void DrealBuildPresentPanel() LIP6bw_width, LIP6bw_height); - PanelLabel = XtVaCreateManagedWidget( "", - xmLabelGadgetClass, - DrealHelpPresentPanel.FORM, - XmNlabelType , XmPIXMAP, - XmNlabelPixmap , PanelPixmap, - NULL - ); + XtVaCreateManagedWidget( "", + xmLabelGadgetClass, + DrealHelpPresentPanel.FORM, + XmNlabelType , XmPIXMAP, + XmNlabelPixmap , PanelPixmap, + NULL + ); sprintf( Buffer, "ALLIANCE CAD SYSTEM %s\n", ALLIANCE_VERSION ); PanelString = XmStringCreateLtoR( Buffer, "Panel_charset2" ); diff --git a/alliance/src/dreal/src/GMS_menu.c b/alliance/src/dreal/src/GMS_menu.c index d3cc2179..09fac6ca 100644 --- a/alliance/src/dreal/src/GMS_menu.c +++ b/alliance/src/dreal/src/GMS_menu.c @@ -56,6 +56,7 @@ # include "GMS_menu.h" # include "GMS_setup.h" +# include "GMS_panel.h" /*------------------------------------------------------------\ | | @@ -140,7 +141,9 @@ (DrealMenuItem *)NULL } , - NULL + { + NULL + } }; diff --git a/alliance/src/dreal/src/GMS_panel.c b/alliance/src/dreal/src/GMS_panel.c index 5096e901..cdc2cb36 100644 --- a/alliance/src/dreal/src/GMS_panel.c +++ b/alliance/src/dreal/src/GMS_panel.c @@ -45,6 +45,7 @@ # include # include # include +# include # include # include # include @@ -60,6 +61,7 @@ # include "GMS.h" # include "GMS_panel.h" +# include "GTB_dialog.h" /*------------------------------------------------------------\ | | diff --git a/alliance/src/dreal/src/GMS_setup.c b/alliance/src/dreal/src/GMS_setup.c index c6554fd6..be7739a4 100644 --- a/alliance/src/dreal/src/GMS_setup.c +++ b/alliance/src/dreal/src/GMS_setup.c @@ -62,6 +62,7 @@ # include "GMH.h" # include "GMS_setup.h" +# include "GMV_panel.h" /*------------------------------------------------------------\ | | @@ -215,7 +216,7 @@ void DrealReadPanelValues( Panel ) rdsbegin(); - fscanf( FileConfig, "X: %d, Y: %d, WIDTH: %d, HEIGHT: %d, MANAGED: %d\n", + fscanf( FileConfig, "X: %11d, Y: %11d, WIDTH: %11d, HEIGHT: %11d, MANAGED: %11d\n", &Values[0], &Values[1], &Values[2], &Values[3], &Values[4] ); Values[2] *= Panel->COLUMN; @@ -239,7 +240,7 @@ char DrealReadTopLevelValues() rdsbegin(); - fscanf( FileConfig, "VERSION: %s\n", Version ); + fscanf( FileConfig, "VERSION: %63s\n", Version ); if ( strcmp( Version, VERSION ) ) { @@ -247,7 +248,7 @@ char DrealReadTopLevelValues() return( 0 ); } - fscanf( FileConfig, "X: %d, Y: %d, WIDTH: %d, HEIGHT: %d, MANAGED: %d\n", + fscanf( FileConfig, "X: %11d, Y: %11d, WIDTH: %11d, HEIGHT: %11d, MANAGED: %11d\n", &Values[0], &Values[1], &Values[2], &Values[3], &Values[4] ); XtVaSetValues( DrealTopLevel, @@ -277,31 +278,31 @@ void DrealReadActiveLayers() for ( Layer = 0; Layer < RDS_ALL_LAYER; Layer++ ) { - fscanf( FileConfig, "ACTIVE: %d\n", &Value ); + fscanf( FileConfig, "ACTIVE: %11d\n", &Value ); - if ( ( DREAL_RDS_LAYER_NAME_TABLE[ Layer ][ 0 ] != (char *)NULL ) && - ( RDS_DYNAMIC_LAYER[ Layer ] != RDS_LAYER_UNUSED ) ) + if ( ( DREAL_RDS_LAYER_NAME_TABLE[ (int)Layer ][ 0 ] != (char *)NULL ) && + ( RDS_DYNAMIC_LAYER[ (int)Layer ] != RDS_LAYER_UNUSED ) ) { - DREAL_RDS_ACTIVE_LAYER_TABLE[ Layer ] = Value; + DREAL_RDS_ACTIVE_LAYER_TABLE[ (int)Layer ] = Value; } else { - DREAL_RDS_ACTIVE_LAYER_TABLE[ Layer ] = -1; + DREAL_RDS_ACTIVE_LAYER_TABLE[ (int)Layer ] = -1; } } for ( Layer = 0; Layer < DREAL_MAX_ACTIVE_NAME; Layer++ ) { - fscanf( FileConfig, "ACTIVE: %d\n", &Value ); + fscanf( FileConfig, "ACTIVE: %11d\n", &Value ); - DREAL_RDS_ACTIVE_NAME_TABLE[ Layer ] = Value; + DREAL_RDS_ACTIVE_NAME_TABLE[ (int)Layer ] = Value; } - fscanf( FileConfig, "FILLMODE: %d\n", &Value ); + fscanf( FileConfig, "FILLMODE: %11d\n", &Value ); DREAL_FILL_MODE = Value; - fscanf( FileConfig, "INTERFACE: %d\n", &Value ); + fscanf( FileConfig, "INTERFACE: %11d\n", &Value ); DREAL_INSTANCE_INTERFACE = Value; @@ -318,20 +319,19 @@ void DrealWriteActiveLayers() { char Layer; - int Value; rdsbegin(); for ( Layer = 0; Layer < RDS_ALL_LAYER; Layer++ ) { fprintf( FileConfig, "ACTIVE: %d\n", - ( DREAL_RDS_ACTIVE_LAYER_TABLE[ Layer ] != 0 ) ); + ( DREAL_RDS_ACTIVE_LAYER_TABLE[ (int)Layer ] != 0 ) ); } for ( Layer = 0; Layer < DREAL_MAX_ACTIVE_NAME; Layer++ ) { fprintf( FileConfig, "ACTIVE: %d\n", - DREAL_RDS_ACTIVE_NAME_TABLE[ Layer ] ); + DREAL_RDS_ACTIVE_NAME_TABLE[ (int)Layer ] ); } fprintf( FileConfig, "FILLMODE: %d\n", @@ -401,20 +401,20 @@ void DrealDefaultConfig() for ( Layer = 0; Layer < RDS_ALL_LAYER; Layer++ ) { - if ( ( DREAL_RDS_LAYER_NAME_TABLE[ Layer ][ 0 ] != (char *)NULL ) && - ( RDS_DYNAMIC_LAYER[ Layer ] != RDS_LAYER_UNUSED ) ) + if ( ( DREAL_RDS_LAYER_NAME_TABLE[ (int)Layer ][ 0 ] != (char *)NULL ) && + ( RDS_DYNAMIC_LAYER[ (int)Layer ] != RDS_LAYER_UNUSED ) ) { - DREAL_RDS_ACTIVE_LAYER_TABLE[ Layer ] = 1; + DREAL_RDS_ACTIVE_LAYER_TABLE[ (int)Layer ] = 1; } else { - DREAL_RDS_ACTIVE_LAYER_TABLE[ Layer ] = -1; + DREAL_RDS_ACTIVE_LAYER_TABLE[ (int)Layer ] = -1; } } for ( Layer = 0; Layer < DREAL_MAX_ACTIVE_NAME; Layer++ ) { - DREAL_RDS_ACTIVE_NAME_TABLE[ Layer ] = 1; + DREAL_RDS_ACTIVE_NAME_TABLE[ (int)Layer ] = 1; } DREAL_FILL_MODE = DREAL_FILL_MODE_PATTERN; diff --git a/alliance/src/dreal/src/GMT_menu.c b/alliance/src/dreal/src/GMT_menu.c index 0487e2e3..c55a88f5 100644 --- a/alliance/src/dreal/src/GMT_menu.c +++ b/alliance/src/dreal/src/GMT_menu.c @@ -130,7 +130,9 @@ (DrealMenuItem *)NULL } , - NULL + { + NULL + } }; /*------------------------------------------------------------\ diff --git a/alliance/src/dreal/src/GMT_panel.c b/alliance/src/dreal/src/GMT_panel.c index 9954d79c..0c8c6415 100644 --- a/alliance/src/dreal/src/GMT_panel.c +++ b/alliance/src/dreal/src/GMT_panel.c @@ -45,6 +45,7 @@ # include # include # include +# include # include # include # include diff --git a/alliance/src/dreal/src/GMT_tools.c b/alliance/src/dreal/src/GMT_tools.c index 59b41133..15bf79b4 100644 --- a/alliance/src/dreal/src/GMT_tools.c +++ b/alliance/src/dreal/src/GMT_tools.c @@ -59,6 +59,7 @@ # include "GMX.h" # include "GRD.h" # include "GMT.h" +# include "GMV.h" # include "GMT_tools.h" # include "GMT_message.h" diff --git a/alliance/src/dreal/src/GMV_map.c b/alliance/src/dreal/src/GMV_map.c index 19991a9e..55f67dfc 100644 --- a/alliance/src/dreal/src/GMV_map.c +++ b/alliance/src/dreal/src/GMV_map.c @@ -221,15 +221,13 @@ void CallbackMapEvent ( MyWidget, Event, Args, Argc ) String *Args; int *Argc; { - Display *EventDisplay; char MouseEvent; long X; long Y; rdsbegin(); - EventDisplay = Event->display; - MouseEvent = Args[ 0 ][ 0 ] - '0'; + MouseEvent = Args[ 0 ][ 0 ] - '0'; X = Event->x; Y = DrealMapDy - Event->y; @@ -305,12 +303,8 @@ void CallbackMapExpose( MyWidget, ClientData, CallData ) XtPointer ClientData; XmDrawingAreaCallbackStruct *CallData; { - XExposeEvent *ExposeEvent; - rdsbegin(); - ExposeEvent = (XExposeEvent *)CallData->event; - if ( DrealFirstExpose ) { DrealFirstExpose = DREAL_FALSE; diff --git a/alliance/src/dreal/src/GMV_map.h b/alliance/src/dreal/src/GMV_map.h index 5b042e26..c89fcf17 100644 --- a/alliance/src/dreal/src/GMV_map.h +++ b/alliance/src/dreal/src/GMV_map.h @@ -87,6 +87,7 @@ extern void DrealInitializeLambdaMap(); extern void DrealDisplayLambdaMap(); + extern void DrealBuildPanelMap(); extern void DrealEnterMapPanel(); extern void DrealClearMapWindow(); extern void DrealResizeMapWindow(); diff --git a/alliance/src/dreal/src/GMV_menu.c b/alliance/src/dreal/src/GMV_menu.c index 15a7f2ae..fce27a30 100644 --- a/alliance/src/dreal/src/GMV_menu.c +++ b/alliance/src/dreal/src/GMV_menu.c @@ -60,6 +60,7 @@ # include "GMV_dialog.h" # include "GMV_view.h" # include "GMV_map.h" +# include "GMV_panel.h" /*------------------------------------------------------------\ | | @@ -168,7 +169,9 @@ (DrealMenuItem *)NULL } , - NULL + { + NULL + } }; /*------------------------------------------------------------\ diff --git a/alliance/src/dreal/src/GMV_message.c b/alliance/src/dreal/src/GMV_message.c index 5e1077b7..3b6ddc08 100644 --- a/alliance/src/dreal/src/GMV_message.c +++ b/alliance/src/dreal/src/GMV_message.c @@ -75,9 +75,6 @@ | Variables | | | \------------------------------------------------------------*/ - - static char MessageBuffer[ 512 ]; - /*------------------------------------------------------------\ | | | Functions | diff --git a/alliance/src/dreal/src/GMV_panel.c b/alliance/src/dreal/src/GMV_panel.c index ae1cc62f..da39943f 100644 --- a/alliance/src/dreal/src/GMV_panel.c +++ b/alliance/src/dreal/src/GMV_panel.c @@ -2544,8 +2544,6 @@ 180, 550, 0 }; - static char FirstEnterLayerPanel = 1; - /*------------------------------------------------------------\ | | | Panel Grid | @@ -3359,7 +3357,7 @@ void DrealChangeFillMode( FillMode ) rdsbegin(); Index = 2 + ( ( RDS_ALL_LAYER + DREAL_MAX_ACTIVE_NAME ) << 1 ); - Label = XmStringCreateSimple( DrealViewLayerFillModeName[ FillMode ] ); + Label = XmStringCreateSimple( DrealViewLayerFillModeName[ (int)FillMode ] ); XtVaSetValues( DrealViewLayerButton[ Index ].BUTTON, XmNlabelString, Label, @@ -3387,7 +3385,7 @@ void DrealChangeInterface( Interface ) rdsbegin(); Index = 3 + ( ( RDS_ALL_LAYER + DREAL_MAX_ACTIVE_NAME ) << 1 ); - Label = XmStringCreateSimple( DrealViewLayerInterfaceName[ Interface ] ); + Label = XmStringCreateSimple( DrealViewLayerInterfaceName[ (int)Interface ] ); XtVaSetValues( DrealViewLayerButton[ Index ].BUTTON, XmNlabelString, Label, @@ -3415,7 +3413,7 @@ void DrealChangeCursor( Index ) rdsbegin(); Pos = 4 + ( ( RDS_ALL_LAYER + DREAL_MAX_ACTIVE_NAME ) << 1 ); - Label = XmStringCreateSimple( DrealViewLayerCursorType[ Index ] ); + Label = XmStringCreateSimple( DrealViewLayerCursorType[ (int)Index ] ); XtVaSetValues( DrealViewLayerButton[ Pos ].BUTTON, XmNlabelString, Label, @@ -3443,7 +3441,7 @@ void DrealChangeForceDisplay( Index ) rdsbegin(); Pos = 5 + ( ( RDS_ALL_LAYER + DREAL_MAX_ACTIVE_NAME ) << 1 ); - Label = XmStringCreateSimple( DrealViewLayerForceDisplay[ Index ] ); + Label = XmStringCreateSimple( DrealViewLayerForceDisplay[ (int)Index ] ); XtVaSetValues( DrealViewLayerButton[ Pos ].BUTTON, XmNlabelString, Label, @@ -3471,7 +3469,7 @@ void DrealChangeBlackBoxString( Index ) rdsbegin(); Pos = 6 + ( ( RDS_ALL_LAYER + DREAL_MAX_ACTIVE_NAME ) << 1 ); - Label = XmStringCreateSimple( DrealViewLayerBlackBoxString[ Index ] ); + Label = XmStringCreateSimple( DrealViewLayerBlackBoxString[ (int)Index ] ); XtVaSetValues( DrealViewLayerButton[ Pos ].BUTTON, XmNlabelString, Label, diff --git a/alliance/src/dreal/src/GMV_view.c b/alliance/src/dreal/src/GMV_view.c index a54d80ff..11b3a5d9 100644 --- a/alliance/src/dreal/src/GMV_view.c +++ b/alliance/src/dreal/src/GMV_view.c @@ -57,6 +57,7 @@ # include "GMV.h" # include "GMV_view.h" +# include "GMX_grid.h" /*------------------------------------------------------------\ | | diff --git a/alliance/src/dreal/src/GMX_color.c b/alliance/src/dreal/src/GMX_color.c index a9fc2467..6bda2104 100644 --- a/alliance/src/dreal/src/GMX_color.c +++ b/alliance/src/dreal/src/GMX_color.c @@ -523,8 +523,6 @@ void DrealInitializeColors() void DrealChangeCursorContext() { - XGCValues GraphicValue; - if ( DREAL_XOR_CURSOR == DREAL_TRUE ) { DrealXorGC = DrealXorGCXor; @@ -659,7 +657,7 @@ void DrealInitializeGraphicContext() Pattern = DrealLayerPatternDefine[ Counter ]; } - GraphicValue.stipple = DrealPattern[ Pattern ]; + GraphicValue.stipple = DrealPattern[ (int)Pattern ]; GraphicValue.fill_style = FillStippled; GraphicValue.foreground = DrealColor[ 3 ]; diff --git a/alliance/src/dreal/src/GMX_cursor.c b/alliance/src/dreal/src/GMX_cursor.c index 0d26dae3..2a357d7d 100644 --- a/alliance/src/dreal/src/GMX_cursor.c +++ b/alliance/src/dreal/src/GMX_cursor.c @@ -200,8 +200,8 @@ void DrealPointCursor() DrealUndisplayCursor(); - DrealLambdaCursorSaveX[ DrealCursorIndex ] = DrealLambdaCursorX; - DrealLambdaCursorSaveY[ DrealCursorIndex ] = DrealLambdaCursorY; + DrealLambdaCursorSaveX[ (int)DrealCursorIndex ] = DrealLambdaCursorX; + DrealLambdaCursorSaveY[ (int)DrealCursorIndex ] = DrealLambdaCursorY; DrealCursorIndex = DrealCursorIndex + 1; diff --git a/alliance/src/dreal/src/GMX_dialog.c b/alliance/src/dreal/src/GMX_dialog.c index 92352873..62e6732e 100644 --- a/alliance/src/dreal/src/GMX_dialog.c +++ b/alliance/src/dreal/src/GMX_dialog.c @@ -61,6 +61,8 @@ # include "GMS.h" # include "GMH.h" # include "GMX.h" +# include "GME.h" +# include "GMC.h" # include "GMX_dialog.h" diff --git a/alliance/src/dreal/src/GMX_event.c b/alliance/src/dreal/src/GMX_event.c index 0cc44bcd..91de10b8 100644 --- a/alliance/src/dreal/src/GMX_event.c +++ b/alliance/src/dreal/src/GMX_event.c @@ -60,11 +60,17 @@ # include "GMV.h" # include "GMS.h" # include "GMH.h" +# include "GME.h" +# include "GMC.h" +# include "GMT.h" + +# include "GME_select.h" # include "GMX_motif.h" # include "GMX_grid.h" # include "GMX_cursor.h" # include "GMX_event.h" # include "GMX_message.h" +# include "GMX_graphic.h" /*------------------------------------------------------------\ | | @@ -247,7 +253,7 @@ void DrealChangeEditMode( EditMode , PromptMessage ) EditMode = EditMode & ~DREAL_ZOOM_MARK; DrealCountEventZoom = 0; - DrealMaxEventZoom = DrealMaxEventZoomTable[ EditMode ]; + DrealMaxEventZoom = DrealMaxEventZoomTable[ (int)EditMode ]; if ( ! ( DrealEditMode & DREAL_ZOOM_MARK ) ) { @@ -256,7 +262,7 @@ void DrealChangeEditMode( EditMode , PromptMessage ) DrealSavePromptMessage = DrealPromptMessage; } - DrealInputMode = DrealInputEventZoomTable[ EditMode ]; + DrealInputMode = DrealInputEventZoomTable[ (int)EditMode ]; DrealPromptMessage = PromptMessage; DrealEditMode = EditMode | DREAL_ZOOM_MARK; @@ -267,19 +273,19 @@ void DrealChangeEditMode( EditMode , PromptMessage ) if ( DrealEditMode & DREAL_ZOOM_MARK ) { DrealSaveEditMode = EditMode; - DrealSaveInputMode = DrealInputEventEditTable[ EditMode ]; + DrealSaveInputMode = DrealInputEventEditTable[ (int)EditMode ]; DrealSavePromptMessage = PromptMessage; DrealCountEventEdit = 0; - DrealMaxEventEdit = DrealMaxEventEditTable[ EditMode ]; + DrealMaxEventEdit = DrealMaxEventEditTable[ (int)EditMode ]; } else { if ( DrealEditMode != EditMode ) { DrealCountEventEdit = 0; - DrealMaxEventEdit = DrealMaxEventEditTable[ EditMode ]; + DrealMaxEventEdit = DrealMaxEventEditTable[ (int)EditMode ]; DrealEditMode = EditMode; - DrealInputMode = DrealInputEventEditTable[ EditMode ]; + DrealInputMode = DrealInputEventEditTable[ (int)EditMode ]; DrealPromptMessage = PromptMessage; DrealChangeCursorType( NULL, NULL, 0, DrealInputMode ); @@ -311,17 +317,17 @@ void DrealContinueEditMode( EditMode , PromptMessage, CountEvent ) if ( DrealEditMode & DREAL_ZOOM_MARK ) { DrealSaveEditMode = EditMode; - DrealSaveInputMode = DrealInputEventEditTable[ EditMode ]; + DrealSaveInputMode = DrealInputEventEditTable[ (int)EditMode ]; DrealSavePromptMessage = PromptMessage; DrealCountEventEdit = CountEvent; - DrealMaxEventEdit = DrealMaxEventEditTable[ EditMode ]; + DrealMaxEventEdit = DrealMaxEventEditTable[ (int)EditMode ]; } else { DrealCountEventEdit = CountEvent; - DrealMaxEventEdit = DrealMaxEventEditTable[ EditMode ]; + DrealMaxEventEdit = DrealMaxEventEditTable[ (int)EditMode ]; DrealEditMode = EditMode; - DrealInputMode = DrealInputEventEditTable[ EditMode ]; + DrealInputMode = DrealInputEventEditTable[ (int)EditMode ]; DrealPromptMessage = PromptMessage; DrealChangeCursorType( DrealLambdaEventEditX, @@ -573,7 +579,6 @@ void CallbackEvent ( MyWidget, Event, Args, Argc ) String *Args; int *Argc; { - Display *EventDisplay; char MouseEvent; int FlagUp; Position OldLambdaCursorX; @@ -581,8 +586,6 @@ void CallbackEvent ( MyWidget, Event, Args, Argc ) rdsbegin(); - EventDisplay = Event->display; - MouseEvent = atoi( Args[ 0 ] ); if ( MouseEvent == DREAL_LEAVE ) @@ -605,8 +608,8 @@ void CallbackEvent ( MyWidget, Event, Args, Argc ) { if ( DrealCountEventZoom < DrealMaxEventZoom ) { - DrealLambdaEventZoomX[ DrealCountEventZoom ] = DrealLambdaCursorX; - DrealLambdaEventZoomY[ DrealCountEventZoom ] = DrealLambdaCursorY; + DrealLambdaEventZoomX[ (int)DrealCountEventZoom ] = DrealLambdaCursorX; + DrealLambdaEventZoomY[ (int)DrealCountEventZoom ] = DrealLambdaCursorY; DrealCountEventZoom = DrealCountEventZoom + 1; @@ -640,8 +643,8 @@ void CallbackEvent ( MyWidget, Event, Args, Argc ) { if ( DrealCountEventEdit < DrealMaxEventEdit ) { - DrealLambdaEventEditX[ DrealCountEventEdit ] = DrealLambdaCursorX; - DrealLambdaEventEditY[ DrealCountEventEdit ] = DrealLambdaCursorY; + DrealLambdaEventEditX[ (int)DrealCountEventEdit ] = DrealLambdaCursorX; + DrealLambdaEventEditY[ (int)DrealCountEventEdit ] = DrealLambdaCursorY; DrealCountEventEdit = DrealCountEventEdit + 1; diff --git a/alliance/src/dreal/src/GMX_graphic.h b/alliance/src/dreal/src/GMX_graphic.h index 8b46b1af..385f7b6f 100644 --- a/alliance/src/dreal/src/GMX_graphic.h +++ b/alliance/src/dreal/src/GMX_graphic.h @@ -67,6 +67,7 @@ | | \------------------------------------------------------------*/ - extern void DrealInitializeGraphic(); + extern void DrealInitializeGraphic (); + extern void DrealInitializeGraphicWindow(); # endif diff --git a/alliance/src/dreal/src/GMX_grid.c b/alliance/src/dreal/src/GMX_grid.c index e7450031..da97009e 100644 --- a/alliance/src/dreal/src/GMX_grid.c +++ b/alliance/src/dreal/src/GMX_grid.c @@ -200,8 +200,6 @@ char DrealDisplayLambdaGrid( GraphicX1, GraphicY1, GraphicX2, GraphicY2 ) long Ymin; char UserGrid; char LambdaGrid; - char TraceCroix; - char TracePoint; float Check; rdsbegin(); @@ -217,6 +215,7 @@ char DrealDisplayLambdaGrid( GraphicX1, GraphicY1, GraphicX2, GraphicY2 ) if ( DrealLambdaUserGrid == 1 ) { +#if THIS_IS_DISABLED if ( DrealLambdaUserGridDx > DrealLambdaUserGridDy ) { Check = ( DREAL_LOWER_GRID_STEP * 2 / DrealLambdaUserGridDy ); @@ -225,6 +224,9 @@ char DrealDisplayLambdaGrid( GraphicX1, GraphicY1, GraphicX2, GraphicY2 ) { Check = ( DREAL_LOWER_GRID_STEP * 2 / DrealLambdaUserGridDy ); } +#else + Check = ( DREAL_LOWER_GRID_STEP * 2 / DrealLambdaUserGridDy ); +#endif if ( DrealLambdaGridStep < Check ) UserGrid = 0; else UserGrid = 1; diff --git a/alliance/src/dreal/src/GMX_grid.h b/alliance/src/dreal/src/GMX_grid.h index 31fd2c8e..30b925af 100644 --- a/alliance/src/dreal/src/GMX_grid.h +++ b/alliance/src/dreal/src/GMX_grid.h @@ -73,4 +73,7 @@ | | \------------------------------------------------------------*/ + extern void DrealInitializeLambdaGrid(); + extern char DrealDisplayLambdaGrid(); + # endif diff --git a/alliance/src/dreal/src/GMX_menu.c b/alliance/src/dreal/src/GMX_menu.c index 3e4ff3c3..4fe9bf82 100644 --- a/alliance/src/dreal/src/GMX_menu.c +++ b/alliance/src/dreal/src/GMX_menu.c @@ -205,7 +205,9 @@ DrealHelpMenu } , - NULL + { + NULL + } }; /*------------------------------------------------------------\ diff --git a/alliance/src/dreal/src/GMX_message.c b/alliance/src/dreal/src/GMX_message.c index 03dab468..4612850d 100644 --- a/alliance/src/dreal/src/GMX_message.c +++ b/alliance/src/dreal/src/GMX_message.c @@ -153,7 +153,7 @@ void DrealDisplayMessage( Where, Text ) TextString = XmStringCreateSimple( Text ); - XtVaSetValues( DrealMessageText[ Where ], XmNlabelString, TextString, NULL ); + XtVaSetValues( DrealMessageText[ (int)Where ], XmNlabelString, TextString, NULL ); XmStringFree( TextString ); diff --git a/alliance/src/dreal/src/GMX_motif.c b/alliance/src/dreal/src/GMX_motif.c index 296940e7..d1261af6 100644 --- a/alliance/src/dreal/src/GMX_motif.c +++ b/alliance/src/dreal/src/GMX_motif.c @@ -57,7 +57,10 @@ # include "GSB.h" # include "GMX.h" # include "GMS.h" +# include "GMV.h" +# include "GMF.h" +# include "GMV_map.h" # include "GMX_motif.h" # include "GMX_graphic.h" # include "GMX_event.h" diff --git a/alliance/src/dreal/src/GMX_panel.c b/alliance/src/dreal/src/GMX_panel.c index 16ae3ba9..6a9710e2 100644 --- a/alliance/src/dreal/src/GMX_panel.c +++ b/alliance/src/dreal/src/GMX_panel.c @@ -64,6 +64,7 @@ # include "GMX.h" # include "GMX_panel.h" +# include "GME_panel.h" /*------------------------------------------------------------\ | | diff --git a/alliance/src/dreal/src/GMX_panel.h b/alliance/src/dreal/src/GMX_panel.h index c5e2df46..a59853ff 100644 --- a/alliance/src/dreal/src/GMX_panel.h +++ b/alliance/src/dreal/src/GMX_panel.h @@ -68,5 +68,6 @@ \------------------------------------------------------------*/ extern void DrealInitializeIcon(); + extern void DrealInitializePanel(); # endif diff --git a/alliance/src/dreal/src/GMX_view.c b/alliance/src/dreal/src/GMX_view.c index 096f0ebc..50f82a98 100644 --- a/alliance/src/dreal/src/GMX_view.c +++ b/alliance/src/dreal/src/GMX_view.c @@ -593,7 +593,6 @@ void DrealDisplayFigure( GraphicX1, GraphicY1, GraphicX2, GraphicY2 ) char ScanRec; char Layer; char StaticLayer; - char DrawLine; long Xmin; long Ymin; long Xmax; @@ -604,12 +603,12 @@ void DrealDisplayFigure( GraphicX1, GraphicY1, GraphicX2, GraphicY2 ) long Y2; long X; long Y; +/* long LambdaGridX; long LambdaGridY; +*/ long X1r; long Y1r; - long X2r; - long Y2r; long LambdaMin; char DrawText; char DrawTextFig; @@ -717,8 +716,10 @@ void DrealDisplayFigure( GraphicX1, GraphicY1, GraphicX2, GraphicY2 ) Y1 = Y1 * RDS_PHYSICAL_GRID; Y2 = Y2 * RDS_PHYSICAL_GRID; +/* LambdaGridX = DrealLambdaGridX * RDS_PHYSICAL_GRID; LambdaGridY = DrealLambdaGridY * RDS_PHYSICAL_GRID; +*/ Xmin = ( X1 - DrealWindowXmin ) / DrealWindowSide; Xmax = ( X2 - DrealWindowXmin ) / DrealWindowSide; @@ -745,9 +746,9 @@ void DrealDisplayFigure( GraphicX1, GraphicY1, GraphicX2, GraphicY2 ) { if ( DrealCheckInterrupt() ) break; - StaticLayer = RDS_STATIC_LAYER[ Layer ]; + StaticLayer = RDS_STATIC_LAYER[ (int)Layer ]; - if ( DREAL_RDS_ACTIVE_LAYER_TABLE[ StaticLayer ] != 1 ) continue; + if ( DREAL_RDS_ACTIVE_LAYER_TABLE[ (int)StaticLayer ] != 1 ) continue; Y = Ymin; @@ -767,13 +768,13 @@ void DrealDisplayFigure( GraphicX1, GraphicY1, GraphicX2, GraphicY2 ) if ( ScanWin->LAYERTAB != (drealwinrec **)NULL ) { - for ( ScanWinRec = ScanWin->LAYERTAB[ Layer ]; + for ( ScanWinRec = ScanWin->LAYERTAB[ (int)Layer ]; ScanWinRec != (drealwinrec *)NULL; ScanWinRec = ScanWinRec->NEXT ) { for ( ScanRec = 0; ScanRec < DREAL_MAX_REC ; ScanRec++ ) { - Rec = ScanWinRec->RECTAB[ ScanRec ]; + Rec = ScanWinRec->RECTAB[ (int)ScanRec ]; if ( ( Rec != (rdsrec_list *)NULL ) && ( ! IsDrealDeleted( Rec ) ) && @@ -862,8 +863,8 @@ void DrealDisplayFigure( GraphicX1, GraphicY1, GraphicX2, GraphicY2 ) } else { - DrealDrawGC = DrealLayerDrawGC[ StaticLayer ]; - DrealFillGC = DrealLayerFillGC[ StaticLayer ]; + DrealDrawGC = DrealLayerDrawGC[ (int)StaticLayer ]; + DrealFillGC = DrealLayerFillGC[ (int)StaticLayer ]; DrealDisplayOneRectangle( Rec ); @@ -892,7 +893,7 @@ void DrealDisplayFigure( GraphicX1, GraphicY1, GraphicX2, GraphicY2 ) if ( IsDrealAccepted( Rec ) != 0 ) { DrealDrawGC = DrealAcceptDrawGC; - DrealFillGC = DrealLayerAcceptGC[ StaticLayer ]; + DrealFillGC = DrealLayerAcceptGC[ (int)StaticLayer ]; } DrealDisplayOneRectangle( Rec ); @@ -928,12 +929,10 @@ void DrealDisplayRectangle( Rectangle ) rdsrec_list *Rectangle; { - rdsrec_list *ScanRec; long Xmin; long Ymin; long Xmax; long Ymax; - char Layer; rdsbegin(); diff --git a/alliance/src/dreal/src/GRD_error.c b/alliance/src/dreal/src/GRD_error.c index 437de8c9..1a3a7d0a 100644 --- a/alliance/src/dreal/src/GRD_error.c +++ b/alliance/src/dreal/src/GRD_error.c @@ -43,9 +43,11 @@ \------------------------------------------------------------*/ # include +# include # include # include # include + # include "mut.h" # include "mph.h" # include "rds.h" @@ -54,7 +56,9 @@ # include "rtl.h" # include "GSB.h" # include "GRD.h" + # include "GRD_error.h" +# include "GMF_menu.h" /*------------------------------------------------------------\ | | @@ -383,7 +387,7 @@ char *DrealGetInformations() Scan = Scan + strlen( Scan ); - sprintf( Scan, " WINDOWS : \n\n XMIN : %.3f\n YMIN : %.3f\n XMAX : %.3f\n YMAX : %.3f\n DX : %d\n DY : %d\n SIDE : %.3f\n\n", + sprintf( Scan, " WINDOWS : \n\n XMIN : %.3f\n YMIN : %.3f\n XMAX : %.3f\n YMAX : %.3f\n DX : %ld\n DY : %ld\n SIDE : %.3f\n\n", (float)( DrealWindowXmin ) * DREAL_RDS_UNIT_TO_MICRON, (float)( DrealWindowYmin ) * DREAL_RDS_UNIT_TO_MICRON, (float)( DrealWindowXmax ) * DREAL_RDS_UNIT_TO_MICRON, diff --git a/alliance/src/dreal/src/GRD_error.h b/alliance/src/dreal/src/GRD_error.h index 92a2ef25..92a9740e 100644 --- a/alliance/src/dreal/src/GRD_error.h +++ b/alliance/src/dreal/src/GRD_error.h @@ -70,5 +70,7 @@ \------------------------------------------------------------*/ extern void DrealFlushErrorMessage(); + extern void DrealInitializeErrorMessage(); + # endif diff --git a/alliance/src/dreal/src/GRD_rds.c b/alliance/src/dreal/src/GRD_rds.c index 9a012d0c..333e38c0 100644 --- a/alliance/src/dreal/src/GRD_rds.c +++ b/alliance/src/dreal/src/GRD_rds.c @@ -82,7 +82,6 @@ \------------------------------------------------------------*/ static jmp_buf DrealJumpBuffer; - static void (*OldExitHandler)() = NULL; /*------------------------------------------------------------\ | | @@ -207,9 +206,9 @@ void DrealAddFigure( Name ) for ( Layer = 0; Layer < RDS_MAX_LAYER; Layer++ ) { - Previous = &DrealFigureRds->LAYERTAB[ Layer ]; + Previous = &DrealFigureRds->LAYERTAB[ (int)Layer ]; - for ( Rectangle = DrealFigureRds->LAYERTAB[ Layer ]; + for ( Rectangle = DrealFigureRds->LAYERTAB[ (int)Layer ]; Rectangle != (rdsrec_list *)NULL; Rectangle = Rectangle->NEXT ) { @@ -226,7 +225,7 @@ void DrealAddFigure( Name ) { for ( Layer = 0; Layer < RDS_MAX_LAYER; Layer++ ) { - for ( Rectangle = Instance->LAYERTAB[ Layer ]; + for ( Rectangle = Instance->LAYERTAB[ (int)Layer ]; Rectangle != (rdsrec_list *)NULL; Rectangle = Rectangle->NEXT ) { @@ -269,7 +268,7 @@ rdsrec_list *DrealAddRectangle( Name, Layer, X, Y, Dx, Dy ) DREAL_PREVIOUS_L( ScanRec->NEXT ) = &ScanRec->NEXT; } - DREAL_PREVIOUS_L( ScanRec ) = &DrealFigureRds->LAYERTAB[ Layer ]; + DREAL_PREVIOUS_L( ScanRec ) = &DrealFigureRds->LAYERTAB[ (int)Layer ]; rdsend(); return( ScanRec ); @@ -333,13 +332,12 @@ void DrealDelFigure() rdsrec_list *ScanRec; rdsins_list *ScanIns; rdsins_list *DelIns; - rdsfig_list *ScanFig; rdsbegin(); for ( Layer = 0; Layer < RDS_MAX_LAYER; Layer++ ) { - ScanRec = DrealFigureRds->LAYERTAB[ Layer ]; + ScanRec = DrealFigureRds->LAYERTAB[ (int)Layer ]; while ( ScanRec != (rdsrec_list *)NULL ) { @@ -351,7 +349,7 @@ void DrealDelFigure() freerdsrec( DelRec, DREAL_SIZE ); } - DrealFigureRds->LAYERTAB[ Layer ] = (rdsrec_list *)NULL; + DrealFigureRds->LAYERTAB[ (int)Layer ] = (rdsrec_list *)NULL; } ScanIns = DrealFigureRds->INSTANCE; @@ -363,7 +361,7 @@ void DrealDelFigure() for ( Layer = 0; Layer < RDS_MAX_LAYER; Layer++ ) { - ScanRec = DrealFigureRds->LAYERTAB[ Layer ]; + ScanRec = DrealFigureRds->LAYERTAB[ (int)Layer ]; while ( ScanRec != (rdsrec_list *)NULL ) { @@ -442,9 +440,9 @@ void DrealFlattenFigure() { for ( Layer = 0; Layer < RDS_MAX_LAYER; Layer++ ) { - ScanRec = ScanIns->LAYERTAB[ Layer ]; + ScanRec = ScanIns->LAYERTAB[ (int)Layer ]; - ScanIns->LAYERTAB[ Layer ] = (rdsrec_list *)NULL; + ScanIns->LAYERTAB[ (int)Layer ] = (rdsrec_list *)NULL; while ( ScanRec != (rdsrec_list *)NULL ) { @@ -466,8 +464,8 @@ void DrealFlattenFigure() for ( Layer = 0; Layer < RDS_MAX_LAYER; Layer++ ) { - Previous = &DrealFigureRds->LAYERTAB[ Layer ]; - ScanRec = Figure->LAYERTAB[ Layer ]; + Previous = &DrealFigureRds->LAYERTAB[ (int)Layer ]; + ScanRec = Figure->LAYERTAB[ (int)Layer ]; while ( ScanRec != (rdsrec_list *)NULL ) { @@ -478,9 +476,9 @@ void DrealFlattenFigure() if ( ScanRec->NEXT == (rdsrec_list *)NULL ) { - ScanRec->NEXT = DrealFigureRds->LAYERTAB[ Layer ]; - DrealFigureRds->LAYERTAB[ Layer ] = Figure->LAYERTAB[ Layer ]; - Figure->LAYERTAB[ Layer ] = (rdsrec_list *)NULL; + ScanRec->NEXT = DrealFigureRds->LAYERTAB[ (int)Layer ]; + DrealFigureRds->LAYERTAB[ (int)Layer ] = Figure->LAYERTAB[ (int)Layer ]; + Figure->LAYERTAB[ (int)Layer ] = (rdsrec_list *)NULL; if ( ScanRec->NEXT != (rdsrec_list *)NULL ) { diff --git a/alliance/src/dreal/src/GRD_select.h b/alliance/src/dreal/src/GRD_select.h index f3f44501..64c6e2dc 100644 --- a/alliance/src/dreal/src/GRD_select.h +++ b/alliance/src/dreal/src/GRD_select.h @@ -67,4 +67,6 @@ | | \------------------------------------------------------------*/ +extern void DrealFreeSelect(); + # endif diff --git a/alliance/src/dreal/src/GRD_window.c b/alliance/src/dreal/src/GRD_window.c index 3c3b8c71..083d0c82 100644 --- a/alliance/src/dreal/src/GRD_window.c +++ b/alliance/src/dreal/src/GRD_window.c @@ -102,6 +102,8 @@ drealwin *DrealAllocWinLayer( DrealWin ) (drealwinrec **)rdsallocblock( sizeof(drealwinrec *) * RDS_MAX_LAYER ); } + + return DrealWin; } /*------------------------------------------------------------\ @@ -270,7 +272,6 @@ void DrealEraseWindow() { long Offset; drealwin *ScanWin; - drealwin *DelWin; drealwinrec *ScanWinRec; drealwinrec *DelWinRec; char Layer; @@ -285,7 +286,7 @@ void DrealEraseWindow() { for ( Layer = 0; Layer < RDS_MAX_LAYER; Layer++ ) { - ScanWinRec = ScanWin->LAYERTAB[ Layer ]; + ScanWinRec = ScanWin->LAYERTAB[ (int)Layer ]; while ( ScanWinRec != (drealwinrec *)NULL ) { @@ -385,31 +386,31 @@ void DrealInsertRectangle( Rectangle ) Layer = GetRdsLayer( Rectangle ); - WinRec = LinkWin->LAYERTAB[ Layer ]; + WinRec = LinkWin->LAYERTAB[ (int)Layer ]; if ( WinRec == (drealwinrec *)NULL ) { - WinRec = DrealAllocWinRec(); - LinkWin->LAYERTAB[ Layer ] = WinRec; - WinRec->RECTAB[ 0 ] = Rectangle; + WinRec = DrealAllocWinRec(); + LinkWin->LAYERTAB[ (int)Layer ] = WinRec; + WinRec->RECTAB[ 0 ] = Rectangle; } else { for ( Index = 0; Index < DREAL_MAX_REC; Index++ ) { - if ( WinRec->RECTAB[ Index ] == (rdsrec_list *)NULL ) break; + if ( WinRec->RECTAB[ (int)Index ] == (rdsrec_list *)NULL ) break; } if ( Index == DREAL_MAX_REC ) { - WinRec = DrealAllocWinRec(); - WinRec->NEXT = LinkWin->LAYERTAB[ Layer ]; - LinkWin->LAYERTAB[ Layer ] = WinRec; - WinRec->RECTAB[ 0 ] = Rectangle; + WinRec = DrealAllocWinRec(); + WinRec->NEXT = LinkWin->LAYERTAB[ (int)Layer ]; + LinkWin->LAYERTAB[ (int)Layer ] = WinRec; + WinRec->RECTAB[ 0 ] = Rectangle; } else { - WinRec->RECTAB[ Index ] = Rectangle; + WinRec->RECTAB[ (int)Index ] = Rectangle; } } @@ -466,7 +467,7 @@ void DrealEraseRectangle( Rectangle ) ScanWin = DelRecWin->WINDOW; Found = DREAL_MAX_REC; - FirstWinRec = ScanWin->LAYERTAB[ Layer ]; + FirstWinRec = ScanWin->LAYERTAB[ (int)Layer ]; for ( ScanWinRec = FirstWinRec; ScanWinRec != (drealwinrec *)NULL; @@ -474,7 +475,7 @@ void DrealEraseRectangle( Rectangle ) { for ( Index = 0; Index < DREAL_MAX_REC; Index++ ) { - if ( ScanWinRec->RECTAB[ Index ] == Rectangle ) + if ( ScanWinRec->RECTAB[ (int)Index ] == Rectangle ) { Found = Index; break; } @@ -485,27 +486,27 @@ void DrealEraseRectangle( Rectangle ) if ( ScanWinRec == FirstWinRec ) { - ScanWinRec->RECTAB[ Found ] = (rdsrec_list *)NULL; + ScanWinRec->RECTAB[ (int)Found ] = (rdsrec_list *)NULL; } else { for ( Index = 0; Index < DREAL_MAX_REC; Index++ ) { - if ( FirstWinRec->RECTAB[ Index ] != (rdsrec_list *)NULL ) break; + if ( FirstWinRec->RECTAB[ (int)Index ] != (rdsrec_list *)NULL ) break; } - ScanWinRec->RECTAB[ Found ] = FirstWinRec->RECTAB[ Index ]; - FirstWinRec->RECTAB[ Index ] = (rdsrec_list *)NULL; + ScanWinRec->RECTAB[ (int)Found ] = FirstWinRec->RECTAB[ (int)Index ]; + FirstWinRec->RECTAB[ (int)Index ] = (rdsrec_list *)NULL; } for ( Index = 0; Index < DREAL_MAX_REC; Index++ ) { - if ( FirstWinRec->RECTAB[ Index ] != (rdsrec_list *)NULL ) break; + if ( FirstWinRec->RECTAB[ (int)Index ] != (rdsrec_list *)NULL ) break; } if ( Index == DREAL_MAX_REC ) { - ScanWin->LAYERTAB[ Layer ] = FirstWinRec->NEXT; + ScanWin->LAYERTAB[ (int)Layer ] = FirstWinRec->NEXT; DrealFreeWinRec( FirstWinRec ); } @@ -724,13 +725,13 @@ char DrealComputeBound() { for ( Layer = 0; Layer < RDS_MAX_LAYER; Layer++ ) { - for ( ScanWinRec = ScanWin->LAYERTAB[ Layer ]; + for ( ScanWinRec = ScanWin->LAYERTAB[ (int)Layer ]; ScanWinRec != (drealwinrec *)NULL; ScanWinRec = ScanWinRec->NEXT ) { for ( ScanRec = 0; ScanRec < DREAL_MAX_REC ; ScanRec++ ) { - Rec = ScanWinRec->RECTAB[ ScanRec ]; + Rec = ScanWinRec->RECTAB[ (int)ScanRec ]; if ( ( Rec != (rdsrec_list *)NULL ) && ( ! IsDrealDeleted( Rec ) ) ) @@ -782,13 +783,13 @@ char DrealComputeBound() { for ( Layer = 0; Layer < RDS_MAX_LAYER; Layer++ ) { - for ( ScanWinRec = ScanWin->LAYERTAB[ Layer ]; + for ( ScanWinRec = ScanWin->LAYERTAB[ (int)Layer ]; ScanWinRec != (drealwinrec *)NULL; ScanWinRec = ScanWinRec->NEXT ) { for ( ScanRec = 0; ScanRec < DREAL_MAX_REC ; ScanRec++ ) { - Rec = ScanWinRec->RECTAB[ ScanRec ]; + Rec = ScanWinRec->RECTAB[ (int)ScanRec ]; if ( ( Rec != (rdsrec_list *)NULL ) && ( ! IsDrealDeleted( Rec ) ) ) @@ -834,13 +835,13 @@ char DrealComputeBound() { for ( Layer = 0; Layer < RDS_MAX_LAYER; Layer++ ) { - for ( ScanWinRec = ScanWin->LAYERTAB[ Layer ]; + for ( ScanWinRec = ScanWin->LAYERTAB[ (int)Layer ]; ScanWinRec != (drealwinrec *)NULL; ScanWinRec = ScanWinRec->NEXT ) { for ( ScanRec = 0; ScanRec < DREAL_MAX_REC ; ScanRec++ ) { - Rec = ScanWinRec->RECTAB[ ScanRec ]; + Rec = ScanWinRec->RECTAB[ (int)ScanRec ]; if ( ( Rec != (rdsrec_list *)NULL ) && ( ! IsDrealDeleted( Rec ) ) ) @@ -886,13 +887,13 @@ char DrealComputeBound() { for ( Layer = 0; Layer < RDS_MAX_LAYER; Layer++ ) { - for ( ScanWinRec = ScanWin->LAYERTAB[ Layer ]; + for ( ScanWinRec = ScanWin->LAYERTAB[ (int)Layer ]; ScanWinRec != (drealwinrec *)NULL; ScanWinRec = ScanWinRec->NEXT ) { for ( ScanRec = 0; ScanRec < DREAL_MAX_REC ; ScanRec++ ) { - Rec = ScanWinRec->RECTAB[ ScanRec ]; + Rec = ScanWinRec->RECTAB[ (int)ScanRec ]; if ( ( Rec != (rdsrec_list *)NULL ) && ( ! IsDrealDeleted( Rec ) ) ) diff --git a/alliance/src/dreal/src/GSB_error.h b/alliance/src/dreal/src/GSB_error.h index cbcc7d8f..e98aac59 100644 --- a/alliance/src/dreal/src/GSB_error.h +++ b/alliance/src/dreal/src/GSB_error.h @@ -85,4 +85,6 @@ | | \------------------------------------------------------------*/ + extern void GsbError(); + # endif diff --git a/alliance/src/dreal/src/GSB_parse.c b/alliance/src/dreal/src/GSB_parse.c index 24c3cff8..7f2c4931 100644 --- a/alliance/src/dreal/src/GSB_parse.c +++ b/alliance/src/dreal/src/GSB_parse.c @@ -227,7 +227,7 @@ char *GsbFileGetString( String, Size ) int Size; { register char *RegisterString; - register Register; + register int Register = 0; rdsbegin(); @@ -290,7 +290,7 @@ void GsbGetLine( Buffer ) GsbError( UNEXPECTED_EOF, (char *)NULL, GsbCurrentLine ); } - if ( String = strchr( Buffer, GSB_COMMENT_CHAR )) + if ( (String = strchr( Buffer, GSB_COMMENT_CHAR )) ) { if ( String == Buffer ) { @@ -354,7 +354,7 @@ char *GsbGetFirstWord( Buffer, IsKeyword, Hash ) rdsbegin(); - if ( String = (char *)strtok( Buffer, GSB_SEPARATORS_STRING )) + if ( (String = (char *)strtok( Buffer, GSB_SEPARATORS_STRING )) ) { if ( Hash ) { @@ -399,7 +399,7 @@ char *GsbGetNextWord( IsKeyword, Hash ) rdsbegin(); - if ( String = (char *)strtok( (char *)NULL, GSB_SEPARATORS_STRING )) + if ( (String = (char *)strtok( (char *)NULL, GSB_SEPARATORS_STRING )) ) { if ( Hash ) { @@ -458,7 +458,7 @@ long GsbGetStringValue( String ) rdsbegin(); - if ( sscanf( String, "%d", &Value) ) + if ( sscanf( String, "%11ld", &Value) ) { rdsend(); return ( Value ); @@ -491,12 +491,10 @@ float GsbGetStringFloat( String ) char *String; { float Value; - keyword *Keyword; - keyword Entry; rdsbegin(); - if ( ! sscanf( String, "%g", &Value) ) + if ( ! sscanf( String, "%22g", &Value) ) { GsbError( ILLEGAL_FLOAT, String, GsbCurrentLine ); } @@ -519,7 +517,7 @@ long GsbGetNumber( String ) rdsbegin(); - if ( ! sscanf( String, "%d", &Value )) + if ( ! sscanf( String, "%11ld", &Value )) { GsbError( UNEXPECTED_LINE, "number", GsbCurrentLine ); } @@ -574,9 +572,9 @@ void GsbReadRdsLayerName() GsbError( MISSING_VALUE, (char *)NULL, GsbCurrentLine ); } else - if ( RDS_DYNAMIC_LAYER[ Layer ] != RDS_LAYER_UNUSED ) + if ( RDS_DYNAMIC_LAYER[ (int)Layer ] != RDS_LAYER_UNUSED ) { - DREAL_RDS_LAYER_NAME_TABLE [ Layer ][ Field ] = FirstWord; + DREAL_RDS_LAYER_NAME_TABLE [ (int)Layer ][ (int)Field ] = FirstWord; } } @@ -586,9 +584,9 @@ void GsbReadRdsLayerName() { Pattern = GsbGetStringValue( FirstWord ); - if ( RDS_DYNAMIC_LAYER[ Layer ] != RDS_LAYER_UNUSED ) + if ( RDS_DYNAMIC_LAYER[ (int)Layer ] != RDS_LAYER_UNUSED ) { - DREAL_RDS_LAYER_PATTERN_TABLE[ Layer ] = (int)Pattern; + DREAL_RDS_LAYER_PATTERN_TABLE[ (int)Layer ] = (int)Pattern; } FirstWord = GsbGetNextWord( 0, 1 ); @@ -779,10 +777,10 @@ void DrealLoadParameters() for ( Layer = 0; Layer < RDS_ALL_LAYER; Layer++ ) { - DREAL_RDS_LAYER_NAME_TABLE[ Layer ][0] = (char *)NULL; - DREAL_RDS_LAYER_NAME_TABLE[ Layer ][1] = (char *)NULL; - DREAL_RDS_LAYER_NAME_TABLE[ Layer ][2] = (char *)NULL; - DREAL_RDS_LAYER_PATTERN_TABLE[ Layer ] = -1; + DREAL_RDS_LAYER_NAME_TABLE[ (int)Layer ][0] = (char *)NULL; + DREAL_RDS_LAYER_NAME_TABLE[ (int)Layer ][1] = (char *)NULL; + DREAL_RDS_LAYER_NAME_TABLE[ (int)Layer ][2] = (char *)NULL; + DREAL_RDS_LAYER_PATTERN_TABLE[ (int)Layer ] = -1; } DREAL_LOWER_GRID_STEP = 0.0; diff --git a/alliance/src/dreal/src/GTB_cursor.c b/alliance/src/dreal/src/GTB_cursor.c index b1d32cc4..37f30708 100644 --- a/alliance/src/dreal/src/GTB_cursor.c +++ b/alliance/src/dreal/src/GTB_cursor.c @@ -46,6 +46,7 @@ # include # include # include +#include # include "mut.h" # include "rds.h" # include "GTB.h" @@ -145,12 +146,12 @@ void DrealSetMouseCursor( MainWidget, CursorType ) TopWindow = XtWindow( TopShell ); ScanWindow = XtWindow( ScanShell ); - if ( DrealMouseCursorArray[ CursorType ].MAKE == True ) + if ( DrealMouseCursorArray[ (int)CursorType ].MAKE == True ) { - if ( DrealMouseCursorArray[ CursorType ].CURSOR != 0 ) + if ( DrealMouseCursorArray[ (int)CursorType ].CURSOR != 0 ) { NewCursor = XCreateFontCursor( DisplayId, - DrealMouseCursorArray[ CursorType ].CURSOR ); + DrealMouseCursorArray[ (int)CursorType ].CURSOR ); } else { @@ -181,13 +182,13 @@ void DrealSetMouseCursor( MainWidget, CursorType ) &Black, &White, 0, 0 ); } - DrealMouseCursorArray[ CursorType ].CURSOR = NewCursor; - DrealMouseCursorArray[ CursorType ].MAKE = False; + DrealMouseCursorArray[ (int)CursorType ].CURSOR = NewCursor; + DrealMouseCursorArray[ (int)CursorType ].MAKE = False; } XDefineCursor( XtDisplay( TopShell ), XtWindow( MainWidget ), - DrealMouseCursorArray[ CursorType ].CURSOR ); + DrealMouseCursorArray[ (int)CursorType ].CURSOR ); Context = XtWidgetToApplicationContext( TopShell ); diff --git a/alliance/src/dreal/src/GTB_dialog.c b/alliance/src/dreal/src/GTB_dialog.c index 36975e81..cc2a3583 100644 --- a/alliance/src/dreal/src/GTB_dialog.c +++ b/alliance/src/dreal/src/GTB_dialog.c @@ -51,6 +51,7 @@ # include "mut.h" # include "rds.h" # include "GTB.h" +# include "GRD.h" # include "GTB_dialog.h" /*------------------------------------------------------------\ @@ -69,7 +70,7 @@ | | \------------------------------------------------------------*/ - static DrealLockLoop = 0; + static int DrealLockLoop = 0; static DrealDialogItem DrealWarningDialog = diff --git a/alliance/src/dreal/src/GTB_dialog.h b/alliance/src/dreal/src/GTB_dialog.h index 8f458ce5..3da0bdbf 100644 --- a/alliance/src/dreal/src/GTB_dialog.h +++ b/alliance/src/dreal/src/GTB_dialog.h @@ -67,4 +67,6 @@ | | \------------------------------------------------------------*/ +extern void DrealLimitedLoop(); + # endif diff --git a/alliance/src/dreal/src/dreal.c b/alliance/src/dreal/src/dreal.c index e67ad12c..79439910 100644 --- a/alliance/src/dreal/src/dreal.c +++ b/alliance/src/dreal/src/dreal.c @@ -54,8 +54,11 @@ # include "rpr.h" # include "rwi.h" # include "rut.h" +# include "rtl.h" # include "GSB.h" # include "GRD.h" +# include "GRD_window.h" +# include "GRD_error.h" # include "GMX.h" # include "dreal.h" @@ -167,14 +170,14 @@ int main( argc, argv ) if ( WindowInfo ) { fprintf( stdout, "\nDreal window\n" ); - fprintf( stdout, "\n XMIN : %d" , DrealWindowXmin / RDS_PHYSICAL_GRID ); - fprintf( stdout, "\n XMAX : %d" , DrealWindowXmax / RDS_PHYSICAL_GRID ); - fprintf( stdout, "\n YMIN : %d" , DrealWindowYmin / RDS_PHYSICAL_GRID ); - fprintf( stdout, "\n YMAX : %d" , DrealWindowYmax / RDS_PHYSICAL_GRID ); - fprintf( stdout, "\n SIDE : %d" , DrealWindowSide / RDS_PHYSICAL_GRID ); - fprintf( stdout, "\n DX : %d" , DrealWindowDx ); - fprintf( stdout, "\n DY : %d" , DrealWindowDy ); - fprintf( stdout, "\n SIZE : %d\n", DrealWindowSize ); + fprintf( stdout, "\n XMIN : %ld" , DrealWindowXmin / RDS_PHYSICAL_GRID ); + fprintf( stdout, "\n XMAX : %ld" , DrealWindowXmax / RDS_PHYSICAL_GRID ); + fprintf( stdout, "\n YMIN : %ld" , DrealWindowYmin / RDS_PHYSICAL_GRID ); + fprintf( stdout, "\n YMAX : %ld" , DrealWindowYmax / RDS_PHYSICAL_GRID ); + fprintf( stdout, "\n SIDE : %ld" , DrealWindowSide / RDS_PHYSICAL_GRID ); + fprintf( stdout, "\n DX : %ld" , DrealWindowDx ); + fprintf( stdout, "\n DY : %ld" , DrealWindowDy ); + fprintf( stdout, "\n SIZE : %ld\n", DrealWindowSize ); } DrealInitializeErrorMessage( Debug ); diff --git a/alliance/src/druc/src/defdefin.c b/alliance/src/druc/src/defdefin.c index cf519cf4..1dccbd2e 100644 --- a/alliance/src/druc/src/defdefin.c +++ b/alliance/src/druc/src/defdefin.c @@ -28,6 +28,7 @@ #include "drucutil.h" #include "vmctools.h" +#include "vmcunify.h" #include "deftools.h" #include "defunion.h" #include "definter.h" diff --git a/alliance/src/druc/src/defresiz.c b/alliance/src/druc/src/defresiz.c index df6aaeb1..283782c3 100644 --- a/alliance/src/druc/src/defresiz.c +++ b/alliance/src/druc/src/defresiz.c @@ -56,13 +56,11 @@ void DrucDefineResize ( DrucFigureRds, int TmpLayerDest; int TmpLayerSource1; - int TmpLayerSource2; register rdsrec_list *TmpRectangleSource; register rdsrec_list *TmpRectangleDest; TmpLayerDest = DrucInstructionCourante->LAYER_DEST; TmpLayerSource1 = DrucInstructionCourante->LAYER_1; - TmpLayerSource2 = DrucInstructionCourante->LAYER_2; /*\ * modifier tous les rectangles du layer source 1 \*/ diff --git a/alliance/src/druc/src/deftools.c b/alliance/src/druc/src/deftools.c index 5676c182..2647af5f 100644 --- a/alliance/src/druc/src/deftools.c +++ b/alliance/src/druc/src/deftools.c @@ -258,7 +258,6 @@ register long UnaireDY; register rdsrec_list *TmpRectangleDest; register int TmpLayerDest = DrucInstructionCourante->LAYER_DEST; -register int TmpLayerSource = DrucInstructionCourante->LAYER_1; TmpRectangleDest = allocrdsrec( sizeof ( DrucTypeStructPlusRect )); TmpRectangleDest->X = UnaireX ; @@ -310,11 +309,6 @@ register rdsrec_list *Rectangle1; register rdsrec_list *Rectangle2; { - - -register long TmpDx2 = Rectangle2->X + Rectangle2->DX; -register long TmpDy2 = Rectangle2->Y + Rectangle2->DY; - if ( ( UnaireX + UnaireDX < Rectangle2->X ) || ( Rectangle2->X + Rectangle2->DX < UnaireX ) ) diff --git a/alliance/src/druc/src/deftools.h b/alliance/src/druc/src/deftools.h index 9aa39a73..00e024a6 100644 --- a/alliance/src/druc/src/deftools.h +++ b/alliance/src/druc/src/deftools.h @@ -65,3 +65,4 @@ extern void DrucExclusionRectangle (); | ou retoune NULL | \------------------------------------------------------------*/ extern void DrucMarqueInclusion (); +extern void DrucCalculOperationUnaire (); diff --git a/alliance/src/druc/src/defunion.h b/alliance/src/druc/src/defunion.h index c7b90ed8..acbd14bc 100644 --- a/alliance/src/druc/src/defunion.h +++ b/alliance/src/druc/src/defunion.h @@ -23,3 +23,4 @@ | l'instruction | \------------------------------------------------------------*/ extern void DrucDefineEquipot (); +extern void DrucDefineUnion (); diff --git a/alliance/src/druc/src/drucbath.c b/alliance/src/druc/src/drucbath.c index f184ac6c..3b43999f 100644 --- a/alliance/src/druc/src/drucbath.c +++ b/alliance/src/druc/src/drucbath.c @@ -66,7 +66,7 @@ void DrucConcateneErrorFiles ( DrucFigureRds, rdsins_list *InstanceCourante; char *TmpErrorFileName; FILE *TmpErrorFile; -char DrucTmpFileBuffer [ DRUC_MAX_STRING_BUFFER + 1 ]; +char DrucTmpFileBuffer [ DRUC_MAX_FILE_BUFFER + 1 ]; fputs ( "\n" , DrucErrorFile @@ -236,9 +236,6 @@ void DrucSaveFigureErreur ( DrucFigureRdsErreur rdsfig_list *DrucFigureRdsErreur; { - -rdsrec_list *RectangleCourant; - DrucDelLayer ( DrucFigureRdsErreur, RDS_USER0 ); @@ -571,17 +568,9 @@ int main (argc , argv ) int argc; char *argv[]; { -phfig_list *DrucFigureMbk; -rdsfig_list *DrucFigureRds; -rdswindow *DrucRdsWindow; char *Name; char *DrucFigureName; char *DrucErrorName = (char *)NULL; -char *DrucCouronneRdsName; -char *DrucNetworkName; -DrucTypeStructInstruction *DrucTabInstruction = ( DrucTypeStructInstruction *)NULL; -int IndexLayer; -int Resultat; int IndexName = 1; int i; diff --git a/alliance/src/druc/src/drucgral_test.c b/alliance/src/druc/src/drucgral_test.c index 816eac01..7f0bb8b2 100644 --- a/alliance/src/druc/src/drucgral_test.c +++ b/alliance/src/druc/src/drucgral_test.c @@ -58,16 +58,9 @@ void main (argc , argv ) { phfig_list *DrucFigureMbk; rdsfig_list *DrucFigureRds; -rdswindow *DrucRdsWindow; char *Name; char *DrucFigureName; char *DrucErrorName = (char *)NULL; -char *DrucCouronneRdsName; -char *DrucNetworkName; -DrucTypeStructInstruction *DrucTabInstruction = ( DrucTypeStructInstruction *)NULL; -int DrucNombreInstructions; -int IndexLayer; -int Resultat; /*\ * lecture des parametres d'entree diff --git a/alliance/src/druc/src/druchier.c b/alliance/src/druc/src/druchier.c index 4592c615..651e5ec9 100644 --- a/alliance/src/druc/src/druchier.c +++ b/alliance/src/druc/src/druchier.c @@ -55,8 +55,6 @@ DrucTypeStructVirtuEquiv TabVirtuEquivalence [ ] = \------------------------------------------------------------*/ extern long DrucCtmMax; -static char DrucFileBuffer [ DRUC_MAX_FILE_BUFFER + 1 ]; - /*------------------------------------------------------------\ | | | DRUCHIER Fonctions | @@ -234,7 +232,6 @@ DrucTypeStructInstruction **DrucStructInstruction; int *DrucNombreInstructions; { DrucTypeStructInstruction *TmpStructInstruction; -int InstructionAddNumber ; int IndexMesure; int IndexSuite; int LayerTransparent; @@ -423,9 +420,7 @@ DrucTypeStructInstruction **DrucStructInstruction; int *DrucNombreInstructions; { DrucTypeStructInstruction *TmpStructInstruction; -int InstructionAddNumber ; int IndexMesure; -int IndexSuite; int LayerTransparent; int LayerSource; int LayerSource2; @@ -500,9 +495,7 @@ DrucTypeStructInstruction **DrucStructInstruction; int *DrucNombreInstructions; { DrucTypeStructInstruction *TmpStructInstruction; -int InstructionAddNumber ; int IndexMesure; -int IndexSuite; int LayerVirtuel; int LayerSource; int LayerSource2; @@ -577,7 +570,6 @@ DrucTypeStructInstruction **DrucStructInstruction; int *DrucNombreInstructions; { DrucTypeStructInstruction *TmpStructInstruction; -int InstructionAddNumber ; int IndexMesure; int IndexSuite; int LayerTransparent; diff --git a/alliance/src/druc/src/druchier.h b/alliance/src/druc/src/druchier.h index 8c252938..a1f615fc 100644 --- a/alliance/src/druc/src/druchier.h +++ b/alliance/src/druc/src/druchier.h @@ -53,3 +53,7 @@ extern DrucTypeStructVirtuEquiv TabVirtuEquivalence []; | ajouter extern au tableau DrucTypeStructTransEquiv | | | \------------------------------------------------------------*/ + +extern void DrucDuplicateHierarchicalRule(); +extern int DrucAsTransparenceEquivalent (); +extern void DrucAddABoxRules (); diff --git a/alliance/src/druc/src/drucompi.c b/alliance/src/druc/src/drucompi.c index e5664be3..0d994b95 100644 --- a/alliance/src/druc/src/drucompi.c +++ b/alliance/src/druc/src/drucompi.c @@ -23,7 +23,9 @@ #include "rpr.h" #include "drucompi_y.h" #include "drucutil.h" +#include "druchier.h" #include "vmctools.h" +#include "vmcasmld.h" #include "drucompi.h" /*------------------------------------------------------------\ | | diff --git a/alliance/src/druc/src/drucompi.h b/alliance/src/druc/src/drucompi.h index 048a9d3f..84c28af5 100644 --- a/alliance/src/druc/src/drucompi.h +++ b/alliance/src/druc/src/drucompi.h @@ -77,7 +77,7 @@ extern char DrucInputChaine[]; | Druc Fonctions LEX/YACC | | | \------------------------------------------------------------*/ -extern vrd_y_parse (); +extern int vrd_y_parse (); extern void vrd_y_error (); /*------------------------------------------------------------\ | | @@ -97,9 +97,12 @@ extern void DrucInitDefineLayerA (); extern void DrucInitDefineLayerB (); extern void DrucStoreInstructionDefine (); +extern void DrucLoadInstructionDefine (); +extern void DrucLoadInstructionUndefine (); extern void DrucInitUndefineUserLayer (); extern void DrucStoreInstructionUndefine (); +extern void DrucInitOpUnaire (); extern void DrucInitRegleNumero (); extern void DrucInitRegleInstruction (); extern void DrucInitRegleLayerA (); @@ -108,6 +111,8 @@ extern void DrucInitRegleValeur (); extern void DrucInitRegleRelation (); extern void DrucInitRegleMesure (); extern void DrucInitRegleOpCompare (); +extern void DrucInitDefineValeur (); +extern void DrucLoadInstructionRegle (); extern void DrucStoreInstructionRegle (); extern void DrucEcho (); diff --git a/alliance/src/druc/src/drucompi_l.l b/alliance/src/druc/src/drucompi_l.l index ad9b218a..061e4529 100644 --- a/alliance/src/druc/src/drucompi_l.l +++ b/alliance/src/druc/src/drucompi_l.l @@ -1,8 +1,15 @@ + +%option noinput +%option nounput + %{ +#include #include "mut.h" +#include "rds.h" #include "drucompi_y.h" #include "drucutil.h" #include "drucompi.h" +#include "vmctools.h" #ifdef FLEX_SCANNER diff --git a/alliance/src/druc/src/drucompi_y.y b/alliance/src/druc/src/drucompi_y.y index 8b19974d..4b6dc2eb 100644 --- a/alliance/src/druc/src/drucompi_y.y +++ b/alliance/src/druc/src/drucompi_y.y @@ -32,6 +32,7 @@ extern FILE *yyin; int DrucNegatif; float DrucInputFloat; char DrucInputChaine[DRUC_MAX_STRING_BUFFER + 1]; +extern int yylex (); %} /*------------------------------------------------------------\ @@ -96,7 +97,7 @@ drc : { DrucNombreInstructions = 0; DRUC_REGLES list_bloc DRUC_FIN - DRUC_REGLES { return ;} + DRUC_REGLES { return 0;} ; list_layer: list_layer layer diff --git a/alliance/src/druc/src/drucring.c b/alliance/src/druc/src/drucring.c index c48c683c..cd50570d 100644 --- a/alliance/src/druc/src/drucring.c +++ b/alliance/src/druc/src/drucring.c @@ -113,14 +113,8 @@ void DrucFlattenInstanceRings ( DrucFigureRds { rdsfig_list *InstanceModele; rdsins_list *InstanceCourante; -long PositionBboxX; -long PositionBboxY; -long PositionBboxDX; -long PositionBboxDY; int IndexLayer; char *TmpName; -char *savName; -char *brico = "a"; rdsrec_list *RectangleCourant; rdsrec_list *NouveauRectangle; @@ -293,7 +287,6 @@ void DrucCreateRectangleInCouronne ( DrucCouronneRds, long PositionInterneCouronneDY; { -rdsrec_list *RectangleDest; /*\ * si le rectangle est en contact avec la couronne \*/ @@ -311,14 +304,14 @@ rdsrec_list *RectangleDest; * creer un nouveau rectangle, * l'inserer dans la figure couronne sur son layer \*/ - RectangleDest = addrdsfigrec ( DrucCouronneRds, - RectangleCourant->NAME, - IndexLayer, - RectangleCourant->X, - RectangleCourant->Y, - RectangleCourant->DX, - RectangleCourant->DY - ); + addrdsfigrec ( DrucCouronneRds, + RectangleCourant->NAME, + IndexLayer, + RectangleCourant->X, + RectangleCourant->Y, + RectangleCourant->DX, + RectangleCourant->DY + ); } } diff --git a/alliance/src/druc/src/drucring.h b/alliance/src/druc/src/drucring.h index 2516b180..a2d65cb6 100644 --- a/alliance/src/druc/src/drucring.h +++ b/alliance/src/druc/src/drucring.h @@ -22,3 +22,7 @@ #define DRUC_BLOC_PERE (rdsins_list *)NULL #define DRUC_DEMI_CONNECTEUR 4 #define DRUC_COURONNE_EXTEND "_RNG" + +extern void DrucDelLayer (); +extern void DrucFlattenInstanceRings (); +extern void DrucCreateCouron (); diff --git a/alliance/src/druc/src/drucutil.h b/alliance/src/druc/src/drucutil.h index b04d9b5e..60bfc8f6 100644 --- a/alliance/src/druc/src/drucutil.h +++ b/alliance/src/druc/src/drucutil.h @@ -283,8 +283,9 @@ extern DrucTypeStructStat DrucStructStat; | Druc Fonctions | | | \------------------------------------------------------------*/ -extern void DrucComputeCheckSumm(); -extern char *DrucGetRuleComment (); -extern void DrucViewRuleComment (); -extern chain_list *getrdswindow (); -extern void DrucStatInit (); +extern void DrucComputeCheckSumm(); +extern char* DrucGetRuleComment (); +extern void DrucViewRuleComment (); +extern chain_list* getrdswindow (); +extern void DrucStatInit (); +extern void DrucViewNumber (); diff --git a/alliance/src/druc/src/vmcasmld.c b/alliance/src/druc/src/vmcasmld.c index 6cdc74e2..5acfafcf 100644 --- a/alliance/src/druc/src/vmcasmld.c +++ b/alliance/src/druc/src/vmcasmld.c @@ -61,7 +61,6 @@ DrucTypeStructInstruction *DrucInstructionCourante; { -int IndexInstruction; long Value; int IndexMesure = 0; @@ -130,7 +129,7 @@ char *TmpBuffer; return; } - if ( sscanf ( DrucFileBuffer, "%ld\n", &Rule ) == EOF + if ( sscanf ( DrucFileBuffer, "%22ld\n", &Rule ) == EOF ) { DRUC_EXIT( DRUC_ERROR_BAD_COMMENT ); @@ -173,7 +172,6 @@ DrucTypeStructInstruction **DrucTabInstruction; { int TmpIndexMesure; -int TmpResultat; int IndexLayer; boolean FlagBegin; char *FlagBuffer; @@ -223,7 +221,7 @@ DrucTypeStructInstruction *TmpStructInstruction; DrucStructInstruction = ( DrucTypeStructInstruction *)NULL; - TmpResultat = vrd_y_parse(); + vrd_y_parse(); DrucViewString ("\n"); if ( DrucStructStat.FLAG_FLATTEN_MODE == DRUC_HIERARCHIE diff --git a/alliance/src/druc/src/vmcasmld.h b/alliance/src/druc/src/vmcasmld.h index 95d970fe..fcfb86e9 100644 --- a/alliance/src/druc/src/vmcasmld.h +++ b/alliance/src/druc/src/vmcasmld.h @@ -25,3 +25,4 @@ extern int DrucReadNextCodeAsm (); extern int DrucInitInstruction (); extern int DrucReadAsm (); +extern void DrucComputeCtm (); diff --git a/alliance/src/druc/src/vmcerror.c b/alliance/src/druc/src/vmcerror.c index 2898177e..329bd9e6 100644 --- a/alliance/src/druc/src/vmcerror.c +++ b/alliance/src/druc/src/vmcerror.c @@ -470,7 +470,7 @@ void DrucErreurCleanFigureErreur ( DrucFigureRdsErreur, delrdsfig ( DrucFigureRdsErrorName ); - DrucFigureRdsErreur = ( rdsfig_list *)NULL; + //DrucFigureRdsErreur = ( rdsfig_list *)NULL; } } diff --git a/alliance/src/druc/src/vmcerror.h b/alliance/src/druc/src/vmcerror.h index bcf709b4..c489aa08 100644 --- a/alliance/src/druc/src/vmcerror.h +++ b/alliance/src/druc/src/vmcerror.h @@ -38,3 +38,5 @@ extern void DrucErreurOutFileRegle (); extern void DrucErreurOutFileLayer (); extern void DrucErreurUnRectangle (); extern void DrucErreurCleanFigureErreur (); +extern void DrucOpenErrorFile (); +extern void DrucCloseErrorFile (); diff --git a/alliance/src/druc/src/vmcmesur.c b/alliance/src/druc/src/vmcmesur.c index 596e9daa..e1778cc8 100644 --- a/alliance/src/druc/src/vmcmesur.c +++ b/alliance/src/druc/src/vmcmesur.c @@ -141,10 +141,8 @@ long FinXA = XA + DXA; long FinXB = XB + DXB; long FinYA = YA + DYA; long FinYB = YB + DYB; -long ExtenXAXB = XA - XB; long ExtenDXAXB = FinXA - XB; long ExtenDXADXB = FinXA - FinXB; -long ExtenYAYB = YA - YB; long ExtenDYAYB = FinYA - YB; long ExtenDYADYB = FinYA - FinYB; long ExtenXBXA = XB - XA; diff --git a/alliance/src/druc/src/vmcmesur.h b/alliance/src/druc/src/vmcmesur.h index 85b2a815..4821661c 100644 --- a/alliance/src/druc/src/vmcmesur.h +++ b/alliance/src/druc/src/vmcmesur.h @@ -19,6 +19,8 @@ | Druc VmcMesur Fonctions | | | \------------------------------------------------------------*/ -extern void DrucRelationSetDistance (); -extern void DrucRelationMesure (); -extern void DrucRelationTeste (); +extern void DrucRelationSetDistance (); +extern void DrucRelationMesure (); +extern void DrucRelationTeste (); +extern void DrucMesureInter (); +extern void DrucRelationTesteDistance (); diff --git a/alliance/src/druc/src/vmctools.h b/alliance/src/druc/src/vmctools.h index 19078635..79854d34 100644 --- a/alliance/src/druc/src/vmctools.h +++ b/alliance/src/druc/src/vmctools.h @@ -1,3 +1,6 @@ + +#include "rwi.h" + /*------------------------------------------------------------\ | | | Tool : DRUC | @@ -319,21 +322,29 @@ typedef struct struct_mesure long POSY_RECT_RI; long POSDX_RECT_RI; long POSDY_RECT_RI; - } DrucTypeStructMesure; +} DrucTypeStructMesure; /*------------------------------------------------------------\ | | | Druc VmcTools Fonctions | | | \------------------------------------------------------------*/ -extern void DrucClearFlag (); -extern void DrucComputeEqui (); -extern rdsrecwin_list *DrucChercheWindow (); -extern boolean DrucIsRectangleEquipot (); -extern boolean DrucIsRectanglesValides (); -extern void DrucSetEquiFlag (); -extern void DrucClearEquiFlag (); -extern void DrucAddRecFigure (); -extern void DrucViewString (); -extern char *DrucAddSuffixeName (); -extern void DrucVerifyEqui (); -extern void DrucVerifyEquiLayer (); +extern void DrucClearFlag (); +extern void DrucComputeEqui (); +extern rdsrecwin_list *DrucChercheWindow (); +extern boolean DrucIsRectangleEquipot (); +extern boolean DrucIsRectanglesValides (); +extern void DrucSetEquiFlag (); +extern void DrucClearEquiFlag (); +extern void DrucAddRecFigure (); +extern void DrucViewString (); +extern char *DrucAddSuffixeName (); +extern void DrucVerifyEqui (); +extern void DrucVerifyEquiLayer (); +extern void DrucComputeEquiLayer (); +extern void DrucDestroyLayerWindow (); +extern void DrucBuiltLayerWindow (); +extern void DrucIsPositionInclusInEqui (); +extern boolean DrucIsPerimetreInclusInEqui(); +extern boolean DrucIsRectanglesContact (); +extern void DrucInitStructLayers (); +extern void DrucComputeEquiFigure (); diff --git a/alliance/src/druc/src/vmcunify.c b/alliance/src/druc/src/vmcunify.c index b73b387d..64f8e966 100644 --- a/alliance/src/druc/src/vmcunify.c +++ b/alliance/src/druc/src/vmcunify.c @@ -263,7 +263,6 @@ boolean DrucUnifyOrientation ( DrucFigureRds, { -rdsrec_list *DrucNouveauRectangle; long XA = Rectangle1->X; long YA = Rectangle1->Y; long XB = Rectangle2->X; @@ -276,16 +275,10 @@ long FinXA = XA + DXA; long FinXB = XB + DXB; long FinYA = YA + DYA; long FinYB = YB + DYB; -long ExtenXAXB = XA - XB; long ExtenDXAXB = FinXA - XB; -long ExtenDXADXB = FinXA - FinXB; -long ExtenYAYB = YA - YB; long ExtenDYAYB = FinYA - YB; -long ExtenDYADYB = FinYA - FinYB; long ExtenDXBXA = FinXB - XA; -long ExtenDXBDXA = - ExtenDXADXB; long ExtenDYBYA = FinYB - YA; -long ExtenDYBDYA = - ExtenDYADYB; int TmpCas; boolean FlagIsEquiModified = DRUC_FALSE; @@ -678,16 +671,10 @@ long FinXA = XA + DXA; long FinXB = XB + DXB; long FinYA = YA + DYA; long FinYB = YB + DYB; -long ExtenXAXB = XA - XB; long ExtenDXAXB = FinXA - XB; -long ExtenDXADXB = FinXA - FinXB; -long ExtenYAYB = YA - YB; long ExtenDYAYB = FinYA - YB; -long ExtenDYADYB = FinYA - FinYB; long ExtenDXBXA = FinXB - XA; -long ExtenDXBDXA = - ExtenDXADXB; long ExtenDYBYA = FinYB - YA; -long ExtenDYBDYA = - ExtenDYADYB; int TmpCas; boolean FlagIsEquiModified = DRUC_FALSE; @@ -948,11 +935,10 @@ rdsrec_list *TmpRectangle1; rdsrec_list *TmpRectangle2; boolean FlagNextRectangle1; boolean FlagIsEquiModified; -boolean FlagCreateRectangle = DRUC_TRUE; +boolean FlagCreateRectangle = DRUC_FALSE; DrucTypeStructPlusRect *PlusRec1; DrucTypeStructPlusRect *PlusRec2; - FlagCreateRectangle = DRUC_FALSE; do { FlagIsEquiModified = DRUC_FALSE; @@ -1326,8 +1312,6 @@ void DrucUnifyFigure ( DrucFigureRds, rdswindow *DrucRdsWindow; rdsins_list *InstanceCourante; -int IndexLayer; -int LayerCourant; InstanceCourante = DrucFigureRds->INSTANCE; DrucFigureRds->INSTANCE = (rdsins_list *)NULL; diff --git a/alliance/src/druc/src/vmcunify.h b/alliance/src/druc/src/vmcunify.h index a689a396..78164a2d 100644 --- a/alliance/src/druc/src/vmcunify.h +++ b/alliance/src/druc/src/vmcunify.h @@ -22,4 +22,5 @@ extern void DrucUnifyRectangle (); extern void DrucUnifyLayer (); extern void DrucUnify (); extern void DrucUnifyFigure (); +extern void DrucUnifyLayer (); diff --git a/alliance/src/elp/src/elp.c b/alliance/src/elp/src/elp.c index 92323238..d279e6cf 100644 --- a/alliance/src/elp/src/elp.c +++ b/alliance/src/elp/src/elp.c @@ -18,9 +18,10 @@ #include #include "elp.h" -extern FILE *elpyyin ; +extern FILE *elpyyin ; +extern int elpyyparse () ; char elpTechnoName[elpSTRINGSIZE] ; -char elpTechnoFile[elpSTRINGSIZE] ; +char elpTechnoFile[elpSTRINGSIZE] ; double elpTechnoVersion ; char elpEsimName[elpSTRINGSIZE] ; char elpModelName[elpSTRINGSIZE] = "MOS" ; @@ -47,10 +48,8 @@ int elpyylineno ; /* ------------------- */ /* Aucun! */ /*****************************************************************************/ -elpFCT elpenv() +elpFCT int elpenv() { - char Buffer[ 512 ]; - char *str ; str = mbkgetenv("ELP_TECHNO_NAME"); @@ -62,6 +61,7 @@ elpFCT elpenv() if ( str == (char *)NULL ) str = ALLIANCE_TOP; sprintf( elpTechnoFile, "%s/%s", str, TECHNOLOGY ); } + return 0; } /*****************************************************************************/ @@ -249,7 +249,7 @@ if(elpGeneral[elpACM] == 1.0) lotrs->PS = lotrs->PD = lotrs->WIDTH ; } -return ; +return 0; } @@ -457,7 +457,7 @@ if((lotrs->PS != 0.0) && (lotrs->XS != 0.0)) addcapa( lotrs->SOURCE->SIG, elpLotrsCapaSource(lotrs) ) ; } -return ; +return 0; } @@ -487,7 +487,7 @@ for(lotrs = lofig->LOTRS ; lotrs != NULL ; lotrs = lotrs->NEXT) addcapa( lotrs->GRID->SIG, elpLotrsCapaGrid(lotrs) ); } -return ; +return 0; } @@ -515,5 +515,5 @@ lotrs_list *lotrs ; for(lotrs = lofig->LOTRS ; lotrs != NULL ; lotrs = lotrs->NEXT) elpLotrsShrink(lotrs) ; -return ; +return 0; } diff --git a/alliance/src/elp/src/elp_l.l b/alliance/src/elp/src/elp_l.l index 4a90d975..8855f905 100644 --- a/alliance/src/elp/src/elp_l.l +++ b/alliance/src/elp/src/elp_l.l @@ -1,3 +1,7 @@ + +%option noinput +%option nounput + %{ #include #include diff --git a/alliance/src/elp/src/elp_y.y b/alliance/src/elp/src/elp_y.y index 529abe6e..904ce7f0 100644 --- a/alliance/src/elp/src/elp_y.y +++ b/alliance/src/elp/src/elp_y.y @@ -1,5 +1,8 @@ %{ #include "elp.h" + + int yylex (); + void yyerror(); %} %union { @@ -100,12 +103,12 @@ elpvar : extern int yylineno ; extern char yytext[] ; -yyerror() +void yyerror() { elpError(1001,yytext,yylineno) ; /* si erreur de syntaxe => erreur 1001 */ } -yywrap() {return 1 ;} +int yywrap() {return 1 ;} diff --git a/alliance/src/exp/src/expl.l b/alliance/src/exp/src/expl.l index d3510948..192dc997 100644 --- a/alliance/src/exp/src/expl.l +++ b/alliance/src/exp/src/expl.l @@ -1,3 +1,7 @@ + +%option noinput +%option nounput + %{ #include #include @@ -58,7 +62,7 @@ message [Mm][Ee][Ss][Ss][Aa][Gg][Ee] lineno_stack[include_stack_ptr] = lineno; fname_stack[include_stack_ptr++] = expfname; if ((expfname = strdup (filename)) == NULL) { - fprintf (stderr, " %-3d %s : not enough memory\n", lineno, expfname, filename); + fprintf (stderr, " %-3d %s %s : not enough memory\n", lineno, expfname, filename); exit (1); } lineno = 1; diff --git a/alliance/src/exp/src/expy.y b/alliance/src/exp/src/expy.y index a80af28a..1bc3feec 100644 --- a/alliance/src/exp/src/expy.y +++ b/alliance/src/exp/src/expy.y @@ -1,11 +1,15 @@ %{ #include #include +#include #include #include "exp.h" #include "ht.h" #include "expy.h" + extern int yylex (); + int yyerror(char *s); + #define VERBOSE (int)((htget(dico, "verbose")->VAL.f+EPSILON)) #define EPSILON 0.00001 #define anint(x) floor((x) + 0.5) @@ -89,6 +93,7 @@ htelt_t *mess (int type, char *fmt, htelt_t * args) } } eltremove (args); + return NULL; } %} @@ -152,8 +157,8 @@ exp : IDENT '=' exp { if ((pcond==0) || (cond[pcond]>0.)) { | INF '(' exp ',' exp ')' { $$ = ((int)(floor(($5+EPSILON)/$3)))*$3; pe(" inf ",$$);} | MAX '(' args ')' { $$ = limit (MAX, $3); pe(" max ",$$);} | MIN '(' args ')' { $$ = limit (MIN, $3); pe(" min ",$$);} - | DEF '(' IDENT ')' { $$ = ($3->TYPE==0) ? -1. : +1.; pe($3,$$);} - | NDEF '(' IDENT ')' { $$ = ($3->TYPE==0) ? +1. : -1.; pe($3,$$);} + | DEF '(' IDENT ')' { $$ = ($3->TYPE==0) ? -1. : +1.; pe(/*$3*/ " IDENT ",$$);} + | NDEF '(' IDENT ')' { $$ = ($3->TYPE==0) ? +1. : -1.; pe(/*$3*/ " IDENT ",$$);} ; cond : exp { if (pcond < PCONDMAX) cond[++pcond] = $1; @@ -166,8 +171,8 @@ idents : IDENT { $$ = eltadd (NULL,NULL); $$->VAL.e=$1;} | REGEX { $$ = $1->NEXT; $1->NEXT=NULL;} | REGEX ',' idents { $$ = $1->NEXT; $1->NEXT=$3;} ; -args : exp { $$ = eltadd (NULL,NULL); $$->VAL.f=$1; $$->TYPE=HT_FLOAT;pe(" , ",$1);} - | exp ',' args { $$ = eltadd ($3,NULL); $$->VAL.f=$1; $$->TYPE=HT_FLOAT;pe(" , ",$3);} +args : exp { $$ = eltadd (NULL,NULL); $$->VAL.f=$1; $$->TYPE=HT_FLOAT;pe(" , ",$$->VAL.f);} + | exp ',' args { $$ = eltadd ($3,NULL); $$->VAL.f=$1; $$->TYPE=HT_FLOAT;pe(" , ",$$->VAL.f);} | REGEX { $$ = $1->NEXT; $1->NEXT=NULL; for (ele = $$; ele; ele = ele->NEXT) { diff --git a/alliance/src/exp/src/ht.c b/alliance/src/exp/src/ht.c index da777bce..8e647bde 100644 --- a/alliance/src/exp/src/ht.c +++ b/alliance/src/exp/src/ht.c @@ -93,7 +93,7 @@ void htstat (ht_t * ht) start=0; printf ("Warning : following variables declared but never used :\n"); } - printf (" %-3d %-20s : %s\n", elt->FLINE, elt->FNAME, elt->KEY); + printf (" %-3ld %-20s : %s\n", elt->FLINE, elt->FNAME, elt->KEY); } printf ("\n"); free (ht); diff --git a/alliance/src/exp/src/ht.h b/alliance/src/exp/src/ht.h index f35c6e38..84e99f9e 100644 --- a/alliance/src/exp/src/ht.h +++ b/alliance/src/exp/src/ht.h @@ -92,4 +92,6 @@ htelt_t *htset (ht_t * ht, char *key); */ htelt_t *htsetre (ht_t * ht, char *key); +void htstat (ht_t * ht); + #endif diff --git a/alliance/src/fks/src/fksparse.c b/alliance/src/fks/src/fksparse.c index 5baaa5f0..7e06e13a 100644 --- a/alliance/src/fks/src/fksparse.c +++ b/alliance/src/fks/src/fksparse.c @@ -211,7 +211,7 @@ void kissloadfsmfig( FsmFigure, FigureName ) char *FigureName; { fsmstate_list *StateFrom; - fsmstate_list *StateTo; + fsmstate_list *StateTo = NULL; fsmstate_list *StarState; fsmout_list *Output; fsmin_list *Input; @@ -222,9 +222,9 @@ void kissloadfsmfig( FsmFigure, FigureName ) char *StateVoidName; char *StarStateName; char *PortName; - int NumberIn; - int NumberOut; - int NumberState; + int NumberIn = 0; + int NumberOut = 0; + int NumberState = 0; char Instruction; char DeclarationType; int Index; diff --git a/alliance/src/flatbeh/src/abstract.c b/alliance/src/flatbeh/src/abstract.c index 289981b8..743e42e6 100644 --- a/alliance/src/flatbeh/src/abstract.c +++ b/alliance/src/flatbeh/src/abstract.c @@ -508,12 +508,16 @@ for(inst = lofig->LOINS; inst; inst = inst->NEXT) if ((ret = searchauthelem(busTH, busName)) == NULL) { +#if THIS_IS_DISABLED if (cptInt == 0) befig->BEBUS = beh_addbebus(befig->BEBUS, busName, newBi, NULL, bus->TYPE); else befig->BEBUS = beh_addbebus(befig->BEBUS, busName, newBi, NULL, bus->TYPE); +#endif + befig->BEBUS = beh_addbebus(befig->BEBUS, busName, + newBi, NULL, bus->TYPE); addauthelem(busTH, busName,(long) befig->BEBUS); } else diff --git a/alliance/src/flatbeh/src/utils.c b/alliance/src/flatbeh/src/utils.c index d995670a..f16af264 100644 --- a/alliance/src/flatbeh/src/utils.c +++ b/alliance/src/flatbeh/src/utils.c @@ -37,11 +37,12 @@ char *itostr(str,nbr) char *str; int nbr; { -char *s = (char *)mbkalloc(strlen(str)+5); -strcpy(s,str); -strcat(s,"%d"); -sprintf(s,s,nbr); -return ((char *)s); +char *s1 = (char *)mbkalloc(strlen(str)+5); +char *s2 = (char *)mbkalloc(strlen(str)+5); +strcpy(s1,str); +strcat(s1,"%d"); +sprintf(s2,s1,nbr); +return ((char *)s2); } void Usage(nom) @@ -140,7 +141,7 @@ char *name; while (*s !='\0') { *t++=*s++;} *t = '\0'; - sscanf(tmp_index,"%d",&ind); + sscanf(tmp_index,"%11d",&ind); return(ind); } diff --git a/alliance/src/flatlo/src/flatlo.c b/alliance/src/flatlo/src/flatlo.c index c8af0417..ea5042f1 100644 --- a/alliance/src/flatlo/src/flatlo.c +++ b/alliance/src/flatlo/src/flatlo.c @@ -27,9 +27,10 @@ #include #include "mut.h" #include "mlo.h" +#include "mlu.h" -usage(progname) +void usage(progname) char *progname; { fprintf(stderr, "usage : %s logical_figure instance output_name\n", @@ -42,7 +43,7 @@ char *progname; EXIT(1); } -main(argc, argv) +int main(argc, argv) int argc; char **argv; { @@ -65,4 +66,5 @@ lofig_list *p; p->NAME=argv[3]; savelofig(p); exit(0); + return 0; } diff --git a/alliance/src/flatph/src/flatph.c b/alliance/src/flatph/src/flatph.c index 80640d0b..4fbdd790 100644 --- a/alliance/src/flatph/src/flatph.c +++ b/alliance/src/flatph/src/flatph.c @@ -23,10 +23,12 @@ #ident "$Id: flatph.c,v 1.3 2012/05/14 14:20:10 alliance Exp $" #include +#include #include "mut.h" #include "mph.h" +#include "mpu.h" -usage(progname) +void usage(progname) char *progname; { fprintf(stderr, "usage : %s physical_figure instance output_name\n", progname); @@ -38,7 +40,7 @@ char *progname; EXIT(1); } -main(argc, argv) +int main(argc, argv) int argc; char **argv; { @@ -60,4 +62,5 @@ phfig_list *p; p->NAME=argv[3]; savephfig(p); exit(0); + return 0; } diff --git a/alliance/src/fmi/src/fmi_optim.c b/alliance/src/fmi/src/fmi_optim.c index 799aa7c8..70f9ab5c 100644 --- a/alliance/src/fmi/src/fmi_optim.c +++ b/alliance/src/fmi/src/fmi_optim.c @@ -219,9 +219,6 @@ FmiRazFlag (classe) fmiclass_list *ScanClasse; fmicelm_list *Scanelm; - fmiclass_list *head; - - head = classe; for (ScanClasse = classe; ScanClasse != (fmiclass_list *) 0; ScanClasse = ScanClasse->NEXT) @@ -347,7 +344,6 @@ FmiRec (fsm, classe) fsmtrans_list *ScanTrans; chain_list *ScanChain1; fsmstate_list *State, *FromState, *ToState; - fsmtrans_list *trans; fsmfig_list *NewFsm; fsmin_list *ScanIn; @@ -419,10 +415,8 @@ FmiRec (fsm, classe) *) ((fsmtrans_list *) ScanChain1->DATA)->TO->USER)-> ELM->STATE->NAME); - trans = - addfsmtrans (NewFsm, FromState, ToState, - dupablexpr (((fsmtrans_list *) ScanChain1->DATA)-> - ABL)); + addfsmtrans (NewFsm, FromState, ToState, + dupablexpr (((fsmtrans_list *) ScanChain1->DATA)->ABL)); } } diff --git a/alliance/src/fsm/src/fsmview.c b/alliance/src/fsm/src/fsmview.c index 1d05af96..2faa3137 100644 --- a/alliance/src/fsm/src/fsmview.c +++ b/alliance/src/fsm/src/fsmview.c @@ -124,7 +124,7 @@ void viewfsmport( Port ) fprintf( stdout, "\n\t\tNAME : %s", Port->NAME ); fprintf( stdout, "\n\t\tDIR : %c", Port->DIR ); if ( Port->TYPE < FSM_MAX_TYPE ) - fprintf( stdout, "\n\t\tTYPE : %s", FSM_TYPE_NAME[ Port->TYPE ] ); + fprintf( stdout, "\n\t\tTYPE : %s", FSM_TYPE_NAME[ (int)Port->TYPE ] ); else fprintf( stdout, "\n\t\tTYPE : %d", (int)Port->TYPE ); fprintf( stdout, "\n\t\tFLAGS : %lx", Port->FLAGS ); diff --git a/alliance/src/fsp/src/fsp_proof.c b/alliance/src/fsp/src/fsp_proof.c index 1f335b18..600ac42f 100644 --- a/alliance/src/fsp/src/fsp_proof.c +++ b/alliance/src/fsp/src/fsp_proof.c @@ -342,8 +342,7 @@ int FspVerifyInputOutput( FsmFigure1, FsmFigure2 ) fsmout_list *ScanOut; authtable *HashTable; - if ( ( FsmFigure1->NUMBER_IN != FsmFigure2->NUMBER_IN ) || - ( FsmFigure2->NUMBER_OUT != FsmFigure2->NUMBER_OUT ) ) + if ( FsmFigure1->NUMBER_IN != FsmFigure2->NUMBER_IN ) { return( 0 ); } diff --git a/alliance/src/fvh/src/fbh_rmv.c b/alliance/src/fvh/src/fbh_rmv.c index 29ec1040..6aff44aa 100644 --- a/alliance/src/fvh/src/fbh_rmv.c +++ b/alliance/src/fvh/src/fbh_rmv.c @@ -57,7 +57,7 @@ char mode; /* recursive delete or not (Y or N) */ { struct fbaux headaux; - struct fbaux *ptlastaux; + struct fbaux *ptlastaux = NULL; struct fbaux *ptfbaux; if (listfbaux != 0) @@ -120,7 +120,7 @@ char mode; /* recursive delete or not (Y or N) */ { struct fbbus headbus; - struct fbbus *ptlastbus; + struct fbbus *ptlastbus = NULL; struct fbbus *ptfbbus; if (listfbbus != 0) @@ -186,7 +186,7 @@ char mode; /* recursive delete or not (Y or N) */ { struct fbbux headbux; - struct fbbux *ptlastbux; + struct fbbux *ptlastbux = NULL; struct fbbux *ptfbbux; if (listfbbux != 0) @@ -252,7 +252,7 @@ char mode; /* recursive delete or not (Y or N) */ { struct fbfig headfig; - struct fbfig *ptlastfig; + struct fbfig *ptlastfig = NULL; struct fbfig *ptfbfig; struct ptype *ptptype; @@ -333,7 +333,7 @@ char mode; /* recursive delete or not (Y or N) */ { struct fbgen headgen; - struct fbgen *ptlastgen; + struct fbgen *ptlastgen = NULL; struct fbgen *ptfbgen; if (listfbgen != 0) @@ -396,7 +396,7 @@ char mode; /* recursive delete or not (Y or N) */ { struct fbmsg headmsg; - struct fbmsg *ptlastmsg; + struct fbmsg *ptlastmsg = NULL; struct fbmsg *ptfbmsg; if (listfbmsg != 0) @@ -459,7 +459,7 @@ char mode; /* recursive delete or not (Y or N) */ { struct fbout headout; - struct fbout *ptlastout; + struct fbout *ptlastout = NULL; struct fbout *ptfbout; if (listfbout != 0) @@ -520,7 +520,7 @@ char *fbporname; /* name of the BEPOR to be deleted */ { struct fbpor headpor; - struct fbpor *ptlastpor; + struct fbpor *ptlastpor = NULL; struct fbpor *ptfbpor; if (listfbpor != 0) @@ -572,7 +572,7 @@ char mode; /* recursive delete or not (Y or N) */ { struct fbreg headreg; - struct fbreg *ptlastreg; + struct fbreg *ptlastreg = NULL; struct fbreg *ptfbreg; if (listfbreg != 0) @@ -636,7 +636,7 @@ char *fbrinname; /* name of the BERIN to be deleted */ { struct fbrin headrin; - struct fbrin *ptlastrin; + struct fbrin *ptlastrin = NULL; struct fbrin *ptfbrin; if (listfbrin != 0) diff --git a/alliance/src/fvh/src/fbh_uti.c b/alliance/src/fvh/src/fbh_uti.c index 5ce50cc0..efffd441 100644 --- a/alliance/src/fvh/src/fbh_uti.c +++ b/alliance/src/fvh/src/fbh_uti.c @@ -78,15 +78,12 @@ static void FbhScanExprWhen( ScanCase ) fbcas_list *ScanCase; { - char *ChoiceValue; int Index; FbhFuncRight( ScanCase->ABL ); for ( Index = 0; Index < ScanCase->SIZE; Index++ ) { - ChoiceValue = ScanCase->CHOICE[ Index ].VALUE; - FbhScanExprInstruction( ScanCase->CHOICE[ Index ].INSTRUCTION ); } } diff --git a/alliance/src/fvh/src/fbl_bcomp_l.l b/alliance/src/fvh/src/fbl_bcomp_l.l index a1051722..de19aad7 100644 --- a/alliance/src/fvh/src/fbl_bcomp_l.l +++ b/alliance/src/fvh/src/fbl_bcomp_l.l @@ -1,3 +1,7 @@ + +%option noinput +%option nounput + /*------------------------------------------------------------\ | | | This file is part of the Alliance CAD System Copyright | diff --git a/alliance/src/fvh/src/fbl_bcomp_y.y b/alliance/src/fvh/src/fbl_bcomp_y.y index f382514e..4fe127bb 100644 --- a/alliance/src/fvh/src/fbl_bcomp_y.y +++ b/alliance/src/fvh/src/fbl_bcomp_y.y @@ -827,7 +827,7 @@ pragma_declaration char type[128]; char name[128]; char value[128]; - char *pt; + char *pt = NULL; long field; field = sscanf((char *)$1,"-- %s %s %s %s", pragma,type,name,value); @@ -1006,7 +1006,7 @@ enumeration_type_definition char *enumname; long size=0; long indice=0; - char **pnt; + char **pnt = NULL; chain_list *nm1lst; FBL_NM1LST = reverse (FBL_NM1LST); @@ -1849,7 +1849,7 @@ process_statement | { char buffer[ 64 ]; - sprintf( buffer, "process_%d", FBL_LINNUM ); + sprintf( buffer, "process_%ld", FBL_LINNUM ); FBL_LBLNAM = namealloc( buffer ); } unlabeled_process_statement @@ -1990,8 +1990,6 @@ signal_assignment_statement char extname[100]; struct fbl_expr expr; struct ptype **pnt; - struct fbaux *fbaux_pnt; - struct fbout *fbout_pnt; type = chktab(hshtab,$1.NAME,FBL_MODNAM,FBL_TYPDFN); sig_conf = chktab(hshtab,$1.NAME,FBL_MODNAM,FBL_SIGDFN); @@ -2094,7 +2092,7 @@ signal_assignment_statement { char *newname; - sprintf (extname,"%s %d",$1.NAME,i+debut-in_bound); + sprintf (extname,"%s %ld",$1.NAME,i+debut-in_bound); newname = namealloc( extname ); if (i >= in_bound) { @@ -2230,7 +2228,7 @@ case_statement long indice=0; struct choice_chain *ch; struct fbcho **pnt; - struct fbcho *tab; + struct fbcho *tab = NULL; struct choice_chain *nm1lst; @@ -2349,7 +2347,7 @@ choices2 Bar choice { - if ($3.NAME == "others") + if (!strncmp($3.NAME,"others",7)) { fbl_error (30,NULL); } @@ -3327,7 +3325,7 @@ short right; char auxflg = 0; char buxflg = 0; char regflg = 0; - char lclmod; + char lclmod = 'B'; char lcltyp = type; char extname[100]; short i; diff --git a/alliance/src/fvh/src/fbl_bspec.c b/alliance/src/fvh/src/fbl_bspec.c index b2302220..04e75238 100644 --- a/alliance/src/fvh/src/fbl_bspec.c +++ b/alliance/src/fvh/src/fbl_bspec.c @@ -106,7 +106,7 @@ short right; /* array's right bound (= -1 if scalar) */ { for (i=left ; i!=(right+inc) ; i+=inc) { - sprintf (extname,"%s %d",(char *)ptauxnam->DATA,i); + sprintf (extname,"%s %ld",(char *)ptauxnam->DATA,i); name = namealloc(extname); if (ptauxnat != 0) { @@ -950,7 +950,7 @@ fbl_ablstr *pt_ablstr; /* tested expression */ { for (; last_widthWIDTH ; last_width++) { - sprintf (nomvar,"(%d)",last_width); + sprintf (nomvar,"(%ld)",last_width); addlogbddcircuitin(FblBddCircuit,nomvar); } } @@ -1006,7 +1006,7 @@ fbl_ablstr *pt_ablstr; /* tested expression */ i = pt_ablstr->WIDTH - 1; while (pt_auxabl != NULL) { - sprintf (nomvar,"(%i)",i); + sprintf (nomvar,"(%li)",i); pt_newabl2 = substdupablexpr (pt_newabl,namealloc(nomvar), (struct chain *)pt_auxabl->DATA); freeablexpr (pt_newabl); diff --git a/alliance/src/fvh/src/fbl_drive.c b/alliance/src/fvh/src/fbl_drive.c index 9f1580d8..1dd1953b 100644 --- a/alliance/src/fvh/src/fbl_drive.c +++ b/alliance/src/fvh/src/fbl_drive.c @@ -48,7 +48,6 @@ #include "fbl_drive.h" FILE *FblDriveFile; - static int synopsys = 0; /* ###--------------------------------------------------------------### */ /* function : vhdlsavefbfig */ @@ -63,7 +62,7 @@ void vhdlsavefbdecl( pthedfbfig, synopsys ) fbfig_list *pthedfbfig; int synopsys; { - char *type_mark; + char *type_mark = NULL; int left,right; char *name; @@ -178,11 +177,11 @@ void vhdlsavefbport( pthedfbfig, synopsys ) fbfig_list *pthedfbfig; int synopsys; { - char *mode; - char *type_mark; + char *mode = NULL; + char *type_mark = NULL; int left,right; char *name; - char *bus; + char *bus = NULL; struct fbpor *ptfbpor = 0; /* correctly ordered port list */ diff --git a/alliance/src/fvh/src/fvhfbh2fsm.c b/alliance/src/fvh/src/fvhfbh2fsm.c index fac14e27..66b6ba0f 100644 --- a/alliance/src/fvh/src/fvhfbh2fsm.c +++ b/alliance/src/fvh/src/fvhfbh2fsm.c @@ -746,10 +746,6 @@ void FvhFbhTreatPort( FbhFigure, FsmFigure ) fbbux_list *ScanBux; fbbus_list *ScanBus; char IsClock; - char ClockOk; - char Direction; - - ClockOk = 0; if ( ! IsFsmFigMixedRtl( FsmFigure ) ) { @@ -849,11 +845,6 @@ void FvhFbhTreatPort( FbhFigure, FsmFigure ) if ( IsFbhAssignByFsm( ScanAux ) ) { addfsmout( FsmFigure, ScanAux->NAME ); - Direction = 'B'; - } - else - { - Direction = 'I'; } addfsmport( FsmFigure, ScanAux->NAME, 'B', ScanAux->TYPE ); @@ -1650,7 +1641,7 @@ void FvhFbhTreatProcess( FbhFigure, FsmFigure ) { fsmfig_list *Figure; fvhfig_list *ScanFigList; - fbpcs_list *ScanProc; + fbpcs_list *ScanProc = NULL; chain_list *ScanSens; fbpcs_list *MainProc; fbpcs_list *ClockProc; diff --git a/alliance/src/genlib/src/dpgen_Adder.c b/alliance/src/genlib/src/dpgen_Adder.c index d417831d..5c89fed7 100644 --- a/alliance/src/genlib/src/dpgen_Adder.c +++ b/alliance/src/genlib/src/dpgen_Adder.c @@ -72,7 +72,7 @@ static void RSA_Layout () { - int pi, i, n, posy; + int pi, i, n; int twostage = -1; @@ -123,9 +123,6 @@ static void RSA_Layout () } - posy = n; - - /* LV_N n'est pas une puissance entiere de 2. */ if (LV_N % (iexp2 (ilog2 (LV_N) - 1))) twostage++; diff --git a/alliance/src/genlib/src/dpgen_Nul.c b/alliance/src/genlib/src/dpgen_Nul.c index 2f21729e..87502053 100644 --- a/alliance/src/genlib/src/dpgen_Nul.c +++ b/alliance/src/genlib/src/dpgen_Nul.c @@ -78,7 +78,7 @@ static long create_Netlist_Tree (aOffset, amDepth, amDepthNext) long aOffset, amDepth, amDepthNext; { long depth, mk, k, polarity; - long cell_index, i0_index, i1_index, i_offset; + long cell_index = 0, i0_index, i1_index, i_offset; char *sModel; char sInstance[SIZE_SNAME]; char *sQ, *sI0, *sI1; @@ -240,10 +240,7 @@ static long create_Netlist_Tree (aOffset, amDepth, amDepthNext) static void create_Netlist () { - long mDepth, depth, depthNext, offset; - - - mDepth = ilog2 (LV_N); + long depth, depthNext, offset; LV_prevTreeOut = -1; LV_oneShift = 0; @@ -258,7 +255,7 @@ static void create_Netlist () offset = 0; - depthNext = get_depth (LV_N, NULL); + depthNext = get_depth (LV_N, 0); do { depth = depthNext; @@ -286,7 +283,7 @@ static long create_Layout_Tree (aOffset, amDepth, amDepthNext) long aOffset, amDepth, amDepthNext; { long depth, mk, k, polarity; - long cell_index; + long cell_index = 0; char *sModel; char sInstance[SIZE_SNAME]; @@ -385,10 +382,7 @@ static long create_Layout_Tree (aOffset, amDepth, amDepthNext) static void create_Layout () { - long mDepth, depth, depthNext, offset; - - - mDepth = ilog2 (LV_N); + long depth, depthNext, offset; LV_prevTreeOut = -1; LV_oneShift = 0; @@ -398,7 +392,7 @@ static void create_Layout () offset = 0; - depthNext = get_depth (LV_N, NULL); + depthNext = get_depth (LV_N, 0); do { depth = depthNext; diff --git a/alliance/src/genlib/src/dpgen_RAM.c b/alliance/src/genlib/src/dpgen_RAM.c index 2f401568..e731b624 100644 --- a/alliance/src/genlib/src/dpgen_RAM.c +++ b/alliance/src/genlib/src/dpgen_RAM.c @@ -63,11 +63,10 @@ extern void dpgen_RAM (aFunction, aAL) int nmot; /* nombre de mots */ int nbit; /* nombre de bits */ char *model_name; /* nom de modele */ -long flags; int HCELL = 50; -int bottom,i,j,k; +int bottom,i,j; int sym1,sym2; int adrange; @@ -84,7 +83,7 @@ char x7[10]; ////////////////////////////////////////////////////////// model_name = va_arg (aAL, char*); -flags = va_arg (aAL, long ); + (void)va_arg (aAL, long ); // flags are ignored. nbit = va_arg (aAL, long ); nmot = va_arg (aAL, long ); diff --git a/alliance/src/genlib/src/dpgen_RF1.c b/alliance/src/genlib/src/dpgen_RF1.c index 40a365d8..ed7a150b 100644 --- a/alliance/src/genlib/src/dpgen_RF1.c +++ b/alliance/src/genlib/src/dpgen_RF1.c @@ -88,8 +88,8 @@ extern void dpgen_RF1 (aFunction, aAL) { long nmot; /* nombre de mots */ long nbitd; /* nombre de bits en-dessous des buffers */ -long type; /* fifo, avec ou sans decodeurs */ -long flags; /* indexation : bit 0 en bas si flags = 0 */ +long type = 0; /* fifo, avec ou sans decodeurs */ +/*long flags; * UNUSED indexation : bit 0 en bas si flags = 0 */ long nbitu=0; /* nombre de bits au-dessus des buffers : non utilise */ long hbuf=2; /* hauteur des buffers (2 ou 4 slices) : non utilise */ @@ -99,7 +99,8 @@ long HCELL = 50; long bottom; long ntot; long i,j; -long half,max; +long half; +long max = 0; long sym1,sym2; long adrange; @@ -130,7 +131,7 @@ cell_mid_mem=(char*)malloc(sizeof(char)*512); ////////////////////////////////////////////////////////// model_name = va_arg (aAL, char*); -flags = va_arg (aAL, long ); + va_arg (aAL, long ); nbitd = va_arg (aAL, long ); nmot = va_arg (aAL, long ); @@ -257,8 +258,8 @@ GENLIB_LOCON("vss",IN,"vss"); // placement des lignes de bit en dessous des buffers // /////////////////////////////////////////////////////////////////// -cell_in_mem = strdup("rf_inmux_mem"); -cell_out_mem = strdup("rf_out_mem"); +strcpy(cell_in_mem, "rf_inmux_mem"); +strcpy(cell_out_mem, "rf_out_mem"); bottom = 0; sym1 = NOSYM; sym2 = SYM_X; @@ -355,8 +356,8 @@ GENLIB_PLACE_RIGHT(cell_out_buf,"outbuf",NOSYM); // placement des lignes de bit au dessus des buffers // /////////////////////////////////////////////////////////////////// -cell_in_mem = strdup("rf_inmux_mem"); -cell_out_mem = strdup("rf_out_mem"); +strcpy(cell_in_mem, "rf_inmux_mem"); + strcpy(cell_out_mem, "rf_out_mem"); bottom = (nbitd+hbuf) * HCELL; for(i=0;i 0) + if (SliceIndex > 0) { if (aFunction == DPGEN_SHROT) GENLIB_DEF_PHINS(XX_NAME("oa_%d", SliceIndex * n + n - 1)); else GENLIB_DEF_PHINS(XX_NAME("m_%d", SliceIndex * n + n - 1)); + } if (SliceIndex == 0) GENLIB_SC_RIGHT(XX_NAME("i_%d", SliceIndex), SYM); else diff --git a/alliance/src/genlib/src/genlib.c b/alliance/src/genlib/src/genlib.c index b29f1351..66f32aee 100644 --- a/alliance/src/genlib/src/genlib.c +++ b/alliance/src/genlib/src/genlib.c @@ -71,7 +71,7 @@ #include "mbkgen.h" #define __GENLIB__ #include "mgn.h" -static char rcsid[] = "$Id: genlib.c,v 1.14 2012/05/14 14:20:13 alliance Exp $"; +//static char rcsid[] = "$Id: genlib.c,v 1.14 2012/05/14 14:20:13 alliance Exp $"; /******************************************************************************* * global variables used in genlib * @@ -338,7 +338,7 @@ long dx1, dy1, dx2, dy2; { phfig_list *ptfig; phins_list *ptins; -ptype_list *ptype; +/*ptype_list *ptype;*/ long x1, y1, x2, y2; long insx1, insx2, insy1, insy2; @@ -355,10 +355,10 @@ long insx1, insx2, insy1, insy2; y2 = y1 = WORK_PHFIG->PHINS->YINS; } for (ptins = WORK_PHFIG->PHINS; ptins; ptins = ptins->NEXT) { +#if 0 ptype = getptype(ptins->USER, (long)PLACEABOX); /* This has been commented out as it should never ever occur, since * all instances are placed using genlib. */ -#if 0 if (ptype == NULL) { #endif ptfig = getphfig(ptins->FIGNAME, 'P'); @@ -2241,7 +2241,7 @@ phins_list *ins; phcon_list *con = NULL; /* To make -Wall happy */ phseg_list *seg = NULL; /* may not be overwritten */ phref_list *ref; -chain_list *chain = NULL; +/* chain_list *chain = NULL; */ long x, y; if (WORK_PHFIG == NULL) { @@ -2298,8 +2298,9 @@ long x, y; } /* Absolutly needed for GenView */ - if (seg) - chain = addchain(chain, (void *)seg); + /* if (seg) + * chain = addchain(chain, (void *)seg); + */ return addptype( seg ? addptype(NULL, MBK_SEGMENT, addchain(NULL, seg)) : NULL, MBK_CONNECTOR, @@ -2993,7 +2994,7 @@ chain_list *ptchain = NULL; *s = ' '; break; } - if (sscanf(signame, " %s %d:%d => %s %d:%d ", con, &icon, &jcon, sig, &isig, &jsig) == 6) { + if (sscanf(signame, " %99s %11d:%11d => %99s %11d:%11d ", con, &icon, &jcon, sig, &isig, &jsig) == 6) { if (abs(icon - jcon) != abs(isig - jsig) || icon == jcon) { fprintf(stderr, "Not a valid range : %s[%d:%d] => %s[%d:%d]\n", @@ -3006,7 +3007,7 @@ chain_list *ptchain = NULL; consiglist = addptype(consiglist, (long)vectorize(con, nb), vectorize(sig, nbs)); - } else if (sscanf(signame, " %s => %s ", con, sig) == 2) + } else if (sscanf(signame, " %99s => %99s ", con, sig) == 2) consiglist = addptype(consiglist, (long)namealloc(checkname(con)), namealloc(checkname(sig))); else { @@ -3158,7 +3159,7 @@ char *s; } ptchain1 = ptchain1->NEXT; } - ptchain1 = (chain_list *)reverse(ptchain1); + //ptchain1 = (chain_list *)reverse(ptchain1); } } @@ -3516,9 +3517,8 @@ chain_list *chain; logen_list *genLOGENLIST(int type, ...) { va_list ap; -int v; char *s, *t; -logen_list *g = NULL, *x = NULL; +logen_list *g = NULL; va_start(ap, type); while (type != GENTYPE_EMPTY) { @@ -3568,7 +3568,7 @@ logen_list *g; p->DATA = g = addlogen(p->DATA, name); - if (type < 0 && type > GENTYPE_MAX) { + if (type < 0 || type > GENTYPE_MAX) { (void)fflush(stdout); (void)fputs("*** genlib error ***\n", stderr); (void)fprintf(stderr, "Illegal LOGEN: unsupported generic type\n"); @@ -3602,7 +3602,7 @@ logen_list *g; EXIT(1); } va_end(ap); - debuglogen(g, 0); + //debuglogen(g, 0); } /******************************************************************************* @@ -3612,7 +3612,6 @@ void genSETLOGEN(char *instance, char *name, ...) { va_list ap; /* We have a single argument, but of unknown type yet! */ loins_list *i = getloins(WORK_LOFIG, instance); -lofig_list *f; ptype_list *p; logen_list *g; char *s, *t; @@ -4236,7 +4235,7 @@ char *buffer = mbkstrdup(busname); if (!(space = strchr(buffer, ']'))) return 0; *space = ' '; - (void)sscanf(buffer, "%s %ld %ld", signame, first, last); + (void)sscanf(buffer, "%1024s %22ld %22ld", signame, first, last); mbkfree(buffer); return 1; } diff --git a/alliance/src/genpat/src/ARRAY.c b/alliance/src/genpat/src/ARRAY.c index 825368e6..8f7e6ebf 100644 --- a/alliance/src/genpat/src/ARRAY.c +++ b/alliance/src/genpat/src/ARRAY.c @@ -97,8 +97,11 @@ struct alpha_num decomp; { TraiterChaine (buffer_anx, &decomp); CheckWidth (&decomp); - if (strlen(decomp.alpha) ==0) - sprintf(buffer,"%s %s",buffer,decomp.gauche); + if (strlen(decomp.alpha) ==0) { + char tmp[80]; + sprintf(tmp,"%s %s",buffer,decomp.gauche); + strcpy(buffer, tmp); + } else Erreur ("ARRAY must separate each element of a vector\n"); } @@ -162,7 +165,9 @@ struct alpha_num decomp; SplitIdent (buffer,buffer_anx); if (strlen (buffer_anx) != 0) { - sprintf (buffer, "%s %s", buffer, buffer_anx); + char tmp[80]; + sprintf (tmp, "%s %s", buffer, buffer_anx); + strcpy(buffer, tmp); } sprintf (buffer_name, "%s %d", name, GNP_PARAM_COURANT); diff --git a/alliance/src/genpat/src/libpat_l.c b/alliance/src/genpat/src/libpat_l.c index c2c2908f..0b55983b 100644 --- a/alliance/src/genpat/src/libpat_l.c +++ b/alliance/src/genpat/src/libpat_l.c @@ -94,7 +94,7 @@ elt *hash_pagrp[GNP_HASHSIZE]; void Erreur (chaine) char *chaine; { - fprintf (stderr, "GENPAT : line %d : %s\n", GNP_LINE, chaine); + fprintf (stderr, "GENPAT : line %u : %s\n", GNP_LINE, chaine); #ifdef DEBUG EXIT(1); @@ -297,7 +297,7 @@ char CheckFormat (format) char *format; { -char value; +char value = '-'; KillEsp (format); if (strlen (format) > 1 ) @@ -336,7 +336,7 @@ char value; char CheckType (type) char *type; { - char t; + char t = '-'; KillEsp (type); if (strlen (type) > 1 ) @@ -348,7 +348,6 @@ char *type; case 'T':case 't': t = 'T'; break; case 'S':case 's': t = 'S'; break; case 'R':case 'r': t = 'R'; break; - break; default: Erreur ("MODE error"); } @@ -1096,7 +1095,7 @@ char flg =' '; if (lg > nb_car) { valeur = res = ret_val ; - printf ("line %d :VALUE too large value: MSB are truncated\n",GNP_LINE); + printf ("line %u :VALUE too large value: MSB are truncated\n",GNP_LINE); for (i = 0; i< (lg - nb_car) ; i++,res++); while ( *res != '\0') { diff --git a/alliance/src/graal/src/GMC_create.c b/alliance/src/graal/src/GMC_create.c index 635a792c..228eb0bc 100644 --- a/alliance/src/graal/src/GMC_create.c +++ b/alliance/src/graal/src/GMC_create.c @@ -57,6 +57,8 @@ # include "GTB.h" # include "GSB.h" # include "GMC.h" +# include "GMV.h" +# include "GMT.h" # include "GMC_create.h" # include "GMC_dialog.h" @@ -191,7 +193,6 @@ void GraalCreateSegmentMbk( LambdaX1, LambdaY1, LambdaX2, LambdaY2 ) char *SaveName; char *SegmentName; long Delta; - int Error; rdsbegin(); @@ -206,7 +207,7 @@ void GraalCreateSegmentMbk( LambdaX1, LambdaY1, LambdaX2, LambdaY2 ) if ( Delta < 0 ) Delta = - Delta; - if ( Delta < GRAAL_SCALE * GRAAL_SEGMENT_VALUE_TABLE[GraalSegmentLayer][1] ) + if ( Delta < GRAAL_SCALE * GRAAL_SEGMENT_VALUE_TABLE[(int)GraalSegmentLayer][1] ) { GraalErrorMessage( GraalMainWindow, "This segment is too small !" ); @@ -384,8 +385,8 @@ void GraalCreateBigViaMbk( LambdaX1, LambdaY1, LambdaX2, LambdaY2 ) ViaDx = LambdaX2 - LambdaX1; ViaDy = LambdaY2 - LambdaY1; - if ( ( ViaDx < GRAAL_SCALE * GRAAL_BIGVIA_VALUE_TABLE[ GraalBigViaType ][0] ) || - ( ViaDy < GRAAL_SCALE * GRAAL_BIGVIA_VALUE_TABLE[ GraalBigViaType ][0] ) ) + if ( ( ViaDx < GRAAL_SCALE * GRAAL_BIGVIA_VALUE_TABLE[ (int)GraalBigViaType ][0] ) || + ( ViaDy < GRAAL_SCALE * GRAAL_BIGVIA_VALUE_TABLE[ (int)GraalBigViaType ][0] ) ) { GraalErrorMessage( GraalMainWindow, "This big via is too small !" ); @@ -475,7 +476,7 @@ void GraalCreateTransistorMbk( LambdaX1, LambdaY1, LambdaX2, LambdaY2 ) if ( Delta < 0 ) Delta = - Delta; - if ( Delta < GRAAL_SCALE * GRAAL_SEGMENT_VALUE_TABLE[GraalTransistorType][1] ) + if ( Delta < GRAAL_SCALE * GRAAL_SEGMENT_VALUE_TABLE[(int)GraalTransistorType][1] ) { GraalErrorMessage( GraalMainWindow, "This transistor is too small !" ); @@ -544,7 +545,6 @@ void GraalCreateConnectorMbk( LambdaX1, LambdaY1 ) { rdsrec_list *Rectangle; phcon_list *Connector; - char Orient; char MbkOrient; rdsbegin(); @@ -712,7 +712,6 @@ void GraalCreateInstanceMbk( LambdaX1, LambdaY1 ) long LambdaX1; long LambdaY1; { - rdsrec_list *Rectangle; phins_list *InstanceMbk; phins_list *SaveInstance; rdsins_list *InstanceRds; diff --git a/alliance/src/graal/src/GMC_dialog.c b/alliance/src/graal/src/GMC_dialog.c index 3104af82..6184caa3 100644 --- a/alliance/src/graal/src/GMC_dialog.c +++ b/alliance/src/graal/src/GMC_dialog.c @@ -330,7 +330,7 @@ void CallbackChangeSegmentWidthOk( MyWidget, ClientData, CallData ) NewWidth = atof( WidthSet ); NewWidth = (float)( (long)( NewWidth * Factor / 2.0 ) * 2 / Factor ); - if ( NewWidth >= GRAAL_SEGMENT_VALUE_TABLE[ GraalSegmentLayer ][0] ) + if ( NewWidth >= GRAAL_SEGMENT_VALUE_TABLE[ (int)GraalSegmentLayer ][0] ) { GraalSegmentWidth = NewWidth; } @@ -488,7 +488,7 @@ void CallbackChangeTransistorWidthOk( MyWidget, ClientData, CallData ) NewWidth = atof( WidthSet ); NewWidth = (float)( (long)( NewWidth * Factor / 2.0 ) * 2 / Factor ); - if ( NewWidth >= GRAAL_SEGMENT_VALUE_TABLE[ GraalTransistorType ][0] ) + if ( NewWidth >= GRAAL_SEGMENT_VALUE_TABLE[ (int)GraalTransistorType ][0] ) { GraalTransistorWidth = NewWidth; } @@ -646,7 +646,7 @@ void CallbackChangeConnectorWidthOk( MyWidget, ClientData, CallData ) NewWidth = atof( WidthSet ); NewWidth = (float)( (long)( NewWidth * Factor / 2.0 ) * 2 / Factor ); - if ( NewWidth >= GRAAL_SEGMENT_VALUE_TABLE[ GraalConnectorLayer ][0] ) + if ( NewWidth >= GRAAL_SEGMENT_VALUE_TABLE[ (int)GraalConnectorLayer ][0] ) { GraalConnectorWidth = NewWidth; } @@ -1008,7 +1008,6 @@ void CallbackChangeInstanceModelCancel( MyWidget, ClientData, FileStruct ) void GraalEnterChangeInstanceModelDialog() { - XmString Label; XmString Filter; if ( GraalModelFilter[2] == '\0' ) diff --git a/alliance/src/graal/src/GMC_menu.c b/alliance/src/graal/src/GMC_menu.c index db472973..f276382e 100644 --- a/alliance/src/graal/src/GMC_menu.c +++ b/alliance/src/graal/src/GMC_menu.c @@ -208,7 +208,9 @@ (GraalMenuItem *)NULL, } , - NULL + { + NULL + } }; /*------------------------------------------------------------\ @@ -232,7 +234,7 @@ void CallbackCreateSegment( MyWidget, ClientData, CallData ) if ( GraalSegmentWidth == -1.0 ) { - GraalSegmentWidth = GRAAL_SEGMENT_VALUE_TABLE[ GraalSegmentLayer ][0]; + GraalSegmentWidth = GRAAL_SEGMENT_VALUE_TABLE[ (int)GraalSegmentLayer ][0]; } if ( GraalSegmentWire == GRAAL_FALSE ) @@ -365,7 +367,7 @@ void CallbackCreateConnector( MyWidget, ClientData, CallData ) { if ( GraalConnectorWidth == -1.0 ) { - GraalConnectorWidth = GRAAL_SEGMENT_VALUE_TABLE[ GraalConnectorLayer ][0]; + GraalConnectorWidth = GRAAL_SEGMENT_VALUE_TABLE[ (int)GraalConnectorLayer ][0]; } GraalChangeEditMode( GRAAL_CREATE_CONNECTOR, @@ -393,7 +395,7 @@ void CallbackCreateTransistor( MyWidget, ClientData, CallData ) if ( GraalTransistorWidth == -1.0 ) { - GraalTransistorWidth = GRAAL_SEGMENT_VALUE_TABLE[ GraalTransistorType ][0]; + GraalTransistorWidth = GRAAL_SEGMENT_VALUE_TABLE[ (int)GraalTransistorType ][0]; } GraalChangeEditMode( GRAAL_CREATE_TRANSISTOR, diff --git a/alliance/src/graal/src/GMC_message.c b/alliance/src/graal/src/GMC_message.c index 9e242c8b..8e4d0a03 100644 --- a/alliance/src/graal/src/GMC_message.c +++ b/alliance/src/graal/src/GMC_message.c @@ -96,7 +96,7 @@ void GraalPromptCreateSegment() GraalDisplayMessage( GRAAL_MESSAGE_MODE, "Create Segment" ); sprintf( MessageBuffer, "Layer: %s Width: %.2f Name: %s", - GRAAL_SEGMENT_NAME_TABLE[ GraalSegmentLayer ][0] , + GRAAL_SEGMENT_NAME_TABLE[ (int)GraalSegmentLayer ][0] , GraalSegmentWidth, ( GraalSegmentName ) ? GraalSegmentName : "none" ); @@ -128,9 +128,9 @@ void GraalPromptCreateConnector() GraalDisplayMessage( GRAAL_MESSAGE_MODE, "Create Connector" ); sprintf( MessageBuffer, "Layer: %s Width: %.2f Orient: %s", - GRAAL_CONNECTOR_NAME_TABLE[ GraalConnectorLayer ][0], + GRAAL_CONNECTOR_NAME_TABLE[ (int)GraalConnectorLayer ][0], GraalConnectorWidth, - GRAAL_ORIENT_NAME_TABLE[ GraalConnectorOrient ][0] ); + GRAAL_ORIENT_NAME_TABLE[ (int)GraalConnectorOrient ][0] ); GraalDisplayMessage( GRAAL_MESSAGE_INFO, MessageBuffer ); GraalDisplayMessage( GRAAL_MESSAGE_PROMPT, "Enter center point" ); @@ -148,7 +148,7 @@ void GraalPromptCreateReference() GraalDisplayMessage( GRAAL_MESSAGE_MODE, "Create Reference" ); sprintf( MessageBuffer, "Type: %s", - GRAAL_REFERENCE_NAME_TABLE[GraalReferenceType][0] ); + GRAAL_REFERENCE_NAME_TABLE[(int)GraalReferenceType][0] ); GraalDisplayMessage( GRAAL_MESSAGE_INFO, MessageBuffer ); GraalDisplayMessage( GRAAL_MESSAGE_PROMPT, "Enter center point" ); @@ -166,7 +166,7 @@ void GraalPromptCreateVia() GraalDisplayMessage( GRAAL_MESSAGE_MODE, "Create Via" ); sprintf( MessageBuffer, "Type: %s Name: %s", - GRAAL_VIA_NAME_TABLE[ GraalViaType ][0], + GRAAL_VIA_NAME_TABLE[ (int)GraalViaType ][0], ( GraalViaName ) ? GraalViaName : "none" ); GraalDisplayMessage( GRAAL_MESSAGE_INFO, MessageBuffer ); @@ -185,7 +185,7 @@ void GraalPromptCreateBigVia() GraalDisplayMessage( GRAAL_MESSAGE_MODE, "Create Big Via" ); sprintf( MessageBuffer, "Type: %s Name: %s", - GRAAL_BIGVIA_NAME_TABLE[ GraalBigViaType ][0], + GRAAL_BIGVIA_NAME_TABLE[ (int)GraalBigViaType ][0], ( GraalBigViaName ) ? GraalBigViaName : "none" ); GraalDisplayMessage( GRAAL_MESSAGE_INFO, MessageBuffer ); @@ -218,13 +218,13 @@ void GraalPromptCreateTransistor() if ( GraalTransistorName == (char *)NULL ) { sprintf( MessageBuffer, "Type: %s Width: %.2f Name: none", - GRAAL_TRANSISTOR_NAME_TABLE[ GraalTransistorType ][0], + GRAAL_TRANSISTOR_NAME_TABLE[ (int)GraalTransistorType ][0], GraalTransistorWidth ); } else { sprintf( MessageBuffer, "Type: %s Width: %.2f Name: %s", - GRAAL_TRANSISTOR_NAME_TABLE[ GraalTransistorType ][0], + GRAAL_TRANSISTOR_NAME_TABLE[ (int)GraalTransistorType ][0], GraalTransistorWidth, GraalTransistorName ); } @@ -282,7 +282,7 @@ void GraalPromptCreateInstance() GraalDisplayMessage( GRAAL_MESSAGE_MODE, "Create Instance" ); sprintf( MessageBuffer, "Symmetry: %s", - GRAAL_SYMMETRY_NAME_TABLE[ GraalInstanceSym ][0] ); + GRAAL_SYMMETRY_NAME_TABLE[ (int)GraalInstanceSym ][0] ); GraalDisplayMessage( GRAAL_MESSAGE_INFO, MessageBuffer ); GraalDisplayMessage( GRAAL_MESSAGE_PROMPT, "Enter base point" ); diff --git a/alliance/src/graal/src/GMC_panel.c b/alliance/src/graal/src/GMC_panel.c index 5f39061c..6c574886 100644 --- a/alliance/src/graal/src/GMC_panel.c +++ b/alliance/src/graal/src/GMC_panel.c @@ -3141,7 +3141,7 @@ void CallbackChangeSegmentLayer( MyWidget, ClientData, CallData ) rdsbegin(); GraalSegmentLayer = (long)ClientData; - GraalSegmentWidth = GRAAL_SEGMENT_VALUE_TABLE[ GraalSegmentLayer ][0]; + GraalSegmentWidth = GRAAL_SEGMENT_VALUE_TABLE[ (int)GraalSegmentLayer ][0]; if ( GraalSegmentWire == GRAAL_FALSE ) { @@ -3510,7 +3510,7 @@ void CallbackChangeTransistorType( MyWidget, ClientData, CallData ) rdsbegin(); GraalTransistorType = (long)ClientData; - GraalTransistorWidth = GRAAL_SEGMENT_VALUE_TABLE[ GraalTransistorType ][0]; + GraalTransistorWidth = GRAAL_SEGMENT_VALUE_TABLE[ (int)GraalTransistorType ][0]; if ( GraalTransistorWire == GRAAL_FALSE ) { @@ -3681,7 +3681,7 @@ void CallbackChangeConnectorLayer( MyWidget, ClientData, CallData ) rdsbegin(); GraalConnectorLayer = (long)ClientData; - GraalConnectorWidth = GRAAL_SEGMENT_VALUE_TABLE[ GraalConnectorLayer ][0]; + GraalConnectorWidth = GRAAL_SEGMENT_VALUE_TABLE[ (int)GraalConnectorLayer ][0]; GraalChangeEditMode( GRAAL_CREATE_CONNECTOR, GraalPromptCreateConnector ); diff --git a/alliance/src/graal/src/GME_dialog.c b/alliance/src/graal/src/GME_dialog.c index 73db0c0a..b1255d0f 100644 --- a/alliance/src/graal/src/GME_dialog.c +++ b/alliance/src/graal/src/GME_dialog.c @@ -65,6 +65,7 @@ # include "GME_modify.h" # include "GME_search.h" # include "GME_edit.h" +# include "GME_message.h" /*------------------------------------------------------------\ | | @@ -431,7 +432,7 @@ void CallbackModifySegmentWidthOk( MyWidget, ClientData, CallData ) NewWidth = atof( WidthSet ); NewWidth = (float)( (long)( NewWidth * Factor / 2.0 ) * 2 / Factor ); - if ( NewWidth >= GRAAL_SEGMENT_VALUE_TABLE[ GraalSegmentMLayer ][0] ) + if ( NewWidth >= GRAAL_SEGMENT_VALUE_TABLE[ (int)GraalSegmentMLayer ][0] ) { GraalSegmentMWidth = NewWidth; } @@ -570,7 +571,7 @@ void CallbackModifyTransistorWidthOk( MyWidget, ClientData, CallData ) NewWidth = atof( WidthSet ); NewWidth = (float)( (long)( NewWidth * Factor / 2.0 ) * 2 / Factor ); - if ( NewWidth >= GRAAL_SEGMENT_VALUE_TABLE[ GraalTransistorMType ][0] ) + if ( NewWidth >= GRAAL_SEGMENT_VALUE_TABLE[ (int)GraalTransistorMType ][0] ) { GraalTransistorMWidth = NewWidth; } @@ -702,7 +703,7 @@ void CallbackModifyConnectorWidthOk( MyWidget, ClientData, CallData ) NewWidth = atof( WidthSet ); NewWidth = (float)( (long)( NewWidth * Factor / 2.0 ) * 2 / Factor ); - if ( NewWidth >= GRAAL_SEGMENT_VALUE_TABLE[ GraalConnectorMLayer ][0] ) + if ( NewWidth >= GRAAL_SEGMENT_VALUE_TABLE[ (int)GraalConnectorMLayer ][0] ) { GraalConnectorMWidth = NewWidth; } diff --git a/alliance/src/graal/src/GME_dialog.h b/alliance/src/graal/src/GME_dialog.h index 0d73a7f2..ef6c6be6 100644 --- a/alliance/src/graal/src/GME_dialog.h +++ b/alliance/src/graal/src/GME_dialog.h @@ -131,4 +131,6 @@ extern void CallbackSearchViaOk(); extern void CallbackSearchViaCancel(); + extern void GraalLimitedLoop(); + # endif diff --git a/alliance/src/graal/src/GME_edit.c b/alliance/src/graal/src/GME_edit.c index c37dfb62..200841a3 100644 --- a/alliance/src/graal/src/GME_edit.c +++ b/alliance/src/graal/src/GME_edit.c @@ -59,6 +59,8 @@ # include "GTB.h" # include "GSB.h" # include "GME.h" +# include "GMV.h" +# include "GMT.h" # include "GME_edit.h" # include "GME_panel.h" @@ -280,7 +282,7 @@ char GraalAddIdentify( Rectangle ) sprintf( GraalIdentifyBuffer, "TRANSISTOR :\n\n NAME : %s\n TYPE : %s\n X1 : %.2f\n Y1 : %.2f\n X2 : %.2f \n Y2 : %.2f\n WIDTH : %.2f\n\n", (((phseg_list *)Pointer)->NAME != (char *)0) ? ((phseg_list *)Pointer)->NAME : "None", - GRAAL_TRANSISTOR_NAME_TABLE[ ((phseg_list *)Pointer)->LAYER ][0], + GRAAL_TRANSISTOR_NAME_TABLE[ (int)((phseg_list *)Pointer)->LAYER ][0], (float)((phseg_list *)Pointer)->X1 / (float)SCALE_X, (float)((phseg_list *)Pointer)->Y1 / (float)SCALE_X, (float)((phseg_list *)Pointer)->X2 / (float)SCALE_X, @@ -292,7 +294,7 @@ char GraalAddIdentify( Rectangle ) sprintf( GraalIdentifyBuffer, "SEGMENT :\n\n NAME : %s\n LAYER : %s\n X1 : %.2f\n Y1 : %.2f\n X2 : %.2f\n Y2 : %.2f\n WIDTH : %.2f\n\n", (((phseg_list *)Pointer)->NAME != (char *)0) ? ((phseg_list *)Pointer)->NAME : "None", - GRAAL_SEGMENT_NAME_TABLE[ ((phseg_list *)Pointer)->LAYER ][0], + GRAAL_SEGMENT_NAME_TABLE[ (int)((phseg_list *)Pointer)->LAYER ][0], (float)((phseg_list *)Pointer)->X1 / (float)SCALE_X, (float)((phseg_list *)Pointer)->Y1 / (float)SCALE_X, (float)((phseg_list *)Pointer)->X2 / (float)SCALE_X, @@ -317,11 +319,11 @@ char GraalAddIdentify( Rectangle ) sprintf( GraalIdentifyBuffer, "CONNECTOR :\n\n NAME : %s\n LAYER : %s\n XCON : %.2f\n YCON : %.2f\n WIDTH : %.2f\n ORIENT : %s\n INDEX : %ld\n\n", (((phcon_list *)Pointer)->NAME != (char *)0) ? ((phcon_list *)Pointer)->NAME : "None", - GRAAL_CONNECTOR_NAME_TABLE[ ((phcon_list *)Pointer)->LAYER ][0], + GRAAL_CONNECTOR_NAME_TABLE[ (int)((phcon_list *)Pointer)->LAYER ][0], (float)((phcon_list *)Pointer)->XCON / (float)SCALE_X, (float)((phcon_list *)Pointer)->YCON / (float)SCALE_X, (float)((phcon_list *)Pointer)->WIDTH / (float)SCALE_X, - GRAAL_ORIENT_NAME_TABLE[ Orient ][0], + GRAAL_ORIENT_NAME_TABLE[ (int)Orient ][0], ((phcon_list *)Pointer)->INDEX ); } else @@ -333,7 +335,7 @@ char GraalAddIdentify( Rectangle ) sprintf( GraalIdentifyBuffer, "VIA :\n\n NAME : %s\n TYPE: %s\n XVIA : %.2f\n YVIA : %.2f\n\n", (((phvia_list *)Pointer)->NAME != (char *)0) ? ((phvia_list *)Pointer)->NAME : "None", - GRAAL_VIA_NAME_TABLE[ ((phvia_list *)Pointer)->TYPE ][0], + GRAAL_VIA_NAME_TABLE[ (int)((phvia_list *)Pointer)->TYPE ][0], (float)((phvia_list *)Pointer)->XVIA / (float)SCALE_X, (float)((phvia_list *)Pointer)->YVIA / (float)SCALE_X ); } @@ -342,7 +344,7 @@ char GraalAddIdentify( Rectangle ) sprintf( GraalIdentifyBuffer, "BIGVIA :\n\n NAME: %s\n TYPE: %s\n XVIA : %.2f\n YVIA : %.2f\n DX : %.2f\n DY : %.2f\n\n", (((phvia_list *)Pointer)->NAME != (char *)0) ? ((phvia_list *)Pointer)->NAME : "None", - GRAAL_BIGVIA_NAME_TABLE[ ((phvia_list *)Pointer)->TYPE ][0], + GRAAL_BIGVIA_NAME_TABLE[ (int)((phvia_list *)Pointer)->TYPE ][0], (float)((phvia_list *)Pointer)->XVIA / (float)SCALE_X, (float)((phvia_list *)Pointer)->YVIA / (float)SCALE_X, (float)((phvia_list *)Pointer)->DX / (float)SCALE_X, @@ -368,7 +370,7 @@ char GraalAddIdentify( Rectangle ) "INSTANCE :\n\n NAME : %s\n MODEL : %s\n TRANSF : %s\n XINS : %.2f\n YINS : %.2f\n\n", ((phins_list *)Pointer)->INSNAME, ((phins_list *)Pointer)->FIGNAME, - GRAAL_SYMMETRY_NAME_TABLE[ Orient ][0], + GRAAL_SYMMETRY_NAME_TABLE[ (int)Orient ][0], (float)((phins_list *)Pointer)->XINS / (float)SCALE_X, (float)((phins_list *)Pointer)->YINS / (float)SCALE_X ); } @@ -452,9 +454,7 @@ void GraalEditCopy( LambdaX1, LambdaY1, LambdaX2, LambdaY2, Mode ) rdsrec_list *NewRec; void *Element; void *Pointer; - char Orient; char FirstUndo; - char MbkOrient; long DeltaX; long DeltaY; long X1; @@ -654,8 +654,6 @@ void GraalEditMove( LambdaX1, LambdaY1, LambdaX2, LambdaY2, Mode ) graalconrec *ConRec; void *Element; void *Pointer; - char Orient; - char MbkOrient; char FirstUndo; long DeltaX; long DeltaY; @@ -1310,7 +1308,7 @@ void GraalEditStretch( LambdaX1, LambdaY1, LambdaX2, LambdaY2, Mode ) X2 = ((phseg_list *)Pointer)->X2; Y2 = ((phseg_list *)Pointer)->Y2; - Length = (long)( GRAAL_SEGMENT_VALUE_TABLE[ ((phseg_list *)Pointer)->LAYER ][1] * SCALE_X ); + Length = (long)( GRAAL_SEGMENT_VALUE_TABLE[ (int)((phseg_list *)Pointer)->LAYER ][1] * SCALE_X ); Stretch = 0; @@ -1410,7 +1408,7 @@ void GraalEditStretch( LambdaX1, LambdaY1, LambdaX2, LambdaY2, Mode ) X2 = X1 + DXvia; Y2 = Y1 + DYvia; - Length = (long)( GRAAL_BIGVIA_VALUE_TABLE[ ((phvia_list *)Pointer)->TYPE ][0] * SCALE_X ); + Length = (long)( GRAAL_BIGVIA_VALUE_TABLE[ (int)((phvia_list *)Pointer)->TYPE ][0] * SCALE_X ); Stretch = 0; diff --git a/alliance/src/graal/src/GME_menu.c b/alliance/src/graal/src/GME_menu.c index 16e58901..0ebd219b 100644 --- a/alliance/src/graal/src/GME_menu.c +++ b/alliance/src/graal/src/GME_menu.c @@ -226,7 +226,9 @@ (GraalMenuItem *)NULL } , - NULL + { + NULL + } }; GraalMenuItem GraalWindowMenu[] = @@ -360,7 +362,9 @@ (GraalMenuItem *)NULL } , - NULL + { + NULL + } }; /*------------------------------------------------------------\ diff --git a/alliance/src/graal/src/GME_message.c b/alliance/src/graal/src/GME_message.c index fc20f471..d2f5e861 100644 --- a/alliance/src/graal/src/GME_message.c +++ b/alliance/src/graal/src/GME_message.c @@ -476,7 +476,7 @@ void GraalPromptModifySegment() GraalDisplayMessage( GRAAL_MESSAGE_MODE, "Modify Segment" ); sprintf( MessageBuffer, "Layer: %s Width: %.2f Name: %s", - GRAAL_SEGMENT_NAME_TABLE[ GraalSegmentMLayer ][0] , + GRAAL_SEGMENT_NAME_TABLE[ (int)GraalSegmentMLayer ][0] , GraalSegmentMWidth, ( GraalSegmentMName ) ? GraalSegmentMName : "none" ); @@ -500,9 +500,9 @@ void GraalPromptModifyConnector() GraalDisplayMessage( GRAAL_MESSAGE_MODE, "Modify Connector" ); sprintf( MessageBuffer, "Layer: %s Width: %.2f Orient: %s Name: %s", - GRAAL_CONNECTOR_NAME_TABLE[ GraalConnectorMLayer ][0], + GRAAL_CONNECTOR_NAME_TABLE[ (int)GraalConnectorMLayer ][0], GraalConnectorMWidth, - GRAAL_ORIENT_NAME_TABLE[ GraalConnectorMOrient ][0], + GRAAL_ORIENT_NAME_TABLE[ (int)GraalConnectorMOrient ][0], ( GraalConnectorMName ) ? GraalConnectorMName : "none" ); GraalDisplayMessage( GRAAL_MESSAGE_INFO, MessageBuffer ); @@ -527,13 +527,13 @@ void GraalPromptModifyReference() if ( GraalReferenceMName != (char *)NULL ) { sprintf( MessageBuffer, "Type: %s Name: %s", - GRAAL_REFERENCE_NAME_TABLE[GraalReferenceMType][0], + GRAAL_REFERENCE_NAME_TABLE[(int)GraalReferenceMType][0], GraalReferenceMName ); } else { sprintf( MessageBuffer, "Type: %s Name: none", - GRAAL_REFERENCE_NAME_TABLE[GraalReferenceMType][0] ); + GRAAL_REFERENCE_NAME_TABLE[(int)GraalReferenceMType][0] ); } GraalDisplayMessage( GRAAL_MESSAGE_INFO, MessageBuffer ); @@ -556,7 +556,7 @@ void GraalPromptModifyVia() GraalDisplayMessage( GRAAL_MESSAGE_MODE, "Modify Via" ); sprintf( MessageBuffer, "Type: %s Name: %s", - GRAAL_VIA_NAME_TABLE[ GraalViaMType ][0], + GRAAL_VIA_NAME_TABLE[ (int)GraalViaMType ][0], GraalViaMName ? GraalViaMName : "none" ); GraalDisplayMessage( GRAAL_MESSAGE_INFO, MessageBuffer ); @@ -579,7 +579,7 @@ void GraalPromptModifyBigVia() GraalDisplayMessage( GRAAL_MESSAGE_MODE, "Modify big Via" ); sprintf( MessageBuffer, "Type: %s Name: %s", - GRAAL_BIGVIA_NAME_TABLE[ GraalViaMType ][0], + GRAAL_BIGVIA_NAME_TABLE[ (int)GraalViaMType ][0], GraalViaMName ? GraalViaMName : "none" ); GraalDisplayMessage( GRAAL_MESSAGE_INFO, MessageBuffer ); @@ -604,13 +604,13 @@ void GraalPromptModifyTransistor() if ( GraalTransistorMName == (char *)NULL ) { sprintf( MessageBuffer, "Type: %s Width: %.2f Name: None", - GRAAL_TRANSISTOR_NAME_TABLE[ GraalTransistorMType ][0], + GRAAL_TRANSISTOR_NAME_TABLE[ (int)GraalTransistorMType ][0], GraalTransistorMWidth ); } else { sprintf( MessageBuffer, "Type: %s Width: %.2f Name: %s", - GRAAL_TRANSISTOR_NAME_TABLE[ GraalTransistorMType ][0], + GRAAL_TRANSISTOR_NAME_TABLE[ (int)GraalTransistorMType ][0], GraalTransistorMWidth, GraalTransistorMName ); } @@ -634,7 +634,7 @@ void GraalPromptModifyInstance() GraalDisplayMessage( GRAAL_MESSAGE_MODE, "Modify Instance" ); sprintf( MessageBuffer, "Symmetry: %s Model: %s Name: %s", - GRAAL_SYMMETRY_NAME_TABLE[ GraalInstanceMSym ][0], + GRAAL_SYMMETRY_NAME_TABLE[ (int)GraalInstanceMSym ][0], GraalInstanceMModel, GraalInstanceMName ); GraalDisplayMessage( GRAAL_MESSAGE_INFO, MessageBuffer ); diff --git a/alliance/src/graal/src/GME_message.h b/alliance/src/graal/src/GME_message.h index 65e16215..0f4b167a 100644 --- a/alliance/src/graal/src/GME_message.h +++ b/alliance/src/graal/src/GME_message.h @@ -91,5 +91,7 @@ extern void GraalPromptModifyReference(); extern void GraalPromptModifyVia(); extern void GraalPromptModifyBigVia(); + extern void GraalPromptModifyInstance(); + # endif diff --git a/alliance/src/graal/src/GME_modify.c b/alliance/src/graal/src/GME_modify.c index 151c4256..43d45f45 100644 --- a/alliance/src/graal/src/GME_modify.c +++ b/alliance/src/graal/src/GME_modify.c @@ -58,11 +58,14 @@ # include "GMX.h" # include "GTB.h" # include "GME.h" +# include "GMT.h" +# include "GMV.h" # include "GME_modify.h" # include "GME_panel.h" # include "GME_edit.h" # include "GME_message.h" +# include "GME_dialog.h" /*------------------------------------------------------------\ | | @@ -273,9 +276,8 @@ void GraalEditModify() void *Pointer; void *Element; char FirstUndo; - char Orient; - char MbkOrient; char MbkLayer; + char MbkOrient = '-'; rdsbegin(); diff --git a/alliance/src/graal/src/GME_panel.c b/alliance/src/graal/src/GME_panel.c index 85ea9dd0..0826c3e2 100644 --- a/alliance/src/graal/src/GME_panel.c +++ b/alliance/src/graal/src/GME_panel.c @@ -45,6 +45,8 @@ # include # include # include +# include +# include # include # include # include @@ -3544,7 +3546,9 @@ (Widget)NULL } , - NULL + { + NULL + } }; GraalPanelItem GraalWindowGlobalPanel = @@ -4433,7 +4437,7 @@ void CallbackModifySegmentLayer( MyWidget, ClientData, CallData ) } GraalSegmentMLayer = NewLayer; - MinWidth = GRAAL_SEGMENT_VALUE_TABLE[ GraalSegmentMLayer ][0]; + MinWidth = GRAAL_SEGMENT_VALUE_TABLE[ (int)GraalSegmentMLayer ][0]; if ( GraalSegmentMWidth < MinWidth ) GraalSegmentMWidth = MinWidth; @@ -4548,7 +4552,7 @@ void CallbackModifyTransistorType( MyWidget, ClientData, CallData ) rdsbegin(); GraalTransistorMType = (long)ClientData; - MinWidth = GRAAL_SEGMENT_VALUE_TABLE[ GraalTransistorMType ][0]; + MinWidth = GRAAL_SEGMENT_VALUE_TABLE[ (int)GraalTransistorMType ][0]; if ( GraalTransistorMWidth < MinWidth ) GraalTransistorMWidth = MinWidth; @@ -4663,7 +4667,7 @@ void CallbackModifyConnectorLayer( MyWidget, ClientData, CallData ) rdsbegin(); GraalConnectorMLayer = (long)ClientData; - MinWidth = GRAAL_SEGMENT_VALUE_TABLE[ GraalConnectorMLayer ][0]; + MinWidth = GRAAL_SEGMENT_VALUE_TABLE[ (int)GraalConnectorMLayer ][0]; if ( GraalConnectorMWidth < MinWidth ) GraalConnectorMWidth = MinWidth; diff --git a/alliance/src/graal/src/GME_panel.h b/alliance/src/graal/src/GME_panel.h index 88980e42..7d3e53af 100644 --- a/alliance/src/graal/src/GME_panel.h +++ b/alliance/src/graal/src/GME_panel.h @@ -169,4 +169,6 @@ extern void GraalDisplayIdentifyMessage(); extern void GraalDisplaySelectList(); + extern void GraalBuildPanelModify(); + # endif diff --git a/alliance/src/graal/src/GME_search.c b/alliance/src/graal/src/GME_search.c index 6bf49ae5..cc07749d 100644 --- a/alliance/src/graal/src/GME_search.c +++ b/alliance/src/graal/src/GME_search.c @@ -65,6 +65,7 @@ # include "GME_panel.h" # include "GME_edit.h" # include "GME_message.h" +# include "GME_dialog.h" /*------------------------------------------------------------\ | | @@ -296,7 +297,6 @@ void GraalEditSearchSegment( SegmentName ) { graalsearch *Search; rdsins_list *Instance; - rdsfig_list *Figure; rdsrec_list *Rec; char Layer; long X1; @@ -310,7 +310,7 @@ void GraalEditSearchSegment( SegmentName ) for ( Layer = 0; Layer < RDS_MAX_LAYER; Layer++ ) { - for ( Rec = GraalFigureRds->LAYERTAB[ Layer ]; + for ( Rec = GraalFigureRds->LAYERTAB[ (int)Layer ]; Rec != (rdsrec_list *)NULL; Rec = Rec->NEXT ) { @@ -333,7 +333,7 @@ void GraalEditSearchSegment( SegmentName ) for ( Layer = 0; Layer < RDS_MAX_LAYER; Layer++ ) { - for ( Rec = Instance->LAYERTAB[ Layer ]; + for ( Rec = Instance->LAYERTAB[ (int)Layer ]; Rec != (rdsrec_list *)NULL; Rec = Rec->NEXT ) { @@ -394,7 +394,6 @@ void GraalEditSearchReference( ReferenceName ) { graalsearch *Search; rdsins_list *Instance; - rdsfig_list *Figure; rdsrec_list *Rec; char Layer; long X1; @@ -408,7 +407,7 @@ void GraalEditSearchReference( ReferenceName ) for ( Layer = 0; Layer < RDS_MAX_LAYER; Layer++ ) { - for ( Rec = GraalFigureRds->LAYERTAB[ Layer ]; + for ( Rec = GraalFigureRds->LAYERTAB[ (int)Layer ]; Rec != (rdsrec_list *)NULL; Rec = Rec->NEXT ) { @@ -431,7 +430,7 @@ void GraalEditSearchReference( ReferenceName ) for ( Layer = 0; Layer < RDS_MAX_LAYER; Layer++ ) { - for ( Rec = Instance->LAYERTAB[ Layer ]; + for ( Rec = Instance->LAYERTAB[ (int)Layer ]; Rec != (rdsrec_list *)NULL; Rec = Rec->NEXT ) { @@ -492,7 +491,6 @@ void GraalEditSearchVia( ViaName ) { graalsearch *Search; rdsins_list *Instance; - rdsfig_list *Figure; rdsrec_list *Rec; char Layer; long X1; @@ -506,7 +504,7 @@ void GraalEditSearchVia( ViaName ) for ( Layer = 0; Layer < RDS_MAX_LAYER; Layer++ ) { - for ( Rec = GraalFigureRds->LAYERTAB[ Layer ]; + for ( Rec = GraalFigureRds->LAYERTAB[ (int)Layer ]; Rec != (rdsrec_list *)NULL; Rec = Rec->NEXT ) { @@ -529,7 +527,7 @@ void GraalEditSearchVia( ViaName ) for ( Layer = 0; Layer < RDS_MAX_LAYER; Layer++ ) { - for ( Rec = Instance->LAYERTAB[ Layer ]; + for ( Rec = Instance->LAYERTAB[ (int)Layer ]; Rec != (rdsrec_list *)NULL; Rec = Rec->NEXT ) { diff --git a/alliance/src/graal/src/GME_search.h b/alliance/src/graal/src/GME_search.h index 65800f42..1fd3d533 100644 --- a/alliance/src/graal/src/GME_search.h +++ b/alliance/src/graal/src/GME_search.h @@ -68,5 +68,6 @@ extern void GraalEditSearchInstance(); extern void GraalEditSearchSegment(); extern void GraalEditSearchReference(); + extern void GraalEditSearchVia(); # endif diff --git a/alliance/src/graal/src/GME_select.c b/alliance/src/graal/src/GME_select.c index cca6003f..9585158e 100644 --- a/alliance/src/graal/src/GME_select.c +++ b/alliance/src/graal/src/GME_select.c @@ -60,9 +60,13 @@ # include "GSB.h" # include "GME.h" # include "GMT.h" +# include "GMV.h" # include "GME_select.h" +# include "GRM_select.h" # include "GME_message.h" +# include "GME_panel.h" +# include "GME_dialog.h" /*------------------------------------------------------------\ | | @@ -119,14 +123,14 @@ void GraalAddSelectList( Rectangle ) { sprintf( GraalSelectBuffer, " TRANSISTOR : %s", - GRAAL_TRANSISTOR_NAME_TABLE[ ((phseg_list *)Pointer)->LAYER ][0] ); + GRAAL_TRANSISTOR_NAME_TABLE[ (int)((phseg_list *)Pointer)->LAYER ][0] ); } else { sprintf( GraalSelectBuffer, " SEGMENT %s : %s", ( Rectangle->NAME != (char *)NULL ) ? Rectangle->NAME : "None", - GRAAL_SEGMENT_NAME_TABLE[ ((phseg_list *)Pointer)->LAYER ][0] ); + GRAAL_SEGMENT_NAME_TABLE[ (int)((phseg_list *)Pointer)->LAYER ][0] ); } } else @@ -146,7 +150,7 @@ void GraalAddSelectList( Rectangle ) sprintf( GraalSelectBuffer, " CONNECTOR %s : %s %s", ( Rectangle->NAME != (char *)NULL ) ? Rectangle->NAME : "None", - GRAAL_CONNECTOR_NAME_TABLE[ ((phcon_list *)Pointer)->LAYER ][0], + GRAAL_CONNECTOR_NAME_TABLE[ (int)((phcon_list *)Pointer)->LAYER ][0], GRAAL_ORIENT_NAME_TABLE[ Orient ][0] ); } else @@ -157,13 +161,13 @@ void GraalAddSelectList( Rectangle ) { sprintf( GraalSelectBuffer, " VIA : %s", - GRAAL_VIA_NAME_TABLE[ ((phvia_list *)Pointer)->TYPE ][0] ); + GRAAL_VIA_NAME_TABLE[ (int)((phvia_list *)Pointer)->TYPE ][0] ); } else { sprintf( GraalSelectBuffer, " BIGVIA : %s", - GRAAL_BIGVIA_NAME_TABLE[ ((phvia_list *)Pointer)->TYPE ][0] ); + GRAAL_BIGVIA_NAME_TABLE[ (int)((phvia_list *)Pointer)->TYPE ][0] ); } } else @@ -341,17 +345,17 @@ void GraalEditSelectPoint( LambdaX1, LambdaY1 ) { for ( Layer = 0; Layer < RDS_MAX_LAYER; Layer++ ) { - StaticLayer = RDS_STATIC_LAYER[ Layer ]; + StaticLayer = RDS_STATIC_LAYER[ (int)Layer ]; - if ( GRAAL_RDS_ACTIVE_LAYER_TABLE[ StaticLayer ] != 1 ) continue; + if ( GRAAL_RDS_ACTIVE_LAYER_TABLE[ (int)StaticLayer ] != 1 ) continue; - for ( ScanWinRec = ScanWin->LAYERTAB[ Layer ]; + for ( ScanWinRec = ScanWin->LAYERTAB[ (int)Layer ]; ScanWinRec != (graalwinrec *)NULL; ScanWinRec = ScanWinRec->NEXT ) { for ( ScanRec = 0; ScanRec < GRAAL_MAX_REC ; ScanRec++ ) { - Rec = ScanWinRec->RECTAB[ ScanRec ]; + Rec = ScanWinRec->RECTAB[ (int)ScanRec ]; if ( ( Rec != (rdsrec_list *)NULL ) && ( ! IsGraalDeleted( Rec ) ) && @@ -393,7 +397,7 @@ void GraalEditSelectPoint( LambdaX1, LambdaY1 ) { StaticLayer = RDS_STATIC_LAYER[ GetRdsLayer( CheckRec ) ]; - if ( GRAAL_RDS_ACTIVE_LAYER_TABLE[ StaticLayer ] != 1 ) + if ( GRAAL_RDS_ACTIVE_LAYER_TABLE[ (int)StaticLayer ] != 1 ) break; @@ -499,9 +503,9 @@ void GraalEditSelectWindow( LambdaX1, LambdaY1, LambdaX2, LambdaY2 ) for ( Layer = 0; Layer < RDS_MAX_LAYER; Layer++ ) { - StaticLayer = RDS_STATIC_LAYER[ Layer ]; + StaticLayer = RDS_STATIC_LAYER[ (int)Layer ]; - if ( GRAAL_RDS_ACTIVE_LAYER_TABLE[ StaticLayer ] != 1 ) continue; + if ( GRAAL_RDS_ACTIVE_LAYER_TABLE[ (int)StaticLayer ] != 1 ) continue; Y = Ymin; @@ -517,13 +521,13 @@ void GraalEditSelectWindow( LambdaX1, LambdaY1, LambdaX2, LambdaY2 ) if ( ScanWin->LAYERTAB != (graalwinrec **)NULL ) { - for ( ScanWinRec = ScanWin->LAYERTAB[ Layer ]; + for ( ScanWinRec = ScanWin->LAYERTAB[ (int)Layer ]; ScanWinRec != (graalwinrec *)NULL; ScanWinRec = ScanWinRec->NEXT ) { for ( ScanRec = 0; ScanRec < GRAAL_MAX_REC ; ScanRec++ ) { - Rec = ScanWinRec->RECTAB[ ScanRec ]; + Rec = ScanWinRec->RECTAB[ (int)ScanRec ]; if ( ( Rec != (rdsrec_list *)NULL ) && ( ! IsGraalDeleted( Rec ) ) && @@ -545,7 +549,7 @@ void GraalEditSelectWindow( LambdaX1, LambdaY1, LambdaX2, LambdaY2 ) { StaticLayer = RDS_STATIC_LAYER[ GetRdsLayer( CheckRec ) ]; - if ( GRAAL_RDS_ACTIVE_LAYER_TABLE[ StaticLayer ] != 1 ) + if ( GRAAL_RDS_ACTIVE_LAYER_TABLE[ (int)StaticLayer ] != 1 ) break; @@ -647,9 +651,9 @@ void GraalEditSelectFence( LambdaX1, LambdaY1, LambdaX2, LambdaY2 ) for ( Layer = 0; Layer < RDS_MAX_LAYER; Layer++ ) { - StaticLayer = RDS_STATIC_LAYER[ Layer ]; + StaticLayer = RDS_STATIC_LAYER[ (int)Layer ]; - if ( GRAAL_RDS_ACTIVE_LAYER_TABLE[ StaticLayer ] != 1 ) continue; + if ( GRAAL_RDS_ACTIVE_LAYER_TABLE[ (int)StaticLayer ] != 1 ) continue; Y = Ymin; @@ -665,13 +669,13 @@ void GraalEditSelectFence( LambdaX1, LambdaY1, LambdaX2, LambdaY2 ) if ( ScanWin->LAYERTAB != (graalwinrec **)NULL ) { - for ( ScanWinRec = ScanWin->LAYERTAB[ Layer ]; + for ( ScanWinRec = ScanWin->LAYERTAB[ (int)Layer ]; ScanWinRec != (graalwinrec *)NULL; ScanWinRec = ScanWinRec->NEXT ) { for ( ScanRec = 0; ScanRec < GRAAL_MAX_REC ; ScanRec++ ) { - Rec = ScanWinRec->RECTAB[ ScanRec ]; + Rec = ScanWinRec->RECTAB[ (int)ScanRec ]; if ( ( Rec != (rdsrec_list *)NULL ) && ( ! IsGraalDeleted( Rec ) ) && @@ -693,7 +697,7 @@ void GraalEditSelectFence( LambdaX1, LambdaY1, LambdaX2, LambdaY2 ) { StaticLayer = RDS_STATIC_LAYER[ GetRdsLayer( CheckRec ) ]; - if ( GRAAL_RDS_ACTIVE_LAYER_TABLE[ StaticLayer ] != 1 ) + if ( GRAAL_RDS_ACTIVE_LAYER_TABLE[ (int)StaticLayer ] != 1 ) break; diff --git a/alliance/src/graal/src/GME_select.h b/alliance/src/graal/src/GME_select.h index 9c2901f3..920e5894 100644 --- a/alliance/src/graal/src/GME_select.h +++ b/alliance/src/graal/src/GME_select.h @@ -65,5 +65,9 @@ \------------------------------------------------------------*/ extern void GraalEditSelectRectangle(); + extern void GraalEditSelectAccept(); + extern void GraalEditSelectCancel(); + extern void GraalEditSelectWindowStretch(); + extern void GraalEditSelectPointStretch(); # endif diff --git a/alliance/src/graal/src/GMF_dialog.c b/alliance/src/graal/src/GMF_dialog.c index ce7aea6d..2049d84f 100644 --- a/alliance/src/graal/src/GMF_dialog.c +++ b/alliance/src/graal/src/GMF_dialog.c @@ -67,6 +67,7 @@ # include "GMF_dialog.h" # include "GMF_file.h" +# include "GMF_menu.h" /*------------------------------------------------------------\ | | diff --git a/alliance/src/graal/src/GMF_file.c b/alliance/src/graal/src/GMF_file.c index 990506f9..456c4c94 100644 --- a/alliance/src/graal/src/GMF_file.c +++ b/alliance/src/graal/src/GMF_file.c @@ -59,6 +59,8 @@ # include "GTB.h" # include "GSB.h" # include "GMF.h" +# include "GMV.h" +# include "GMT.h" # include "GMF_file.h" diff --git a/alliance/src/graal/src/GMF_menu.c b/alliance/src/graal/src/GMF_menu.c index effb0c4e..b39da90e 100644 --- a/alliance/src/graal/src/GMF_menu.c +++ b/alliance/src/graal/src/GMF_menu.c @@ -168,7 +168,9 @@ (GraalMenuItem *)NULL } , - NULL + { + NULL + } }; /*------------------------------------------------------------\ @@ -282,7 +284,6 @@ void CallbackFileSaveAs( MyWidget, ClientData, CallData ) caddr_t ClientData; caddr_t CallData; { - Arg Args; XmString SaveAsString; rdsbegin(); diff --git a/alliance/src/graal/src/GMF_panel.c b/alliance/src/graal/src/GMF_panel.c index 1612076c..b4298f37 100644 --- a/alliance/src/graal/src/GMF_panel.c +++ b/alliance/src/graal/src/GMF_panel.c @@ -71,6 +71,7 @@ # include "GMF_dialog.h" # include "GMC_dialog.h" # include "GMT_dialog.h" +# include "GME_dialog.h" /*------------------------------------------------------------\ | | diff --git a/alliance/src/graal/src/GMH_menu.c b/alliance/src/graal/src/GMH_menu.c index e67d1d56..dab765e8 100644 --- a/alliance/src/graal/src/GMH_menu.c +++ b/alliance/src/graal/src/GMH_menu.c @@ -98,7 +98,9 @@ (GraalMenuItem *)NULL } , - NULL + { + NULL + } }; /*------------------------------------------------------------\ diff --git a/alliance/src/graal/src/GMH_panel.c b/alliance/src/graal/src/GMH_panel.c index 84c4afbb..95f3798d 100644 --- a/alliance/src/graal/src/GMH_panel.c +++ b/alliance/src/graal/src/GMH_panel.c @@ -66,6 +66,7 @@ # include "GMH.h" # include "GMH_panel.h" +# include "GME_dialog.h" # include "LIP6bw.h" /*------------------------------------------------------------\ diff --git a/alliance/src/graal/src/GMS_menu.c b/alliance/src/graal/src/GMS_menu.c index dd208fb2..b654425c 100644 --- a/alliance/src/graal/src/GMS_menu.c +++ b/alliance/src/graal/src/GMS_menu.c @@ -141,7 +141,9 @@ (GraalMenuItem *)NULL } , - NULL + { + NULL + } }; diff --git a/alliance/src/graal/src/GMS_panel.c b/alliance/src/graal/src/GMS_panel.c index 820106d2..63864840 100644 --- a/alliance/src/graal/src/GMS_panel.c +++ b/alliance/src/graal/src/GMS_panel.c @@ -45,6 +45,7 @@ # include # include # include +# include # include # include # include @@ -60,6 +61,7 @@ # include "GMS.h" # include "GMS_panel.h" +# include "GME_dialog.h" /*------------------------------------------------------------\ | | diff --git a/alliance/src/graal/src/GMS_setup.c b/alliance/src/graal/src/GMS_setup.c index 08f2b6a4..51bc9781 100644 --- a/alliance/src/graal/src/GMS_setup.c +++ b/alliance/src/graal/src/GMS_setup.c @@ -62,6 +62,7 @@ # include "GMH.h" # include "GMS_setup.h" +# include "GMV_panel.h" /*------------------------------------------------------------\ | | @@ -215,7 +216,7 @@ void GraalReadPanelValues( Panel ) rdsbegin(); - fscanf( FileConfig, "X: %d, Y: %d, WIDTH: %d, HEIGHT: %d, MANAGED: %d\n", + fscanf( FileConfig, "X: %11d, Y: %11d, WIDTH: %11d, HEIGHT: %11d, MANAGED: %11d\n", &Values[0], &Values[1], &Values[2], &Values[3], &Values[4] ); Values[2] *= Panel->COLUMN; @@ -240,7 +241,7 @@ char GraalReadTopLevelValues() rdsbegin(); - fscanf( FileConfig, "VERSION: %s\n", Version ); + fscanf( FileConfig, "VERSION: %63s\n", Version ); if ( strcmp( Version, VERSION ) ) { @@ -248,7 +249,7 @@ char GraalReadTopLevelValues() return( 0 ); } - fscanf( FileConfig, "X: %d, Y: %d, WIDTH: %d, HEIGHT: %d, MANAGED: %d\n", + fscanf( FileConfig, "X: %11d, Y: %11d, WIDTH: %11d, HEIGHT: %11d, MANAGED: %11d\n", &Values[0], &Values[1], &Values[2], &Values[3], &Values[4] ); XtVaSetValues( GraalTopLevel, @@ -277,31 +278,31 @@ void GraalReadActiveLayers() for ( Layer = 0; Layer < RDS_ALL_LAYER; Layer++ ) { - fscanf( FileConfig, "ACTIVE: %d\n", &Value ); + fscanf( FileConfig, "ACTIVE: %11d\n", &Value ); - if ( ( GRAAL_RDS_LAYER_NAME_TABLE[ Layer ][ 0 ] != (char *)NULL ) && - ( RDS_DYNAMIC_LAYER[ Layer ] != RDS_LAYER_UNUSED ) ) + if ( ( GRAAL_RDS_LAYER_NAME_TABLE[ (int)Layer ][ 0 ] != (char *)NULL ) && + ( RDS_DYNAMIC_LAYER[ (int)Layer ] != RDS_LAYER_UNUSED ) ) { - GRAAL_RDS_ACTIVE_LAYER_TABLE[ Layer ] = Value; + GRAAL_RDS_ACTIVE_LAYER_TABLE[ (int)Layer ] = Value; } else { - GRAAL_RDS_ACTIVE_LAYER_TABLE[ Layer ] = -1; + GRAAL_RDS_ACTIVE_LAYER_TABLE[ (int)Layer ] = -1; } } for ( Layer = 0; Layer < GRAAL_MAX_ACTIVE_NAME; Layer++ ) { - fscanf( FileConfig, "ACTIVE: %d\n", &Value ); + fscanf( FileConfig, "ACTIVE: %11d\n", &Value ); - GRAAL_RDS_ACTIVE_NAME_TABLE[ Layer ] = Value; + GRAAL_RDS_ACTIVE_NAME_TABLE[ (int)Layer ] = Value; } - fscanf( FileConfig, "FILLMODE: %d\n", &Value ); + fscanf( FileConfig, "FILLMODE: %11d\n", &Value ); GRAAL_FILL_MODE = Value; - fscanf( FileConfig, "INTERFACE: %d\n", &Value ); + fscanf( FileConfig, "INTERFACE: %11d\n", &Value ); GRAAL_INSTANCE_INTERFACE = Value; @@ -324,13 +325,13 @@ void GraalWriteActiveLayers() for ( Layer = 0; Layer < RDS_ALL_LAYER; Layer++ ) { fprintf( FileConfig, "ACTIVE: %d\n", - ( GRAAL_RDS_ACTIVE_LAYER_TABLE[ Layer ] != 0 ) ); + ( GRAAL_RDS_ACTIVE_LAYER_TABLE[ (int)Layer ] != 0 ) ); } for ( Layer = 0; Layer < GRAAL_MAX_ACTIVE_NAME; Layer++ ) { fprintf( FileConfig, "ACTIVE: %d\n", - GRAAL_RDS_ACTIVE_NAME_TABLE[ Layer ] ); + GRAAL_RDS_ACTIVE_NAME_TABLE[ (int)Layer ] ); } fprintf( FileConfig, "FILLMODE: %d\n", @@ -444,20 +445,20 @@ void GraalDefaultConfig() for ( Layer = 0; Layer < RDS_ALL_LAYER; Layer++ ) { - if ( ( GRAAL_RDS_LAYER_NAME_TABLE[ Layer ][ 0 ] != (char *)NULL ) && - ( RDS_DYNAMIC_LAYER[ Layer ] != RDS_LAYER_UNUSED ) ) + if ( ( GRAAL_RDS_LAYER_NAME_TABLE[ (int)Layer ][ 0 ] != (char *)NULL ) && + ( RDS_DYNAMIC_LAYER[ (int)Layer ] != RDS_LAYER_UNUSED ) ) { - GRAAL_RDS_ACTIVE_LAYER_TABLE[ Layer ] = 1; + GRAAL_RDS_ACTIVE_LAYER_TABLE[ (int)Layer ] = 1; } else { - GRAAL_RDS_ACTIVE_LAYER_TABLE[ Layer ] = -1; + GRAAL_RDS_ACTIVE_LAYER_TABLE[ (int)Layer ] = -1; } } for ( Layer = 0; Layer < GRAAL_MAX_ACTIVE_NAME; Layer++ ) { - GRAAL_RDS_ACTIVE_NAME_TABLE[ Layer ] = 1; + GRAAL_RDS_ACTIVE_NAME_TABLE[ (int)Layer ] = 1; } GRAAL_FILL_MODE = GRAAL_FILL_MODE_PATTERN; diff --git a/alliance/src/graal/src/GMT_druc.c b/alliance/src/graal/src/GMT_druc.c index f3e023bf..9eeacb50 100644 --- a/alliance/src/graal/src/GMT_druc.c +++ b/alliance/src/graal/src/GMT_druc.c @@ -57,10 +57,13 @@ # include "GMX.h" # include "GRM.h" # include "GMT.h" +# include "GMV.h" +# include "GME.h" # include "GMT_druc.h" # include "GMT_panel.h" # include "GMT_message.h" +# include "GRM_select.h" /*------------------------------------------------------------\ | | @@ -119,7 +122,7 @@ void GraalDisplayDrucError( Rectangle ) Error = MACRO_REGLE_NUM( Rectangle ); Comment = drucgeterror( Error ); - sprintf( GraalDrucErrorMessage, "Rule error %d\n%s", + sprintf( GraalDrucErrorMessage, "Rule error %ld\n%s", Error, Comment ); GraalDisplayDrucMessage( GraalDrucErrorMessage ); @@ -156,7 +159,6 @@ void GraalToolsDrucNextError() rdsrec_list *DrucRec; rdsrec_list *ScanRec; char Layer; - char Error; long X1; long Y1; @@ -178,7 +180,7 @@ void GraalToolsDrucNextError() { for ( Layer = 0; Layer < RDS_MAX_LAYER; Layer++ ) { - for ( GraalCurrentDruc = GraalFigureDruc->LAYERTAB[ Layer ]; + for ( GraalCurrentDruc = GraalFigureDruc->LAYERTAB[ (int)Layer ]; GraalCurrentDruc != (rdsrec_list *)0; GraalCurrentDruc = GraalCurrentDruc->NEXT ) { @@ -205,7 +207,7 @@ void GraalToolsDrucNextError() { for ( Layer = GetRdsLayer( GraalCurrentDruc ) + 1; Layer < RDS_MAX_LAYER; Layer++ ) { - for ( GraalCurrentDruc = GraalFigureDruc->LAYERTAB[ Layer ]; + for ( GraalCurrentDruc = GraalFigureDruc->LAYERTAB[ (int)Layer ]; GraalCurrentDruc != (rdsrec_list *)0; GraalCurrentDruc = GraalCurrentDruc->NEXT ) { @@ -228,7 +230,7 @@ void GraalToolsDrucNextError() for ( Layer = 0; Layer < RDS_MAX_LAYER; Layer++ ) { - for ( ScanRec = GraalFigureDruc->LAYERTAB[ Layer ]; + for ( ScanRec = GraalFigureDruc->LAYERTAB[ (int)Layer ]; ScanRec != (rdsrec_list *)0; ScanRec = ScanRec->NEXT ) { @@ -283,12 +285,9 @@ void GraalToolsDruc( LambdaX1, LambdaY1, LambdaX2, LambdaY2 ) graalselect **Previous; rdsrec_list *Rectangle; rdsrec_list **PrevRectangle; - rdsrec_list *DrucRec; void *Pointer; char Layer; char Error; - long X1; - long Y1; rdsbegin(); @@ -382,7 +381,7 @@ void GraalToolsDruc( LambdaX1, LambdaY1, LambdaX2, LambdaY2 ) for ( Layer = 0; Layer < RDS_MAX_LAYER; Layer++ ) { - for ( Rectangle = GraalFigureDruc->LAYERTAB[ Layer ]; + for ( Rectangle = GraalFigureDruc->LAYERTAB[ (int)Layer ]; Rectangle != (rdsrec_list *)NULL; Rectangle = Rectangle->NEXT ) { @@ -402,9 +401,9 @@ void GraalToolsDruc( LambdaX1, LambdaY1, LambdaX2, LambdaY2 ) for ( Layer = RDS_USER0; Layer <= RDS_USER8; Layer++ ) { - *PrevRectangle = GraalFigureDruc->LAYERTAB[ Layer ]; + *PrevRectangle = GraalFigureDruc->LAYERTAB[ (int)Layer ]; - for ( Rectangle = GraalFigureDruc->LAYERTAB[ Layer ]; + for ( Rectangle = GraalFigureDruc->LAYERTAB[ (int)Layer ]; Rectangle != (rdsrec_list *)0; Rectangle = Rectangle->NEXT ) { @@ -412,7 +411,7 @@ void GraalToolsDruc( LambdaX1, LambdaY1, LambdaX2, LambdaY2 ) PrevRectangle = &Rectangle->NEXT; } - GraalFigureDruc->LAYERTAB[ Layer ] = (rdsrec_list *)0; + GraalFigureDruc->LAYERTAB[ (int)Layer ] = (rdsrec_list *)0; } *PrevRectangle = GraalFigureDruc->LAYERTAB[ RDS_USER9 ]; diff --git a/alliance/src/graal/src/GMT_druc.h b/alliance/src/graal/src/GMT_druc.h index 95f7e07b..224a6302 100644 --- a/alliance/src/graal/src/GMT_druc.h +++ b/alliance/src/graal/src/GMT_druc.h @@ -70,4 +70,9 @@ | | \------------------------------------------------------------*/ +extern void GraalDisplayDrucMessage(); +extern void GraalToolsDrucNextError(); +extern void GraalToolsDrucAbortError(); +extern void GraalToolsDruc(); + # endif diff --git a/alliance/src/graal/src/GMT_menu.c b/alliance/src/graal/src/GMT_menu.c index 2d92e263..3e535f21 100644 --- a/alliance/src/graal/src/GMT_menu.c +++ b/alliance/src/graal/src/GMT_menu.c @@ -275,7 +275,9 @@ (GraalMenuItem *)NULL } , - NULL + { + NULL + } }; /*------------------------------------------------------------\ diff --git a/alliance/src/graal/src/GMT_panel.c b/alliance/src/graal/src/GMT_panel.c index 2581651e..a8f60f06 100644 --- a/alliance/src/graal/src/GMT_panel.c +++ b/alliance/src/graal/src/GMT_panel.c @@ -45,6 +45,7 @@ # include # include # include +# include # include # include # include @@ -59,6 +60,7 @@ # include "GTB.h" # include "GSB.h" # include "GMT.h" +# include "GMV.h" # include "GMT_panel.h" # include "GMT_message.h" diff --git a/alliance/src/graal/src/GMT_tools.c b/alliance/src/graal/src/GMT_tools.c index 17ecd64e..ba52cfda 100644 --- a/alliance/src/graal/src/GMT_tools.c +++ b/alliance/src/graal/src/GMT_tools.c @@ -62,9 +62,15 @@ # include "GMF.h" # include "GRM.h" # include "GMT.h" +# include "GMV.h" # include "GMT_tools.h" +# include "GMT_panel.h" # include "GMT_message.h" +# include "GRM_select.h" +# include "GMF_menu.h" +# include "GMF_file.h" +# include "GRM_window.h" /*------------------------------------------------------------\ | | @@ -348,7 +354,6 @@ void GraalToolsPeek( LambdaX1, LambdaY1, LambdaX2, LambdaY2 ) rdsrec_list *Rec; graalpeek *Peek; char ScanRec; - char Layer; long XabMin; long XabMax; long YabMin; @@ -429,7 +434,7 @@ void GraalToolsPeek( LambdaX1, LambdaY1, LambdaX2, LambdaY2 ) { for ( ScanRec = 0; ScanRec < GRAAL_MAX_REC ; ScanRec++ ) { - Rec = ScanWinRec->RECTAB[ ScanRec ]; + Rec = ScanWinRec->RECTAB[ (int)ScanRec ]; if ( ( Rec != (rdsrec_list *)NULL ) && ( ! IsRdsFigRec( Rec ) ) && @@ -501,7 +506,6 @@ void GraalToolsUnpeek() void GraalToolsHierarchyDown() { - graalselect *Select; rdsrec_list *Rectangle; rdsins_list *Instance; char *ModelName; @@ -541,7 +545,6 @@ void GraalToolsHierarchyShow( LambdaX1, LambdaY1 ) long LambdaY1; { graalselect *Select; - rdsrec_list *Rectangle; phins_list *InsMbk; phins_list *ScanInsMbk; phfig_list *ModelMbk; @@ -596,7 +599,7 @@ void GraalToolsHierarchyShow( LambdaX1, LambdaY1 ) sprintf( GraalScanHierarchyShow, "INSTANCE %s (%s,%s)\n", InsMbk->INSNAME, InsMbk->FIGNAME, - GRAAL_SYMMETRY_NAME_TABLE[ InsMbk->TRANSF ][0] ); + GRAAL_SYMMETRY_NAME_TABLE[ (int)InsMbk->TRANSF ][0] ); GraalScanHierarchyShow += strlen( GraalScanHierarchyShow ); diff --git a/alliance/src/graal/src/GMV_menu.c b/alliance/src/graal/src/GMV_menu.c index eeb76caa..5ffb253f 100644 --- a/alliance/src/graal/src/GMV_menu.c +++ b/alliance/src/graal/src/GMV_menu.c @@ -60,6 +60,7 @@ # include "GMV_dialog.h" # include "GMV_view.h" # include "GMV_map.h" +# include "GMV_panel.h" /*------------------------------------------------------------\ | | @@ -168,7 +169,9 @@ (GraalMenuItem *)NULL } , - NULL + { + NULL + } }; /*------------------------------------------------------------\ diff --git a/alliance/src/graal/src/GMV_panel.c b/alliance/src/graal/src/GMV_panel.c index 0ab18717..f270a8fe 100644 --- a/alliance/src/graal/src/GMV_panel.c +++ b/alliance/src/graal/src/GMV_panel.c @@ -2573,8 +2573,6 @@ 180, 575, 0 }; - static char FirstEnterLayerPanel = 1; - /*------------------------------------------------------------\ | | | Panel Grid | @@ -3454,7 +3452,7 @@ void GraalChangeFillMode( FillMode ) rdsbegin(); Index = 2 + ( ( RDS_ALL_LAYER + GRAAL_MAX_ACTIVE_NAME ) << 1 ); - Label = XmStringCreateSimple( GraalViewLayerFillModeName[ FillMode ] ); + Label = XmStringCreateSimple( GraalViewLayerFillModeName[ (int)FillMode ] ); XtVaSetValues( GraalViewLayerButton[ Index ].BUTTON, XmNlabelString, Label, @@ -3482,7 +3480,7 @@ void GraalChangeInterface( Interface ) rdsbegin(); Index = 3 + ( ( RDS_ALL_LAYER + GRAAL_MAX_ACTIVE_NAME ) << 1 ); - Label = XmStringCreateSimple( GraalViewLayerInterfaceName[ Interface ] ); + Label = XmStringCreateSimple( GraalViewLayerInterfaceName[ (int)Interface ] ); XtVaSetValues( GraalViewLayerButton[ Index ].BUTTON, XmNlabelString, Label, @@ -3510,7 +3508,7 @@ void GraalChangeIndex( Index ) rdsbegin(); Pos = 4 + ( ( RDS_ALL_LAYER + GRAAL_MAX_ACTIVE_NAME ) << 1 ); - Label = XmStringCreateSimple( GraalViewLayerConnectorIndex[ Index ] ); + Label = XmStringCreateSimple( GraalViewLayerConnectorIndex[ (int)Index ] ); XtVaSetValues( GraalViewLayerButton[ Pos ].BUTTON, XmNlabelString, Label, @@ -3538,7 +3536,7 @@ void GraalChangeCursor( Type ) rdsbegin(); Pos = 5 + ( ( RDS_ALL_LAYER + GRAAL_MAX_ACTIVE_NAME ) << 1 ); - Label = XmStringCreateSimple( GraalViewLayerCursorType[ Type ] ); + Label = XmStringCreateSimple( GraalViewLayerCursorType[ (int)Type ] ); XtVaSetValues( GraalViewLayerButton[ Pos ].BUTTON, XmNlabelString, Label, @@ -3566,7 +3564,7 @@ void GraalChangeForceDisplay( Index ) rdsbegin(); Pos = 6 + ( ( RDS_ALL_LAYER + GRAAL_MAX_ACTIVE_NAME ) << 1 ); - Label = XmStringCreateSimple( GraalViewLayerForceDisplay[ Index ] ); + Label = XmStringCreateSimple( GraalViewLayerForceDisplay[ (int)Index ] ); XtVaSetValues( GraalViewLayerButton[ Pos ].BUTTON, XmNlabelString, Label, @@ -3596,7 +3594,7 @@ void GraalChangeScale( Scale ) Pos = 7 + ( ( RDS_ALL_LAYER + GRAAL_MAX_ACTIVE_NAME ) << 1 ); - sprintf( Buffer, "Scale %d", Scale ); + sprintf( Buffer, "Scale %ld", Scale ); Label = XmStringCreateSimple( Buffer ); XtVaSetValues( GraalViewLayerButton[ Pos ].BUTTON, @@ -3625,7 +3623,7 @@ void GraalChangeBlackBoxString( Index ) rdsbegin(); Pos = 8 + ( ( RDS_ALL_LAYER + GRAAL_MAX_ACTIVE_NAME ) << 1 ); - Label = XmStringCreateSimple( GraalViewLayerBlackBoxString[ Index ] ); + Label = XmStringCreateSimple( GraalViewLayerBlackBoxString[ (int)Index ] ); XtVaSetValues( GraalViewLayerButton[ Pos ].BUTTON, XmNlabelString, Label, diff --git a/alliance/src/graal/src/GMV_view.c b/alliance/src/graal/src/GMV_view.c index a461d153..b9b47ff6 100644 --- a/alliance/src/graal/src/GMV_view.c +++ b/alliance/src/graal/src/GMV_view.c @@ -58,6 +58,7 @@ # include "GMV.h" # include "GMV_view.h" +# include "GMX_grid.h" /*------------------------------------------------------------\ | | diff --git a/alliance/src/graal/src/GMX_color.c b/alliance/src/graal/src/GMX_color.c index 927acfcd..5bddf411 100644 --- a/alliance/src/graal/src/GMX_color.c +++ b/alliance/src/graal/src/GMX_color.c @@ -530,8 +530,6 @@ void GraalInitializeColors() void GraalChangeCursorContext() { - XGCValues GraphicValue; - if ( GRAAL_XOR_CURSOR == GRAAL_TRUE ) { GraalXorGC = GraalXorGCXor; @@ -685,7 +683,7 @@ void GraalInitializeGraphicContext() Pattern = GraalLayerPatternDefine[ Counter ]; } - GraphicValue.stipple = GraalPattern[ Pattern ]; + GraphicValue.stipple = GraalPattern[ (int)Pattern ]; GraphicValue.fill_style = FillStippled; GraphicValue.foreground = GraalColor[ 3 ]; diff --git a/alliance/src/graal/src/GMX_cursor.c b/alliance/src/graal/src/GMX_cursor.c index a58bfd91..a19dae19 100644 --- a/alliance/src/graal/src/GMX_cursor.c +++ b/alliance/src/graal/src/GMX_cursor.c @@ -196,8 +196,8 @@ void GraalPointCursor() GraalUndisplayCursor(); - GraalLambdaCursorSaveX[ GraalCursorIndex ] = GraalLambdaCursorX; - GraalLambdaCursorSaveY[ GraalCursorIndex ] = GraalLambdaCursorY; + GraalLambdaCursorSaveX[ (int)GraalCursorIndex ] = GraalLambdaCursorX; + GraalLambdaCursorSaveY[ (int)GraalCursorIndex ] = GraalLambdaCursorY; GraalCursorIndex = GraalCursorIndex + 1; diff --git a/alliance/src/graal/src/GMX_event.c b/alliance/src/graal/src/GMX_event.c index 08d69397..3e845a4f 100644 --- a/alliance/src/graal/src/GMX_event.c +++ b/alliance/src/graal/src/GMX_event.c @@ -61,11 +61,16 @@ # include "GMS.h" # include "GME.h" # include "GMH.h" +# include "GMC.h" +# include "GMT.h" # include "GMX_motif.h" # include "GMX_grid.h" # include "GMX_cursor.h" # include "GMX_event.h" # include "GMX_message.h" +# include "GMX_graphic.h" +# include "GME_select.h" +# include "GMT_druc.h" /*------------------------------------------------------------\ | | @@ -289,7 +294,7 @@ void GraalChangeEditMode( EditMode , PromptMessage ) EditMode = EditMode & ~GRAAL_ZOOM_MARK; GraalCountEventZoom = 0; - GraalMaxEventZoom = GraalMaxEventZoomTable[ EditMode ]; + GraalMaxEventZoom = GraalMaxEventZoomTable[ (int)EditMode ]; if ( ! ( GraalEditMode & GRAAL_ZOOM_MARK ) ) { @@ -298,7 +303,7 @@ void GraalChangeEditMode( EditMode , PromptMessage ) GraalSavePromptMessage = GraalPromptMessage; } - GraalInputMode = GraalInputEventZoomTable[ EditMode ]; + GraalInputMode = GraalInputEventZoomTable[ (int)EditMode ]; GraalPromptMessage = PromptMessage; GraalEditMode = EditMode | GRAAL_ZOOM_MARK; @@ -309,19 +314,19 @@ void GraalChangeEditMode( EditMode , PromptMessage ) if ( GraalEditMode & GRAAL_ZOOM_MARK ) { GraalSaveEditMode = EditMode; - GraalSaveInputMode = GraalInputEventEditTable[ EditMode ]; + GraalSaveInputMode = GraalInputEventEditTable[ (int)EditMode ]; GraalSavePromptMessage = PromptMessage; GraalCountEventEdit = 0; - GraalMaxEventEdit = GraalMaxEventEditTable[ EditMode ]; + GraalMaxEventEdit = GraalMaxEventEditTable[ (int)EditMode ]; } else { if ( GraalEditMode != EditMode ) { GraalCountEventEdit = 0; - GraalMaxEventEdit = GraalMaxEventEditTable[ EditMode ]; + GraalMaxEventEdit = GraalMaxEventEditTable[ (int)EditMode ]; GraalEditMode = EditMode; - GraalInputMode = GraalInputEventEditTable[ EditMode ]; + GraalInputMode = GraalInputEventEditTable[ (int)EditMode ]; GraalPromptMessage = PromptMessage; GraalChangeCursorType( NULL, NULL, 0, GraalInputMode ); @@ -353,17 +358,17 @@ void GraalContinueEditMode( EditMode , PromptMessage, CountEvent ) if ( GraalEditMode & GRAAL_ZOOM_MARK ) { GraalSaveEditMode = EditMode; - GraalSaveInputMode = GraalInputEventEditTable[ EditMode ]; + GraalSaveInputMode = GraalInputEventEditTable[ (int)EditMode ]; GraalSavePromptMessage = PromptMessage; GraalCountEventEdit = CountEvent; - GraalMaxEventEdit = GraalMaxEventEditTable[ EditMode ]; + GraalMaxEventEdit = GraalMaxEventEditTable[ (int)EditMode ]; } else { GraalCountEventEdit = CountEvent; - GraalMaxEventEdit = GraalMaxEventEditTable[ EditMode ]; + GraalMaxEventEdit = GraalMaxEventEditTable[ (int)EditMode ]; GraalEditMode = EditMode; - GraalInputMode = GraalInputEventEditTable[ EditMode ]; + GraalInputMode = GraalInputEventEditTable[ (int)EditMode ]; GraalPromptMessage = PromptMessage; GraalChangeCursorType( GraalLambdaEventEditX, @@ -746,8 +751,8 @@ void CallbackEvent ( MyWidget, Event, Args, Argc ) { if ( GraalCountEventZoom < GraalMaxEventZoom ) { - GraalLambdaEventZoomX[ GraalCountEventZoom ] = GraalLambdaCursorX; - GraalLambdaEventZoomY[ GraalCountEventZoom ] = GraalLambdaCursorY; + GraalLambdaEventZoomX[ (int)GraalCountEventZoom ] = GraalLambdaCursorX; + GraalLambdaEventZoomY[ (int)GraalCountEventZoom ] = GraalLambdaCursorY; GraalCountEventZoom = GraalCountEventZoom + 1; @@ -781,8 +786,8 @@ void CallbackEvent ( MyWidget, Event, Args, Argc ) { if ( GraalCountEventEdit < GraalMaxEventEdit ) { - GraalLambdaEventEditX[ GraalCountEventEdit ] = GraalLambdaCursorX; - GraalLambdaEventEditY[ GraalCountEventEdit ] = GraalLambdaCursorY; + GraalLambdaEventEditX[ (int)GraalCountEventEdit ] = GraalLambdaCursorX; + GraalLambdaEventEditY[ (int)GraalCountEventEdit ] = GraalLambdaCursorY; GraalCountEventEdit = GraalCountEventEdit + 1; diff --git a/alliance/src/graal/src/GMX_graphic.h b/alliance/src/graal/src/GMX_graphic.h index 6e852bc2..4c983daf 100644 --- a/alliance/src/graal/src/GMX_graphic.h +++ b/alliance/src/graal/src/GMX_graphic.h @@ -68,5 +68,6 @@ \------------------------------------------------------------*/ extern void GraalInitializeGraphic(); + extern void GraalInitializeGraphicWindow(); # endif diff --git a/alliance/src/graal/src/GMX_grid.h b/alliance/src/graal/src/GMX_grid.h index 554196c2..2c67ce35 100644 --- a/alliance/src/graal/src/GMX_grid.h +++ b/alliance/src/graal/src/GMX_grid.h @@ -73,4 +73,7 @@ | | \------------------------------------------------------------*/ +extern void GraalInitializeLambdaGrid(); +extern char GraalDisplayLambdaGrid(); + # endif diff --git a/alliance/src/graal/src/GMX_menu.c b/alliance/src/graal/src/GMX_menu.c index 170449e2..cbcbb12e 100644 --- a/alliance/src/graal/src/GMX_menu.c +++ b/alliance/src/graal/src/GMX_menu.c @@ -205,7 +205,9 @@ GraalHelpMenu } , - NULL + { + NULL + } }; /*------------------------------------------------------------\ diff --git a/alliance/src/graal/src/GMX_message.c b/alliance/src/graal/src/GMX_message.c index b37021ab..06395560 100644 --- a/alliance/src/graal/src/GMX_message.c +++ b/alliance/src/graal/src/GMX_message.c @@ -153,7 +153,7 @@ void GraalDisplayMessage( Where, Text ) TextString = XmStringCreateSimple( Text ); - XtVaSetValues( GraalMessageText[ Where ], XmNlabelString, TextString, NULL ); + XtVaSetValues( GraalMessageText[ (int)Where ], XmNlabelString, TextString, NULL ); XmStringFree( TextString ); diff --git a/alliance/src/graal/src/GMX_motif.c b/alliance/src/graal/src/GMX_motif.c index aa35d69e..43d98d23 100644 --- a/alliance/src/graal/src/GMX_motif.c +++ b/alliance/src/graal/src/GMX_motif.c @@ -57,6 +57,8 @@ # include "GSB.h" # include "GMX.h" # include "GMS.h" +# include "GMV.h" +# include "GMF.h" # include "GMX_motif.h" # include "GMX_graphic.h" diff --git a/alliance/src/graal/src/GMX_panel.c b/alliance/src/graal/src/GMX_panel.c index cce3ceef..31020d80 100644 --- a/alliance/src/graal/src/GMX_panel.c +++ b/alliance/src/graal/src/GMX_panel.c @@ -65,6 +65,7 @@ # include "GMX.h" # include "GMX_panel.h" +# include "GME_panel.h" /*------------------------------------------------------------\ | | diff --git a/alliance/src/graal/src/GMX_panel.h b/alliance/src/graal/src/GMX_panel.h index fb36c078..633c722a 100644 --- a/alliance/src/graal/src/GMX_panel.h +++ b/alliance/src/graal/src/GMX_panel.h @@ -68,5 +68,6 @@ \------------------------------------------------------------*/ extern void GraalInitializeIcon(); + extern void GraalInitializePanel(); # endif diff --git a/alliance/src/graal/src/GMX_view.c b/alliance/src/graal/src/GMX_view.c index d98463c0..371ccf6d 100644 --- a/alliance/src/graal/src/GMX_view.c +++ b/alliance/src/graal/src/GMX_view.c @@ -751,9 +751,9 @@ void GraalDisplayFigure( GraphicX1, GraphicY1, GraphicX2, GraphicY2 ) { if ( GraalCheckInterrupt() ) break; - StaticLayer = RDS_STATIC_LAYER[ Layer ]; + StaticLayer = RDS_STATIC_LAYER[ (int)Layer ]; - if ( GRAAL_RDS_ACTIVE_LAYER_TABLE[ StaticLayer ] != 1 ) continue; + if ( GRAAL_RDS_ACTIVE_LAYER_TABLE[ (int)StaticLayer ] != 1 ) continue; Y = Ymin; @@ -773,13 +773,13 @@ void GraalDisplayFigure( GraphicX1, GraphicY1, GraphicX2, GraphicY2 ) if ( ScanWin->LAYERTAB != (graalwinrec **)NULL ) { - for ( ScanWinRec = ScanWin->LAYERTAB[ Layer ]; + for ( ScanWinRec = ScanWin->LAYERTAB[ (int)Layer ]; ScanWinRec != (graalwinrec *)NULL; ScanWinRec = ScanWinRec->NEXT ) { for ( ScanRec = 0; ScanRec < GRAAL_MAX_REC ; ScanRec++ ) { - Rec = ScanWinRec->RECTAB[ ScanRec ]; + Rec = ScanWinRec->RECTAB[ (int)ScanRec ]; if ( ( Rec != (rdsrec_list *)NULL ) && ( ! IsGraalDeleted( Rec ) ) && @@ -878,8 +878,8 @@ void GraalDisplayFigure( GraphicX1, GraphicY1, GraphicX2, GraphicY2 ) } else { - GraalDrawGC = GraalLayerDrawGC[ StaticLayer ]; - GraalFillGC = GraalLayerFillGC[ StaticLayer ]; + GraalDrawGC = GraalLayerDrawGC[ (int)StaticLayer ]; + GraalFillGC = GraalLayerFillGC[ (int)StaticLayer ]; GraalDisplayOneRectangle( Rec ); @@ -908,18 +908,18 @@ void GraalDisplayFigure( GraphicX1, GraphicY1, GraphicX2, GraphicY2 ) if ( IsGraalAccepted( Rec ) != 0 ) { GraalDrawGC = GraalAcceptDrawGC; - GraalFillGC = GraalLayerAcceptGC[ StaticLayer ]; + GraalFillGC = GraalLayerAcceptGC[ (int)StaticLayer ]; } else if ( IsGraalTreated( Rec ) != 0 ) { GraalDrawGC = GraalEquiDrawGC; - GraalFillGC = GraalLayerEquiGC[ StaticLayer ]; + GraalFillGC = GraalLayerEquiGC[ (int)StaticLayer ]; } else { GraalDrawGC = GraalDrucDrawGC; - GraalFillGC = GraalLayerDrucGC[ StaticLayer ]; + GraalFillGC = GraalLayerDrucGC[ (int)StaticLayer ]; } GraalDisplayOneRectangle( Rec ); diff --git a/alliance/src/graal/src/GRM_druc.c b/alliance/src/graal/src/GRM_druc.c index cec4b128..d01c5b2f 100644 --- a/alliance/src/graal/src/GRM_druc.c +++ b/alliance/src/graal/src/GRM_druc.c @@ -82,7 +82,7 @@ rdsrec_list *GraalAddDruc( DrucRec ) rdsrec_list *ScanDrucRec; rdsrec_list *ScanRec; rdsrec_list *First; - rdsrec_list *Link; + rdsrec_list *Link = NULL; rdsbegin(); diff --git a/alliance/src/graal/src/GRM_equi.c b/alliance/src/graal/src/GRM_equi.c index 60c5e755..cc5c5769 100644 --- a/alliance/src/graal/src/GRM_equi.c +++ b/alliance/src/graal/src/GRM_equi.c @@ -52,6 +52,7 @@ # include "GRM.h" # include "GSB.h" # include "GRM_equi.h" +# include "GRM_window.h" /*------------------------------------------------------------\ | | @@ -120,7 +121,7 @@ rdsrec_list *GraalCutCx( Rec, X1, Y1, X2, Y2 ) Yvia = ((phvia_list *)Pointer)->YVIA; CXType = ((phvia_list *)Pointer)->TYPE; - MbkLayer = GRAAL_CUT_C_X_LIST[ CXType ]; + MbkLayer = GRAAL_CUT_C_X_LIST[ (int)CXType ]; GateLayer = GET_LYNX_TRANSISTOR_GATE_LAYER( MbkLayer ); DiffLayer = GET_LYNX_TRANSISTOR_DIFF_LAYER( MbkLayer ); @@ -130,7 +131,7 @@ rdsrec_list *GraalCutCx( Rec, X1, Y1, X2, Y2 ) return( Rec ); } - Table = GRAAL_CUT_C_X_ARRAY[ MbkLayer ]; + Table = GRAAL_CUT_C_X_ARRAY[ (int)MbkLayer ]; Mask = 0; Save = Rec; @@ -151,13 +152,13 @@ rdsrec_list *GraalCutCx( Rec, X1, Y1, X2, Y2 ) { ScanWin = ScanRecWin->WINDOW; - for ( ScanWinRec = ScanWin->LAYERTAB[ GateLayer ]; + for ( ScanWinRec = ScanWin->LAYERTAB[ (int)GateLayer ]; ScanWinRec != (graalwinrec *)NULL; ScanWinRec = ScanWinRec->NEXT ) { for ( Index = 0; Index < GRAAL_MAX_REC; Index++ ) { - ScanRec = ScanWinRec->RECTAB[ Index ]; + ScanRec = ScanWinRec->RECTAB[ (int)Index ]; if ( ( ScanRec != (rdsrec_list *)NULL ) && ( ! IsGraalDeleted( ScanRec ) ) && @@ -201,7 +202,7 @@ rdsrec_list *GraalCutCx( Rec, X1, Y1, X2, Y2 ) for ( Index = 0; Index < 16; Index = Index + 4 ) { - if ( LineTable[ Index ] == -1 ) break; + if ( LineTable[ (int)Index ] == -1 ) break; Diff = addrdsfigrec( GraalFigureRds, NULL, DiffLayer, @@ -212,7 +213,7 @@ rdsrec_list *GraalCutCx( Rec, X1, Y1, X2, Y2 ) GRAAL_PREVIOUS( Diff ) = - &(GraalFigureRds->LAYERTAB[ DiffLayer ]); + &(GraalFigureRds->LAYERTAB[ (int)DiffLayer ]); if ( Diff->NEXT != (rdsrec_list *)NULL ) { @@ -358,7 +359,7 @@ void GraalExtractEqui( Rec ) { Pointer = GRAAL_MBK( ScanRec ); - if ( GRAAL_CUT_C_X_LIST[ ((phvia_list *)Pointer)->TYPE ] < MBK_MAX_LAYER ) + if ( GRAAL_CUT_C_X_LIST[ (int)((phvia_list *)Pointer)->TYPE ] < MBK_MAX_LAYER ) { ScanRec = GraalCutCx( ScanRec, X1, Y1, X2, Y2 ); } diff --git a/alliance/src/graal/src/GRM_error.c b/alliance/src/graal/src/GRM_error.c index ed4cef80..858f640f 100644 --- a/alliance/src/graal/src/GRM_error.c +++ b/alliance/src/graal/src/GRM_error.c @@ -44,6 +44,7 @@ # include # include +# include # include # include # include "mut.h" @@ -55,6 +56,7 @@ # include "GSB.h" # include "GRM.h" # include "GRM_error.h" +# include "GMF_menu.h" /*------------------------------------------------------------\ | | @@ -376,13 +378,13 @@ char *GraalGetInformations() Scan = Scan + strlen( Scan ); - sprintf( Scan, " BOUNDING BOX : \n\n XMIN : %d\n YMIN : %d\n XMAX : %d\n YMAX : %d\n\n", + sprintf( Scan, " BOUNDING BOX : \n\n XMIN : %ld\n YMIN : %ld\n XMAX : %ld\n YMAX : %ld\n\n", GraalBoundXmin / GRAAL_RDS_LAMBDA, GraalBoundYmin / GRAAL_RDS_LAMBDA, GraalBoundXmax / GRAAL_RDS_LAMBDA, GraalBoundYmax / GRAAL_RDS_LAMBDA ); Scan = Scan + strlen( Scan ); - sprintf( Scan, " WINDOWS : \n\n XMIN : %d\n YMIN : %d\n XMAX : %d\n YMAX : %d\n DX : %d\n DY : %d\n SIDE : %d\n\n", + sprintf( Scan, " WINDOWS : \n\n XMIN : %ld\n YMIN : %ld\n XMAX : %ld\n YMAX : %ld\n DX : %ld\n DY : %ld\n SIDE : %ld\n\n", GraalWindowXmin / GRAAL_RDS_LAMBDA, GraalWindowYmin / GRAAL_RDS_LAMBDA, GraalWindowXmax / GRAAL_RDS_LAMBDA, GraalWindowYmax / GRAAL_RDS_LAMBDA, GraalWindowDx , GraalWindowDy, diff --git a/alliance/src/graal/src/GRM_error.h b/alliance/src/graal/src/GRM_error.h index ffd2ca2f..06cc8a99 100644 --- a/alliance/src/graal/src/GRM_error.h +++ b/alliance/src/graal/src/GRM_error.h @@ -70,6 +70,7 @@ | | \------------------------------------------------------------*/ - extern void GraalFlushErrorMessage(); + extern void GraalFlushErrorMessage (); + extern void GraalInitializeErrorMessage(); # endif diff --git a/alliance/src/graal/src/GRM_mbkrds.c b/alliance/src/graal/src/GRM_mbkrds.c index 10a82565..6686350a 100644 --- a/alliance/src/graal/src/GRM_mbkrds.c +++ b/alliance/src/graal/src/GRM_mbkrds.c @@ -61,6 +61,7 @@ # include "GRM_error.h" # include "GRM_window.h" # include "GRM_mbkrds.h" +# include "GRM_connector.h" /*------------------------------------------------------------\ | | @@ -267,7 +268,7 @@ rdsins_list *GraalAddInstance( InstanceMbk ) for ( Layer = 0; Layer < RDS_MAX_LAYER; Layer++ ) { - for ( Rectangle = InstanceRds->LAYERTAB[ Layer ]; + for ( Rectangle = InstanceRds->LAYERTAB[ (int)Layer ]; Rectangle != (rdsrec_list *)NULL; Rectangle = Rectangle->NEXT ) { @@ -318,9 +319,9 @@ rdsins_list *GraalFlatInstance( InstanceRds ) for ( Layer = 0; Layer < RDS_ABOX; Layer++ ) { - ScanRec = InstanceRds->LAYERTAB[ Layer ]; + ScanRec = InstanceRds->LAYERTAB[ (int)Layer ]; - InstanceRds->LAYERTAB[ Layer ] = (rdsrec_list *)NULL; + InstanceRds->LAYERTAB[ (int)Layer ] = (rdsrec_list *)NULL; while( ScanRec != (rdsrec_list *)NULL ) { @@ -346,7 +347,7 @@ rdsins_list *GraalFlatInstance( InstanceRds ) for ( Layer = 0; Layer < RDS_MAX_LAYER; Layer++ ) { - for ( ScanRec = InstanceRds->LAYERTAB[ Layer ]; + for ( ScanRec = InstanceRds->LAYERTAB[ (int)Layer ]; ScanRec != (rdsrec_list *)NULL; ScanRec = ScanRec->NEXT ) { @@ -375,7 +376,6 @@ rdsins_list *GraalUnflatInstance( InstanceRds ) { phfig_list *ModelMbk; phins_list *InstanceMbk; - rdsrec_list *Rectangle; rdsrec_list *ScanRec; rdsrec_list *DelRec; char Layer; @@ -394,9 +394,9 @@ rdsins_list *GraalUnflatInstance( InstanceRds ) for ( Layer = 0; Layer < RDS_ABOX; Layer++ ) { - ScanRec = InstanceRds->LAYERTAB[ Layer ]; + ScanRec = InstanceRds->LAYERTAB[ (int)Layer ]; - InstanceRds->LAYERTAB[ Layer ] = (rdsrec_list *)NULL; + InstanceRds->LAYERTAB[ (int)Layer ] = (rdsrec_list *)NULL; while( ScanRec != (rdsrec_list *)NULL ) { @@ -422,7 +422,7 @@ rdsins_list *GraalUnflatInstance( InstanceRds ) for ( Layer = 0; Layer < RDS_MAX_LAYER; Layer++ ) { - for ( ScanRec = InstanceRds->LAYERTAB[ Layer ]; + for ( ScanRec = InstanceRds->LAYERTAB[ (int)Layer ]; ScanRec != (rdsrec_list *)NULL; ScanRec = ScanRec->NEXT ) { @@ -739,7 +739,7 @@ void GraalDelFigure() for ( Layer = 0; Layer < RDS_MAX_LAYER; Layer++ ) { - ScanRec = GraalFigureRds->LAYERTAB[ Layer ]; + ScanRec = GraalFigureRds->LAYERTAB[ (int)Layer ]; while ( ScanRec != (rdsrec_list *)NULL ) { @@ -751,7 +751,7 @@ void GraalDelFigure() freerdsrec( DelRec, GRAAL_SIZE ); } - GraalFigureRds->LAYERTAB[ Layer ] = (rdsrec_list *)NULL; + GraalFigureRds->LAYERTAB[ (int)Layer ] = (rdsrec_list *)NULL; } ScanIns = GraalFigureRds->INSTANCE; @@ -763,7 +763,7 @@ void GraalDelFigure() for ( Layer = 0; Layer < RDS_MAX_LAYER; Layer++ ) { - ScanRec = GraalFigureRds->LAYERTAB[ Layer ]; + ScanRec = GraalFigureRds->LAYERTAB[ (int)Layer ]; while ( ScanRec != (rdsrec_list *)NULL ) { @@ -836,7 +836,7 @@ void GraalDelInstance( InstanceRds ) for ( Layer = 0; Layer < RDS_MAX_LAYER; Layer++ ) { - ScanRec = InstanceRds->LAYERTAB[ Layer ]; + ScanRec = InstanceRds->LAYERTAB[ (int)Layer ]; while( ScanRec != (rdsrec_list *)NULL ) { diff --git a/alliance/src/graal/src/GRM_peek.c b/alliance/src/graal/src/GRM_peek.c index 98565492..ea712ec7 100644 --- a/alliance/src/graal/src/GRM_peek.c +++ b/alliance/src/graal/src/GRM_peek.c @@ -49,6 +49,7 @@ # include "GRM.h" # include "GSB.h" # include "GRM_peek.h" +# include "GRM_window.h" /*------------------------------------------------------------\ | | @@ -151,7 +152,7 @@ void GraalDelPeek() for ( Layer = 0; Layer < RDS_ABOX; Layer++ ) { - Previous = &Instance->LAYERTAB[ Layer ]; + Previous = &Instance->LAYERTAB[ (int)Layer ]; ScanRec = *Previous; while( ScanRec != (rdsrec_list *)0 ) @@ -286,7 +287,7 @@ void GraalPeekInstance( Rectangle, LambdaX1, LambdaY1, LambdaX2, LambdaY2 ) for ( Layer = 0; Layer < RDS_MAX_LAYER; Layer++ ) { - ScanRec = FigureRds->LAYERTAB[ Layer ]; + ScanRec = FigureRds->LAYERTAB[ (int)Layer ]; while ( ScanRec != (rdsrec_list *)0 ) { @@ -306,8 +307,8 @@ void GraalPeekInstance( Rectangle, LambdaX1, LambdaY1, LambdaX2, LambdaY2 ) SetGraalPeek( DelRec ); ClearRdsFigRec( DelRec ); - DelRec->NEXT = TargetRds->LAYERTAB[ Layer ]; - TargetRds->LAYERTAB[ Layer ] = DelRec; + DelRec->NEXT = TargetRds->LAYERTAB[ (int)Layer ]; + TargetRds->LAYERTAB[ (int)Layer ] = DelRec; GRAAL_MBK( DelRec ) = (void *)SourceMbk; GRAAL_PREVIOUS( DelRec ) = (rdsrec_list **)TargetRds; @@ -330,7 +331,7 @@ void GraalPeekInstance( Rectangle, LambdaX1, LambdaY1, LambdaX2, LambdaY2 ) } } - FigureRds->LAYERTAB[ Layer ] = (rdsrec_list *)0; + FigureRds->LAYERTAB[ (int)Layer ] = (rdsrec_list *)0; } InstanceMbk = FigureMbk->PHINS; diff --git a/alliance/src/graal/src/GRM_select.h b/alliance/src/graal/src/GRM_select.h index fe35f283..7dd76415 100644 --- a/alliance/src/graal/src/GRM_select.h +++ b/alliance/src/graal/src/GRM_select.h @@ -67,4 +67,6 @@ | | \------------------------------------------------------------*/ +extern void GraalFreeSelect(); + # endif diff --git a/alliance/src/graal/src/GRM_window.c b/alliance/src/graal/src/GRM_window.c index 40126a25..8b5c13d0 100644 --- a/alliance/src/graal/src/GRM_window.c +++ b/alliance/src/graal/src/GRM_window.c @@ -102,6 +102,8 @@ graalwin *GraalAllocWinLayer( GraalWin ) (graalwinrec **)rdsallocblock( sizeof(graalwinrec *) * RDS_MAX_LAYER ); } + + return GraalWin; } /*------------------------------------------------------------\ @@ -280,7 +282,7 @@ void GraalEraseWindow() { for ( Layer = 0; Layer < RDS_MAX_LAYER; Layer++ ) { - ScanWinRec = ScanWin->LAYERTAB[ Layer ]; + ScanWinRec = ScanWin->LAYERTAB[ (int)Layer ]; while ( ScanWinRec != (graalwinrec *)NULL ) { @@ -380,31 +382,31 @@ void GraalInsertRectangle( Rectangle ) Layer = GetRdsLayer( Rectangle ); - WinRec = LinkWin->LAYERTAB[ Layer ]; + WinRec = LinkWin->LAYERTAB[ (int)Layer ]; if ( WinRec == (graalwinrec *)NULL ) { - WinRec = GraalAllocWinRec(); - LinkWin->LAYERTAB[ Layer ] = WinRec; - WinRec->RECTAB[ 0 ] = Rectangle; + WinRec = GraalAllocWinRec(); + LinkWin->LAYERTAB[ (int)Layer ] = WinRec; + WinRec->RECTAB[ 0 ] = Rectangle; } else { for ( Index = 0; Index < GRAAL_MAX_REC; Index++ ) { - if ( WinRec->RECTAB[ Index ] == (rdsrec_list *)NULL ) break; + if ( WinRec->RECTAB[ (int)Index ] == (rdsrec_list *)NULL ) break; } if ( Index == GRAAL_MAX_REC ) { - WinRec = GraalAllocWinRec(); - WinRec->NEXT = LinkWin->LAYERTAB[ Layer ]; - LinkWin->LAYERTAB[ Layer ] = WinRec; - WinRec->RECTAB[ 0 ] = Rectangle; + WinRec = GraalAllocWinRec(); + WinRec->NEXT = LinkWin->LAYERTAB[ (int)Layer ]; + LinkWin->LAYERTAB[ (int)Layer ] = WinRec; + WinRec->RECTAB[ 0 ] = Rectangle; } else { - WinRec->RECTAB[ Index ] = Rectangle; + WinRec->RECTAB[ (int)Index ] = Rectangle; } } @@ -461,7 +463,7 @@ void GraalEraseRectangle( Rectangle ) ScanWin = DelRecWin->WINDOW; Found = GRAAL_MAX_REC; - FirstWinRec = ScanWin->LAYERTAB[ Layer ]; + FirstWinRec = ScanWin->LAYERTAB[ (int)Layer ]; for ( ScanWinRec = FirstWinRec; ScanWinRec != (graalwinrec *)NULL; @@ -469,7 +471,7 @@ void GraalEraseRectangle( Rectangle ) { for ( Index = 0; Index < GRAAL_MAX_REC; Index++ ) { - if ( ScanWinRec->RECTAB[ Index ] == Rectangle ) + if ( ScanWinRec->RECTAB[ (int)Index ] == Rectangle ) { Found = Index; break; } @@ -480,27 +482,27 @@ void GraalEraseRectangle( Rectangle ) if ( ScanWinRec == FirstWinRec ) { - ScanWinRec->RECTAB[ Found ] = (rdsrec_list *)NULL; + ScanWinRec->RECTAB[ (int)Found ] = (rdsrec_list *)NULL; } else { for ( Index = 0; Index < GRAAL_MAX_REC; Index++ ) { - if ( FirstWinRec->RECTAB[ Index ] != (rdsrec_list *)NULL ) break; + if ( FirstWinRec->RECTAB[ (int)Index ] != (rdsrec_list *)NULL ) break; } - ScanWinRec->RECTAB[ Found ] = FirstWinRec->RECTAB[ Index ]; - FirstWinRec->RECTAB[ Index ] = (rdsrec_list *)NULL; + ScanWinRec->RECTAB[ (int)Found ] = FirstWinRec->RECTAB[ (int)Index ]; + FirstWinRec->RECTAB[ (int)Index ] = (rdsrec_list *)NULL; } for ( Index = 0; Index < GRAAL_MAX_REC; Index++ ) { - if ( FirstWinRec->RECTAB[ Index ] != (rdsrec_list *)NULL ) break; + if ( FirstWinRec->RECTAB[ (int)Index ] != (rdsrec_list *)NULL ) break; } if ( Index == GRAAL_MAX_REC ) { - ScanWin->LAYERTAB[ Layer ] = FirstWinRec->NEXT; + ScanWin->LAYERTAB[ (int)Layer ] = FirstWinRec->NEXT; GraalFreeWinRec( FirstWinRec ); } @@ -719,13 +721,13 @@ char GraalComputeBound() { for ( Layer = 0; Layer < RDS_MAX_LAYER; Layer++ ) { - for ( ScanWinRec = ScanWin->LAYERTAB[ Layer ]; + for ( ScanWinRec = ScanWin->LAYERTAB[ (int)Layer ]; ScanWinRec != (graalwinrec *)NULL; ScanWinRec = ScanWinRec->NEXT ) { for ( ScanRec = 0; ScanRec < GRAAL_MAX_REC ; ScanRec++ ) { - Rec = ScanWinRec->RECTAB[ ScanRec ]; + Rec = ScanWinRec->RECTAB[ (int)ScanRec ]; if ( ( Rec != (rdsrec_list *)NULL ) && ( ! IsGraalDeleted( Rec ) ) ) @@ -777,13 +779,13 @@ char GraalComputeBound() { for ( Layer = 0; Layer < RDS_MAX_LAYER; Layer++ ) { - for ( ScanWinRec = ScanWin->LAYERTAB[ Layer ]; + for ( ScanWinRec = ScanWin->LAYERTAB[ (int)Layer ]; ScanWinRec != (graalwinrec *)NULL; ScanWinRec = ScanWinRec->NEXT ) { for ( ScanRec = 0; ScanRec < GRAAL_MAX_REC ; ScanRec++ ) { - Rec = ScanWinRec->RECTAB[ ScanRec ]; + Rec = ScanWinRec->RECTAB[ (int)ScanRec ]; if ( ( Rec != (rdsrec_list *)NULL ) && ( ! IsGraalDeleted( Rec ) ) ) @@ -829,13 +831,13 @@ char GraalComputeBound() { for ( Layer = 0; Layer < RDS_MAX_LAYER; Layer++ ) { - for ( ScanWinRec = ScanWin->LAYERTAB[ Layer ]; + for ( ScanWinRec = ScanWin->LAYERTAB[ (int)Layer ]; ScanWinRec != (graalwinrec *)NULL; ScanWinRec = ScanWinRec->NEXT ) { for ( ScanRec = 0; ScanRec < GRAAL_MAX_REC ; ScanRec++ ) { - Rec = ScanWinRec->RECTAB[ ScanRec ]; + Rec = ScanWinRec->RECTAB[ (int)ScanRec ]; if ( ( Rec != (rdsrec_list *)NULL ) && ( ! IsGraalDeleted( Rec ) ) ) @@ -881,13 +883,13 @@ char GraalComputeBound() { for ( Layer = 0; Layer < RDS_MAX_LAYER; Layer++ ) { - for ( ScanWinRec = ScanWin->LAYERTAB[ Layer ]; + for ( ScanWinRec = ScanWin->LAYERTAB[ (int)Layer ]; ScanWinRec != (graalwinrec *)NULL; ScanWinRec = ScanWinRec->NEXT ) { for ( ScanRec = 0; ScanRec < GRAAL_MAX_REC ; ScanRec++ ) { - Rec = ScanWinRec->RECTAB[ ScanRec ]; + Rec = ScanWinRec->RECTAB[ (int)ScanRec ]; if ( ( Rec != (rdsrec_list *)NULL ) && ( ! IsGraalDeleted( Rec ) ) ) diff --git a/alliance/src/graal/src/GSB_error.h b/alliance/src/graal/src/GSB_error.h index 428c63ff..9db42889 100644 --- a/alliance/src/graal/src/GSB_error.h +++ b/alliance/src/graal/src/GSB_error.h @@ -85,4 +85,6 @@ | | \------------------------------------------------------------*/ +extern void GsbError(); + # endif diff --git a/alliance/src/graal/src/GSB_parse.c b/alliance/src/graal/src/GSB_parse.c index b9785c11..98d21537 100644 --- a/alliance/src/graal/src/GSB_parse.c +++ b/alliance/src/graal/src/GSB_parse.c @@ -328,7 +328,7 @@ char *GsbFileGetString( String, Size ) int Size; { register char *RegisterString; - register Register; + register int Register = 0; rdsbegin(); @@ -391,7 +391,7 @@ void GsbGetLine( Buffer ) GsbError( UNEXPECTED_EOF, (char *)NULL, GsbCurrentLine ); } - if ( String = strchr( Buffer, GSB_COMMENT_CHAR )) + if ( (String = strchr( Buffer, GSB_COMMENT_CHAR )) ) { if ( String == Buffer ) { @@ -455,7 +455,7 @@ char *GsbGetFirstWord( Buffer, IsKeyword, Hash ) rdsbegin(); - if ( String = (char *)strtok( Buffer, GSB_SEPARATORS_STRING )) + if ( (String = (char *)strtok( Buffer, GSB_SEPARATORS_STRING )) ) { if ( Hash ) { @@ -500,7 +500,7 @@ char *GsbGetNextWord( IsKeyword, Hash ) rdsbegin(); - if ( String = (char *)strtok( (char *)NULL, GSB_SEPARATORS_STRING )) + if ( (String = (char *)strtok( (char *)NULL, GSB_SEPARATORS_STRING )) ) { if ( Hash ) { @@ -617,7 +617,7 @@ long GsbGetNumber( String ) rdsbegin(); - if ( ! sscanf( String, "%d", &Value )) + if ( ! sscanf( String, "%22ld", &Value )) { GsbError( UNEXPECTED_LINE, "number", GsbCurrentLine ); } @@ -674,7 +674,7 @@ void GsbReadSegmentName() if ( GET_SEGMENT_LAYER( Layer, 0 ) != RDS_SEGMENT_EMPTY ) { - GRAAL_SEGMENT_NAME_TABLE [ Layer ][ Field ] = FirstWord; + GRAAL_SEGMENT_NAME_TABLE [ (int)Layer ][ (int)Field ] = FirstWord; } } @@ -744,7 +744,7 @@ void GsbReadTransistorName() else if ( GET_SEGMENT_LAYER( Layer, 0 ) != RDS_SEGMENT_EMPTY ) { - GRAAL_TRANSISTOR_NAME_TABLE [ Layer ][ Field ] = FirstWord; + GRAAL_TRANSISTOR_NAME_TABLE [ (int)Layer ][ (int)Field ] = FirstWord; } } @@ -814,7 +814,7 @@ void GsbReadConnectorName() else if ( GET_SEGMENT_LAYER( Layer, 0 ) != RDS_SEGMENT_EMPTY ) { - GRAAL_CONNECTOR_NAME_TABLE [ Layer ][ Field ] = FirstWord; + GRAAL_CONNECTOR_NAME_TABLE [ (int)Layer ][ (int)Field ] = FirstWord; } } @@ -884,7 +884,7 @@ void GsbReadSegmentValue() else if ( GET_SEGMENT_LAYER( Layer, 0 ) != RDS_SEGMENT_EMPTY ) { - GRAAL_SEGMENT_VALUE_TABLE [ Layer ][ Field ] = GsbGetStringFloat( FirstWord ); + GRAAL_SEGMENT_VALUE_TABLE [ (int)Layer ][ (int)Field ] = GsbGetStringFloat( FirstWord ); } } @@ -917,7 +917,6 @@ void GsbReadBigViaValue() { char Layer; - char Field; char LayerCount; char EndTable; char *FirstWord; @@ -953,7 +952,7 @@ void GsbReadBigViaValue() if ( ( GET_BIGVIA_HOLE_LAYER( Layer, 0 ) != RDS_BIGVIA_HOLE_EMPTY ) || ( GET_TURNVIA_LAYER( Layer, 0 ) != RDS_TURNVIA_EMPTY ) ) { - GRAAL_BIGVIA_VALUE_TABLE [ Layer ][ 0 ] = GsbGetStringFloat( FirstWord ); + GRAAL_BIGVIA_VALUE_TABLE [ (int)Layer ][ 0 ] = GsbGetStringFloat( FirstWord ); } FirstWord = GsbGetNextWord( 0, 1 ); @@ -1022,7 +1021,7 @@ void GsbReadReferenceName() else if ( GET_REFERENCE_LAYER( Layer, 0 ) != RDS_REFERENCE_EMPTY ) { - GRAAL_REFERENCE_NAME_TABLE [ Layer ][ Field ] = FirstWord; + GRAAL_REFERENCE_NAME_TABLE [ (int)Layer ][ (int)Field ] = FirstWord; } } @@ -1091,7 +1090,7 @@ void GsbReadOrientName() } else { - GRAAL_ORIENT_NAME_TABLE [ Layer ][ Field ] = FirstWord; + GRAAL_ORIENT_NAME_TABLE [ (int)Layer ][ (int)Field ] = FirstWord; } } @@ -1160,7 +1159,7 @@ void GsbReadSymmetryName() } else { - GRAAL_SYMMETRY_NAME_TABLE [ Layer ][ Field ] = FirstWord; + GRAAL_SYMMETRY_NAME_TABLE [ (int)Layer ][ (int)Field ] = FirstWord; } } @@ -1231,7 +1230,7 @@ void GsbReadBigViaName() if ( ( GET_BIGVIA_HOLE_LAYER( Layer, 0 ) != RDS_BIGVIA_HOLE_EMPTY ) || ( GET_TURNVIA_LAYER( Layer, 0 ) != RDS_TURNVIA_EMPTY ) ) { - GRAAL_BIGVIA_NAME_TABLE [ Layer ][ Field ] = FirstWord; + GRAAL_BIGVIA_NAME_TABLE [ (int)Layer ][ (int)Field ] = FirstWord; } } @@ -1301,7 +1300,7 @@ void GsbReadViaName() else if ( GET_VIA_LAYER( Layer, 0 ) != RDS_VIA_EMPTY ) { - GRAAL_VIA_NAME_TABLE [ Layer ][ Field ] = FirstWord; + GRAAL_VIA_NAME_TABLE [ (int)Layer ][ (int)Field ] = FirstWord; } } @@ -1370,9 +1369,9 @@ void GsbReadRdsLayerName() GsbError( MISSING_VALUE, (char *)NULL, GsbCurrentLine ); } else - if ( RDS_DYNAMIC_LAYER[ Layer ] != RDS_LAYER_UNUSED ) + if ( RDS_DYNAMIC_LAYER[ (int)Layer ] != RDS_LAYER_UNUSED ) { - GRAAL_RDS_LAYER_NAME_TABLE [ Layer ][ Field ] = FirstWord; + GRAAL_RDS_LAYER_NAME_TABLE [ (int)Layer ][ (int)Field ] = FirstWord; } } @@ -1382,9 +1381,9 @@ void GsbReadRdsLayerName() { Pattern = GsbGetStringValue( FirstWord ); - if ( RDS_DYNAMIC_LAYER[ Layer ] != RDS_LAYER_UNUSED ) + if ( RDS_DYNAMIC_LAYER[ (int)Layer ] != RDS_LAYER_UNUSED ) { - GRAAL_RDS_LAYER_PATTERN_TABLE[ Layer ] = (int)Pattern; + GRAAL_RDS_LAYER_PATTERN_TABLE[ (int)Layer ] = (int)Pattern; } FirstWord = GsbGetNextWord( 0, 1 ); @@ -1666,62 +1665,62 @@ void GraalLoadParameters() for ( Layer = 0; Layer < MBK_MAX_LAYER; Layer++ ) { - GRAAL_CONNECTOR_NAME_TABLE[ Layer ][0] = (char *)NULL;; - GRAAL_CONNECTOR_NAME_TABLE[ Layer ][1] = (char *)NULL; - GRAAL_CONNECTOR_NAME_TABLE[ Layer ][2] = (char *)NULL; + GRAAL_CONNECTOR_NAME_TABLE[ (int)Layer ][0] = (char *)NULL;; + GRAAL_CONNECTOR_NAME_TABLE[ (int)Layer ][1] = (char *)NULL; + GRAAL_CONNECTOR_NAME_TABLE[ (int)Layer ][2] = (char *)NULL; - GRAAL_SEGMENT_NAME_TABLE[ Layer ][0] = (char *)NULL;; - GRAAL_SEGMENT_NAME_TABLE[ Layer ][1] = (char *)NULL; - GRAAL_SEGMENT_NAME_TABLE[ Layer ][2] = (char *)NULL; + GRAAL_SEGMENT_NAME_TABLE[ (int)Layer ][0] = (char *)NULL;; + GRAAL_SEGMENT_NAME_TABLE[ (int)Layer ][1] = (char *)NULL; + GRAAL_SEGMENT_NAME_TABLE[ (int)Layer ][2] = (char *)NULL; - GRAAL_TRANSISTOR_NAME_TABLE[ Layer ][0] = (char *)NULL;; - GRAAL_TRANSISTOR_NAME_TABLE[ Layer ][1] = (char *)NULL; - GRAAL_TRANSISTOR_NAME_TABLE[ Layer ][2] = (char *)NULL; + GRAAL_TRANSISTOR_NAME_TABLE[ (int)Layer ][0] = (char *)NULL;; + GRAAL_TRANSISTOR_NAME_TABLE[ (int)Layer ][1] = (char *)NULL; + GRAAL_TRANSISTOR_NAME_TABLE[ (int)Layer ][2] = (char *)NULL; - GRAAL_SEGMENT_VALUE_TABLE[ Layer ][0] = 0; - GRAAL_SEGMENT_VALUE_TABLE[ Layer ][1] = 0; + GRAAL_SEGMENT_VALUE_TABLE[ (int)Layer ][0] = 0; + GRAAL_SEGMENT_VALUE_TABLE[ (int)Layer ][1] = 0; } for ( Layer = 0; Layer < MBK_MAX_VIA; Layer++ ) { - GRAAL_VIA_NAME_TABLE[ Layer ][0] = (char *)NULL;; - GRAAL_VIA_NAME_TABLE[ Layer ][1] = (char *)NULL; - GRAAL_VIA_NAME_TABLE[ Layer ][2] = (char *)NULL; + GRAAL_VIA_NAME_TABLE[ (int)Layer ][0] = (char *)NULL;; + GRAAL_VIA_NAME_TABLE[ (int)Layer ][1] = (char *)NULL; + GRAAL_VIA_NAME_TABLE[ (int)Layer ][2] = (char *)NULL; - GRAAL_BIGVIA_NAME_TABLE[ Layer ][0] = (char *)NULL;; - GRAAL_BIGVIA_NAME_TABLE[ Layer ][1] = (char *)NULL; - GRAAL_BIGVIA_NAME_TABLE[ Layer ][2] = (char *)NULL; + GRAAL_BIGVIA_NAME_TABLE[ (int)Layer ][0] = (char *)NULL;; + GRAAL_BIGVIA_NAME_TABLE[ (int)Layer ][1] = (char *)NULL; + GRAAL_BIGVIA_NAME_TABLE[ (int)Layer ][2] = (char *)NULL; - GRAAL_BIGVIA_VALUE_TABLE[ Layer ][0] = 0; + GRAAL_BIGVIA_VALUE_TABLE[ (int)Layer ][0] = 0; } for ( Layer = 0; Layer < MBK_MAX_REFERENCE; Layer++ ) { - GRAAL_REFERENCE_NAME_TABLE[ Layer ][0] = (char *)NULL;; - GRAAL_REFERENCE_NAME_TABLE[ Layer ][1] = (char *)NULL; - GRAAL_REFERENCE_NAME_TABLE[ Layer ][2] = (char *)NULL; + GRAAL_REFERENCE_NAME_TABLE[ (int)Layer ][0] = (char *)NULL;; + GRAAL_REFERENCE_NAME_TABLE[ (int)Layer ][1] = (char *)NULL; + GRAAL_REFERENCE_NAME_TABLE[ (int)Layer ][2] = (char *)NULL; } for ( Layer = 0; Layer < RDS_ALL_LAYER; Layer++ ) { - GRAAL_RDS_LAYER_NAME_TABLE[ Layer ][0] = (char *)NULL;; - GRAAL_RDS_LAYER_NAME_TABLE[ Layer ][1] = (char *)NULL; - GRAAL_RDS_LAYER_NAME_TABLE[ Layer ][2] = (char *)NULL; - GRAAL_RDS_LAYER_PATTERN_TABLE[ Layer ] = -1; + GRAAL_RDS_LAYER_NAME_TABLE[ (int)Layer ][0] = (char *)NULL;; + GRAAL_RDS_LAYER_NAME_TABLE[ (int)Layer ][1] = (char *)NULL; + GRAAL_RDS_LAYER_NAME_TABLE[ (int)Layer ][2] = (char *)NULL; + GRAAL_RDS_LAYER_PATTERN_TABLE[ (int)Layer ] = -1; } for ( Layer = 0; Layer < MBK_MAX_SYMMETRY; Layer++ ) { - GRAAL_SYMMETRY_NAME_TABLE[ Layer ][0] = (char *)NULL;; - GRAAL_SYMMETRY_NAME_TABLE[ Layer ][1] = (char *)NULL; - GRAAL_SYMMETRY_NAME_TABLE[ Layer ][2] = (char *)NULL; + GRAAL_SYMMETRY_NAME_TABLE[ (int)Layer ][0] = (char *)NULL;; + GRAAL_SYMMETRY_NAME_TABLE[ (int)Layer ][1] = (char *)NULL; + GRAAL_SYMMETRY_NAME_TABLE[ (int)Layer ][2] = (char *)NULL; } for ( Layer = 0; Layer < MBK_MAX_ORIENT; Layer++ ) { - GRAAL_ORIENT_NAME_TABLE[ Layer ][0] = (char *)NULL;; - GRAAL_ORIENT_NAME_TABLE[ Layer ][1] = (char *)NULL; - GRAAL_ORIENT_NAME_TABLE[ Layer ][2] = (char *)NULL; + GRAAL_ORIENT_NAME_TABLE[ (int)Layer ][0] = (char *)NULL;; + GRAAL_ORIENT_NAME_TABLE[ (int)Layer ][1] = (char *)NULL; + GRAAL_ORIENT_NAME_TABLE[ (int)Layer ][2] = (char *)NULL; } GRAAL_PEEK_BOUND = 0; diff --git a/alliance/src/graal/src/GSB_share.c b/alliance/src/graal/src/GSB_share.c index 9cf9bc1b..9084d458 100644 --- a/alliance/src/graal/src/GSB_share.c +++ b/alliance/src/graal/src/GSB_share.c @@ -415,7 +415,7 @@ void Graalenv() } Buffer = rdsallocblock( strlen( WORK_LIB ) + 32 ); - sprintf( Buffer, "%s/_ludo_%ld", WORK_LIB, getpid() ); + sprintf( Buffer, "%s/_ludo_%u", WORK_LIB, getpid() ); File = fopen( Buffer, "w" ); diff --git a/alliance/src/graal/src/GTB_cursor.c b/alliance/src/graal/src/GTB_cursor.c index d50d1e79..d3a902e9 100644 --- a/alliance/src/graal/src/GTB_cursor.c +++ b/alliance/src/graal/src/GTB_cursor.c @@ -46,6 +46,7 @@ # include # include # include +# include # include "mut.h" # include "rds.h" # include "GTB.h" @@ -121,9 +122,9 @@ void GraalSetMouseCursor( MainWidget, CursorType ) DisplayId = XtDisplay( MainWidget ); MainWindow = XtWindow( MainWidget ); - Type = GraalMouseCursorArray[ CursorType ].CURSOR; + Type = GraalMouseCursorArray[ (int)CursorType ].CURSOR; - if ( GraalMouseCursorArray[ CursorType ].MAKE == True ) + if ( GraalMouseCursorArray[ (int)CursorType ].MAKE == True ) { if ( Type != 0 ) { @@ -159,8 +160,8 @@ void GraalSetMouseCursor( MainWidget, CursorType ) &Black, &White, 0, 0 ); } - GraalMouseCursorArray[ CursorType ].CURSOR = NewCursor; - GraalMouseCursorArray[ CursorType ].MAKE = False; + GraalMouseCursorArray[ (int)CursorType ].CURSOR = NewCursor; + GraalMouseCursorArray[ (int)CursorType ].MAKE = False; Type = NewCursor; } diff --git a/alliance/src/graal/src/GTB_dialog.c b/alliance/src/graal/src/GTB_dialog.c index 331b1721..2a77c2ed 100644 --- a/alliance/src/graal/src/GTB_dialog.c +++ b/alliance/src/graal/src/GTB_dialog.c @@ -49,9 +49,11 @@ # include # include +# include "mph.h" # include "mut.h" # include "rds.h" # include "GTB.h" +# include "GRM.h" # include "GTB_dialog.h" /*------------------------------------------------------------\ @@ -70,7 +72,7 @@ | | \------------------------------------------------------------*/ - static GraalLockLoop = 0; + static int GraalLockLoop = 0; static GraalDialogItem GraalWarningDialog = diff --git a/alliance/src/graal/src/graal.c b/alliance/src/graal/src/graal.c index 9ad8a1ae..f48fd06e 100644 --- a/alliance/src/graal/src/graal.c +++ b/alliance/src/graal/src/graal.c @@ -54,9 +54,12 @@ # include "rpr.h" # include "rwi.h" # include "rut.h" +# include "rtl.h" # include "GSB.h" # include "GRM.h" # include "GMX.h" +# include "GRM_window.h" +# include "GRM_error.h" # include "graal.h" @@ -179,14 +182,14 @@ int main( argc, argv ) if ( WindowInfo ) { fprintf( stdout, "\nGraal window\n" ); - fprintf( stdout, "\n XMIN : %d" , GraalWindowXmin / GRAAL_RDS_LAMBDA ); - fprintf( stdout, "\n XMAX : %d" , GraalWindowXmax / GRAAL_RDS_LAMBDA ); - fprintf( stdout, "\n YMIN : %d" , GraalWindowYmin / GRAAL_RDS_LAMBDA ); - fprintf( stdout, "\n YMAX : %d" , GraalWindowYmax / GRAAL_RDS_LAMBDA ); - fprintf( stdout, "\n SIDE : %d" , GraalWindowSide / GRAAL_RDS_LAMBDA ); - fprintf( stdout, "\n DX : %d" , GraalWindowDx ); - fprintf( stdout, "\n DY : %d" , GraalWindowDy ); - fprintf( stdout, "\n SIZE : %d\n", GraalWindowSize ); + fprintf( stdout, "\n XMIN : %ld" , GraalWindowXmin / GRAAL_RDS_LAMBDA ); + fprintf( stdout, "\n XMAX : %ld" , GraalWindowXmax / GRAAL_RDS_LAMBDA ); + fprintf( stdout, "\n YMIN : %ld" , GraalWindowYmin / GRAAL_RDS_LAMBDA ); + fprintf( stdout, "\n YMAX : %ld" , GraalWindowYmax / GRAAL_RDS_LAMBDA ); + fprintf( stdout, "\n SIDE : %ld" , GraalWindowSide / GRAAL_RDS_LAMBDA ); + fprintf( stdout, "\n DX : %ld" , GraalWindowDx ); + fprintf( stdout, "\n DY : %ld" , GraalWindowDy ); + fprintf( stdout, "\n SIZE : %ld\n", GraalWindowSize ); } GraalInitializeCutCxTable(); diff --git a/alliance/src/l2p/src/drive_ps.c b/alliance/src/l2p/src/drive_ps.c index bc46deec..20ff34c0 100644 --- a/alliance/src/l2p/src/drive_ps.c +++ b/alliance/src/l2p/src/drive_ps.c @@ -117,7 +117,7 @@ long *X, *Y, *dX, *dY; rdsins_list *Instance; int Layer; long X1, Y1, X2, Y2; - long XMinRds, YMinRds, XMaxRds, YMaxRds; + long XMinRds = 0, YMinRds = 0, XMaxRds = 0, YMaxRds = 0; long MaskCounter; short ComputeBound; @@ -204,8 +204,8 @@ char *s; }; } -extern rps_print_dict_color (); -extern rps_print_dict_bw (); +extern void rps_print_dict_color (); +extern void rps_print_dict_bw (); /* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */ void rps_put_psdict (pg) rps_pge *pg; @@ -267,7 +267,9 @@ rps_pge *pg; rps_put (pg, "/Helvetica findfont 10 scalefont setfont\n"); sprintf (buf, "( %dx%d pages total)", p.nbx_pages, p.nby_pages); - sprintf (buf, "%sshow\n", buf); + char tmp[512]; + sprintf (tmp, "%sshow\n", buf); + strcpy(buf, tmp); rps_put (pg, buf); }; }; @@ -280,6 +282,7 @@ rps_par *p; double topsw, topsh; char fname[256]; char buf[512]; + char tmp[512]; rps_pge *pg; /* On calcule l'echelle */ @@ -375,8 +378,8 @@ rps_par *p; pg->ps_x, pg->ps_y, pg->ps_x+pg->ps_w, pg->ps_y+pg->ps_h); rps_put (pg, buf); - sprintf (buf, "%%%%Creator: Rps v%s", VERSION); - sprintf (buf, "%s with%s\n", buf, p->cmdline); + sprintf (tmp, "%%%%Creator: Rps v%s", VERSION); + sprintf (buf, "%s with%s\n", tmp, p->cmdline); rps_put (pg, buf); sprintf (buf, "%%SCALE=%f\n", p->tops); rps_put (pg, buf); @@ -449,8 +452,8 @@ rps_par *p; pg->ps_x, pg->ps_y, pg->ps_x+pg->ps_w, pg->ps_y+pg->ps_h); rps_put (pg, buf); - sprintf (buf, "%%%%Creator: Rps v%s", VERSION); - sprintf (buf, "%s with%s\n", buf, p->cmdline); + sprintf (tmp, "%%%%Creator: Rps v%s", VERSION); + sprintf (buf, "%s with%s\n", tmp, p->cmdline); rps_put (pg, buf); sprintf (buf, "%%SCALE=%f\n", p->tops); rps_put (pg, buf); @@ -558,8 +561,8 @@ rdsrec_list *r; ay += p.rds_dy; if ((ax < p.rds_x) || (ay < p.rds_y) || (aw > p.rds_w) || (ah > p.rds_h)) { - sprintf (p.err, "(%d, %d, %d, %d) is", ax, ay, aw, ah); - sprintf (p.err, "%s out of boundingbox:(%d, %d, %d, %d)", + sprintf (p.err, "(%ld, %ld, %ld, %ld) is", ax, ay, aw, ah); + sprintf (p.err, "%s out of boundingbox:(%ld, %ld, %ld, %ld)", p.err, p.rds_x, p.rds_y, p.rds_w, p.rds_h); rps_error (E_OUTBOX, p.err); } diff --git a/alliance/src/l2p/src/l2p.c b/alliance/src/l2p/src/l2p.c index d6d4794c..fcaf65b2 100644 --- a/alliance/src/l2p/src/l2p.c +++ b/alliance/src/l2p/src/l2p.c @@ -57,6 +57,8 @@ #include "rfm.h" extern void rps_print_man (); +extern void rps_print_dict_bw (); +extern void rps_print_dict_color (); extern struct rps_param p; /* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */ @@ -254,7 +256,7 @@ struct rps_param *param; continue; }; if (!strncmp(argv[a], "-pages=", 7)) { - if (sscanf (&(argv[a][7]),"%ldx%ld", + if (sscanf (&(argv[a][7]),"%dx%d", ¶m->nbx_pages, ¶m->nby_pages) != 2) { print_usage (argv[0]); diff --git a/alliance/src/l2p/src/tmp_dict.c b/alliance/src/l2p/src/tmp_dict.c index 451038ae..9bcf15ad 100644 --- a/alliance/src/l2p/src/tmp_dict.c +++ b/alliance/src/l2p/src/tmp_dict.c @@ -1,4 +1,4 @@ -extern rps_put(); +extern void rps_put(); void rps_print_dict_bw (pg) void *pg; { diff --git a/alliance/src/l2p/src/tmp_man.c b/alliance/src/l2p/src/tmp_man.c index 86f5a855..46bab05d 100644 --- a/alliance/src/l2p/src/tmp_man.c +++ b/alliance/src/l2p/src/tmp_man.c @@ -1,4 +1,5 @@ -void puts (); +#include + void rps_print_man () { puts (""); puts (""); diff --git a/alliance/src/log/src/log_bdd0.c b/alliance/src/log/src/log_bdd0.c index ebc2cb43..68eb9d2a 100644 --- a/alliance/src/log/src/log_bdd0.c +++ b/alliance/src/log/src/log_bdd0.c @@ -69,7 +69,7 @@ initVertexBdd (index, high, low) pNode pt; - if ((pt = searchTableBdd (sysBdd.pRT, index, high, low)) != NULL) + if ((pt = searchTableBdd (sysBdd.pRT, index, high, low)) != NULL) { if (pt != BDDTABLE_PLEINE) return (pt); else @@ -77,6 +77,7 @@ initVertexBdd (index, high, low) sysBdd.pRT = reAllocTableBdd (sysBdd.pRT); return (initVertexBdd (index, high, low)); } + } if (high == low) /* noeud eliminable */ return (high); @@ -696,9 +697,9 @@ displayGraphicBdd (pBdd) for (i = pBdd->index; i > 1; i--) { if (i < 10) - printf (" %d | ", i); + printf (" %ld | ", i); else - printf (" %d | ", i); + printf (" %ld | ", i); lst = supp; while (lst) { @@ -710,7 +711,7 @@ displayGraphicBdd (pBdd) long numHigh = searchTH (vTable, (char *) pt->high); long num = searchTH (vTable, (char *)pt); - printf (" %d_(%d)_%d ", numLow, num, numHigh); + printf (" %ld_(%ld)_%ld ", numLow, num, numHigh); } lst = lst->NEXT; } @@ -812,7 +813,7 @@ applyTerm (oper, index, pBdd) { /* noeud one */ - if (index == 1) + if (index == 1) { if (oper == OR) return (one); else if (oper == NAND || oper == XOR) @@ -821,6 +822,7 @@ applyTerm (oper, index, pBdd) return (pBdd); else return (zero); + } /* noeud zero */ @@ -853,7 +855,7 @@ applyBinBdd (oper, pBdd1, pBdd2) short index1 = pBdd1->index; short index2 = pBdd2->index; - if ((index1 < 2) || (index2 < 2)) /* il existe un noeud terminal */ + if ((index1 < 2) || (index2 < 2)) { /* il existe un noeud terminal */ if ((index1 < 2) && (index2 < 2)) /* tous les deux sont terminaux */ if (index1 != index2) /* 01 ou 10 */ @@ -875,6 +877,7 @@ applyBinBdd (oper, pBdd1, pBdd2) return (applyTerm (oper, index1, pBdd2)); else return (applyTerm (oper, index2, pBdd1)); + } /* les index ne correspondent pas a des noeuds terminaux */ @@ -1733,7 +1736,7 @@ initVertexBddAux (index, high, low, sysCible) pNode pt; - if ((pt = searchTableBdd (sysCible->pRT, index, high, low)) != NULL) + if ((pt = searchTableBdd (sysCible->pRT, index, high, low)) != NULL) { if (pt != BDDTABLE_PLEINE) return (pt); else @@ -1741,6 +1744,7 @@ initVertexBddAux (index, high, low, sysCible) sysCible->pRT = reAllocTableBdd (sysCible->pRT); return (initVertexBddAux (index, high, low, sysCible)); } + } if (high == low) { diff --git a/alliance/src/log/src/log_bdd1.c b/alliance/src/log/src/log_bdd1.c index 1d1771f2..535b809e 100644 --- a/alliance/src/log/src/log_bdd1.c +++ b/alliance/src/log/src/log_bdd1.c @@ -40,6 +40,7 @@ #include #include +#include #include "mut.h" #include "log.h" @@ -326,7 +327,7 @@ displayCct (pC, mode) for (i = 0; i < (pC->pTI)->length; i++) { if (pEl->value != EMPTYTH && pEl->value != DELETETH) - printf ("INPUT = %s INDEX = %d\n", pEl->key, pEl->value); + printf ("INPUT = %s INDEX = %ld\n", pEl->key, pEl->value); pEl++; } printf ("\n------------- NUMBER OF INPUTS : %d\n\n", (pC->countI) - 2); @@ -346,7 +347,7 @@ displayCct (pC, mode) printf ("OUTPUT = %s", pEl->key); if (mode == 0) { - printf (" BDD = %d\n", pEl->value); + printf (" BDD = %ld\n", pEl->value); displayBddName (TRUE, (pNode)pEl->value, pC->pNameI); } else diff --git a/alliance/src/log/src/log_prefbib.c b/alliance/src/log/src/log_prefbib.c index 175ea9b6..da550344 100644 --- a/alliance/src/log/src/log_prefbib.c +++ b/alliance/src/log/src/log_prefbib.c @@ -65,8 +65,8 @@ gensym_abl (name, num) char *ret; name1 = (char *) mbkalloc (strlen (name) + 5); - (void *) strcpy (name1, name); - sprintf (number, "%d", num); + (void) strcpy (name1, name); + sprintf (number, "%ld", num); strcat (name1, number); ret = namealloc (name1); mbkfree (name1); @@ -357,7 +357,7 @@ displayExprInt (expr) } else { - printf ("\ndisplayExpr : error - unknown operator %d\n", oper); + printf ("\ndisplayExpr : error - unknown operator %ld\n", oper); exit (-1); } } @@ -569,7 +569,7 @@ identExprInt (expr, chaine, taille) } if (oper != NOT) { - sprintf (arite, "%d", lengthExpr (expr1)); + sprintf (arite, "%ld", lengthExpr (expr1)); strcat (chaine, arite); } return (chaine); @@ -847,11 +847,12 @@ long equalExpr (expr1, expr2) chain_list *expr1, *expr2; { - if (ATOM (expr1)) + if (ATOM (expr1)) { if (ATOM (expr2) && (CAR (expr1) == CAR (expr2))) return 1; else return 0; + } if (ATOM (expr2)) return 0; else @@ -1504,10 +1505,12 @@ funcNormExpr (expr) if (ATOM (expr)) return ((long) VALUE_ATOM (expr)); else if (OPER (expr) == NOT) + { if (ATOM (CADR (expr))) return (NOT * 100 + 10); else return (NOT * 100 + OPER (CADR (expr))); + } return OPER (expr) * 100 + lengthExpr (expr); } @@ -1551,7 +1554,7 @@ deleteNumExpr (expr, i) if (lengthExpr (expr) <= i) { - printf ("deleteNumExpr : error - index %d out of bound for \n", i); + printf ("deleteNumExpr : error - index %ld out of bound for \n", i); displayExpr (e); exit (-1); } @@ -1596,7 +1599,7 @@ searchNumExpr (expr, i) co++; } - printf ("\nsearchNumExpr : error - index %d out of bound for \n", i); + printf ("\nsearchNumExpr : error - index %ld out of bound for \n", i); displayExpr (e); exit (-1); } @@ -1804,15 +1807,19 @@ simplif10Expr (expr) if ((oper == AND) || (oper == NOR)) return createAtom ("'1'"); if (oper == XOR) + { if ((cpt1 % 2) == 1) return createAtom ("'1'"); else return createAtom ("'0'"); + } if (oper == NXOR) + { if ((cpt1 % 2) == 1) return createAtom ("'0'"); else return createAtom ("'1'"); + } } /* traitement 1 seul argument */ @@ -1824,6 +1831,7 @@ simplif10Expr (expr) return auxExpr; } if (oper == XOR) + { if ((cpt1 % 2) == 1) { changeOperExpr (auxExpr, NOT); @@ -1831,7 +1839,9 @@ simplif10Expr (expr) } else return CADR (auxExpr); + } if (oper == NXOR) + { if ((cpt1 % 2) == 1) return CADR (auxExpr); else @@ -1839,6 +1849,7 @@ simplif10Expr (expr) changeOperExpr (auxExpr, NOT); return auxExpr; } + } } printf ("## ERROR in simplif10Expr, %s.%d\n", basename(__FILE__), __LINE__); diff --git a/alliance/src/log/src/log_thash.c b/alliance/src/log/src/log_thash.c index f4962327..d28d96b0 100644 --- a/alliance/src/log/src/log_thash.c +++ b/alliance/src/log/src/log_thash.c @@ -340,15 +340,15 @@ displayTH (pTable) pElemTH pEl; pEl = pTable->pElem; printf ("================== DISPLAYTH ================\n"); - printf ("length = %d\t count = %d\n", pTable->length, pTable->count); + printf ("length = %ld\t count = %ld\n", pTable->length, pTable->count); printf ("=============================================\n"); for (i = 0; i < pTable->length; i++) { if (pEl->value != EMPTYTH && pEl->value != DELETETH) { - printf ("index %d\t", i); + printf ("index %ld\t", i); printf ("key %s\t", pEl->key); - printf ("value %d \n", pEl->value); + printf ("value %ld \n", pEl->value); } pEl++; } diff --git a/alliance/src/log/src/log_thashbdd.c b/alliance/src/log/src/log_thashbdd.c index cc7e073d..fed2ef6b 100644 --- a/alliance/src/log/src/log_thashbdd.c +++ b/alliance/src/log/src/log_thashbdd.c @@ -342,11 +342,11 @@ displayHashBdd (pTab) if (*pBdd != NULL && *pBdd != BDDDELETE) { co++; - printf ("****** indice %d ****** \n", i); + printf ("****** indice %ld ****** \n", i); displayBdd (*pBdd , FALSE); printf ("\n"); } pBdd++; } - printf ("\n****** Nombre de noeuds dans la table = %d\n", co); + printf ("\n****** Nombre de noeuds dans la table = %ld\n", co); } diff --git a/alliance/src/log/src/log_thashloc.c b/alliance/src/log/src/log_thashloc.c index 98f26b43..236af477 100644 --- a/alliance/src/log/src/log_thashloc.c +++ b/alliance/src/log/src/log_thashloc.c @@ -209,7 +209,7 @@ displayLoc (pTab) { co++; printf ("****** indice %ld ****** \n", i); - printf ("HIGH %d LOW %ld FATHER %ld\n", (long) pLoc[i].high, (long) pLoc[i].low, (long) pLoc[i].father); + printf ("HIGH %ld LOW %ld FATHER %ld\n", (long) pLoc[i].high, (long) pLoc[i].low, (long) pLoc[i].father); printf ("\n"); } } diff --git a/alliance/src/loon/src/lon_lib_negativ.c b/alliance/src/loon/src/lon_lib_negativ.c index 5c59a3c1..ca95e9e5 100644 --- a/alliance/src/loon/src/lon_lib_negativ.c +++ b/alliance/src/loon/src/lon_lib_negativ.c @@ -30,6 +30,7 @@ #include +#include #include #include #include "lon_lib_negativ.h" @@ -61,39 +62,39 @@ extern chain_list* inv_oper(chain_list* abl, int negativ) switch (ABL_OPER(abl)) { case ABL_AND: - if (negativ) ABL_OPER_L(abl)=ABL_NAND; - else ABL_OPER_L(abl)=ABL_NOR; - negativ=!negativ; - break; + if (negativ) ABL_OPER_L(abl)=(void*)ABL_NAND; + else ABL_OPER_L(abl)=(void*)ABL_NOR; + negativ=!negativ; + break; case ABL_NAND: - if (negativ) ABL_OPER_L(abl)=ABL_NOR; - else ABL_OPER_L(abl)=ABL_NAND; - break; + if (negativ) ABL_OPER_L(abl)=(void*)ABL_NOR; + else ABL_OPER_L(abl)=(void*)ABL_NAND; + break; case ABL_OR: - if (negativ) ABL_OPER_L(abl)=ABL_NOR; - else ABL_OPER_L(abl)=ABL_NAND; - negativ=!negativ; - break; + if (negativ) ABL_OPER_L(abl)=(void*)ABL_NOR; + else ABL_OPER_L(abl)=(void*)ABL_NAND; + negativ=!negativ; + break; case ABL_NOR: - if (negativ) ABL_OPER_L(abl)=ABL_NAND; - else ABL_OPER_L(abl)=ABL_NOR; - break; + if (negativ) ABL_OPER_L(abl)=(void*)ABL_NAND; + else ABL_OPER_L(abl)=(void*)ABL_NOR; + break; case ABL_XOR: - if (negativ) ABL_OPER_L(abl)=ABL_NXOR; - negativ=0; - /*nothing to do: same size XOR and NXOR*/ - break; - case ABL_NXOR: - if (negativ) ABL_OPER_L(abl)=ABL_XOR; - negativ=0; - /*nothing to do*/ - break; - case ABL_NOT: /*erase NOT*/ - chain=abl; - abl=inv_oper(ABL_CADR(abl),!negativ); - freechain(chain); - return abl; - default: + if (negativ) ABL_OPER_L(abl)=(void*)ABL_NXOR; + negativ=0; + /*nothing to do: same size XOR and NXOR*/ + break; + case ABL_NXOR: + if (negativ) ABL_OPER_L(abl)=(void*)ABL_XOR; + negativ=0; + /*nothing to do*/ + break; + case ABL_NOT: /*erase NOT*/ + chain=abl; + abl=inv_oper(ABL_CADR(abl),!negativ); + freechain(chain); + return abl; + default: fprintf(stderr,"inv_oper: unknown operator %ld\n",ABL_OPER(abl)); autexit(1); } @@ -117,7 +118,7 @@ extern chain_list* build_negativ(chain_list* abl) { int to_inv=0; /*leaf to change*/ int to_let=0; /*leaf to let like this*/ - chain_list *leaf, *chain; + chain_list *leaf = NULL, *chain; if (ABL_ATOM(abl)) return abl; /*NOT special case try to erase it*/ @@ -175,12 +176,12 @@ extern chain_list* build_negativ(chain_list* abl) continue; } switch (ABL_OPER(leaf)) { - case ABL_AND: ABL_OPER_L(leaf)=ABL_NAND; break; - case ABL_OR: ABL_OPER_L(leaf)=ABL_NOR; break; - case ABL_NAND: ABL_OPER_L(leaf)=ABL_AND; break; - case ABL_NOR: ABL_OPER_L(leaf)=ABL_OR; break; - case ABL_XOR: ABL_OPER_L(leaf)=ABL_NXOR; break; - case ABL_NXOR: ABL_OPER_L(leaf)=ABL_XOR; break; + case ABL_AND: ABL_OPER_L(leaf)=(void*)ABL_NAND; break; + case ABL_OR: ABL_OPER_L(leaf)=(void*)ABL_NOR; break; + case ABL_NAND: ABL_OPER_L(leaf)=(void*)ABL_AND; break; + case ABL_NOR: ABL_OPER_L(leaf)=(void*)ABL_OR; break; + case ABL_XOR: ABL_OPER_L(leaf)=(void*)ABL_NXOR; break; + case ABL_NXOR: ABL_OPER_L(leaf)=(void*)ABL_XOR; break; case ABL_NOT: ABL_CAR_L(chain)=ABL_CADR(leaf); freechain(leaf); @@ -192,12 +193,12 @@ extern chain_list* build_negativ(chain_list* abl) } switch (ABL_OPER(abl)) { - case ABL_AND: ABL_OPER_L(abl)=ABL_NOR; break; - case ABL_OR: ABL_OPER_L(abl)=ABL_NAND; break; - case ABL_NAND: ABL_OPER_L(abl)=ABL_OR; break; - case ABL_NOR: ABL_OPER_L(abl)=ABL_AND; break; - case ABL_XOR: ABL_OPER_L(abl)=ABL_NXOR; break; - case ABL_NXOR: ABL_OPER_L(abl)=ABL_XOR; break; + case ABL_AND: ABL_OPER_L(abl)=(void*)ABL_NOR; break; + case ABL_OR: ABL_OPER_L(abl)=(void*)ABL_NAND; break; + case ABL_NAND: ABL_OPER_L(abl)=(void*)ABL_OR; break; + case ABL_NOR: ABL_OPER_L(abl)=(void*)ABL_AND; break; + case ABL_XOR: ABL_OPER_L(abl)=(void*)ABL_NXOR; break; + case ABL_NXOR: ABL_OPER_L(abl)=(void*)ABL_XOR; break; case ABL_NOT: chain=abl; abl=ABL_CADR(abl); diff --git a/alliance/src/loon/src/lon_lib_reader.c b/alliance/src/loon/src/lon_lib_reader.c index 7cc6caf9..f44c1622 100644 --- a/alliance/src/loon/src/lon_lib_reader.c +++ b/alliance/src/loon/src/lon_lib_reader.c @@ -32,6 +32,7 @@ #include #include #include +#include #include #include #include diff --git a/alliance/src/loon/src/lon_lib_specifications.c b/alliance/src/loon/src/lon_lib_specifications.c index d0a6a225..33248ecd 100644 --- a/alliance/src/loon/src/lon_lib_specifications.c +++ b/alliance/src/loon/src/lon_lib_specifications.c @@ -29,6 +29,7 @@ #include +#include #include #include #include @@ -207,7 +208,7 @@ extern double getgenericT(befig_list* befig, char* name) int T_setup=0; int count=0; char memo; - char *output; + char *output = NULL; if (befig->BEOUT) output=befig->BEOUT->NAME; else if (befig->BEBUS) output=befig->BEBUS->NAME; @@ -255,7 +256,7 @@ extern double getgenericTh(befig_list* befig, char* name) int T_setup=0; int count=0; char memo; - char *output; + char *output = NULL; if (befig->BEOUT) output=befig->BEOUT->NAME; else if (befig->BEBUS) output=befig->BEBUS->NAME; @@ -294,7 +295,7 @@ extern double getgenericTl(befig_list* befig, char* name) int T_setup=0; int count=0; char memo; - char *output; + char *output = NULL; if (befig->BEOUT) output=befig->BEOUT->NAME; else if (befig->BEBUS) output=befig->BEBUS->NAME; @@ -330,7 +331,7 @@ extern void putgenericT(befig_list* befig, char* name, double Thl_value, double { char* Thl, *Tll, *Tlh, *Thh; char memo; - char *output; + char *output = NULL; if (befig->BEOUT) output=befig->BEOUT->NAME; else if (befig->BEBUS) output=befig->BEBUS->NAME; @@ -414,7 +415,7 @@ extern int getgenericR(befig_list* befig, char* name) int R=0; int count=0; char memo; - char *output; + char *output = NULL; if (befig->BEOUT) output=befig->BEOUT->NAME; else if (befig->BEBUS) output=befig->BEBUS->NAME; @@ -450,7 +451,7 @@ extern void putgenericR(befig_list* befig, char* name, double Rup_value, double { char* R_up, *R_down; char memo; - char *output; + char *output = NULL; if (befig->BEOUT) output=befig->BEOUT->NAME; else if (befig->BEBUS) output=befig->BEBUS->NAME; @@ -484,7 +485,7 @@ extern int getgenericRup(befig_list* befig, char* name) int R=0; int count=0; char memo; - char *output; + char *output = NULL; if (befig->BEOUT) output=befig->BEOUT->NAME; else if (befig->BEBUS) output=befig->BEBUS->NAME; @@ -521,7 +522,7 @@ extern int getgenericRdown(befig_list* befig, char* name) int R=0; int count=0; char memo; - char *output; + char *output = NULL; if (befig->BEOUT) output=befig->BEOUT->NAME; else if (befig->BEBUS) output=befig->BEBUS->NAME; diff --git a/alliance/src/loon/src/lon_lib_utils.c b/alliance/src/loon/src/lon_lib_utils.c index 905bcb4d..f8bf3080 100644 --- a/alliance/src/loon/src/lon_lib_utils.c +++ b/alliance/src/loon/src/lon_lib_utils.c @@ -240,8 +240,7 @@ static cell_list* properties_addCell(befig_list* befig, lofig_list *lofig) if (bepor->NAME==locon->NAME) break; } if (!locon) { - fprintf(stderr,"properties_addCell: locon '%s' not found\n", - locon->NAME); + fprintf(stderr,"properties_addCell: locon '%s' not found\n", bepor->NAME); autexit(1); } losig=locon->SIG; @@ -251,9 +250,11 @@ static cell_list* properties_addCell(befig_list* befig, lofig_list *lofig) if (losig==locon->SIG) break; } if (!locon) { - fprintf(stderr,"properties_addCell: locon '%s' not found in cell\n", - locon->NAME); - autexit(1); + const char* signame = ""; + if (losig->NAMECHAIN) + signame = (const char*)losig->NAMECHAIN->DATA; + fprintf(stderr,"properties_addCell: locon '%s' not found in cell\n", signame); + autexit(1); } /*apply properties*/ diff --git a/alliance/src/loon/src/lon_normalize_DAG.c b/alliance/src/loon/src/lon_normalize_DAG.c index be27bca9..15d784af 100644 --- a/alliance/src/loon/src/lon_normalize_DAG.c +++ b/alliance/src/loon/src/lon_normalize_DAG.c @@ -30,6 +30,7 @@ #include #include +#include #include #include #include @@ -38,14 +39,14 @@ #include "lon_normalize_DAG.h" -#define USING(node) {(int)node=-mark;} -#define USING_L(node) {node=-mark;} -#define USED(node) {(int)node=(int)((((int)node<0)?0:(int)node)+1);} -#define USED_L(node) {node=(int)((((int)node<0)?0:(int)node)+1);} -#define IS_USING(node) ((int)node==-mark) -#define IS_USED(node) ((int)node!=0) -#define IS_UNUSED(node) ((int)node==0) -#define IS_ONE(node) ((int)node==1) +#define USING(node) {(long)node=-mark;} +#define USING_L(node) {node=(void*)(((long)node)-mark);} +#define USED(node) {(long)node=(long)((((long)node<0)?0:(long)node)+1);} +#define USED_L(node) {node=(void*)((((long)node<0)?0:(long)node)+1);} +#define IS_USING(node) ((long)node==-mark) +#define IS_USED(node) ((long)node!=0) +#define IS_UNUSED(node) ((long)node==0) +#define IS_ONE(node) ((long)node==1) typedef struct equi { diff --git a/alliance/src/loon/src/lon_normalize_message.c b/alliance/src/loon/src/lon_normalize_message.c index 14e2b31b..42024c95 100644 --- a/alliance/src/loon/src/lon_normalize_message.c +++ b/alliance/src/loon/src/lon_normalize_message.c @@ -32,6 +32,7 @@ #include #include #include +#include #include #include "lon_normalize_message.h" diff --git a/alliance/src/loon/src/lon_normalize_register.c b/alliance/src/loon/src/lon_normalize_register.c index 6f15db95..82e0be3b 100644 --- a/alliance/src/loon/src/lon_normalize_register.c +++ b/alliance/src/loon/src/lon_normalize_register.c @@ -32,6 +32,7 @@ #include #include #include +#include #include #include #include "lon_normalize_message.h" diff --git a/alliance/src/loon/src/lon_normalize_simplify.c b/alliance/src/loon/src/lon_normalize_simplify.c index ffe12137..90a274b5 100644 --- a/alliance/src/loon/src/lon_normalize_simplify.c +++ b/alliance/src/loon/src/lon_normalize_simplify.c @@ -30,6 +30,7 @@ #include +#include #include #include #include "lon_normalize_simplify.h" @@ -56,16 +57,16 @@ static chain_list* unflatnegexpr(chain_list* abl) if (ABL_OPER(abl)!=ABL_NXOR && count<=2) return abl; switch(ABL_OPER(abl)) { - case ABL_NAND: - ABL_OPER_L(abl)=ABL_AND; - return createablnotexpr(abl); - case ABL_NOR: - ABL_OPER_L(abl)=ABL_OR; - return createablnotexpr(abl); - case ABL_NXOR: - ABL_OPER_L(abl)=ABL_XOR; - return createablnotexpr(abl); - default: return abl; + case ABL_NAND: + ABL_OPER_L(abl)=(void*)ABL_AND; + return createablnotexpr(abl); + case ABL_NOR: + ABL_OPER_L(abl)=(void*)ABL_OR; + return createablnotexpr(abl); + case ABL_NXOR: + ABL_OPER_L(abl)=(void*)ABL_XOR; + return createablnotexpr(abl); + default: return abl; } } diff --git a/alliance/src/loon/src/lon_optim_stats.c b/alliance/src/loon/src/lon_optim_stats.c index 3d44437b..9d7913cd 100644 --- a/alliance/src/loon/src/lon_optim_stats.c +++ b/alliance/src/loon/src/lon_optim_stats.c @@ -33,6 +33,7 @@ #include #include #include +#include #include "lon_lib_utils.h" #include "lon_signal_netlist.h" #include "lon_optim_stats.h" @@ -132,7 +133,7 @@ extern ptype_list* percent_instance(ptype_list* model_list) for (ptype=model_list; ptype; ptype=ptype->NEXT) { cell=getCell((char*)ptype->DATA); if (!cell) { - fprintf(stderr,"Library Error: cell '%s' not found\n",cell->NAME); + fprintf(stderr,"Library Error: cell '%s' not found\n",(char*)ptype->DATA); autexit(1); } inst=addptype(inst,cell->AREA*ptype->TYPE,ptype->DATA); diff --git a/alliance/src/loon/src/lon_signal_critical.c b/alliance/src/loon/src/lon_signal_critical.c index ddb0f3d9..96349163 100644 --- a/alliance/src/loon/src/lon_signal_critical.c +++ b/alliance/src/loon/src/lon_signal_critical.c @@ -112,7 +112,7 @@ static ptype_list* search_long_path(losig_list* losig, int ck_include) char* signame, *ck=NULL; int reg=0; /*flag for flip-flop*/ chain_list* lofigchain; - ptype_list* ptype, *ret; + ptype_list* ptype, *ret = NULL; double max_delay=-1, delay; cell_list* cell; biabl_list* biabl; diff --git a/alliance/src/loon/src/lon_xsch_driver.c b/alliance/src/loon/src/lon_xsch_driver.c index 6b9e6b11..98d05116 100644 --- a/alliance/src/loon/src/lon_xsch_driver.c +++ b/alliance/src/loon/src/lon_xsch_driver.c @@ -37,6 +37,8 @@ #include #include +#include +#include #include #include #include @@ -131,7 +133,7 @@ extern void save_xsch(FILE* xsch_stream, lofig_list* lofig, ptype_list* long_pat ptype_list* ptype, *ptype2=NULL; double delay=0, delay_out=0; char mes[1024]; - char* signame; + char* signame = NULL; locon_list* locon; losig_list* losig; double gradient=1; diff --git a/alliance/src/lvx/src/lvx.c b/alliance/src/lvx/src/lvx.c index b06787a6..121201d3 100644 --- a/alliance/src/lvx/src/lvx.c +++ b/alliance/src/lvx/src/lvx.c @@ -41,16 +41,16 @@ /* */ /****************************************************************************/ /* $Log: lvx.c,v $ -/* Revision 1.5 2012/05/14 14:20:21 alliance -/* Updated GNU/FSF address (patch from Thibault North). -/* -/* Revision 1.4 2004/05/22 14:26:08 ludo -/* Now, by default LVX does not check unassigned signals between the two input netlists. -/* (this feature is usefull/mandatory with the new VST driver that adds sometimes unused -/* signals to have consitent VHDL vectors declaration) -/* The command line option '-u' permits to behave like it was before and then check -/* also unassigned signals. -/* + * Revision 1.5 2012/05/14 14:20:21 alliance + * Updated GNU/FSF address (patch from Thibault North). + * + * Revision 1.4 2004/05/22 14:26:08 ludo + * Now, by default LVX does not check unassigned signals between the two input netlists. + * (this feature is usefull/mandatory with the new VST driver that adds sometimes unused + * signals to have consitent VHDL vectors declaration) + * The command line option '-u' permits to behave like it was before and then check + * also unassigned signals. + * * Revision 1.3 2002/09/30 16:20:46 czo * support/users * @@ -103,8 +103,10 @@ static char rcsid[] = "$Id: lvx.c,v 1.5 2012/05/14 14:20:21 alliance Exp $" ; #include #include #include +#include #include #include +#include #define TRUE 1 #define FALSE 0 @@ -181,7 +183,7 @@ int exitcode = 2; /*****************************************************************************/ /*===========================================================================*/ - fatalerror (message) +void fatalerror (message) /*===========================================================================*/ char *message; @@ -332,7 +334,7 @@ locon_tree *ptnode; */ { locon_list *ptaux; - int result1, result2; + int result1; if ( (locon == (locon_list *)NULL) || (ptnode == (locon_tree *)NULL) ) return ( -1 ); @@ -501,8 +503,8 @@ unsigned char mark; Returns ERR if error on insertion, OK else. */ { - locon_tree *prev_node, *ptnode, *ptaux; - int prev_compar, compar; + locon_tree *prev_node = NULL, *ptnode, *ptaux; + int prev_compar = 0, compar; if (locon == (locon_list *)NULL) fatalerror ("Fatal error on tree construction. (insertlocon)"); @@ -551,6 +553,7 @@ unsigned char mark; } fatalerror ("Fatal error on tree construction. (insertlocon)"); + return 0; /* never reached. */ } @@ -685,6 +688,7 @@ rootlocon_tree *ptnode; } fatalerror ("Fatal error on Terminals Tree checking. (checkrootlocontree)"); + return 0; /* never reached. */ } @@ -726,11 +730,12 @@ loins_tree *ptnode; } fatalerror ("Fatal error on Instances Tree checking. (checkloinstree)"); + return 0; /* never reached. */ } /*===========================================================================*/ - mylofigchain (lofig) +void mylofigchain (lofig) /*===========================================================================*/ lofig_list *lofig; @@ -831,6 +836,7 @@ locon_list *locon; } fatalerror ("Fatal error on mbk structure: Illegal connector"); + return NULL; /* never reached. */ } @@ -979,7 +985,6 @@ lofig_list *lofig1, *lofig2; Returns OK if terminals are equivalent, ERR else. */ { - rootlocon_tree *ptnode; int result; rootlocon_time = time( (long *)0 ); @@ -1152,9 +1157,9 @@ lofig_list *lofig1, *lofig2; } else result4 = OK; - printf ("\n\n===== Terminals .......... %-6lu\n", rootlocon_count); - printf ( "===== Instances .......... %-6lu\n", loins_count); - printf ( "===== Connectors ......... %-6lu\n", locon_count); + printf ("\n\n===== Terminals .......... %-6d\n", rootlocon_count); + printf ( "===== Instances .......... %-6d\n", loins_count); + printf ( "===== Connectors ......... %-6d\n", locon_count); if (error_count) printf ( "\n===== Errors ............. %i\n", error_count); if ( (result3 == OK) && (result4 == OK)) return ( OK ); @@ -1264,7 +1269,6 @@ char *name1, *name2; locon_list *ptlocon, *ptaux, *prevlocon; locon_list *reflocon = NULL; losig_list *oldlosig, *reflosig; - int found = FALSE; if (lofig == NULL) fatalerror ("Invalid figure. (equivinslocon)"); if (loins == NULL) fatalerror ("Invalid instance. (equivinslocon)"); @@ -1341,7 +1345,7 @@ char *name1, *name2; /*===========================================================================*/ - localstartid ( ptlocon, name1, name2) +void localstartid ( ptlocon, name1, name2) /*===========================================================================*/ locon_list *ptlocon; char *name1, *name2; @@ -1363,7 +1367,7 @@ char *name1, *name2; /*===========================================================================*/ - reducepower (lofig1, lofig2) +void reducepower (lofig1, lofig2) /*===========================================================================*/ lofig_list *lofig1, *lofig2; @@ -1377,7 +1381,6 @@ lofig_list *lofig1, *lofig2; chain_list *Delete; chain_list *ScanChain; locon_list *ptlocon; - locon_list *next_locon; char *firstvdd; char *firstvss; loins_list *ptloins; @@ -1528,7 +1531,7 @@ locon_list *list1, *list2; /*===========================================================================*/ - order (lofig1, lofig2) +void order (lofig1, lofig2) /*===========================================================================*/ lofig_list *lofig1, *lofig2; @@ -1697,7 +1700,7 @@ char *loinsname; /*===========================================================================*/ - readparamfile (lofig1, lofig2, filename) +void readparamfile (lofig1, lofig2, filename) /*===========================================================================*/ lofig_list *lofig1, *lofig2; char *filename; @@ -1733,7 +1736,7 @@ char *filename; /*===========================================================================*/ - presentation () +void presentation () /*===========================================================================*/ { char revision[100] ; @@ -1752,7 +1755,7 @@ char *filename; } /*****************************************************************************/ - main (argc, argv) +int main (argc, argv) /*****************************************************************************/ int argc; char **argv; @@ -1839,4 +1842,5 @@ char **argv; savelofig (lofig2); } exit ( 0 ); + return 0; } diff --git a/alliance/src/lynx/src/cutelbow.c b/alliance/src/lynx/src/cutelbow.c index 7d0e80b2..60309949 100644 --- a/alliance/src/lynx/src/cutelbow.c +++ b/alliance/src/lynx/src/cutelbow.c @@ -43,6 +43,7 @@ \------------------------------------------------------------*/ # include +# include # include "mut.h" # include "mlo.h" @@ -298,7 +299,6 @@ long LynxCutTransistorElbow( Figure, Window, Core ) long X; long Y; int MbkLayer; - char TransType; char CXType; rdsbegin(); @@ -316,7 +316,6 @@ long LynxCutTransistorElbow( Figure, Window, Core ) if ( Table == (long *)0 ) continue; - TransType = GET_LYNX_TRANSISTOR_TYPE( MbkLayer ); CXType = GET_LYNX_TRANSISTOR_CX( MbkLayer ); GateLayer = GET_LYNX_TRANSISTOR_GATE_LAYER( MbkLayer ); DiffLayer = GET_LYNX_TRANSISTOR_DIFF_LAYER( MbkLayer ); diff --git a/alliance/src/lynx/src/flatrds.c b/alliance/src/lynx/src/flatrds.c index 5ab5e01a..4dba5af1 100644 --- a/alliance/src/lynx/src/flatrds.c +++ b/alliance/src/lynx/src/flatrds.c @@ -43,6 +43,7 @@ \------------------------------------------------------------*/ # include +# include # include "mut.h" # include "mph.h" diff --git a/alliance/src/lynx/src/interval.c b/alliance/src/lynx/src/interval.c index e1e8b7dc..01adf9d3 100644 --- a/alliance/src/lynx/src/interval.c +++ b/alliance/src/lynx/src/interval.c @@ -433,7 +433,7 @@ void LynxTestInterval() while ( fgets( Buffer, 32, stdin ) ) { - if ( sscanf( Buffer, "%d %d", &Min, &Max ) != 2 ) break; + if ( sscanf( Buffer, "%11d %11d", &Min, &Max ) != 2 ) break; Interval1 = LynxUnionInterval( Interval1, Min, Max ); LynxViewInterval( Interval1 ); @@ -443,7 +443,7 @@ void LynxTestInterval() while ( fgets( Buffer, 32, stdin ) ) { - if ( sscanf( Buffer, "%d %d", &Min, &Max ) != 2 ) break; + if ( sscanf( Buffer, "%11d %11d", &Min, &Max ) != 2 ) break; Interval1 = LynxSplitInterval( Interval1, Min, Max ); LynxViewInterval( Interval1 ); @@ -453,7 +453,7 @@ void LynxTestInterval() while ( fgets( Buffer, 32, stdin ) ) { - if ( sscanf( Buffer, "%d %d", &Min, &Max ) != 2 ) break; + if ( sscanf( Buffer, "%11d %11d", &Min, &Max ) != 2 ) break; Interval2 = LynxUnionInterval( Interval2, Min, Max ); LynxViewInterval( Interval2 ); diff --git a/alliance/src/lynx/src/mbkrds.c b/alliance/src/lynx/src/mbkrds.c index 17789db3..987e1de2 100644 --- a/alliance/src/lynx/src/mbkrds.c +++ b/alliance/src/lynx/src/mbkrds.c @@ -505,7 +505,6 @@ void Lynxrecrdsmbk( Figure, Rectangle, Real ) rdsrec_list *Rectangle; char Real; { - rdsrec_list *ScanRec; rdsins_list *InstanceRds; long X1; @@ -536,9 +535,9 @@ void Lynxrecrdsmbk( Figure, Rectangle, Real ) if ( Real ) { LayerRds = GetRdsLayer( Rectangle ); - ScanRec = addrdsfigrec( Figure, Rectangle->NAME, LayerRds, - Rectangle->X , Rectangle->Y, - Rectangle->DX, Rectangle->DY ); + addrdsfigrec( Figure, Rectangle->NAME, LayerRds, + Rectangle->X , Rectangle->Y, + Rectangle->DX, Rectangle->DY ); if ( LayerRds != RDS_ABOX ) { diff --git a/alliance/src/lynx/src/netlist.c b/alliance/src/lynx/src/netlist.c index cf9dfde2..44c5d633 100644 --- a/alliance/src/lynx/src/netlist.c +++ b/alliance/src/lynx/src/netlist.c @@ -127,7 +127,6 @@ long LynxBuildLogicalSignal( FigureRds, HeadEqui, LogicalFigure, Core, Real, Rcn ptype_list *ScanPtype; char LayerMbk; - char LayerRds; char Scan; char *ConnectorName=NULL; @@ -287,7 +286,6 @@ Cette liste contient la liste des rectangles connecteurs. */ else { LayerMbk = GetLynxAttribute( ScanEqui ); - LayerRds = GetRdsLayer( ScanEqui ); if ( GET_LYNX_TRANSISTOR_TYPE( LayerMbk ) != RDS_LYNX_TRANSISTOR_EMPTY ) diff --git a/alliance/src/lynx/src/parse.c b/alliance/src/lynx/src/parse.c index beaf325b..f2f7dd0e 100644 --- a/alliance/src/lynx/src/parse.c +++ b/alliance/src/lynx/src/parse.c @@ -123,7 +123,7 @@ char LynxParseEqui() while ( fgets( LynxBuffer, LYNX_BUFFER_SIZE, LynxFile ) != (char *)0 ) { - LynxBuffer[ strlen( LynxBuffer ) - 1 ] = '\0'; + //LynxBuffer[ strlen( LynxBuffer ) - 1 ] = '\0'; LynxScanEqui = addchain( LynxScanEqui, (void *)namealloc( LynxBuffer ) ); diff --git a/alliance/src/lynx/src/znc.c b/alliance/src/lynx/src/znc.c index 01580e32..1cbf23f3 100644 --- a/alliance/src/lynx/src/znc.c +++ b/alliance/src/lynx/src/znc.c @@ -408,7 +408,6 @@ WinZnc *wininfo; if( elem->x1<=ix2 && ix1<=elem->x2 && iy1<=elem->y2 && elem->y1<=iy2 ) nx1=x1-1; } - x1=nx1; return(nx1); } @@ -433,7 +432,6 @@ WinZnc *wininfo; if( elem->x1<=ix2 && ix1<=elem->x2 && iy1<=elem->y2 && elem->y1<=iy2 ) ny1=y1-1; } - y1=ny1; return(ny1); } diff --git a/alliance/src/m2e/src/m2e.c b/alliance/src/m2e/src/m2e.c index f72b19cf..f6620e19 100644 --- a/alliance/src/m2e/src/m2e.c +++ b/alliance/src/m2e/src/m2e.c @@ -103,7 +103,7 @@ int ParseCommand(int argc,char *argv[]) { case 'v': i++; - sscanf(argv[i],"%d",&VerboseMode); + sscanf(argv[i],"%11d",&VerboseMode); if(VerboseMode>=VMINFO) fprintf(stderr,"[m2e] Info : Verbose Level Set to %d \n",VerboseMode); break; @@ -631,7 +631,7 @@ int TraitFichClass(lofig_list *ptfig) psig->USER = addptype(psig->USER,(long)DEDALE,(void*)NULL); pt = psig->USER; } - sscanf(pcl,"%d",(int*)&(pt->DATA)); + sscanf(pcl,"%11d",(int*)&(pt->DATA)); /*fprintf(stderr,"class %d\n",(int)pt->DATA);*/ trouve = 1; break ; @@ -642,7 +642,7 @@ int TraitFichClass(lofig_list *ptfig) fprintf(stderr,"[m2e] Info : Signal %s, absent\n",ps); } /* exploite /PLACEMENT */ - if((ps = strtok(buf,&ct[0])) == 0) return 1; + if((strtok(buf,&ct[0])) == 0) return 1; if(strcmp(PLACEMENT,buf) != 0) return 1; while(LigneSuiv(buf) == 0) { @@ -863,7 +863,7 @@ void TraitSignaux(lofig_list *ptfig) losig_list *psig; chain_list *pchcon,*pchbro; locon_list *pcon=NULL; - loins_list *pins; + loins_list *pins=NULL; lofig_list *pfig; int class=0; short n,nbc,nomsig,j,k; @@ -984,7 +984,7 @@ void TraitSignaux(lofig_list *ptfig) fprintf(stderr,"[m2e] missing in %s.pin\n",pfig->NAME); } } - } /* end if*/ + } * end if*/ if(VerboseMode>=VMTRACE) fprintf(stderr,"[m2e] Trace : signal : %s, nombre de broches : %d\n",(char *)psig->NAMECHAIN->DATA,nbc); if(nbc != 0) diff --git a/alliance/src/mbk/src/mbk_lo.c b/alliance/src/mbk/src/mbk_lo.c index 7725b2d2..b693ac65 100644 --- a/alliance/src/mbk/src/mbk_lo.c +++ b/alliance/src/mbk/src/mbk_lo.c @@ -1954,49 +1954,42 @@ void viewlocap(locap_list *ptcap) /*********************************** Capacitor : dellocapuser **********************************/ -void dellocapuser(locap_list *ptlocap) +void dellocapuser ( locap_list *ptlocap ) { - ptype_list *scanptype = NULL ; - ptype_list *next = NULL ; - ptype_list *prev = NULL ; - long del = 0 ; + ptype_list *scanptype = NULL; + ptype_list *next = NULL; + ptype_list *prev = NULL; + long del = 0; - for(scanptype = ptlocap -> USER ; scanptype != NULL ; scanptype = next) - { - next = scanptype -> NEXT ; - del = 0 ; + for (scanptype = ptlocap->USER ; scanptype != NULL ; scanptype = next) { + next = scanptype->NEXT ; + del = 0 ; - switch(scanptype -> TYPE) - { - case LOCAP_INFO : mbkfree(scanptype -> DATA) ; - del = 1 ; - break ; - default : + switch (scanptype->TYPE) { + case LOCAP_INFO : + mbkfree( scanptype->DATA ); + del = 1 ; + break ; + default : #ifdef MBK_TRACE_BAD_PTYPE - fprintf( stderr, "WARNING in delloconuser() : unknown ptype %ld\n",scanptype -> TYPE) ; + fprintf( stderr, "WARNING in delloconuser() : unknown ptype %ld\n", scanptype->TYPE ); #endif - break; + break; } - if(del) - { - if(prev != NULL) - { - ptlocap -> USER = next ; - } - else - { - prev -> NEXT = next ; - } + if (del) { + if (prev == NULL) { + ptlocap->USER = next; + } else { + prev->NEXT = next; + } - scanptype -> NEXT = NULL ; - freeptype(scanptype ) ; - } - else - { + scanptype->NEXT = NULL; + freeptype( scanptype ); + } else { prev = scanptype ; } - } + } } /*********************************** Resistor : add ********************************************/ @@ -2012,7 +2005,7 @@ lores_list *addlores(lofig_list *ptfig,char type,double resi,losig_list *ptrcon1 rcon1 = namealloc("rcon1"); rcon2 = namealloc("rcon2"); - if((type != RESMIM) && (type != RESMIM)) + if(type != RESMIM) { (void)fflush(stdout) ; (void)fprintf(stderr, "*** mbk error ***\n") ; @@ -2243,7 +2236,7 @@ void delloresuser(lores_list *ptlores) if(del) { - if(prev != NULL) + if(prev == NULL) { ptlores -> USER = next ; } @@ -2275,7 +2268,7 @@ loself_list *addloself(lofig_list *ptfig,char type,double self,losig_list *ptsco scon1 = namealloc("scon1"); scon2 = namealloc("scon2"); - if((type != SELFMIM) && (type != SELFMIM)) + if(type != SELFMIM) { (void)fflush(stdout) ; (void)fprintf(stderr, "*** mbk error ***\n") ; @@ -2503,7 +2496,7 @@ void delloselfuser(loself_list *ptloself) if(del) { - if(prev != NULL) + if(prev == NULL) { ptloself -> USER = next ; } diff --git a/alliance/src/mbk/src/mbk_lo_util.c b/alliance/src/mbk/src/mbk_lo_util.c index f87e69a2..a21f2a84 100644 --- a/alliance/src/mbk/src/mbk_lo_util.c +++ b/alliance/src/mbk/src/mbk_lo_util.c @@ -1109,7 +1109,7 @@ while(ptfig->LOINS != NULL) if(all == 'N') break ; -} + } /* Post traitement sur les CTC dont un des noeuds est a 0 */ @@ -1149,7 +1149,7 @@ while(ptfig->LOINS != NULL) if( othersig == scanlosig && othernode == scanctcnode ) { ptctc->CAPA = -1.0 ; - verif = verif + 2 ; + //verif = verif + 2 ; } else { @@ -1178,7 +1178,7 @@ while(ptfig->LOINS != NULL) { ptctc->CAPA+= ptctc2->CAPA; ptctc2->CAPA = -1.0; - verif = verif + 2 ; + //verif = verif + 2 ; } } chainhtab = addchain(chainhtab,ptctc) ; @@ -1264,7 +1264,7 @@ void debugctc2 ( lofig_list *ptfig ) printf( "Information sur la figure %s.\n", ptfig->NAME ); for( sig = ptfig->LOSIG ; sig ; sig = sig->NEXT ) { - printf( "Signal %2ld (%08X)\n", sig->INDEX, (unsigned long) sig ); + printf( "Signal %2ld (%08lX)\n", sig->INDEX, (unsigned long)sig ); if( sig->PRCN ) { for( scanchain = sig->PRCN->PCTC ; @@ -1613,7 +1613,8 @@ losig_list *ptsig; static char loconname[BUFSIZE]; char *name; char locondir; - int i, foundterm = 0; + /*int i;*/ + int foundterm = 0; /* scan connectors list of the current signal */ ptlosig = (losig_list *)(ptchain->DATA); @@ -1642,8 +1643,8 @@ losig_list *ptsig; locondir = foundterm ? extlocon->DIRECTION : intlocon->DIRECTION; name = (ptlosig->NAMECHAIN != NULL) ? getsigname(ptlosig) : foundterm ? extlocon->NAME : intlocon->NAME; - i = 0; /* + i = 0; while ( (name[i] != '\0') && (name[i] != ' ') ) { loconname [i] = name[i]; i++; @@ -2386,7 +2387,7 @@ key[VHD_scon2DFN] = vhd_hash ("scon2"); current_pnt.data = head_pnt; current_pnt.type = type; - + current_pnt.mark = 0; state = type; while (state != VHD__XTDFN) @@ -2915,7 +2916,7 @@ char prvcmd[3][20]; comd1[0] = '\0'; comd2[0] = '\0'; (void)fgets( readstr, 60, stdin ); - (void)sscanf (readstr,"%s%s%s",comd0,comd1,comd2); + (void)sscanf (readstr,"%19s%19s%19s",comd0,comd1,comd2); if (strcmp(comd0,".")) { diff --git a/alliance/src/mbk/src/mbk_ph_util.c b/alliance/src/mbk/src/mbk_ph_util.c index 6a7303f7..db74bac0 100644 --- a/alliance/src/mbk/src/mbk_ph_util.c +++ b/alliance/src/mbk/src/mbk_ph_util.c @@ -111,7 +111,7 @@ long xab1, yab1, xab2, yab2; long dx, dy; long vx1, vx2, vy1, vy2; char trsf; -char newtrsf; +char newtrsf='-'; int Layer; ptinstbf = getphins(ptfig, insname); @@ -501,7 +501,7 @@ char face, sym; (void)fprintf(stderr, "instanceface impossible :\n"); (void)fprintf(stderr, "face: %c, sym %c\n", face, sym); EXIT(1); - return (char)NULL; /* never reached */ + return (char)'-'; /* never reached */ } #define BV_VIA_VIA 6 /* must be even, whatever! */ @@ -522,7 +522,7 @@ long x, y, dx, dy; { int i, j; long stepx, stepy, xv, yv, dxv, dyv; -char slayer, blayer; /* small and big layers */ +char slayer='-', blayer='-'; /* small and big layers */ if (dx < 0 || dy < 0) { fflush(stdout); @@ -819,7 +819,8 @@ char *stru_name; current_pnt.data = head_pnt; current_pnt.type = type; - state = type; + current_pnt.mark = 0; + state = type; while (state != VHD__XTDFN) { @@ -1182,7 +1183,7 @@ char prvcmd[3][20]; comd1[0] = '\0'; comd2[0] = '\0'; (void)fgets( readstr, 60, stdin ); - (void)sscanf (readstr,"%s%s%s",comd0,comd1,comd2); + (void)sscanf (readstr,"%19s%19s%19s",comd0,comd1,comd2); if (strcmp(comd0,".")) { diff --git a/alliance/src/mbk/src/mbk_util.c b/alliance/src/mbk/src/mbk_util.c index 25682a3a..872b9bba 100644 --- a/alliance/src/mbk/src/mbk_util.c +++ b/alliance/src/mbk/src/mbk_util.c @@ -1109,7 +1109,7 @@ static int read; nb = 0; while (!feof((FILE *)((chain_list *)pt)->DATA)) { nb++; /* count lines */ - nb_input = fscanf((FILE *)((chain_list *)pt)->DATA, "%s %c\n", + nb_input = fscanf((FILE *)((chain_list *)pt)->DATA, "%4096s %c\n", buffer, &attrib); if (nb_input == 0) /* skip white lines */ continue; @@ -1558,7 +1558,7 @@ char day[4], month[4]; int year, nday, hour, minute, second; (void)time(&timer); - (void)sscanf(ctime(&timer), "%s %s %d %d:%d:%d %d", + (void)sscanf(ctime(&timer), "%3s %3s %11d %11d:%11d:%11d %11d", day, month, &nday, &hour, &minute, &second, &year); /* rince off : the buffer is filled with nul characteres. */ diff --git a/alliance/src/mbkal/src/alc_pars_l.c b/alliance/src/mbkal/src/alc_pars_l.c index 16279fbb..2184a80e 100644 --- a/alliance/src/mbkal/src/alc_pars_l.c +++ b/alliance/src/mbkal/src/alc_pars_l.c @@ -102,7 +102,7 @@ char mode; (void)printf("\n--- mbk --- parsing file : %s\n",nomfic); } (void)fgets(ligne,50,in); - (void)sscanf(ligne,"V ALLIANCE : %ld", &i); + (void)sscanf(ligne,"V ALLIANCE : %22ld", &i); if( i== 4 ) alcloadlofig6( pfig, fname, mode, in, 4 ); else diff --git a/alliance/src/mbkal/src/alc_pars_l6.c b/alliance/src/mbkal/src/alc_pars_l6.c index 10f70e6e..77a69244 100644 --- a/alliance/src/mbkal/src/alc_pars_l6.c +++ b/alliance/src/mbkal/src/alc_pars_l6.c @@ -486,7 +486,6 @@ int version; if( version == 6 ) { name = namealloc( (char*)line->DATA ); - line = line->NEXT; } pttrs = addlotrs( ptfig, type, x, y, w, l, ps, pd, xs, xd, @@ -539,18 +538,13 @@ locap_list *decode_locap(lofig_list *ptfig,chain_list *line,char *fname,int mal_ int phtcon = 0 ; int phbcon = 0 ; locap_list *ptcap = NULL ; - int n = 0 ; char *name = NULL ; float capa = 0.0 ; - - n = nbitem(line) ; /* Version 6 : P type capa name tcon bcon node_tcon node_bcon */ /***** type *****/ - type = -1 ; - if(strcasecmp((char *)line -> DATA, "MIM") == 0) { type = CAPMIM ; @@ -596,7 +590,6 @@ locap_list *decode_locap(lofig_list *ptfig,chain_list *line,char *fname,int mal_ line = line -> NEXT ; phbcon = decode_int((char *)line -> DATA,fname,mal_line) ; - line = line -> NEXT ; ptcap = addlocap(ptfig,type,capa,tcon,bcon,name) ; @@ -633,18 +626,11 @@ lores_list *decode_lores(lofig_list *ptfig,chain_list *line,char *fname,int mal_ int phrcon1 = 0 ; int phrcon2 = 0 ; lores_list *ptres = NULL ; - int n = 0 ; char *name = NULL ; float resi = 0.0 ; - - n = nbitem(line) ; /* Version 6 : R type resi name rcon1 rcon2 node_rcon1 node_rcon2 */ - /***** type *****/ - - type = -1 ; - if(strcasecmp((char *)line -> DATA, "MIM") == 0) { type = RESMIM ; @@ -690,7 +676,6 @@ lores_list *decode_lores(lofig_list *ptfig,chain_list *line,char *fname,int mal_ line = line -> NEXT ; phrcon2 = decode_int((char *)line -> DATA,fname,mal_line) ; - line = line -> NEXT ; ptres = addlores(ptfig,type,resi,rcon1,rcon2,name) ; @@ -727,17 +712,10 @@ loself_list *decode_loself(lofig_list *ptfig,chain_list *line,char *fname,int ma int phscon1 = 0 ; int phscon2 = 0 ; loself_list *ptself = NULL ; - int n = 0 ; char *name = NULL ; float self = 0.0 ; - - n = nbitem(line) ; /* Version 6 : L type self name scon1 scon2 node_scon1 node_scon2 */ - - /***** type *****/ - - type = -1 ; if(strcasecmp((char *)line -> DATA, "MIM") == 0) { @@ -784,7 +762,6 @@ loself_list *decode_loself(lofig_list *ptfig,chain_list *line,char *fname,int ma line = line -> NEXT ; phscon2 = decode_int((char *)line -> DATA,fname,mal_line) ; - line = line -> NEXT ; ptself = addloself(ptfig,type,self,scon1,scon2,name) ; @@ -860,7 +837,6 @@ int mal_line; line = line->NEXT; node2 = decode_int( (char*)line->DATA, fname, mal_line ); - line = line->NEXT; ptsig1 = givelosig( ptfig, idxsig1 ); ptsig2 = givelosig( ptfig, idxsig2 ); @@ -891,10 +867,10 @@ int mal_line; float y; float dx; float dy; - long lx; - long ly; - long ldx; - long ldy; + /* long lx; */ + /* long ly; */ + /* long ldx; */ + /* long ldy; */ if( nbitem( line ) != 9 ) mal_error( fname, mal_line,"decode_lowire()","Bad number of argument.\n" ); @@ -927,12 +903,11 @@ int mal_line; line = line->NEXT; dy = (float)decode_float( line->DATA, fname, mal_line ); - line = line->NEXT; - lx = x * SCALE_X; - ly = y * SCALE_X; - ldx = dx * SCALE_X; - ldy = dy * SCALE_X; + /* lx = x * SCALE_X; */ + /* ly = y * SCALE_X; */ + /* ldx = dx * SCALE_X; */ + /* ldy = dy * SCALE_X; */ return( addlowire( ptsig, layer, 0, r, c, x, y, dx, dy, n1, n2 ) ); } @@ -943,12 +918,12 @@ losig_list* decode_sig( ptfig, line, fname, mal_line, version ) lofig_list *ptfig; chain_list *line; char *fname; -int mal_line; -int version; +int mal_line; +int version; { - int idx; + int idx; losig_list *ptsig; - char type; + char type; float capa; char signame[256]; ht *htsigname; @@ -1365,7 +1340,6 @@ int mal_line; { lofig_list *ptmodele; chain_list *scan; - chain_list *next; chain_list *headsig; locon_list *scancon; num_list *scannum; diff --git a/alliance/src/mbkap/src/alc_driv_p.c b/alliance/src/mbkap/src/alc_driv_p.c index 384eb722..2a300e02 100644 --- a/alliance/src/mbkap/src/alc_driv_p.c +++ b/alliance/src/mbkap/src/alc_driv_p.c @@ -41,6 +41,7 @@ * * ************************************************************************/ +#include #include #include #include diff --git a/alliance/src/mbkap/src/alc_pars_p.c b/alliance/src/mbkap/src/alc_pars_p.c index e12675d1..f65c6cb6 100644 --- a/alliance/src/mbkap/src/alc_pars_p.c +++ b/alliance/src/mbkap/src/alc_pars_p.c @@ -591,7 +591,7 @@ char *fig_name, mode; /* Lecture de la ligne d'en tete ( prefixe 'H '). */ parser.curr_line = 2; if ( fscanf(parser.file, - "H %[^,],%c,%ld,%ld,%[^,],%ld,%[^,],", + "H %1023[^,],%c,%22ld,%22ld,%1023[^,],%22ld,%1023[^,],", s_name, &c_ftype, &ab_index, &NB_desc, s_date, &deb_index, s_chain_mode )!=7 ) alc_printerror( EHEADER); @@ -599,13 +599,13 @@ char *fig_name, mode; if ( c_ftype!='P' ) alc_printerror( EFILETYPE); /* Lecture de la boundig box. */ - if ( fscanf(parser.file,"%ld,%ld,%ld,%ld, ", + if ( fscanf(parser.file,"%22ld,%22ld,%22ld,%22ld, ", &xbb, &ybb, &dxbb, &dybb )!=4 ) alc_printerror( EBOUNDBOX); /* Lecture de l'abutment box. */ if ( ab_index>=0 ) { - if ( fscanf(parser.file,"%ld,%ld,%ld,%ld ", + if ( fscanf(parser.file,"%22ld,%22ld,%22ld,%22ld ", &xab, &yab, &dxab, &dyab )!=4 ) alc_printerror( EABUTMBOX); defab( parser.ptfig, @@ -855,12 +855,12 @@ static void alc_load(ptfig,fig_name,mode,setup) if ( setup > 3 ) { if (fscanf(parser.file, - "H %[^,],%c,%[^,],%ld\n", s_name, &c_ftype, s_date, &parser.scale_x)!=4) + "H %1023[^,],%c,%1023[^,],%22ld\n", s_name, &c_ftype, s_date, &parser.scale_x)!=4) alc_printerror(EHEADER); } else { - if (fscanf(parser.file, "H %[^,],%c,%[^\n]\n", s_name, &c_ftype, s_date)!=3) + if (fscanf(parser.file, "H %1023[^,],%c,%1023[^\n]\n", s_name, &c_ftype, s_date)!=3) alc_printerror(EHEADER); } @@ -869,7 +869,7 @@ static void alc_load(ptfig,fig_name,mode,setup) /* Lecture de l'abutment box. */ parser.curr_line++; - if (fscanf(parser.file,"A %ld,%ld,%ld,%ld ", &xab, &yab, &dxab, &dyab) != 4) + if (fscanf(parser.file,"A %22ld,%22ld,%22ld,%22ld ", &xab, &yab, &dxab, &dyab) != 4) alc_printerror(EABUTMBOX); defab(parser.ptfig, alc_scale_x(xab), alc_scale_x(yab), alc_scale_x(dxab), alc_scale_x(dyab)); @@ -1326,12 +1326,12 @@ char buffer[BUFSIZ]; alc_printerror(ESYNTAX); /* printf( "%s\n", buffer); */ - if (sscanf(buffer, "V ALLIANCE : %ld ", &setup) == 1) { + if (sscanf(buffer, "V ALLIANCE : %22ld ", &setup) == 1) { if (setup >= 3) alc_load(ptfig, fig_name, mode,setup); else alc_printerror(ESETUP); - } else if (sscanf(buffer, "V ALLIANCE 2.2 SETUP : %ld ", &setup) == 1) { + } else if (sscanf(buffer, "V ALLIANCE 2.2 SETUP : %22ld ", &setup) == 1) { if (setup == 2) alc_old_load(ptfig, fig_name, mode); else diff --git a/alliance/src/mbkedif/src/driver.c b/alliance/src/mbkedif/src/driver.c index 19697d0b..e796728a 100644 --- a/alliance/src/mbkedif/src/driver.c +++ b/alliance/src/mbkedif/src/driver.c @@ -29,20 +29,19 @@ /*version 1.2 : Extended by Olivier BEAURIN (September, 93) */ /*version 1.2 : Extended by Olivier BEAURIN (November, 93) */ /* $Log: driver.c,v $ -/* Revision 1.5 2012/05/14 14:20:24 alliance -/* Updated GNU/FSF address (patch from Thibault North). -/* -/* Revision 1.4 2002/09/30 16:20:54 czo -/* support/users -/* -/* Revision 1.3 2002/04/25 14:16:44 ludo -/* correction petits bugs -/* -/* Revision 1.2 2002/03/14 12:36:30 fred -/* Makes the correct substitutions in lex and yacc generated files. -/* Fixing includes in dot c files -/* ---------------------------------------------------------------------*/ -/*----------------------------------------------------------------------------*/ +/ Revision 1.5 2012/05/14 14:20:24 alliance +/ Updated GNU/FSF address (patch from Thibault North). +/ +/ Revision 1.4 2002/09/30 16:20:54 czo +/ support/users +/ +/ Revision 1.3 2002/04/25 14:16:44 ludo +/ correction petits bugs +/ +/ Revision 1.2 2002/03/14 12:36:30 fred +/ Makes the correct substitutions in lex and yacc generated files. +/ Fixing includes in dot c files +/ ---------------------------------------------------------------------*/ #include #include @@ -68,6 +67,10 @@ #define DEBUG_MBKEDIF "DEBUG_MBKEDIF" #define DEFAULT_SUFFIXES "y=ScLib:dp=DpLib:fp=FpLib:sp=PadLib" +/* External Functions */ + +extern char *EdifTime(); + /* Global variables*/ static int edif_debug = FALSE; @@ -91,7 +94,7 @@ static void view ( ); static void drive_cell ( ); static void r_drive_cell ( ); static int edif_busindex ( ); -static int drive_basic_cells( ); +static void drive_basic_cells( ); static locon_list *edif_found_array ( ); static void check_fig_portref( ); static void r_found_suffixed_cells( ); @@ -179,8 +182,6 @@ int fill; void edifsavelofig( firstlofig ) lofig_list *firstlofig; { - chain_list *chainl; - chain_list *chainp; char filename[ 255 ]; char *pc; int index; @@ -372,7 +373,6 @@ static void r_found_suffixed_cells( ptlofig ) lofig_list *ptlofig; { chain_list *ptchain; - lofig_list *ptlfig; for (ptchain = ptlofig->MODELCHAIN; ptchain; ptchain = ptchain->NEXT) { @@ -417,11 +417,10 @@ lofig_list *ptlofig; /*---------------------------------------------------------\ drive_basic_cells \---------------------------------------------------------*/ -static int drive_basic_cells( ptlofig ) +static void drive_basic_cells( ptlofig ) lofig_list *ptlofig; { chain_list *ptchain; - lofig_list *ptlfig; char *cell_model_name; for (ptchain = ptlofig->MODELCHAIN; ptchain; ptchain = ptchain->NEXT) @@ -439,9 +438,6 @@ static void drive_cell(figname, c) char *figname; char c; { - chain_list *ptchain; - lofig_list *ptlofig; - if (in_chain_list(already_drived, figname)) return; @@ -652,7 +648,7 @@ locon_list *ptcon; static void edit_ins(ptins) loins_list *ptins; { - char cellref_type; +/* char cellref_type;*/ char *name; char *pt; @@ -668,7 +664,7 @@ loins_list *ptins; } } - cellref_type = (incatalog(ptins->FIGNAME) ? 'I' : 'A'); +/* cellref_type = (incatalog(ptins->FIGNAME) ? 'I' : 'A');*/ pt = found_suffixed_cell( ptins->FIGNAME, FALSE ); @@ -772,8 +768,8 @@ int sig_index; if (nb > 1) { fprintf( stderr, "*** mbk error *** edifsavelofig : Error in MBK Structure\n" ); - fprintf( stderr, " multiple (portref ..) to lofig '%s' not\n" ); - fprintf( stderr, " allowed on signal of type 'E' (cadence)\n", lofig_name ); + fprintf( stderr, " multiple (portref ..) to lofig '%s' not\n", lofig_name ); + fprintf( stderr, " allowed on signal of type 'E' (cadence)\n" ); exit( 1 ); } @@ -787,10 +783,9 @@ locon_list *sig_con; int sig_index; { losig_list *sig_con_sig; - locon_list *connector, *fig_con; + locon_list *fig_con; char *sig_con_name; - connector = (locon_list *)NULL; fig_con = sig_con; sig_con_name = (char *)NULL; @@ -800,7 +795,6 @@ int sig_index; if (sig_con_sig -> INDEX == sig_index) { sig_con_name = sig_con -> NAME; - connector=sig_con; break; } sig_con = sig_con -> NEXT; @@ -849,7 +843,7 @@ int *end; { fprintf( stderr, "*** mbk error *** edifsavelofig : Error in MBK Structure\n" ); fprintf( stderr, " Connectors %s and %s of same bus must have same direction\n", - ptcon_first_bus->NAME, *ptcon->NAME); + ptcon_first_bus->NAME, ptcon->NAME); exit( 1 ); } *end = edif_busindex( ptcon->NAME ); diff --git a/alliance/src/mbkedif/src/parser_l.l b/alliance/src/mbkedif/src/parser_l.l index 9ff71f4d..4b8d53db 100644 --- a/alliance/src/mbkedif/src/parser_l.l +++ b/alliance/src/mbkedif/src/parser_l.l @@ -1,6 +1,10 @@ + +%option nounput + %p 5000 %k 1200 + %{ #include #include "parser_y.h" diff --git a/alliance/src/mbkedif/src/parser_y.y b/alliance/src/mbkedif/src/parser_y.y index a31bdbf2..fab9f689 100644 --- a/alliance/src/mbkedif/src/parser_y.y +++ b/alliance/src/mbkedif/src/parser_y.y @@ -10,10 +10,12 @@ /* version 4.06: by Olivier BEAURIN (Nov. 93) */ /*----------------------------------------------------------------------*/ -#include -#include #include #include +#include +#include +#include +#include /*---------------------------------------------------------\ Les defines @@ -62,9 +64,12 @@ static char CheckCadenceBusError( ); static char *CheckCadenceNetError( ); static lofig_list *get_figure_pt ( ); static char is_portinstance ( ); +static int yyerror ( ); +extern void yyrestart ( ); extern char *edif_busname ( ); extern int yylineno; +extern int yylex ( ); %} @@ -189,7 +194,7 @@ r_extcell : YY_BASE_CELL = incatalog( cell_name ); - if( ptf->LOCON && YY_BASE_CELL || ptf->LOSIG ) + if( (ptf->LOCON && YY_BASE_CELL) || ptf->LOSIG ) YY_NOLOAD_FIG = 1; else YY_NOLOAD_FIG = 0; @@ -283,7 +288,7 @@ r_cell : YY_BASE_CELL = incatalog( cell_name ); - if( ptf->LOCON && YY_BASE_CELL || ptf->LOSIG ) + if( (ptf->LOCON && YY_BASE_CELL) || ptf->LOSIG ) YY_NOLOAD_FIG = 1; else YY_NOLOAD_FIG = 0; @@ -298,15 +303,11 @@ r_cell : if (YY_NOLOAD_FIG == 0) { - char *array_cname; - char *array_sname; - locon_list *ptcon; char new_sig_name[MAXSTRLEN]; - char end; locon_list *YY_INS_PTCON = (locon_list *) NULL; locon_list *YY_PTCON = (locon_list *) NULL; - losig_list *sigvss; - losig_list *sigvdd; + losig_list *sigvss = NULL; + losig_list *sigvdd = NULL; locon_list *ptlocon; for( ptlocon = YY_PTFIG->LOCON; ptlocon; ptlocon = ptlocon->NEXT ) @@ -838,7 +839,8 @@ r_portref : exit( 1 ); } - if (YY_PORTLIST) + if (YY_PORTLIST) + { if (++YY_PORTLIST_NUM < YY_BUS_WIDTH) YY_PORTLIST_SIG = YY_PORTLIST_SIG->NEXT; else @@ -850,6 +852,7 @@ r_portref : yylineno ); exit (1); } + } } } | T_PORTREF T_MEMBER r_namedef T_INTEGER ')' ')' @@ -862,9 +865,9 @@ r_portref : if ( (CheckCadenceBusError ($3, &begin, &end)) && ($4 <= abs( begin - end ) ) ) - sprintf(&port_name[0], "%s %d", YY_ARRAYPORTNAME, ( begin <= end ) ? begin + $4 : begin - $4 ); + sprintf(&port_name[0], "%s %ld", YY_ARRAYPORTNAME, ( begin <= end ) ? begin + $4 : begin - $4 ); else - sprintf(&port_name[0], "%s %d", $3, $4); + sprintf(&port_name[0], "%s %ld", $3, $4); YY_PTCON = getlocon (YY_PTFIG, port_name); if (!YY_PORTLIST) @@ -873,7 +876,7 @@ r_portref : YY_PTCON->SIG = (losig_list *)YY_PORTLIST_SIG->DATA; YY_SIGTYPE = EXTERNAL; - if (YY_PORTLIST) + if (YY_PORTLIST) { if (++YY_PORTLIST_NUM < YY_BUS_WIDTH) YY_PORTLIST_SIG = YY_PORTLIST_SIG->NEXT; else @@ -885,6 +888,7 @@ r_portref : yylineno ); exit (1); } + } } } | T_PORTREF T_MEMBER r_namedef T_INTEGER ')' T_INSTANCEREF r_namedef ')' ')' @@ -901,9 +905,9 @@ r_portref : if ( (CheckCadenceBusError ($3, &begin, &end) ) && ($4 <= abs( begin - end ) ) ) - sprintf(&port_name[0], "%s %d", YY_ARRAYPORTNAME, ( begin <= end ) ? begin + $4 : begin - $4 ); + sprintf(&port_name[0], "%s %ld", YY_ARRAYPORTNAME, ( begin <= end ) ? begin + $4 : begin - $4 ); else - sprintf(&port_name[0], "%s %d", $3, $4); + sprintf(&port_name[0], "%s %ld", $3, $4); YY_PORTNAME = namealloc (&port_name[0]); for (YY_PTCON = YY_PTINS->LOCON; YY_PTCON; YY_PTCON = YY_PTCON->NEXT) @@ -927,7 +931,7 @@ r_portref : exit (1); } - if (YY_PORTLIST) + if (YY_PORTLIST) { if (++YY_PORTLIST_NUM < YY_BUS_WIDTH) YY_PORTLIST_SIG = YY_PORTLIST_SIG->NEXT; else @@ -939,6 +943,7 @@ r_portref : yylineno ); exit (1); } + } } } ; @@ -1104,7 +1109,6 @@ locon_list *ptlocon; char *bnameref; int bus_width; { - int i, n; char port_name[MAXSTRLEN]; char *pname; locon_list *loconp; @@ -1152,9 +1156,7 @@ char mode; char filename[120]; lofig_list *pt; losig_list *ptsig; - losig_list *ptsignext; loins_list *ptins; - loins_list *ptinsnext; static char Vierge = 1; /* first time */ @@ -1562,7 +1564,7 @@ char master; j = 0; do { - sprintf (buf, "%s %d", YY_RIPPER_IN, j); + sprintf (buf, "%s %ld", YY_RIPPER_IN, j); b = namealloc (buf); for (c1 = i->LOCON; c1; c1 = c1->NEXT) @@ -1571,7 +1573,7 @@ char master; { i1 = c1->SIG->INDEX; - sprintf (buf, "%s %d", YY_RIPPER_OUT, j); + sprintf (buf, "%s %ld", YY_RIPPER_OUT, j); b = namealloc (buf); for (c2 = i->LOCON; c2; c2 = c2->NEXT) diff --git a/alliance/src/mbkedif/src/time.c b/alliance/src/mbkedif/src/time.c index 29711751..731ea007 100644 --- a/alliance/src/mbkedif/src/time.c +++ b/alliance/src/mbkedif/src/time.c @@ -62,12 +62,11 @@ int hour; int minute; int second; char month[6]; -int nmonth; time(&tim); date = (char *)malloc(30); strcpy(date, ctime(&tim)); - sscanf(date, "%s %s %d %d:%d:%d %d", + sscanf(date, "%5s %5s %11d %11d:%11d:%11d %11d", day,month,&nday,&hour,&minute,&second,&year); sprintf(date, "%04d %02d %02d %02d %02d %02d", year,EdifMonth(month),nday,hour,minute,second); diff --git a/alliance/src/mbkhilo/src/drive_hilo.c b/alliance/src/mbkhilo/src/drive_hilo.c index be197715..c792397d 100644 --- a/alliance/src/mbkhilo/src/drive_hilo.c +++ b/alliance/src/mbkhilo/src/drive_hilo.c @@ -95,17 +95,18 @@ char one = 1; s = name; t = buffer; while (*s) { - if (*s == ' ') - if (one) { - *t++ = '['; - s++; - one = 0; - } else { - *t++ = ']'; - *t++ = '['; - s++; - } + if (*s == ' ') { + if (one) { + *t++ = '['; + s++; + one = 0; + } else { + *t++ = ']'; + *t++ = '['; + s++; + } *t++ = *s++; + } } if (!one) *t++ = ']'; @@ -133,7 +134,6 @@ lofig_list *ptnewfig = NULL; FILE *ptfile; char *amatla; char *SigName = NULL; -char NetName[100]; char Buffer[256]; if ((ptfile = mbkfopen(ptfig->NAME, OUT_LO, WRITE_TEXT)) == NULL) @@ -195,7 +195,7 @@ for (ptins = ptfig->LOINS; ptins; ptins = ptins->NEXT) { (void)fprintf(stderr, "*** mbk error ***\ninterface discrepancy"); (void)fprintf(stderr, "between instance %s and", ptins->INSNAME); - (void)fprintf(stderr, " model %s", ptins->INSNAME, ptins->FIGNAME); + (void)fprintf(stderr, " model %s", ptins->FIGNAME); (void)fprintf(stderr, " driving file %s.cct\n", ptfig->NAME); EXIT(1); } diff --git a/alliance/src/mbkmg/src/mbk2mg.c b/alliance/src/mbkmg/src/mbk2mg.c index 27ea83df..b0369ea9 100644 --- a/alliance/src/mbkmg/src/mbk2mg.c +++ b/alliance/src/mbkmg/src/mbk2mg.c @@ -96,21 +96,22 @@ char one = 1; s = name; t = buffer; while (*s) { - if (*s == ' ' || (*s == '_' && !one)) - if (one) { - *t++ = '['; - s++; - one = 0; - } else { - *t++ = ']'; - *t++ = '['; - s++; - } - if ((*s == '/' || *s == '_') && !one) { - *t++ = ']'; - one = 1; - } - *t++ = *s++; + if (*s == ' ' || (*s == '_' && !one)) { + if (one) { + *t++ = '['; + s++; + one = 0; + } else { + *t++ = ']'; + *t++ = '['; + s++; + } + } + if ((*s == '/' || *s == '_') && !one) { + *t++ = ']'; + one = 1; + } + *t++ = *s++; } if (!one) *t++ = ']'; @@ -431,7 +432,7 @@ FILE *file; phref_list *HeadOfList; { register phref_list *pt; -static refindex; +static int refindex; for (pt = HeadOfList; pt; pt = pt->NEXT) { /* text because we don't know how to print anything */ diff --git a/alliance/src/mbkmg/src/mg2mbk_l.l b/alliance/src/mbkmg/src/mg2mbk_l.l index 7c42961f..84544cd9 100644 --- a/alliance/src/mbkmg/src/mg2mbk_l.l +++ b/alliance/src/mbkmg/src/mg2mbk_l.l @@ -1,3 +1,6 @@ + +%option nounput + %{ /* * This file is part of the Alliance CAD System diff --git a/alliance/src/mbkmg/src/mg2mbk_y.y b/alliance/src/mbkmg/src/mg2mbk_y.y index da067d0d..d3fcd291 100644 --- a/alliance/src/mbkmg/src/mg2mbk_y.y +++ b/alliance/src/mbkmg/src/mg2mbk_y.y @@ -34,6 +34,10 @@ #include #define MAXLAYER (LAST_LAYER + 1) +extern void yyrestart(); +extern int yylex(); +extern void yyerror(); + static phfig_list *mgleaf; /* modgen leaf cell parsed */ static char mbk_layer(); static char *checkinsname(); @@ -523,6 +527,7 @@ char *mg_layer; return TALU2; if (!strcmp(mg_layer, "am3")) return TALU3; + return NWELL; } /* decode a reference name : @@ -542,25 +547,27 @@ char one = 0; s = t = name; while (*t) { - if (*t == '[') - if (!one) { - *t = ' '; - u = s; - one = 1; - } else if (one == 1) { - *t = '_'; - u = s; - one++; - } else { - *t = ' '; - u = s; - } - else if (*t == ']') - if (*(++t) == '\0') /* ok, it's finished */ - goto end; - else if (*t == '[') /* multiple array */ - continue; - *s++ = *t++; + if (*t == '[') { + if (!one) { + *t = ' '; + u = s; + one = 1; + } else if (one == 1) { + *t = '_'; + u = s; + one++; + } else { + *t = ' '; + u = s; + } + } + else if (*t == ']') { + if (*(++t) == '\0') /* ok, it's finished */ + goto end; + else if (*t == '[') /* multiple array */ + continue; + } + *s++ = *t++; } end: *s = '\0'; diff --git a/alliance/src/mbkspice/src/spi_drive.c b/alliance/src/mbkspice/src/spi_drive.c index e5103672..ccaa83b8 100644 --- a/alliance/src/mbkspice/src/spi_drive.c +++ b/alliance/src/mbkspice/src/spi_drive.c @@ -194,8 +194,6 @@ char *vss; { losig_list *scanlosig; int nbr; - convindex *cvx; - ptype_list *ptptype; lowire_list *scanlowire; int nbctc; chain_list *scanchain; @@ -209,9 +207,6 @@ char *vss; if( !scanlosig->PRCN ) continue; - ptptype = getptype( scanlosig->USER, SPI_DRIVER_PTYPE ); - cvx = (convindex*)(ptptype->DATA); - if( scanlosig->PRCN->PWIRE || scanlosig->PRCN->PCTC ) { nbr = 1; @@ -330,15 +325,11 @@ locon_list *c; int position; { losig_list *signal; - ptype_list *pt; - convindex *noeudbase; num_list *tetenum,*scannum; - char v[1024]; + char v[1024] = ""; int lgmot; signal = c->SIG; - pt = getptype( signal->USER, SPI_DRIVER_PTYPE ); - noeudbase = (convindex*)(pt->DATA); if( c->PNODE ) { @@ -387,8 +378,6 @@ int position; int n; chain_list *cpteordre; losig_list *signal; - ptype_list *pt; - convindex *noeudbase; num_list *scannum; num_list *tetenum; char v[1024]; @@ -416,8 +405,6 @@ int position; num++; signal = scanlocon->SIG; - pt = getptype( signal->USER, SPI_DRIVER_PTYPE ); - noeudbase = (convindex*)(pt->DATA); if( scanlocon->PNODE ) { diff --git a/alliance/src/mbkspice/src/spi_hash.c b/alliance/src/mbkspice/src/spi_hash.c index 948c3105..be5cdfea 100644 --- a/alliance/src/mbkspice/src/spi_hash.c +++ b/alliance/src/mbkspice/src/spi_hash.c @@ -31,6 +31,7 @@ *******************************************************************************/ #include +#include #include #include "spi_hash.h" diff --git a/alliance/src/mbkspice/src/spi_msg.c b/alliance/src/mbkspice/src/spi_msg.c index 8c41bd28..e52432a6 100644 --- a/alliance/src/mbkspice/src/spi_msg.c +++ b/alliance/src/mbkspice/src/spi_msg.c @@ -32,6 +32,7 @@ #include #include +#include #include "spi_msg.h" #include diff --git a/alliance/src/mbkspice/src/spi_parse.c b/alliance/src/mbkspice/src/spi_parse.c index 17264abf..12d92e70 100644 --- a/alliance/src/mbkspice/src/spi_parse.c +++ b/alliance/src/mbkspice/src/spi_parse.c @@ -531,7 +531,6 @@ spifile *df; ginterf **teteinterf; { char complet; - char debut; chain_list *ligne; chain_list *elem, *elem1, *elem2; float valeur; @@ -552,7 +551,6 @@ ginterf **teteinterf; char buf[1024]; char tt; - debut = 0; complet = 0; ptcir = NULL; @@ -1791,7 +1789,6 @@ char mode; trans *scantrans; inst *scaninst; char *nom; - int idxcon; lotrs_list *pttrs; locon_list *scancon; capa *scancapa; @@ -1936,7 +1933,6 @@ char mode; /* Connecteurs de l'interface */ - idxcon = 1; for( sc1 = ptcir->CINTERF, sc2 = instances->GINTERF ; sc1 && sc2 ; sc1 = sc1->NEXT, sc2 = sc2->NEXT @@ -2407,10 +2403,7 @@ spifile *df; int val; char *fin; noeud *sn; - char *nom; - - val = -1; - nom = NULL; + char *nom = NULL; val = strtol( index, &fin, 10 ); @@ -2645,9 +2638,7 @@ circuit *ptcir; capa *c1, *c2; noeud *tmp; char *vss; - char *vdd; - vdd = spicenamealloc( ptcir, VDD ); vss = spicenamealloc( ptcir, VSS); for( scanresi = ptcir->RESI ; scanresi ; scanresi = scanresi->SUIV ) diff --git a/alliance/src/mbkvhdl/src/mvl_parse.h b/alliance/src/mbkvhdl/src/mvl_parse.h index ad89f2eb..29b70666 100644 --- a/alliance/src/mbkvhdl/src/mvl_parse.h +++ b/alliance/src/mbkvhdl/src/mvl_parse.h @@ -52,6 +52,7 @@ struct lofig *MVL_LOFPNT = NULL; /* current LOFIG pointer */ extern FILE *mvl_y_in; extern int mvl_y_parse(); +extern void mvl_y_restart(); extern void mvl_decomp(); /* ###--------------------------------------------------------------### */ diff --git a/alliance/src/mbkvhdl/src/mvl_scomp_l.l b/alliance/src/mbkvhdl/src/mvl_scomp_l.l index daf0e8d0..bc186108 100644 --- a/alliance/src/mbkvhdl/src/mvl_scomp_l.l +++ b/alliance/src/mbkvhdl/src/mvl_scomp_l.l @@ -1,3 +1,7 @@ + +%option noinput +%option nounput + %{ /*###----------------------------------------------------------------###*/ /* */ diff --git a/alliance/src/mbkvhdl/src/mvl_scomp_y.y b/alliance/src/mbkvhdl/src/mvl_scomp_y.y index a65faf66..6fcb77d8 100644 --- a/alliance/src/mbkvhdl/src/mvl_scomp_y.y +++ b/alliance/src/mbkvhdl/src/mvl_scomp_y.y @@ -11,12 +11,15 @@ %{ #include +#include #include #include #include "mvl_stype.h" #include "mvl_syacc.h" #include "mvl_stdef.h" +extern void yyerror (); +extern int yylex (); static int MVL_GENFLG = 0 ; /* Indicates if generic */ static int MVL_CONRNK = 0 ; /* rank of an implicit connexion*/ @@ -925,9 +928,7 @@ component_instantiation_statement struct loins *loins_pnt ; struct locon *locon_pnt ; struct chain *chain_pnt ; - char *prt_name ; char tampon [256] ; - long i = 0; if (MVL_CHDPNT != NULL) { @@ -1043,7 +1044,6 @@ association_element } | actual_port_name { - long sig_width ; struct chain *sig_list1 ; char *prt_name ; long prt_width ; diff --git a/alliance/src/mbkvhdl/src/mvl_sspec.c b/alliance/src/mbkvhdl/src/mvl_sspec.c index d13a7179..51b7e742 100644 --- a/alliance/src/mbkvhdl/src/mvl_sspec.c +++ b/alliance/src/mbkvhdl/src/mvl_sspec.c @@ -62,7 +62,7 @@ short right; /* array's right bound (= -1 if scalar) */ short i ; short inc = 1; struct chain *pt_chlst ; - struct losig *ptsig ; + struct losig *ptsig = NULL; if ((left==-1) && (right==-1)) { @@ -112,7 +112,7 @@ short right; /* array right bound (= -1 if scalar) */ char extname[100]; short i ; short inc = 1; - struct locon *ptcon ; + struct locon *ptcon = NULL; struct locon *ptcontmp ; if ((left==-1) && (right==-1)) diff --git a/alliance/src/mbkvhdl/src/mvl_util.c b/alliance/src/mbkvhdl/src/mvl_util.c index 5d3f56e1..6d4e7aa0 100644 --- a/alliance/src/mbkvhdl/src/mvl_util.c +++ b/alliance/src/mbkvhdl/src/mvl_util.c @@ -149,7 +149,7 @@ char *str1; case 2: if (first_time != 1) { - (void)fprintf (stderr,"Warning %d : ",code); + (void)fprintf (stderr,"Warning %ld : ",code); (void)fprintf(stderr,"consistency checks will be disabled\n"); first_time = 1; } @@ -162,7 +162,7 @@ char *str1; default: { - (void)fprintf(stderr,"Warning %d : ",code); + (void)fprintf(stderr,"Warning %ld : ",code); (void)fprintf(stderr,"unknown Warning code\n"); } } @@ -180,7 +180,7 @@ char *str2; long nbr1; { - (void) fprintf (stderr,"Fatal error %d executing `%s`: ", code,str1); + (void) fprintf (stderr,"Fatal error %ld executing `%s`: ", code,str1); switch (code) { case 10: @@ -205,7 +205,7 @@ long nmb1; switch (code) { default: - (void) fprintf (stderr,"mvl_message : code %d unknown.\n",code); + (void) fprintf (stderr,"mvl_message : code %ld unknown.\n",code); } } @@ -419,11 +419,11 @@ char *str1; { MVL_ERRFLG++; if (code < 100) - (void)fprintf (stderr,"`%s` Error %d line %d :",MVL_CURFIL,code,MVL_LINNUM); + (void)fprintf (stderr,"`%s` Error %ld line %d :",MVL_CURFIL,code,MVL_LINNUM); else { if (code < 200) - (void)fprintf (stderr,"Error %d :",code); + (void)fprintf (stderr,"Error %ld :",code); } switch (code) @@ -692,7 +692,7 @@ char *name; while (mvl_chktab (namtab,new_name,NULL,MVL_NEWDFN) != 0) { new_name = prv_name; - sprintf (buffer,"%s_%d",new_name,number++); + sprintf (buffer,"%s_%ld",new_name,number++); prv_name = new_name; new_name = namealloc (buffer); } diff --git a/alliance/src/mbkvhdlg/src/gen_generic.c b/alliance/src/mbkvhdlg/src/gen_generic.c index 40bdccb3..5d7aa5ba 100644 --- a/alliance/src/mbkvhdlg/src/gen_generic.c +++ b/alliance/src/mbkvhdlg/src/gen_generic.c @@ -128,7 +128,7 @@ logen_list *pins, *pmod; if (ins) { if (ins->NAME) { for (pins=ins;pins;pins=pins->NEXT) - if (pmod=getlogen(mod,pins->NAME)) + if ( (pmod=getlogen(mod,pins->NAME)) ) pmod->TAG=1; else { fprintf(stderr, diff --git a/alliance/src/mbkvhdlg/src/gen_generic.h b/alliance/src/mbkvhdlg/src/gen_generic.h index a09003d2..bdf9f361 100644 --- a/alliance/src/mbkvhdlg/src/gen_generic.h +++ b/alliance/src/mbkvhdlg/src/gen_generic.h @@ -32,3 +32,4 @@ extern logen_list *getlogen(logen_list *,char *); extern logen_list *duplogen(logen_list *,logen_list *, char *); extern logen_list *chklogen(logen_list *,logen_list *, char *, char *); extern logen_list *dellogen(logen_list *, char *name); +extern void debuglogen(logen_list *g, int level); diff --git a/alliance/src/mbkvhdlg/src/mvl_drive.c b/alliance/src/mbkvhdlg/src/mvl_drive.c index 98a397f4..a7f46b73 100644 --- a/alliance/src/mbkvhdlg/src/mvl_drive.c +++ b/alliance/src/mbkvhdlg/src/mvl_drive.c @@ -29,10 +29,10 @@ static void drv_genvalue(FILE *ptfile, logen_list *ptgen) fprintf(ptfile, "'%c'", ptgen->VALUE.CHAR); break; case GENTYPE_VAL: - fprintf(ptfile, "%d", ptgen->VALUE.VAL); + fprintf(ptfile, "%ld", ptgen->VALUE.VAL); break; case GENTYPE_ARG: - fprintf(ptfile, "%d", ptgen->VALUE.VAL); + fprintf(ptfile, "%ld", ptgen->VALUE.VAL); break; case GENTYPE_TEXT: fputs(ptgen->VALUE.TEXT, ptfile); @@ -53,7 +53,7 @@ static void drv_generic(FILE *ptfile, ptype_list *pttype) { struct logen *ptgen; - if (pttype=getptype(pttype,LOGEN)) { + if ( (pttype=getptype(pttype,LOGEN)) ) { fprintf (ptfile," generic (\n"); for (ptgen=pttype->DATA;ptgen;ptgen=ptgen->NEXT) { fprintf (ptfile," CONSTANT %s : ",ptgen->NAME); diff --git a/alliance/src/mbkvhdlg/src/mvl_parse.c b/alliance/src/mbkvhdlg/src/mvl_parse.c index 9baffe56..cfdaa97e 100644 --- a/alliance/src/mbkvhdlg/src/mvl_parse.c +++ b/alliance/src/mbkvhdlg/src/mvl_parse.c @@ -15,6 +15,8 @@ #include "mvl_parse.h" #include "mvl_utdef.h" +extern void mvl_y_restart(); + void vhdlloadlofig (pt_lofig, figname, mode) struct lofig *pt_lofig; diff --git a/alliance/src/mbkvhdlg/src/mvl_scomp_l.l b/alliance/src/mbkvhdlg/src/mvl_scomp_l.l index 988d0a37..b80e25f9 100644 --- a/alliance/src/mbkvhdlg/src/mvl_scomp_l.l +++ b/alliance/src/mbkvhdlg/src/mvl_scomp_l.l @@ -1,3 +1,7 @@ + +%option noinput +%option nounput + %{ /*###----------------------------------------------------------------###*/ /* */ diff --git a/alliance/src/mbkvhdlg/src/mvl_scomp_y.y b/alliance/src/mbkvhdlg/src/mvl_scomp_y.y index 1f86a042..4de57074 100644 --- a/alliance/src/mbkvhdlg/src/mvl_scomp_y.y +++ b/alliance/src/mbkvhdlg/src/mvl_scomp_y.y @@ -21,7 +21,9 @@ #include "gen_generic.h" -static int MVL_GENFLG = 0 ; /* Indicates if generic */ +extern int yylex (); +extern void yyerror (); + static int MVL_CONRNK = 0 ; /* rank of an implicit connexion*/ static int MVL_SIGIDX = 1 ; /* structural's signal index */ static int MVL_SIMFLG = 0 ; /* simple flag */ @@ -951,10 +953,7 @@ component_instantiation_statement struct loins *loins_pnt ; struct locon *locon_pnt ; struct chain *chain_pnt ; - struct logen *genmod ; - char *prt_name ; char tampon [256] ; - long i = 0; if (MVL_CHDPNT != NULL) { @@ -1076,12 +1075,13 @@ generic_simple_expression : .sign. generic_term { - if ($1) + if ($1) { if (MVL_LOGEN.TYPE!=GENTYPE_VAL) { fputs("Don't know how to change Identifier sign\n", stderr); } else MVL_LOGEN.VALUE.VAL = -MVL_LOGEN.VALUE.VAL; + } } ...generic_term.. ; @@ -1271,7 +1271,6 @@ association_element } | actual_port_name { - long sig_width ; struct chain *sig_list1 ; char *prt_name ; long prt_width ; diff --git a/alliance/src/mbkvhdlg/src/mvl_sspec.c b/alliance/src/mbkvhdlg/src/mvl_sspec.c index e49fdbeb..3132ab53 100644 --- a/alliance/src/mbkvhdlg/src/mvl_sspec.c +++ b/alliance/src/mbkvhdlg/src/mvl_sspec.c @@ -39,7 +39,7 @@ short right; /* array's right bound (= -1 if scalar) */ short i ; short inc = 1; struct chain *pt_chlst ; - struct losig *ptsig ; + struct losig *ptsig = NULL; if ((left==-1) && (right==-1)) { @@ -89,7 +89,7 @@ short right; /* array right bound (= -1 if scalar) */ char extname[100]; short i ; short inc = 1; - struct locon *ptcon ; + struct locon *ptcon = NULL; struct locon *ptcontmp ; if ((left==-1) && (right==-1)) diff --git a/alliance/src/mbkvhdlg/src/mvl_util.c b/alliance/src/mbkvhdlg/src/mvl_util.c index f821e4ba..e44b57b5 100644 --- a/alliance/src/mbkvhdlg/src/mvl_util.c +++ b/alliance/src/mbkvhdlg/src/mvl_util.c @@ -127,7 +127,7 @@ char *str1; case 2: if (first_time != 1) { - (void)fprintf (stderr,"Warning %d : ",code); + (void)fprintf (stderr,"Warning %ld : ",code); (void)fprintf(stderr,"consistency checks will be disabled\n"); first_time = 1; } @@ -140,7 +140,7 @@ char *str1; default: { - (void)fprintf(stderr,"Warning %d : ",code); + (void)fprintf(stderr,"Warning %ld : ",code); (void)fprintf(stderr,"unknown Warning code\n"); } } @@ -158,7 +158,7 @@ char *str2; long nbr1; { - (void) fprintf (stderr,"Fatal error %d executing `%s`: ", code,str1); + (void) fprintf (stderr,"Fatal error %ld executing `%s`: ", code,str1); switch (code) { case 10: @@ -183,7 +183,7 @@ long nmb1; switch (code) { default: - (void) fprintf (stderr,"mvl_message : code %d unknown.\n",code); + (void) fprintf (stderr,"mvl_message : code %ld unknown.\n",code); } } @@ -397,11 +397,11 @@ char *str1; { MVL_ERRFLG++; if (code < 100) - (void)fprintf (stderr,"`%s` Error %d line %d :",MVL_CURFIL,code,MVL_LINNUM); + (void)fprintf (stderr,"`%s` Error %ld line %d :",MVL_CURFIL,code,MVL_LINNUM); else { if (code < 200) - (void)fprintf (stderr,"Error %d :",code); + (void)fprintf (stderr,"Error %ld :",code); } switch (code) @@ -663,7 +663,7 @@ char *name; while (mvl_chktab (namtab,new_name,NULL,MVL_NEWDFN) != 0) { new_name = prv_name; - sprintf (buffer,"%s_%d",new_name,number++); + sprintf (buffer,"%s_%ld",new_name,number++); prv_name = new_name; new_name = namealloc (buffer); } diff --git a/alliance/src/mbkvhdlg/src/vel_drive.c b/alliance/src/mbkvhdlg/src/vel_drive.c index da163c94..8b26f57d 100644 --- a/alliance/src/mbkvhdlg/src/vel_drive.c +++ b/alliance/src/mbkvhdlg/src/vel_drive.c @@ -95,12 +95,20 @@ #include #include #include +#include #include #include #include #include "vel_velo.h" #include "gen_generic.h" +extern void vhdlsavelofig(); +extern int vhdlsavevelofig(); +extern void vectorize_velosig(); +extern void vectorize_velocon(); +extern void chkdir(); +extern void addsignals(); + /* ###--------------------------------------------------------------------### */ /* # Static Variables # */ /* ###--------------------------------------------------------------------### */ @@ -223,12 +231,13 @@ static void drv_genvalue(FILE *ptfile, logen_list *ptgen) } for (l=ptgen->VALUE.LIST; l; l=l->NEXT) { drv_genvalue(ptfile, l); - if (l->NEXT) + if (l->NEXT) { if (dim==2) { fputs(",\n", ptfile); for (i=0; iNAME, mode?"vhd":"vst", "w"))) { @@ -426,12 +435,13 @@ int length, j; for (m=s->VSIG; m; m=m->NEXT) { ss=(velosig *)m->DATA; fputs(ss->NAME, file); - if (ss->TYPE=='V' || ss->TYPE=='M') + if (ss->TYPE=='V' || ss->TYPE=='M') { if (ss->LEFT==ss->RIGHT) fprintf(file, "(%ld)", ss->LEFT); else fprintf(file, "(%ld %s %ld)", ss->LEFT, getvectordirection(ss), ss->RIGHT); + } if (m->NEXT) fputs("& ",file); } @@ -603,7 +613,7 @@ loins_list *i; losig_list *s; locon_list *c; char *cn; -char *sn, *t, *r = NULL; +char *sn, *t=NULL, *r = NULL; int first = 1, previous=0, delta=0, current=0; char Buffer0[1024]; int sigi = 0; @@ -748,7 +758,7 @@ its_first: buildvelo(f); - p=getptype(f->USER, VEL_SIG); + //p=getptype(f->USER, VEL_SIG); vectorize_velosig(f); p=getptype(f->USER, VEL_CON); diff --git a/alliance/src/mbkvhdlg/src/vel_o.c b/alliance/src/mbkvhdlg/src/vel_o.c index 0e1532f0..1694784f 100644 --- a/alliance/src/mbkvhdlg/src/vel_o.c +++ b/alliance/src/mbkvhdlg/src/vel_o.c @@ -141,7 +141,7 @@ velosig *s; int delvelocon(ptype_list *p, velocon *d) { - velocon *c, *s; + velocon *c, *s=NULL; for (c=(velocon *)p->DATA; c; c=c->NEXT) { if (c==d) @@ -165,7 +165,7 @@ int delvelocon(ptype_list *p, velocon *d) int delvelosig(ptype_list *p, velosig *d) { - velosig *c, *s; + velosig *c=NULL, *s=NULL; for (c=(velosig *)p->DATA; c; c=c->NEXT) { if (c==d) diff --git a/alliance/src/mbkvhdlg/src/vel_sort.c b/alliance/src/mbkvhdlg/src/vel_sort.c index f5b9764f..9c9cfcae 100644 --- a/alliance/src/mbkvhdlg/src/vel_sort.c +++ b/alliance/src/mbkvhdlg/src/vel_sort.c @@ -42,8 +42,6 @@ #ident "$Id: vel_sort.c,v 1.1 2002/04/26 09:51:07 ludo Exp $" -static char buffer[BUFSIZ]; -static char str[BUFSIZ]; #if 0 /******************************************************************************* diff --git a/alliance/src/mbkvhdlg/src/vel_util.c b/alliance/src/mbkvhdlg/src/vel_util.c index 57805af6..0b4f487f 100644 --- a/alliance/src/mbkvhdlg/src/vel_util.c +++ b/alliance/src/mbkvhdlg/src/vel_util.c @@ -193,9 +193,8 @@ static chain_list *mkvector(lofig_list *f, chain_list *c) { velosig *s, *e; char *name=NULL; -long left, right; -char type; -chain_list *r=NULL, *sigchain; +long left=0, right=0; +chain_list *r=NULL, *sigchain=NULL; ptype_list *ps; ps=getptype(f->USER, VEL_SIG); @@ -216,7 +215,6 @@ ptype_list *ps; name=s->NAME; left=s->LEFT; right=s->RIGHT; - type=s->TYPE; sigchain=addchain(NULL, s); } c=c->NEXT; @@ -337,11 +335,12 @@ long dir; dir=vs->RIGHT-vs->LEFT; - if (dir!=0) + if (dir!=0) { if (dir<0) return -1; else return 1; + } return 0; } @@ -445,7 +444,7 @@ int f=0; c=buf; if (!isalpha(*name)) { - sprintf(c,"v_", signalindex++); + sprintf(c,"v_%u", signalindex++); c+=2; f=1; } @@ -470,8 +469,11 @@ int f=0; if (f) { *c='\0'; - while (namefind(buf)) - sprintf(buf, "d%s", buf); + char buf2[BUFSIZ]; + while (namefind(buf)) { + sprintf(buf2, "d%s", buf); + strncpy(buf, buf2, BUFSIZ-1); + } return namealloc(buf); } else { return name; diff --git a/alliance/src/mbkvhdlg/src/vel_vect.c b/alliance/src/mbkvhdlg/src/vel_vect.c index 5a162d3e..b8084774 100644 --- a/alliance/src/mbkvhdlg/src/vel_vect.c +++ b/alliance/src/mbkvhdlg/src/vel_vect.c @@ -56,11 +56,14 @@ #include #include +extern void sortlosigv(); + static char buffer[BUFSIZ]; #define Signame(sig) ((sig)->NAMECHAIN->DATA) #define Delvectorname(s) (s)->NAMECHAIN=delchain((s)->NAMECHAIN,(s)->NAMECHAIN) + /* ###--------------------------------------------------------------------### */ /* # Function addvectorname # */ /* ###--------------------------------------------------------------------### */ diff --git a/alliance/src/mbkvhdlg/src/x2vy_main.c b/alliance/src/mbkvhdlg/src/x2vy_main.c index b6d28605..c8c386a0 100644 --- a/alliance/src/mbkvhdlg/src/x2vy_main.c +++ b/alliance/src/mbkvhdlg/src/x2vy_main.c @@ -49,6 +49,9 @@ #include "gen_generic.h" #include "vel_velo.h" +extern void vectlosig(); +extern int vhdlsavevelofig(); + #define NOALIM 0x01 #define RENINS 0x02 #define VECCON 0x04 diff --git a/alliance/src/mbkvrlog/src/drive_vlog.c b/alliance/src/mbkvrlog/src/drive_vlog.c index da75625b..4d1c9378 100644 --- a/alliance/src/mbkvrlog/src/drive_vlog.c +++ b/alliance/src/mbkvrlog/src/drive_vlog.c @@ -72,7 +72,7 @@ printf ("entering vlg_name %s\n", name); } else { - if (isalpha(*name) || *name == '_' || (i != 0 && (isdigit(*name)) || *name == '$')) + if (isalpha(*name) || *name == '_' || (((i != 0) && (isdigit(*name))) || *name == '$')) { *scan_new = *name++; /* modif mourad : le 03/12/97 @@ -177,7 +177,6 @@ lofig_list *ptfig; { loins_list *ptins = NULL; locon_list *ptcon = NULL; - locon_list *tmp_ptcon = NULL; locon_list *ptscan = NULL; losig_list *ptsig = NULL; FILE *ptfile; @@ -339,7 +338,7 @@ printf("entering vlogsavelofig\n"); ptcon = ptins->LOCON; while(ptcon != NULL) { - tmp_ptcon = vlg_busname(ptcon, &left, &right, &name); + vlg_busname(ptcon, &left, &right, &name); (void) fprintf (ptfile, ".%s(",vlg_name(name)); if(left != -1) { diff --git a/alliance/src/mbkvti/src/drive_vti_l.c b/alliance/src/mbkvti/src/drive_vti_l.c index d814f019..59b50b55 100644 --- a/alliance/src/mbkvti/src/drive_vti_l.c +++ b/alliance/src/mbkvti/src/drive_vti_l.c @@ -78,7 +78,7 @@ int year, nday, hour, minute, second; (void)time(&timer); (void)strcpy(date, ctime(&timer)); - (void)sscanf(date, "%s %s %d %d:%d:%d 19%d", + (void)sscanf(date, "%3s %3s %11d %11d:%11d:%11d 19%11d", day, month, &nday, &hour, &minute, &second, &year); (void)sprintf(date, "%02d-%s-%02d %02d:%02d", nday, month, year, hour, minute); @@ -103,21 +103,22 @@ char one = 1; s = name; t = buffer; while (*s) { - if (*s == ' ') - if (one) { - *t++ = '['; - s++; - one = 0; - } else { - *t++ = ']'; - *t++ = '['; - s++; - } - if (*s == SEPAR && !one) { - *t++ = ']'; - one = 1; - } - *t++ = *s++; + if (*s == ' ') { + if (one) { + *t++ = '['; + s++; + one = 0; + } else { + *t++ = ']'; + *t++ = '['; + s++; + } + } + if (*s == SEPAR && !one) { + *t++ = ']'; + one = 1; + } + *t++ = *s++; } if (!one) *t++ = ']'; @@ -294,7 +295,7 @@ lowire_list *scanwire; for( ; scannum ; scannum=scannum->NEXT ) { (void)fprintf(ptfile, "X "); /* unable to represent direction in hns */ (void)fprintf(ptfile, "%ld ", ptcon->SIG->INDEX); - (void)fprintf(ptfile, "%d ", idx_rcn); + (void)fprintf(ptfile, "%ld ", idx_rcn); ptnode=getlonode(ptcon->SIG,scannum->DATA); ptnode->USER= (void *)addptype(ptnode->USER,HNSRCN_X,(void*)idx_rcn); (void)fprintf(ptfile, "%s;\n", busname(ptcon->NAME)); @@ -304,7 +305,7 @@ lowire_list *scanwire; else { (void)fprintf(ptfile, "X "); /* unable to represent direction in hns */ (void)fprintf(ptfile, "%ld ", ptcon->SIG->INDEX); - (void)fprintf(ptfile, "%d ", idx_rcn++); + (void)fprintf(ptfile, "%ld ", idx_rcn++); (void)fprintf(ptfile, "%s;\n", busname(ptcon->NAME)); } @@ -339,11 +340,11 @@ lowire_list *scanwire; for (ptcon = ptins->LOCON; ptcon != NULL; ptcon = ptcon->NEXT) { if( (scannum = ptcon->PNODE) ) { for( ; scannum ; scannum=scannum->NEXT ) { - (void)fprintf(ptfile, "%d ", idx_rcn++); + (void)fprintf(ptfile, "%ld ", idx_rcn++); } } else { - (void)fprintf(ptfile, "%d ", idx_rcn++); + (void)fprintf(ptfile, "%ld ", idx_rcn++); } LINEBREAK; } diff --git a/alliance/src/mbkvti/src/drive_vti_p.c b/alliance/src/mbkvti/src/drive_vti_p.c index dce513e1..84f85883 100644 --- a/alliance/src/mbkvti/src/drive_vti_p.c +++ b/alliance/src/mbkvti/src/drive_vti_p.c @@ -63,7 +63,7 @@ int year, nday, hour, minute, second; (void)time(&timer); (void)strcpy(date, ctime(&timer)); - (void)sscanf(date, "%s %s %d %d:%d:%d 19%d", + (void)sscanf(date, "%3s %3s %11d %11d:%11d:%11d 19%11d", day, month, &nday, &hour, &minute, &second, &year); (void)sprintf(date, "%02d-%s-%02d %02d:%02d", nday, month, year, hour, minute); @@ -85,21 +85,22 @@ char one = 1; s = name; t = buffer; while (*s) { - if (*s == ' ') - if (one) { - *t++ = '['; - s++; - one = 0; - } else { - *t++ = ']'; - *t++ = '['; - s++; - } - if (*s == '_' && !one) { /* was SEPAR and not / */ - *t++ = ']'; - one = 1; - } - *t++ = *s++; + if (*s == ' ') { + if (one) { + *t++ = '['; + s++; + one = 0; + } else { + *t++ = ']'; + *t++ = '['; + s++; + } + } + if (*s == '_' && !one) { /* was SEPAR and not / */ + *t++ = ']'; + one = 1; + } + *t++ = *s++; } if (!one) *t++ = ']'; @@ -121,9 +122,9 @@ phvia_list *ptvia; phref_list *ptref; int npoint = 0; int vix[LAST_CONTACT]; -int conindex = 0; /* connector index */ +int conindex = 0; /* connector index */ char symm; -char type; /* connector orient */ +char type = '-'; /* connector orient */ char *filename = ptfig->NAME; /* namealloc unnecessary */ char figname[10]; char insname[10]; diff --git a/alliance/src/mbkvti/src/parse_vti_l.c b/alliance/src/mbkvti/src/parse_vti_l.c index a3886594..ad4cdcb5 100644 --- a/alliance/src/mbkvti/src/parse_vti_l.c +++ b/alliance/src/mbkvti/src/parse_vti_l.c @@ -1012,12 +1012,12 @@ losig_list *sigct1,*sigct2; break; case 'Y' : /* Y INT INT [ num , num ] [ num , num ] ; */ - break; - t1 = strtok(line + 2, " \n\t\"@"); - t2 = strtok((char *)NULL, " \n\t\"@;"); - l2 = atol(t2); - ylist = addnum(ylist, l2); /* create a list of thru routes */ - break; + break; + /* t1 = strtok(line + 2, " \n\t\"@"); */ + /* t2 = strtok((char *)NULL, " \n\t\"@;"); */ + /* l2 = atol(t2); */ + /* ylist = addnum(ylist, l2); /\* create a list of thru routes *\/ */ + /* break; */ case 'Z' : /* Z INT name INT cap INT num num ; */ break; default : @@ -1293,7 +1293,6 @@ lofig_list *ptfig; int index; losig_list *scanlosig; ptype_list *ptl; - lorcnet_list *ptrcnet; struct hns_W *headw; struct hns_W *scanw; struct hns_W *elem_w; @@ -1331,7 +1330,7 @@ lofig_list *ptfig; /* On ne cree les vues RC que si on a des resistances. Tant pis pour les noeuds sur les locons */ if( !scanlosig->PRCN && headw ) - ptrcnet = addlorcnet(scanlosig); + addlorcnet(scanlosig); for( scanw = headw; scanw; scanw = scanw->NEXT ) { diff --git a/alliance/src/mbkvti/src/parse_vti_p.c b/alliance/src/mbkvti/src/parse_vti_p.c index 868d8ddd..4a8291f2 100644 --- a/alliance/src/mbkvti/src/parse_vti_p.c +++ b/alliance/src/mbkvti/src/parse_vti_p.c @@ -285,9 +285,9 @@ static void vti_addphseg(phfig_list * figure, char layer, static long stol(tokenpt) char *tokenpt; { -register char *pt; +//register char *pt; - if ((pt = strchr(tokenpt, '.')) == (char *)NULL) + if ((/*pt =*/ strchr(tokenpt, '.')) == (char *)NULL) return (long)(SCALE_X * atol(tokenpt)); else { #if 0 @@ -377,11 +377,12 @@ char *s, *t; while (*t) { if (*t == '[') *t = ' '; - else if (*t == ']') + else if (*t == ']') { if (*(++t) == '\0') /* ok, it's finished */ goto end; else if (*t == '[') /* multiple array */ continue; + } *s++ = *t++; } end: diff --git a/alliance/src/mips_asm/src/mips_l.l b/alliance/src/mips_asm/src/mips_l.l index 77fe1950..7c28627b 100644 --- a/alliance/src/mips_asm/src/mips_l.l +++ b/alliance/src/mips_asm/src/mips_l.l @@ -29,6 +29,9 @@ /* description : MIPS assembler - lex rules */ /* ###--------------------------------------------------------------### */ +%option noinput +%option nounput + %{ #include #include "mut.h" diff --git a/alliance/src/mips_asm/src/mips_util.c b/alliance/src/mips_asm/src/mips_util.c index 969613b2..2732969a 100644 --- a/alliance/src/mips_asm/src/mips_util.c +++ b/alliance/src/mips_asm/src/mips_util.c @@ -30,6 +30,7 @@ /* ###--------------------------------------------------------------### */ #include +#include #include "mut.h" #include "log.h" #include "beh.h" diff --git a/alliance/src/mips_asm/src/mips_y.y b/alliance/src/mips_asm/src/mips_y.y index 2c006d44..57b021bd 100644 --- a/alliance/src/mips_asm/src/mips_y.y +++ b/alliance/src/mips_asm/src/mips_y.y @@ -31,6 +31,7 @@ %{ #include +#include #include "mut.h" #include "log.h" #include "beh.h" @@ -38,7 +39,13 @@ #include "mips_defs.h" #include "mips_yacc.h" -main (argc, argv) +extern void yyrestart ( ); +extern int yyparse ( ); +extern int yylex ( ); +extern void yyerror ( ); + + +int main (argc, argv) int argc ; char *argv []; @@ -58,7 +65,7 @@ char *argv []; int txt_fil = 0; int dat_fil = 0; int i ; - char *symbol_fil ; + char *symbol_fil = NULL; char arg_err = 0; static int call_nbr = 0; @@ -1640,7 +1647,7 @@ char *str; /* called func. : none */ /* ###--------------------------------------------------------------### */ -yyerror (str) +void yyerror (str) char *str; @@ -1740,7 +1747,7 @@ int byte_nbr; { adr = MPS_ADDRES; for (i=0 ; iBDD_ASSOC_REG; BddReached = MochaFigure->BDD_REACHED_STATE; BddFirst = MochaFigure->BDD_FIRST_STATE; - BddAssume = MochaFigure->BDD_ASSUME; if ( BddStateSet == BddLocalSystem->ZERO ) { @@ -283,7 +281,6 @@ static void MochaCheckBuildTransFunc( MochaFigure ) mochafsm_list *MochaFsm; mochastate_list *MochaState; befig_list *BehFigure; - ctlfig_list *CtlFigure; btrtransfunc *BtrTransFunc; bddassoc *BddStateAssoc; bddassoc *BddRegAssoc; @@ -297,13 +294,11 @@ static void MochaCheckBuildTransFunc( MochaFigure ) char Buffer[ 512 ]; long NumberReg; long Index; - long Index2; long Step; long BitMask; long Width; BehFigure = MochaFigure->BEH_FIGURE; - CtlFigure = MochaFigure->CTL_FIGURE; setbddlocalcircuit( MochaFigure->BDD_CIRCUIT ); @@ -338,7 +333,6 @@ static void MochaCheckBuildTransFunc( MochaFigure ) else Step = 1; Index = MochaFsm->LEFT; - Index2 = 0; HeadList = (chain_list *)0; @@ -351,7 +345,6 @@ static void MochaCheckBuildTransFunc( MochaFigure ) addbddnodeassoc( (bddsystem *)0, BddStateAssoc, Variable, BddLocalSystem->ONE ); Index += Step; - Index2 = Index2 + 1; HeadList = addchain( HeadList, (void *)BddNode ); } @@ -564,19 +557,15 @@ static void MochaCheckComputeReachableStates( MochaFigure ) mochafig_list *MochaFigure; { - befig_list *BehFigure; ctlfig_list *CtlFigure; btrtransfunc *BtrTransFunc; - bddassoc *BddAssoc; bddnode *BddNewSet; bddnode *BddCurrentSet; bddnode *BddReachedSet; bddnode *BddNode; - BehFigure = MochaFigure->BEH_FIGURE; CtlFigure = MochaFigure->CTL_FIGURE; BtrTransFunc = MochaFigure->BTR_TRANS_FUNC; - BddAssoc = MochaFigure->BDD_ASSOC_REG; setbddlocalcircuit( MochaFigure->BDD_CIRCUIT ); @@ -680,11 +669,9 @@ static bddnode *MochaCheckCtlBddQuantify( BddNode ) bddnode *BddReached; bddnode *BddAssume; bddnode *BddAssumeNot; - btrtransfunc *BtrTransFunc; bddassoc *BddAssoc; bddnode *BddNew; - BtrTransFunc = MochaMochaFigure->BTR_TRANS_FUNC; BddAssoc = MochaMochaFigure->BDD_ASSOC_REG; BddReached = MochaMochaFigure->BDD_REACHED_STATE; BddAssume = MochaMochaFigure->BDD_ASSUME; @@ -1327,19 +1314,13 @@ static void MochaCheckCtlFormulae( MochaFigure, FlagVerbose ) { ctlfig_list *CtlFigure; ctlform_list *CtlForm; - btrtransfunc *BtrTransFunc; biablarray *BiAblArray; ablarray *AblArray; bddnode *BddNode; bddnode *BddFirst; bddnode *BddReached; - bddnode *BddAssume; - bddassoc *BddAssoc; CtlFigure = MochaFigure->CTL_FIGURE; - BtrTransFunc = MochaFigure->BTR_TRANS_FUNC; - BddAssoc = MochaFigure->BDD_ASSOC_REG; - BddAssume = MochaFigure->BDD_ASSUME; BddReached = MochaFigure->BDD_REACHED_STATE; BddFirst = MochaFigure->BDD_FIRST_STATE; diff --git a/alliance/src/mocha/src/mocha_fsm.c b/alliance/src/mocha/src/mocha_fsm.c index e7b9601b..a72f7a35 100644 --- a/alliance/src/mocha/src/mocha_fsm.c +++ b/alliance/src/mocha/src/mocha_fsm.c @@ -100,7 +100,6 @@ void MochaCompileFsm( MochaFigure, FileName, FlagVerbose ) chain_list *ScanChain; mochafsm_list *MochaFsm; fsmstate_list *ScanState; - mochastate_list *MochaState; mochasyfinfo *MochaSyfInfo; mochasyfstate *MochaSyfState; @@ -170,8 +169,8 @@ void MochaCompileFsm( MochaFigure, FileName, FlagVerbose ) ScanState = ScanState->NEXT ) { MochaSyfState = MOCHA_SYF_STATE( ScanState ); - MochaState = MochaAddState( MochaFigure, MochaFsm, ScanState->NAME, - MochaSyfState->CODE->VALUE ); + MochaAddState( MochaFigure, MochaFsm, ScanState->NAME, + MochaSyfState->CODE->VALUE ); } } /* diff --git a/alliance/src/mocha/src/mocha_syf.c b/alliance/src/mocha/src/mocha_syf.c index 33ccc190..2eb7103f 100644 --- a/alliance/src/mocha/src/mocha_syf.c +++ b/alliance/src/mocha/src/mocha_syf.c @@ -308,7 +308,6 @@ fsmfig_list *MochaSyfFbhParse( Name ) ScanChain = ScanChain->NEXT ) { ScanFigure = (fsmfig_list *)ScanChain->DATA; - MochaSyfInfo = MOCHA_SYF_INFO( ScanFigure ); ScanState = ScanFigure->STAR_STATE; @@ -348,15 +347,12 @@ void MochaSyfFsmSimplify( FsmFigure ) fsmfig_list *FsmFigure; { - mochasyfinfo *MochaSyfInfo; fsmstate_list *ScanState; fsmlocout_list *ScanLocout; fsmlocout_list *DelLocout; fsmtrans_list *ScanTrans; fsmtrans_list *DelTrans; - MochaSyfInfo = MOCHA_SYF_INFO( FsmFigure ); - for ( ScanState = FsmFigure->STATE; ScanState != (fsmstate_list *)0; ScanState = ScanState->NEXT ) @@ -516,7 +512,6 @@ static void MochaSyfSynthOut2Abl( FsmFigure ) fsmfig_list *FsmFigure; { - mochasyfinfo *MochaSyfInfo; fsmout_list *ScanOutput; fsmstate_list *ScanState; fsmlocout_list *ScanLocout; @@ -526,7 +521,6 @@ static void MochaSyfSynthOut2Abl( FsmFigure ) ablexpr *Equation; ablexpr *Atom; - MochaSyfInfo = MOCHA_SYF_INFO( FsmFigure ); Equation = (ablexpr *)0; for ( ScanOutput = FsmFigure->OUT; @@ -656,12 +650,9 @@ static void MochaSyfSynthFreeOutAbl( FsmFigure ) fsmfig_list *FsmFigure; { - mochasyfinfo *MochaSyfInfo; fsmout_list *ScanOutput; mochasyfout *ScanMochaSyfOut; - MochaSyfInfo = MOCHA_SYF_INFO( FsmFigure ); - for ( ScanOutput = FsmFigure->OUT; ScanOutput != (fsmout_list *)0; ScanOutput = ScanOutput->NEXT ) @@ -953,6 +944,7 @@ static void MochaSyfSynthCode2Abl( FsmFigure ) | | \------------------------------------------------------------*/ +#if THIS_IS_DISABLED static void MochaSyfSynthFreeCodeAbl( FsmFigure ) fsmfig_list *FsmFigure; @@ -979,6 +971,7 @@ static void MochaSyfSynthFreeCodeAbl( FsmFigure ) } } } +#endif /*------------------------------------------------------------\ | | @@ -990,7 +983,6 @@ static void MochaSyfSynthTrans2Abl( FsmFigure ) fsmfig_list *FsmFigure; { - mochasyfinfo *MochaSyfInfo; fsmstate_list *ScanState; mochasyfstate *ScanMochaSyfState; mochasyfstate *FromMochaSyfState; @@ -998,8 +990,6 @@ static void MochaSyfSynthTrans2Abl( FsmFigure ) ablexpr *Atom; fsmtrans_list *ScanTrans; - MochaSyfInfo = MOCHA_SYF_INFO( FsmFigure ); - for ( ScanState = FsmFigure->STATE; ScanState != (fsmstate_list *)0; ScanState = ScanState->NEXT ) @@ -1107,10 +1097,6 @@ static void MochaSyfSynthFsm2Abl( FsmFigure ) fsmfig_list *FsmFigure; { - mochasyfinfo *MochaSyfInfo; - - MochaSyfInfo = MOCHA_SYF_INFO( FsmFigure ); - MochaSyfSynthTrans2Abl( FsmFigure ); MochaSyfSynthOut2Abl( FsmFigure ); MochaSyfSynthReg2Abl( FsmFigure ); @@ -1232,17 +1218,12 @@ void MochaSyfFsmTreatOutput( FsmFigure, FbhFigure ) fsmfig_list *FsmFigure; fbfig_list *FbhFigure; { - mochasyfinfo *MochaSyfInfo; fsmout_list *ScanOut; fbaux_list *ScanAux; mochasyfout *ScanSyfOut; - mochasyfregout *OutArray; - fbout_list *FbhOut; + fbout_list *FbhOut; ablexpr *AblExpr; - MochaSyfInfo = MOCHA_SYF_INFO( FsmFigure ); - OutArray = MochaSyfInfo->OUT_ARRAY; - FbhOut = FbhFigure->BEOUT; for ( ScanOut = FsmFigure->OUT; diff --git a/alliance/src/nero/src/AAstar.cpp b/alliance/src/nero/src/AAstar.cpp index 72d312fc..d94a2729 100644 --- a/alliance/src/nero/src/AAstar.cpp +++ b/alliance/src/nero/src/AAstar.cpp @@ -3,8 +3,7 @@ // // $Id: AAstar.cpp,v 1.10 2005/04/07 14:56:18 jpc Exp $ // -// /----------------------------------------------------------------\ -// | | +// +----------------------------------------------------------------+ // | A l l i a n c e C A D S y s t e m | // | S i m p l e R o u t e r | // | | @@ -12,10 +11,7 @@ // | E-mail : alliance-support@asim.lip6.fr | // | ============================================================== | // | C++ Module : "./AAStar.cpp" | -// | ************************************************************** | -// | U p d a t e s | -// | | -// \----------------------------------------------------------------/ +// +----------------------------------------------------------------+ @@ -25,9 +21,9 @@ -// /----------------------------------------------------------------\ +// +----------------------------------------------------------------+ // | Methods Definitions | -// \----------------------------------------------------------------/ +// +----------------------------------------------------------------+ // ------------------------------------------------------------------- @@ -127,20 +123,17 @@ void CAStar::CNodeASSet::check (bool cleared) void CAStar::CNodeASSet::reset (void) { - int chunk, index, maxindex, maxused_div, maxused_mod; - - if (_maxused > 0) { - maxused_div = (_maxused - 1) / D::CHUNK_SIZE; - maxused_mod = (_maxused - 1) % D::CHUNK_SIZE; + int maxused_div = (_maxused - 1) / D::CHUNK_SIZE; + int maxused_mod = (_maxused - 1) % D::CHUNK_SIZE; - for (chunk = 0; chunk <= maxused_div; chunk++) { - maxindex = D::CHUNK_SIZE - 1; + for (int chunk = 0; chunk <= maxused_div; chunk++) { + int maxindex = D::CHUNK_SIZE - 1; // Incomplete last chunk. if (chunk == maxused_div) maxindex = maxused_mod; - for (index = 0; index <= maxindex; index++) { + for (int index = 0; index <= maxindex; index++) { _chunks[chunk][index].reset (); } } @@ -156,17 +149,17 @@ void CAStar::CNodeASSet::reset (void) // Constructor : "CAStar::CNodeAS::CNodeAS()". CAStar::CNodeAS::CNodeAS (CDRGrid::iterator &pos) + : point (pos) + , back (NULL) + , distance(0) + , remains (LONG_MAX) + , queued (false) + , tagged (false) + , intree (false) + , id (-1) { - point = pos; point.node().algo = (void*)this; - back = NULL; - distance = 0; - remains = LONG_MAX; - queued = false; - tagged = false; - intree = false; - //cdebug << "+ new CNodeAS (id := " << id << ", " << point << ")" << endl; } @@ -207,7 +200,7 @@ void *CAStar::CNodeAS::operator new (size_t size, CNodeASSet &NS) // Allocate a new chunk. if (NS._maxchunk <= chunk) { - NS._chunks.push_back ((CNodeAS*)malloc (sizeof (CNodeAS) * D::CHUNK_SIZE)); + NS._chunks.push_back( static_cast(malloc(sizeof (CNodeAS) * D::CHUNK_SIZE)) ); NS._maxchunk++; new_chunk = true; @@ -260,7 +253,6 @@ void CAStar::CNodeAS::successors (CNodeASSet &NS, CNet *net, CNodeAS *(*success { CDRGrid::iterator neighbor; CDRGrid::iterator neighbor2; - CNet *pNet; CNodeAS *pNodeAS; int cost_x, cost_y, cost_z, cost, edge, i, j; @@ -418,14 +410,11 @@ void CAStar::CNodeAS::successors (CNodeASSet &NS, CNet *net, CNodeAS *(*success void CAStar::CTree::addterm (CTerm &term) { list::iterator endNode, itNode; - CNodeAS* pNodeAS; - - //cdebug << "+ Adding terminal nodes to the tree." << endl; endNode = term.nodes.end (); for (itNode = term.nodes.begin (); itNode != endNode; itNode++) { - pNodeAS = AS(*itNode); + CNodeAS* pNodeAS = AS(*itNode); if (!pNodeAS) pNodeAS = new (*_NS) CNodeAS (*itNode); @@ -514,10 +503,19 @@ void CAStar::CQueue::load (CTree &tree, bool start) // Constructor : "CAStar::CAStar()". CAStar::CAStar (CDRGrid *drgrid, CASimple *netsched) + : _NS () + , _tree () + , _queue () + , _skip (false) + , _trapped (false) + , _reached (NULL) + , net (NULL) + , iterations (0) + , iterations_route (0) + , iterations_reroute(0) + , _drgrid (drgrid) + , _netsched (netsched) { - _drgrid = drgrid; - _netsched = netsched; - _tree._NS = &_NS; } @@ -646,7 +644,7 @@ bool CAStar::nexttarget (void) set::iterator endSet; // Are all targets reacheds? - if (_tree.reached.size () >= net->size) return (false); + if ((long)_tree.reached.size () >= net->size) return (false); // Reset all the nodeAS objects. _NS.reset (); @@ -682,7 +680,7 @@ bool CAStar::nexttarget (void) void CAStar::backtrack (void) { CDRGrid::iterator neighbor; - CNodeAS *node, *node_prev; + CNodeAS *node; CNet *del_net; int i; @@ -718,7 +716,7 @@ void CAStar::backtrack (void) _tree.addnode (node); - node_prev = node; + CNodeAS* node_prev = node; node = node->back; node_prev->reset (); @@ -888,14 +886,11 @@ void CMatrixNodes::check (bool cleared) bool CNode::check (bool cleared) { - CAStar::CNodeAS *nodeAS; - - if ( algo != NULL ) { if (cleared) cerr << "+ Residual algo structure found !" << endl; - nodeAS = (CAStar::CNodeAS*) algo; + CAStar::CNodeAS *nodeAS = (CAStar::CNodeAS*) algo; if ( nodeAS->point.outside() ) { cerr << "+ Incoherent algo structure found (node := " diff --git a/alliance/src/nero/src/ADefs.h b/alliance/src/nero/src/ADefs.h index 2af05526..3ac8ba2e 100644 --- a/alliance/src/nero/src/ADefs.h +++ b/alliance/src/nero/src/ADefs.h @@ -3,8 +3,7 @@ // // $Id: ADefs.h,v 1.4 2008/06/11 09:20:34 jpc Exp $ // -// /-----------------------------------------------------------------\ -// | | +// +-----------------------------------------------------------------+ // | A l l i a n c e C A D S y s t e m | // | S i m p l e R o u t e r | // | | @@ -12,10 +11,7 @@ // | E-mail : alliance-support@asim.lip6.fr | // | =============================================================== | // | C++ Header : "./ADefs.h" | -// | *************************************************************** | -// | U p d a t e s | -// | | -// \-----------------------------------------------------------------/ +// +-----------------------------------------------------------------+ @@ -154,7 +150,7 @@ inline static CNodeAS *AS (CDRGrid::iterator point) - { return ((CNodeAS*)(point.node().algo)); } + { return static_cast(point.node().algo); } // Heap Allocator for CNodeAS. ------------------------------- @@ -346,7 +342,6 @@ // Internal CASimple attributes : the state of the algorithm. public: CQueue _queue; public: CAStar _astar; - public: CDRGrid *_drgrid; public: bool rglobal; // Attributes. diff --git a/alliance/src/nero/src/ASimple.cpp b/alliance/src/nero/src/ASimple.cpp index 70a84019..3e679e18 100644 --- a/alliance/src/nero/src/ASimple.cpp +++ b/alliance/src/nero/src/ASimple.cpp @@ -3,8 +3,7 @@ // // $Id: ASimple.cpp,v 1.4 2005/10/10 15:34:05 jpc Exp $ // -// /----------------------------------------------------------------\ -// | | +// +----------------------------------------------------------------+ // | A l l i a n c e C A D S y s t e m | // | S i m p l e R o u t e r | // | | @@ -12,10 +11,7 @@ // | E-mail : alliance-support@asim.lip6.fr | // | ============================================================== | // | C++ Module : "./ASimple.cpp" | -// | ************************************************************** | -// | U p d a t e s | -// | | -// \----------------------------------------------------------------/ +// +----------------------------------------------------------------+ @@ -25,9 +21,9 @@ -// /----------------------------------------------------------------\ +// +----------------------------------------------------------------+ // | Methods Definitions | -// \----------------------------------------------------------------/ +// +----------------------------------------------------------------+ // ------------------------------------------------------------------- @@ -60,9 +56,10 @@ void CASimple::CQueue::load (MNet *nets, bool rglobal, bool global) // Constructor : "CASimple::CASimple()". CASimple::CASimple (MNet *mNets, CDRGrid *drgrid) - : _astar(drgrid, this) - , nets(mNets) - , iterations_route(0) + : _astar (drgrid, this) + , rglobal (false) + , nets (mNets) + , iterations_route (0) , iterations_reroute(0) { } diff --git a/alliance/src/nero/src/MDRGrid.cpp b/alliance/src/nero/src/MDRGrid.cpp index 5622cd63..9c7a9d6b 100644 --- a/alliance/src/nero/src/MDRGrid.cpp +++ b/alliance/src/nero/src/MDRGrid.cpp @@ -3,8 +3,7 @@ // // $Id: MDRGrid.cpp,v 1.6 2005/10/10 15:34:05 jpc Exp $ // -// /----------------------------------------------------------------\ -// | | +// +----------------------------------------------------------------+ // | A l l i a n c e C A D S y s t e m | // | S i m p l e R o u t e r | // | | @@ -12,10 +11,7 @@ // | E-mail : alliance-support@asim.lip6.fr | // | ============================================================== | // | C++ Module : "./MDRGrid.cpp" | -// | ************************************************************** | -// | U p d a t e s | -// | | -// \----------------------------------------------------------------/ +// +----------------------------------------------------------------+ @@ -25,9 +21,9 @@ -// /----------------------------------------------------------------\ +// +----------------------------------------------------------------+ // | Methods Definitions | -// \----------------------------------------------------------------/ +// +----------------------------------------------------------------+ // ------------------------------------------------------------------- @@ -492,8 +488,9 @@ __CNode__ *TMatrix<__CNode__>::_CHollow::get (int x, int y) template TMatrix<__CNode__>::TMatrix (CDRGrid *drgrid) + : _drgrid(drgrid) + , hole () { - _drgrid = drgrid; _grid = new __CNode__ [_drgrid->size]; } @@ -518,11 +515,8 @@ TMatrix<__CNode__>::~TMatrix (void) template __CNode__ &TMatrix<__CNode__>::operator[] (int index) { - __CNode__ *node; - - if (index < _drgrid->XY ) { - node = _zero.get (_drgrid->x(index), _drgrid->y(index)) ; + __CNode__ *node = _zero.get (_drgrid->x(index), _drgrid->y(index)) ; if ( node != NULL ) return ( *node ); } else { if (index < _drgrid->XYZ) return ( _grid[index - _drgrid->XY] ); diff --git a/alliance/src/nero/src/MDefs.h b/alliance/src/nero/src/MDefs.h index 1a3e922e..7e2ab6f4 100644 --- a/alliance/src/nero/src/MDefs.h +++ b/alliance/src/nero/src/MDefs.h @@ -3,8 +3,7 @@ // // $Id: MDefs.h,v 1.9 2008/06/11 09:20:34 jpc Exp $ // -// /-----------------------------------------------------------------\ -// | | +// +-----------------------------------------------------------------+ // | A l l i a n c e C A D S y s t e m | // | S i m p l e R o u t e r | // | | @@ -12,10 +11,7 @@ // | E-mail : alliance-support@asim.lip6.fr | // | =============================================================== | // | C++ Header : "./MDefs.h" | -// | *************************************************************** | -// | U p d a t e s | -// | | -// \-----------------------------------------------------------------/ +// +-----------------------------------------------------------------+ @@ -133,7 +129,7 @@ string message; // Constructor. - public: e_matrix_iterator (string msg) { message = msg; } + public: e_matrix_iterator (string msg) : message(msg) { } // Destructor. public: ~e_matrix_iterator (void) throw () { }; @@ -203,6 +199,7 @@ // Constructor. public: TMatrix (CDRGrid *drgrid); + private: TMatrix ( const TMatrix& ); // Destructor. public: ~TMatrix (void); @@ -321,6 +318,8 @@ // Constructor. public: CDRGrid (int xoff, int yoff, int x, int y, int z, int zup) throw (e_zupper); + private: CDRGrid ( const CDRGrid& ); + // Destructor. public: ~CDRGrid (void); @@ -373,17 +372,17 @@ , int np , bool term , int id - ) { - x = i; - y = j; - z = k; - pri = p; - nodepri = np; - terminal = term; - ident = id; - ownerName = owner; - netName = net; - } + ) + : x (i) + , y (j) + , z (k) + , ownerName(owner) + , netName (net) + , pri (p) + , nodepri (np) + , terminal (term) + , ident (id) + { } // Destructor. public: ~bad_grab (void) throw () { }; @@ -488,7 +487,12 @@ // Constructor. - public: CMatrixPri (CDRGrid *drgrid) : TMatrix(drgrid) { } + public: CMatrixPri (CDRGrid *drgrid) + : TMatrix(drgrid) + , offset (0) + , delta (0) + , cleared (false) + { } // Modifiers. public: void clear (void); @@ -521,10 +525,10 @@ public: CDRGrid::iterator node; // Constructor. - public: dup_term (string termName, CDRGrid::iterator &dupNode) { - name = termName; - node = dupNode; - } + public: dup_term (string termName, CDRGrid::iterator &dupNode) + : name(termName) + , node(dupNode) + { } // Destructor. public: ~dup_term (void) throw () { }; @@ -556,7 +560,8 @@ , long y , long z ) - : id(ident) + : message() + , id (ident) { ostringstream m; m << "Terminals \"" << tn1 << "\" and \"" << tn2 << "\" of net \"" << nn @@ -623,7 +628,7 @@ public: string name; // Constructor. - public: dup_net (string netName) { name = netName; } + public: dup_net (string netName) : name(netName) { } // Destructor. public: ~dup_net (void) throw () { }; @@ -647,10 +652,7 @@ public: string termName; // Constructor. - public: term_unknown (string nName, string tName) { - netName = nName; - termName = tName; - } + public: term_unknown (string nName, string tName) : netName(nName), termName(tName) { } // Destructor. public: ~term_unknown (void) throw () { }; diff --git a/alliance/src/nero/src/MMBK.cpp b/alliance/src/nero/src/MMBK.cpp index defb6f8c..4a7aa34b 100644 --- a/alliance/src/nero/src/MMBK.cpp +++ b/alliance/src/nero/src/MMBK.cpp @@ -3,8 +3,7 @@ // // $Id: MMBK.cpp,v 1.10 2012/05/02 14:49:23 jpc Exp $ // -// /-----------------------------------------------------------------\ -// | | +// +-----------------------------------------------------------------+ // | A l l i a n c e C A D S y s t e m | // | S i m p l e R o u t e r | // | | @@ -12,10 +11,7 @@ // | E-mail : alliance-support@asim.lip6.fr | // | =============================================================== | // | C++ Module : "./UMBK.cpp" | -// | *************************************************************** | -// | U p d a t e s | -// | | -// \-----------------------------------------------------------------/ +// +-----------------------------------------------------------------+ @@ -40,15 +36,19 @@ namespace MBK { -// /----------------------------------------------------------------\ +// +----------------------------------------------------------------+ // | Methods Definitions | -// \----------------------------------------------------------------/ +// +----------------------------------------------------------------+ // ------------------------------------------------------------------- // Constructor : "CXRect::CXRect()". -CXRect::CXRect ( CDRGrid* agrid ) : drgrid(agrid) +CXRect::CXRect ( CDRGrid* agrid ) + : drgrid(agrid) + , seg () + , rect () + , grid () { } @@ -80,7 +80,7 @@ void CXRect::setSeg (phseg_list &rSeg) void CXRect::seg2rect (void) { - long width = env.layer2width (seg.LAYER); +//long width = env.layer2width (seg.LAYER); long spacing = env.layer2spacing (seg.LAYER); long expand; @@ -846,7 +846,7 @@ CFig::CFig (string &nameLofig, string &namePhfig) throw (except_done): CFig::~CFig (void) { - MIns::iterator itIns, beginIns, endIns; + MIns::iterator itIns, endIns; cmess2 << " o Deleting CFig..."; @@ -946,7 +946,7 @@ void CFig::addphref (phref_list &ref) // ------------------------------------------------------------------- // Function : "layer2a()". -extern char *layer2a(char layer) +extern const char *layer2a(char layer) { switch (layer) { case NDIF: return ("NDIF"); @@ -1024,8 +1024,9 @@ extern bool isALU(char layer) case ALU6: case ALU7: case ALU8: - case ALU9: return (true); + case ALU9: return true; } + return false; } diff --git a/alliance/src/nero/src/MMBK.h b/alliance/src/nero/src/MMBK.h index 3f3537bd..76b0491d 100644 --- a/alliance/src/nero/src/MMBK.h +++ b/alliance/src/nero/src/MMBK.h @@ -3,8 +3,7 @@ // // $Id: MMBK.h,v 1.6 2005/10/17 23:11:06 jpc Exp $ // -// /-----------------------------------------------------------------\ -// | | +// +-----------------------------------------------------------------+ // | A l l i a n c e C A D S y s t e m | // | S i m p l e R o u t e r | // | | @@ -12,10 +11,7 @@ // | E-mail : alliance-support@asim.lip6.fr | // | =============================================================== | // | C++ Header : "./UMBK.h" | -// | *************************************************************** | -// | U p d a t e s | -// | | -// \-----------------------------------------------------------------/ +// +-----------------------------------------------------------------+ @@ -89,16 +85,16 @@ namespace MBK { // --------------------------------------------------------------- // Functions. - extern char *layer2a (char layer); - extern bool isobs (char layer); - extern bool isALU (char layer); - extern bool isCALU (char layer); - extern char layer2ALU (char layer); - extern char layer2CALU (char layer); - extern char layer2TALU (char layer); - extern long cmpALU (char layer1, char layer2); - extern char topVIALayer (char type); - extern char bottomVIALayer (char type); + extern const char *layer2a (char layer); + extern bool isobs (char layer); + extern bool isALU (char layer); + extern bool isCALU (char layer); + extern char layer2ALU (char layer); + extern char layer2CALU (char layer); + extern char layer2TALU (char layer); + extern long cmpALU (char layer1, char layer2); + extern char topVIALayer (char type); + extern char bottomVIALayer (char type); diff --git a/alliance/src/nero/src/MNet.cpp b/alliance/src/nero/src/MNet.cpp index 0290c0a1..b3323b55 100644 --- a/alliance/src/nero/src/MNet.cpp +++ b/alliance/src/nero/src/MNet.cpp @@ -3,8 +3,7 @@ // // $Id: MNet.cpp,v 1.12 2006/04/28 07:51:54 jpc Exp $ // -// /----------------------------------------------------------------\ -// | | +// +----------------------------------------------------------------+ // | A l l i a n c e C A D S y s t e m | // | S i m p l e R o u t e r | // | | @@ -12,10 +11,7 @@ // | E-mail : alliance-support@asim.lip6.fr | // | ============================================================== | // | C++ Module : "./MNet.cpp" | -// | ************************************************************** | -// | U p d a t e s | -// | | -// \----------------------------------------------------------------/ +// +----------------------------------------------------------------+ @@ -25,19 +21,18 @@ -// /----------------------------------------------------------------\ +// +----------------------------------------------------------------+ // | Methods Definitions | -// \----------------------------------------------------------------/ +// +----------------------------------------------------------------+ // ------------------------------------------------------------------- // Constructor : "CTerm::CTerm()". CTerm::CTerm (string termName, int ident) -{ - id = ident; - name = termName; -} + : id (ident) + , name(termName) +{ } @@ -249,8 +244,6 @@ void CTerm::lockalone (bool global) { CDRGrid::iterator coord; CDRGrid::iterator coord2; - int z, i; - bool adjust; if (nodes.size() != 1) return; @@ -305,9 +298,9 @@ void CTerm::lockalone (bool global) if ( coord2.y() % 2 ) { // We are not on the double pitch grid. Try to go there. // Look for up and down grid node. - adjust = true; + bool adjust = true; - for (i = 0; i < 3; i++) { + for (int i = 0; i < 3; i++) { switch (i) { case 0: coord2.dy (+1); break; case 1: coord2.dy (-2); break; diff --git a/alliance/src/nero/src/MNodes.cpp b/alliance/src/nero/src/MNodes.cpp index 3ff5d729..908066ab 100644 --- a/alliance/src/nero/src/MNodes.cpp +++ b/alliance/src/nero/src/MNodes.cpp @@ -3,8 +3,7 @@ // // $Id: MNodes.cpp,v 1.4 2005/10/17 23:11:06 jpc Exp $ // -// /----------------------------------------------------------------\ -// | | +// +----------------------------------------------------------------+ // | A l l i a n c e C A D S y s t e m | // | S i m p l e R o u t e r | // | | @@ -12,10 +11,7 @@ // | E-mail : alliance-support@asim.lip6.fr | // | ============================================================== | // | C++ Module : "./MNodes.cpp" | -// | ************************************************************** | -// | U p d a t e s | -// | | -// \----------------------------------------------------------------/ +// +----------------------------------------------------------------+ @@ -25,9 +21,9 @@ -// /----------------------------------------------------------------\ +// +----------------------------------------------------------------+ // | Methods Definitions | -// \----------------------------------------------------------------/ +// +----------------------------------------------------------------+ // ------------------------------------------------------------------- @@ -109,19 +105,18 @@ void CNode::ungrab (void) void CMatrixNodes::obstacle (CRect &rect, int z) { CDRGrid::iterator coord; - long x, y, X, Y; if ( !z || (z >= _drgrid->Z) ) return; coord = _drgrid->origin; - X = (_drgrid->X <= rect.x2) ? _drgrid->X - 1 : rect.x2; - Y = (_drgrid->Y <= rect.y2) ? _drgrid->Y - 1 : rect.y2; + long X = (_drgrid->X <= rect.x2) ? _drgrid->X - 1 : rect.x2; + long Y = (_drgrid->Y <= rect.y2) ? _drgrid->Y - 1 : rect.y2; - x = (rect.x1>0) ? rect.x1 : 0; + long x = (rect.x1>0) ? rect.x1 : 0; for ( ; x <= X; x++) { - y = (rect.y1>0) ? rect.y1 : 0; + long y = (rect.y1>0) ? rect.y1 : 0; for ( ; y <= Y; y++) { if ( ! (*this)[ coord.set (x, y, z) ].terminal () ) { //cdebug << "+ Obstacle at (" << x << "," << y << "," << z << ")" << "\n"; diff --git a/alliance/src/nero/src/MPower.cpp b/alliance/src/nero/src/MPower.cpp index 370a24e8..9c5451bd 100644 --- a/alliance/src/nero/src/MPower.cpp +++ b/alliance/src/nero/src/MPower.cpp @@ -3,8 +3,7 @@ // // $Id: MPower.cpp,v 1.4 2005/10/10 15:34:05 jpc Exp $ // -// /-----------------------------------------------------------------\ -// | | +// +-----------------------------------------------------------------+ // | A l l i a n c e C A D S y s t e m | // | S i m p l e R o u t e r | // | | @@ -12,10 +11,7 @@ // | E-mail : alliance-support@asim.lip6.fr | // | =============================================================== | // | C++ Module : "./UPower.cpp" | -// | *************************************************************** | -// | U p d a t e s | -// | | -// \-----------------------------------------------------------------/ +// +-----------------------------------------------------------------+ @@ -31,9 +27,9 @@ namespace MBK { -// /----------------------------------------------------------------\ +// +----------------------------------------------------------------+ // | Methods Definitions | -// \----------------------------------------------------------------/ +// +----------------------------------------------------------------+ // ------------------------------------------------------------------- @@ -79,12 +75,11 @@ CPowers::CPowers ( CFig *fig : xoffset(xoff) , yoffset(yoff) { - LPower::iterator itLine, beginLine, endLine; + LPower::iterator itLine, endLine; phins_list *ins; phfig_list *model; phseg_list *seg, flatSeg; - string mess1, mess2; - char ORIENT1, ORIENT2; + string mess1; char segType; long lbound, rbound, key; @@ -97,19 +92,11 @@ CPowers::CPowers ( CFig *fig default: case C_HORIZONTAL: mess1 = "horizontal"; - mess2 = "EAST/WEST"; - ORIENT1 = EAST; - ORIENT2 = WEST; - AB1 = fig->XAB1 (); AB2 = fig->XAB2 (); break; case C_VERTICAL: mess1 = "vertical"; - mess2 = "NORTH/SOUTH"; - ORIENT1 = NORTH; - ORIENT2 = SOUTH; - AB1 = fig->YAB1 (); AB2 = fig->YAB2 (); break; @@ -218,7 +205,7 @@ CPowers::CPowers ( CFig *fig } - beginLine = powerLines.begin (); + //beginLine = powerLines.begin (); endLine = powerLines.end (); diff --git a/alliance/src/nero/src/MPri.cpp b/alliance/src/nero/src/MPri.cpp index 9b95e7e5..df17f4eb 100644 --- a/alliance/src/nero/src/MPri.cpp +++ b/alliance/src/nero/src/MPri.cpp @@ -3,8 +3,7 @@ // // $Id: MPri.cpp,v 1.5 2002/10/29 18:46:03 jpc Exp $ // -// /----------------------------------------------------------------\ -// | | +// +----------------------------------------------------------------+ // | A l l i a n c e C A D S y s t e m | // | S i m p l e R o u t e r | // | | @@ -12,10 +11,7 @@ // | E-mail : alliance-support@asim.lip6.fr | // | ============================================================== | // | C++ Module : "./MPri.cpp" | -// | ************************************************************** | -// | U p d a t e s | -// | | -// \----------------------------------------------------------------/ +// +----------------------------------------------------------------+ @@ -25,9 +21,9 @@ -// /----------------------------------------------------------------\ +// +----------------------------------------------------------------+ // | Methods Definitions | -// \----------------------------------------------------------------/ +// +----------------------------------------------------------------+ // ------------------------------------------------------------------- @@ -127,7 +123,6 @@ void CMatrixPri::load (CNet &net, bool global, int expand) queue *currentBorder, *nextBorder; CDRGrid::iterator *pCoord, coord; - CNet *other; char currentPri, *pmap; int x, y, z, nx, ny, nz, edge, id, ex, ey; bool breakLoop; diff --git a/alliance/src/nero/src/RBox.cpp b/alliance/src/nero/src/RBox.cpp index 36cfede2..ca9541c6 100644 --- a/alliance/src/nero/src/RBox.cpp +++ b/alliance/src/nero/src/RBox.cpp @@ -3,8 +3,7 @@ // // $Id: RBox.cpp,v 1.4 2005/10/10 15:34:06 jpc Exp $ // -// /----------------------------------------------------------------\ -// | | +// +----------------------------------------------------------------+ // | A l l i a n c e C A D S y s t e m | // | S i m p l e R o u t e r | // | | @@ -12,10 +11,7 @@ // | E-mail : alliance-support@asim.lip6.fr | // | ============================================================== | // | C++ Module : "./RBox.cpp" | -// | ************************************************************** | -// | U p d a t e s | -// | | -// \----------------------------------------------------------------/ +// +----------------------------------------------------------------+ @@ -25,9 +21,9 @@ -// /----------------------------------------------------------------\ +// +----------------------------------------------------------------+ // | Methods Definitions | -// \----------------------------------------------------------------/ +// +----------------------------------------------------------------+ // ------------------------------------------------------------------- @@ -52,13 +48,19 @@ CRBox::~CRBox (void) // ------------------------------------------------------------------- // Constructor : "CRBox::CRBox()". -CRBox::CRBox (void) -{ - drgrid = NULL; - netsched = NULL; - loaded = false; - insave = false; -} +CRBox::CRBox () + : netsched (NULL) + , drgrid (NULL) + , xoffsetgrid(0) + , yoffsetgrid(0) + , nets () + , loaded (false) + , insave (false) + , rglobal (false) + , ischip (false) + , fig (NULL) + , powers () +{ } @@ -67,25 +69,32 @@ CRBox::CRBox (void) // Constructor : "CRBox::CRBox()". CRBox::CRBox (int rtype, bool debug) + : netsched (NULL) + , drgrid (NULL) + , xoffsetgrid(0) + , yoffsetgrid(0) + , nets () + , loaded (false) + , insave (false) + , rglobal (false) + , ischip (false) + , fig (NULL) + , powers () { int X, Y, Z; CNet *pNet; - CTerm *pTerm; //CCoord coord; - cdebug << "ENTERING: CRBox::CRBox ()\n"; X = 10 ; //10; Y = 15 ; //15; Z = 3; - // Creating routing matrix. cdebug << " Routing matrix size := (10, 15, 5)\n"; drgrid = new CDRGrid (0, 0, X, Y, Z, 4); - // Adding signal "sig_one". cdebug << " Creating net \"sig_one\".\n"; pNet = getnet ("sig_one"); @@ -100,13 +109,11 @@ CRBox::CRBox (int rtype, bool debug) //cdebug << " Adding CA \"(0,1,1)\".\n"; //nets["sig_one"]->newaccess ("i0", 0, 1, 1); - // Adding terminal "i1" of "sig_one". cdebug << " Adding terminal \"i1\".\n"; cdebug << " Adding CA \"(9,0,0)\".\n"; pNet->newaccess ("i1", 9, 0, 0); - // Adding terminal "o" of "sig_one". cdebug << " Adding terminal \"o\".\n"; //cdebug << " Adding CA \"(5,10,0)\".\n"; @@ -115,24 +122,20 @@ CRBox::CRBox (int rtype, bool debug) //cdebug << " Adding CA \"(7,12,0)\".\n"; //nets["sig_one"]->newaccess ("o", 7, 12, 0); - // Adding signal "sig_two". //cdebug << " Creating net \"sig_two\".\n"; //nets["sig_two"] = new CNet ("sig_two"); - // Adding terminal "i0" of "sig_two". //cdebug << " Adding terminal \"i0\".\n"; //cdebug << " Adding CA \"(4,1,0)\".\n"; //nets["sig_two"]->newaccess ("i0", 4, 1, 0); - // Adding terminal "o" of "sig_two". //cdebug << " Adding terminal \"o\".\n"; //cdebug << " Adding CA \"(4,11,0)\".\n"; //nets["sig_two"]->newaccess ("o", 4, 11, 0); - //{ // int j; @@ -211,23 +214,7 @@ CNet *CRBox::findnet (string &signame) // ------------------------------------------------------------------- // Method : "CRBox::getnet()". -CNet *CRBox::getnet (char *signame) -{ - string name; - - - name = signame; - - return (getnet(name)); -} - - - - -// ------------------------------------------------------------------- -// Method : "CRBox::getnet()". - -CNet *CRBox::getnet (string &signame) +CNet *CRBox::getnet (const string &signame) { MNet::iterator itNet, endNet; CNet *pNet; diff --git a/alliance/src/nero/src/RDefs.h b/alliance/src/nero/src/RDefs.h index 4e0f9ead..6d2c91fc 100644 --- a/alliance/src/nero/src/RDefs.h +++ b/alliance/src/nero/src/RDefs.h @@ -3,8 +3,7 @@ // // $Id: RDefs.h,v 1.6 2012/05/02 14:49:23 jpc Exp $ // -// /-----------------------------------------------------------------\ -// | | +// +-----------------------------------------------------------------+ // | A l l i a n c e C A D S y s t e m | // | S i m p l e R o u t e r | // | | @@ -12,10 +11,7 @@ // | E-mail : alliance-support@asim.lip6.fr | // | =============================================================== | // | C++ Header : "./RDefs.h" | -// | *************************************************************** | -// | U p d a t e s | -// | | -// \-----------------------------------------------------------------/ +// +-----------------------------------------------------------------+ @@ -56,6 +52,7 @@ // Constructor. public: CRBox (void); public: CRBox (int rtype, bool debug); + private: CRBox ( const CRBox& ); // Destructor. public: ~CRBox (void); @@ -63,8 +60,7 @@ // Modifiers. public: CNet *findnet (string &signame); public: CNet *findnet (char *signame); - public: CNet *getnet (string &signame); - public: CNet *getnet (char *signame); + public: CNet *getnet (const string &signame); public: void mbkload (MBK::CFig *mbkfig , int z , int zup diff --git a/alliance/src/nero/src/RMBK.cpp b/alliance/src/nero/src/RMBK.cpp index 55936b4a..b30c60b2 100644 --- a/alliance/src/nero/src/RMBK.cpp +++ b/alliance/src/nero/src/RMBK.cpp @@ -3,8 +3,7 @@ // // $Id: RMBK.cpp,v 1.18 2012/05/02 14:49:23 jpc Exp $ // -// /----------------------------------------------------------------\ -// | | +// +----------------------------------------------------------------+ // | A l l i a n c e C A D S y s t e m | // | S i m p l e R o u t e r | // | | @@ -12,10 +11,7 @@ // | E-mail : alliance-support@asim.lip6.fr | // | ============================================================== | // | C++ Module : "./RMBK.cpp" | -// | ************************************************************** | -// | U p d a t e s | -// | | -// \----------------------------------------------------------------/ +// +----------------------------------------------------------------+ @@ -25,9 +21,9 @@ -// /----------------------------------------------------------------\ +// +----------------------------------------------------------------+ // | Methods Definitions | -// \----------------------------------------------------------------/ +// +----------------------------------------------------------------+ // ------------------------------------------------------------------- @@ -47,7 +43,6 @@ void CRBox::mbkload (MBK::CFig *mbkfig MBK::MLosig::iterator endSig; MBK::MLosig::iterator sig; long mX, mY, mZ, x, y, zz, xadjust, yadjust, yoffsetslice; - long xpitch, ypitch; long XRW1, YRW1, XRW2, YRW2; bool use_global; long northPad, southPad, eastPad, westPad; @@ -61,7 +56,6 @@ void CRBox::mbkload (MBK::CFig *mbkfig MBK::phfig_list *pModel; MBK::CXRect *rect; MBK::CIns *pIns; - MNet routeds; CNet *pNet; string sig_name, term_name, ins_name; CDRGrid::iterator coord; @@ -206,7 +200,7 @@ void CRBox::mbkload (MBK::CFig *mbkfig if (z < 5) { cmess2 << " - Forcing 4 routing layers.\n"; - mZ = z = 5; + mZ = 5; } } else { cmess2 << " o Small design, global routing disabled.\n"; diff --git a/alliance/src/nero/src/UConst.cpp b/alliance/src/nero/src/UConst.cpp index e727f89b..0de9d1d7 100644 --- a/alliance/src/nero/src/UConst.cpp +++ b/alliance/src/nero/src/UConst.cpp @@ -3,8 +3,7 @@ // // $Id: UConst.cpp,v 1.4 2012/05/02 14:49:23 jpc Exp $ // -// /-----------------------------------------------------------------\ -// | | +// +-----------------------------------------------------------------+ // | A l l i a n c e C A D S y s t e m | // | S i m p l e R o u t e r | // | | @@ -12,10 +11,7 @@ // | E-mail : alliance-support@asim.lip6.fr | // | =============================================================== | // | C++ Module : "./UConst.cpp" | -// | *************************************************************** | -// | U p d a t e s | -// | | -// \-----------------------------------------------------------------/ +// +-----------------------------------------------------------------+ diff --git a/alliance/src/nero/src/UDefs.h b/alliance/src/nero/src/UDefs.h index 547ecfac..f756e26a 100644 --- a/alliance/src/nero/src/UDefs.h +++ b/alliance/src/nero/src/UDefs.h @@ -3,8 +3,7 @@ // // $Id: UDefs.h,v 1.4 2012/05/02 14:49:23 jpc Exp $ // -// /-----------------------------------------------------------------\ -// | | +// +-----------------------------------------------------------------+ // | A l l i a n c e C A D S y s t e m | // | S i m p l e R o u t e r | // | | @@ -12,10 +11,7 @@ // | E-mail : alliance-support@asim.lip6.fr | // | =============================================================== | // | C++ Header : "./UDefs.h" | -// | *************************************************************** | -// | U p d a t e s | -// | | -// \-----------------------------------------------------------------/ +// +-----------------------------------------------------------------+ @@ -276,11 +272,12 @@ namespace D { string value; // Constructor. - COpt (bool arg=false, string val="") { - parsed = false; - has_arg = arg; - value = value; - } + COpt (bool arg=false, string val="") + : found (false) + , parsed (false) + , has_arg(arg) + , value (val) + { } // Friends. public: friend ostream &operator<< (ostream &o, const COpt &self); @@ -298,7 +295,7 @@ namespace D { public: vector tVals; // Constructor. - COpts (void) { tShort = "+"; } + COpts (void) : tShort("+") { } // Modifiers. public: void getopts (int argc, char *argv[]) throw (except_done); diff --git a/alliance/src/nero/src/UGrid.cpp b/alliance/src/nero/src/UGrid.cpp index 3f1c6880..7d21f53e 100644 --- a/alliance/src/nero/src/UGrid.cpp +++ b/alliance/src/nero/src/UGrid.cpp @@ -359,9 +359,6 @@ int CDRGrid::iterator::manhattan (iterator &other) CDRGrid::CDRGrid (int xoff, int yoff, int x, int y, int z) : xoffset(xoff), yoffset(yoff), X(x), Y(y), Z(z) { - int index; - - XY = X * Y; XYZ = XY * Z; size = XY * (Z - 1); @@ -546,11 +543,8 @@ TMatrix<__CNode__>::~TMatrix (void) template __CNode__ &TMatrix<__CNode__>::operator[] (int index) { - __CNode__ *node; - - if (index < _drgrid->XY ) { - node = _zero->get (_drgrid->x(index), _drgrid->y(index)) ; + __CNode__* node = _zero->get (_drgrid->x(index), _drgrid->y(index)) ; if ( node != NULL ) return ( *node ); } else { if (index < _drgrid->XYZ) return ( _grid[index - _drgrid->XY] ); diff --git a/alliance/src/nero/src/UInter.cpp b/alliance/src/nero/src/UInter.cpp index d4da4f77..19130e89 100644 --- a/alliance/src/nero/src/UInter.cpp +++ b/alliance/src/nero/src/UInter.cpp @@ -3,8 +3,7 @@ // // $Id: UInter.cpp,v 1.1 2002/10/02 21:23:48 jpc Exp $ // -// /----------------------------------------------------------------\ -// | | +// +----------------------------------------------------------------+ // | A l l i a n c e C A D S y s t e m | // | S i m p l e R o u t e r | // | | @@ -12,10 +11,7 @@ // | E-mail : alliance-support@asim.lip6.fr | // | ============================================================== | // | C++ Module : "./UInter.cpp" | -// | ************************************************************** | -// | U p d a t e s | -// | | -// \----------------------------------------------------------------/ +// +----------------------------------------------------------------+ @@ -38,9 +34,9 @@ namespace { inline long INBOUNDS (CInter &i, long v) { return (inbounds (i.first, i.second, v)); } - // /------------------------------------------------------------\ + // +------------------------------------------------------------+ // | Functions Definitions | - // \------------------------------------------------------------/ + // +------------------------------------------------------------+ // ------------------------------------------------------------------- @@ -65,9 +61,9 @@ static long inbounds (long lbound, long rbound, long value) -// /----------------------------------------------------------------\ +// +----------------------------------------------------------------+ // | Methods Definitions | -// \----------------------------------------------------------------/ +// +----------------------------------------------------------------+ // ------------------------------------------------------------------- diff --git a/alliance/src/nero/src/UOpts.cpp b/alliance/src/nero/src/UOpts.cpp index 31fee140..8fb4fd8c 100644 --- a/alliance/src/nero/src/UOpts.cpp +++ b/alliance/src/nero/src/UOpts.cpp @@ -3,8 +3,7 @@ // // $Id: UOpts.cpp,v 1.2 2002/10/24 07:51:33 hcl Exp $ // -// /----------------------------------------------------------------\ -// | | +// +----------------------------------------------------------------+ // | A l l i a n c e C A D S y s t e m | // | S i m p l e R o u t e r | // | | @@ -12,10 +11,7 @@ // | E-mail : alliance-support@asim.lip6.fr | // | ============================================================== | // | C++ Module : "./UOpts.cpp" | -// | ************************************************************** | -// | U p d a t e s | -// | | -// \----------------------------------------------------------------/ +// +----------------------------------------------------------------+ @@ -26,9 +22,9 @@ -// /----------------------------------------------------------------\ +// +----------------------------------------------------------------+ // | Methods Definitions | -// \----------------------------------------------------------------/ +// +----------------------------------------------------------------+ // ------------------------------------------------------------------- // COpt Friend : "&operator<<()". @@ -169,7 +165,6 @@ void COpts::getopts (int argc, char *argv[]) throw (except_done) long COpts::operator() (string key) throw (except_done) { - long key_index; MOpt::iterator iter; diff --git a/alliance/src/nero/src/USys.cpp b/alliance/src/nero/src/USys.cpp index c998114c..ed61c5cc 100644 --- a/alliance/src/nero/src/USys.cpp +++ b/alliance/src/nero/src/USys.cpp @@ -3,8 +3,7 @@ // // $Id: USys.cpp,v 1.3 2004/07/23 08:50:05 jpc Exp $ // -// /----------------------------------------------------------------\ -// | | +// +----------------------------------------------------------------+ // | A l l i a n c e C A D S y s t e m | // | S i m p l e R o u t e r | // | | @@ -12,10 +11,7 @@ // | E-mail : alliance-support@asim.lip6.fr | // | ============================================================== | // | C++ Module : "./USys.cpp" | -// | ************************************************************** | -// | U p d a t e s | -// | | -// \----------------------------------------------------------------/ +// +----------------------------------------------------------------+ @@ -48,9 +44,9 @@ namespace { -// /----------------------------------------------------------------\ +// +----------------------------------------------------------------+ // | Functions Definitions | -// \----------------------------------------------------------------/ +// +----------------------------------------------------------------+ // ------------------------------------------------------------------- // Function : "trap_sig()". @@ -150,17 +146,16 @@ static void trap_sig(int aSig) -// /----------------------------------------------------------------\ +// +----------------------------------------------------------------+ // | Methods Definitions | -// \----------------------------------------------------------------/ +// +----------------------------------------------------------------+ // ------------------------------------------------------------------- // Constructor : "CHeader::CHeader()". CHeader::CHeader (string h) -{ - _header = h; -} + : _header(h) +{ } // ------------------------------------------------------------------- diff --git a/alliance/src/nero/src/debug.cpp b/alliance/src/nero/src/debug.cpp index b185c178..09457509 100644 --- a/alliance/src/nero/src/debug.cpp +++ b/alliance/src/nero/src/debug.cpp @@ -183,6 +183,7 @@ // Constructor. public: TMatrix (CDRGrid *drgrid); + private: TMatrix ( const TMatrix& ); // Destructor. public: ~TMatrix (void); @@ -211,7 +212,12 @@ // Constructor. - public: CMatrixPri (CDRGrid *drgrid) : TMatrix(drgrid) { } + public: CMatrixPri (CDRGrid *drgrid) + : TMatrix(drgrid) + , offset(0) + , delta(0) + , cleared(false) + { } // Modifiers. public: void clear (void); @@ -306,6 +312,7 @@ // Constructor. public: CDRGrid (int x, int y, int z); + private: CDRGrid ( const CDRGrid& ); // Destructor. public: ~CDRGrid (void); @@ -519,9 +526,6 @@ int CDRGrid::iterator::manhattan (iterator &other) CDRGrid::CDRGrid (int x, int y, int z) { - int index; - - X = x; Y = y; Z = z; @@ -683,10 +687,11 @@ __CNode__ *TMatrix<__CNode__>::_CHollow::get (int x, int y) template TMatrix<__CNode__>::TMatrix (CDRGrid *drgrid) -{ - _drgrid = drgrid; - _grid = new (__CNode__) [_drgrid->size]; -} + : _drgrid(drgrid) + , _zero () + , _grid (new (__CNode__) [_drgrid->size]) + , hole () +{ } @@ -709,11 +714,8 @@ TMatrix<__CNode__>::~TMatrix (void) template __CNode__ &TMatrix<__CNode__>::operator[] (int index) { - __CNode__ *node; - - if (index < _drgrid->XY ) { - node = _zero->get (_drgrid->x(index), _drgrid->y(index)) ; + __CNode__ *node = _zero->get (_drgrid->x(index), _drgrid->y(index)) ; if ( node != NULL ) return ( *node ); } else { if (index < _drgrid->XYZ) return ( _grid[index - _drgrid->XY] ); diff --git a/alliance/src/nero/src/nero.cpp b/alliance/src/nero/src/nero.cpp index 3ce35e8f..d59566da 100644 --- a/alliance/src/nero/src/nero.cpp +++ b/alliance/src/nero/src/nero.cpp @@ -3,8 +3,7 @@ // // $Id: nero.cpp,v 1.14 2012/05/03 20:59:56 jpc Exp $ // -// /----------------------------------------------------------------\ -// | | +// +----------------------------------------------------------------+ // | A l l i a n c e C A D S y s t e m | // | S i m p l e R o u t e r | // | | @@ -12,10 +11,7 @@ // | E-mail : alliance-users@asim.lip6.fr | // | ============================================================== | // | C++ Module : "./nero.cpp" | -// | ************************************************************** | -// | U p d a t e s | -// | | -// \----------------------------------------------------------------/ +// +----------------------------------------------------------------+ @@ -46,9 +42,9 @@ namespace { -// /----------------------------------------------------------------\ +// +----------------------------------------------------------------+ // | Functions Definitions | -// \----------------------------------------------------------------/ +// +----------------------------------------------------------------+ // ------------------------------------------------------------------- diff --git a/alliance/src/nero/src/pdv.c b/alliance/src/nero/src/pdv.c index 3d8df8aa..7a1845af 100644 --- a/alliance/src/nero/src/pdv.c +++ b/alliance/src/nero/src/pdv.c @@ -107,19 +107,19 @@ int main (int argc, char *argv[]) total_length = 0; total_number = 0; for (i = 0; i < _MAX_ALU_; i++) { - printf (" - ALU%d length := %10d", i+2, length[i]); - printf (" (average length := %d)\n", length[i] / number[i]); + printf (" - ALU%d length := %10ld", i+2, length[i]); + printf (" (average length := %ld)\n", length[i] / number[i]); total_length += length[i]; total_number += number[i]; } printf ("\n"); - printf (" - Total length := %10d" , total_length); - printf (" (average length := %d)\n", total_length / total_number); + printf (" - Total length := %10ld" , total_length); + printf (" (average length := %ld)\n", total_length / total_number); printf ("\n"); - printf (" - Total VIA := %10d\n" , total_VIA); + printf (" - Total VIA := %10ld\n" , total_VIA); printf ("\n\n"); diff --git a/alliance/src/ocp/src/common/Makefile.am b/alliance/src/ocp/src/common/Makefile.am index 8c7d01a5..653a6ea6 100644 --- a/alliance/src/ocp/src/common/Makefile.am +++ b/alliance/src/ocp/src/common/Makefile.am @@ -1,6 +1,6 @@ ## Process this file with automake to produce Makefile.in -AM_CXXFLAGS = @ALLIANCE_CFLAGS@ -I$(top_srcdir)/mbk/src +AM_CXXFLAGS = @ALLIANCE_CFLAGS@ -I$(top_srcdir)/mbk/src -std=c++0x noinst_LIBRARIES = libPCommon.a diff --git a/alliance/src/ocp/src/common/PContainer.h b/alliance/src/ocp/src/common/PContainer.h index 64acaaf6..a5d1839c 100644 --- a/alliance/src/ocp/src/common/PContainer.h +++ b/alliance/src/ocp/src/common/PContainer.h @@ -53,7 +53,7 @@ class PContainer double GetWidth() const { return _bBox.GetWidth(); } double GetHeight() const { return _bBox.GetHeight(); } PBBox GetBBox() const { return _bBox; }; - void MergeBBox(const PBBox bbox) {_bBox.Merge(bbox); }; + void MergeBBox(const PBBox& bbox) {_bBox.Merge(bbox); }; virtual ostream& Print(ostream& os) const = 0; }; diff --git a/alliance/src/ocp/src/placer/Makefile.am b/alliance/src/ocp/src/placer/Makefile.am index 5c656b6b..322b2c47 100644 --- a/alliance/src/ocp/src/placer/Makefile.am +++ b/alliance/src/ocp/src/placer/Makefile.am @@ -4,7 +4,7 @@ YACC = @YACC@ -d INCLUDES = -I$(srcdir)/../common -AM_CXXFLAGS = @ALLIANCE_CFLAGS@ -I$(top_srcdir)/mbk/src +AM_CXXFLAGS = @ALLIANCE_CFLAGS@ -I$(top_srcdir)/mbk/src -std=c++0x AM_CFLAGS = @ALLIANCE_CFLAGS@ -I$(top_srcdir)/mbk/src bin_PROGRAMS = ocp diff --git a/alliance/src/ocp/src/placer/Ocp.cpp b/alliance/src/ocp/src/placer/Ocp.cpp index 086b2fe0..836cd351 100644 --- a/alliance/src/ocp/src/placer/Ocp.cpp +++ b/alliance/src/ocp/src/placer/Ocp.cpp @@ -212,7 +212,7 @@ main(int argc, char **argv) { if (i+3 < argc) { - if (!sscanf(argv[i+1], "%lg", &BBoxOccCostRatio)) + if (!sscanf(argv[i+1], "%22lg", &BBoxOccCostRatio)) { cout << "WARNING : invalid argument for -r" << endl; UsageFlg = true; @@ -228,17 +228,17 @@ main(int argc, char **argv) if (!strcmp (argv[i], "-nbrmult")) { if (i+5 < argc) { - if (!sscanf(argv[i+1], "%lg", &NetMult)) + if (!sscanf(argv[i+1], "%22lg", &NetMult)) { cout << "WARNING : invalid argument for -nbrmult" << endl; UsageFlg = true; } - if (!sscanf(argv[i+2], "%lg", &RowMult)) + if (!sscanf(argv[i+2], "%22lg", &RowMult)) { cout << "WARNING : invalid argument for -nbrmult" << endl; UsageFlg = true; } - if (!sscanf(argv[i+3], "%lg", &BinMult)) + if (!sscanf(argv[i+3], "%22lg", &BinMult)) { cout << "WARNING : invalid argument for -nbrmult" << endl; UsageFlg = true; @@ -255,7 +255,7 @@ main(int argc, char **argv) if (!strcmp (argv[i], "-margin")) { if (i+3 < argc) { - if (!sscanf(argv[i+1], "%lg", &Margin)) + if (!sscanf(argv[i+1], "%22lg", &Margin)) { cout << "WARNING : invalid argument for -margin" << endl; UsageFlg = true; @@ -272,7 +272,7 @@ main(int argc, char **argv) if (!strcmp (argv[i], "-partial")) { if (i+3 < argc) { - if (!sscanf(argv[i+1], "%s", PartialFile)) + if (!sscanf(argv[i+1], "%255s", PartialFile)) { cout << "WARNING : invalid argument for -partial" << endl; UsageFlg = true; @@ -289,7 +289,7 @@ main(int argc, char **argv) if (!strcmp (argv[i], "-ioc")) { if (i+3 < argc) { - if (!sscanf(argv[i+1], "%s", IocFile)) + if (!sscanf(argv[i+1], "%255s", IocFile)) { cout << "WARNING : invalid argument for -partial" << endl; UsageFlg = true; @@ -307,7 +307,7 @@ main(int argc, char **argv) if (!strcmp (argv[i], "-mdl")) { if (i+3 < argc) { - if (!sscanf(argv[i+1], "%d", &MaxDetLoop)) + if (!sscanf(argv[i+1], "%11d", &MaxDetLoop)) { cout << "WARNING : invalid argument for -mdl" << endl; UsageFlg = true; @@ -324,7 +324,7 @@ main(int argc, char **argv) if (!strcmp (argv[i], "-rows")) { if (i+3 < argc) { - if (!sscanf(argv[i+1], "%d", &NbRows)) + if (!sscanf(argv[i+1], "%11d", &NbRows)) { cout << "WARNING : invalid argument for -rows" << endl; UsageFlg = true; diff --git a/alliance/src/ocp/src/placer/PBin.cpp b/alliance/src/ocp/src/placer/PBin.cpp index 55727dab..d093f097 100644 --- a/alliance/src/ocp/src/placer/PBin.cpp +++ b/alliance/src/ocp/src/placer/PBin.cpp @@ -34,9 +34,14 @@ using namespace std; #include "PBin.h" PBin::PBin() - : PContainer(), _toPlaceInss(), _sourceHits(0), _targetHits(0) -{ -} + : PContainer () + , _subRow (NULL) + , _capa (0.0) + , _size (0.0) + , _toPlaceInss() + , _sourceHits (0) + , _targetHits (0) +{ } void PBin::Init(const PBBox& bbox, double margin, PSubRow &row) @@ -116,10 +121,10 @@ PBin::PlotLabel(ofstream& out, unsigned totalMoves) const { unsigned x = (unsigned)(GetMinX() + GetMaxX()) / 2; unsigned y = (unsigned)(GetMinY() + GetMaxY()) / 2; - double percent; + if (totalMoves != 0) { - percent = (_sourceHits * 100.0) / totalMoves; + double percent = (_sourceHits * 100.0) / totalMoves; out << "set label \"" << percent << "%\" at " << x << "," << y << " center" << endl; diff --git a/alliance/src/ocp/src/placer/PCon.h b/alliance/src/ocp/src/placer/PCon.h index cebfe2e8..80608d93 100644 --- a/alliance/src/ocp/src/placer/PCon.h +++ b/alliance/src/ocp/src/placer/PCon.h @@ -43,7 +43,7 @@ class PCon: public PElem { PCon(const locon* con, PPos pos, char orient); PPos GetPos() const { return _pos; } const locon* GetLocon() const { return _con; } - void SetPos(const PPos pos) {_pos = pos;} + void SetPos(const PPos& pos) {_pos = pos;} void SetOrient(const char orient) {_orient = orient;} void Save(struct phfig *physicalfig, const double dx, const double dy) const; void RingSave(struct phfig *physicalfig, const double dx, const double dy) const; diff --git a/alliance/src/ocp/src/placer/PDetToPlaceIns.cpp b/alliance/src/ocp/src/placer/PDetToPlaceIns.cpp index 52107089..aca7a657 100644 --- a/alliance/src/ocp/src/placer/PDetToPlaceIns.cpp +++ b/alliance/src/ocp/src/placer/PDetToPlaceIns.cpp @@ -37,13 +37,14 @@ using namespace std; #include "PDetToPlaceIns.h" -PDetToPlaceIns::PDetToPlaceIns(PToPlaceIns* toplaceins): - PIns(toplaceins->GetInstance()), - _pos(toplaceins->GetPos()), - _marginWidth(toplaceins->GetWidth()), - _leftCorner(PPos(_pos.GetX() - toplaceins->GetWidth() / 2.0, - _pos.GetY() - toplaceins->GetHeight() / 2.0)), - _placed(true) +PDetToPlaceIns::PDetToPlaceIns(PToPlaceIns* toplaceins) + : PIns (toplaceins->GetInstance()) + , _subRow (NULL) + , _pos (toplaceins->GetPos()) + , _marginWidth(toplaceins->GetWidth()) + , _leftCorner (PPos(_pos.GetX() - toplaceins->GetWidth () / 2.0, + _pos.GetY() - toplaceins->GetHeight() / 2.0)) + , _placed(true) { // initialisation des vecteurs de nets, // les adresses ne sont pas modifiees diff --git a/alliance/src/ocp/src/placer/PDetToPlaceIns.h b/alliance/src/ocp/src/placer/PDetToPlaceIns.h index 241d625b..aa4c7ba9 100644 --- a/alliance/src/ocp/src/placer/PDetToPlaceIns.h +++ b/alliance/src/ocp/src/placer/PDetToPlaceIns.h @@ -35,7 +35,7 @@ class PDetSubRow; class PDetToPlaceIns : public PIns { private: - PDetSubRow* _subRow; + PDetSubRow* _subRow; PPos _pos; double _marginWidth; PPos _leftCorner; diff --git a/alliance/src/ocp/src/placer/PPlacement.cpp b/alliance/src/ocp/src/placer/PPlacement.cpp index 382cc4ba..6b39f961 100644 --- a/alliance/src/ocp/src/placer/PPlacement.cpp +++ b/alliance/src/ocp/src/placer/PPlacement.cpp @@ -236,7 +236,7 @@ PPlacement::Init(lofig* fig, int NbRows) } else { - loins* ins = (loins *)con->ROOT; + loins* ins = (loins*)(con->ROOT); set::iterator liit = siginsset.find(ins); if (liit == siginsset.end()) { @@ -265,7 +265,7 @@ PPlacement::Init(lofig* fig, int NbRows) } else { - loins* ins = (loins *)con->ROOT; + loins* ins = (loins*)(con->ROOT); cerr << "instance " << ins->INSNAME; } cerr << endl; @@ -282,7 +282,6 @@ PPlacement::Init(lofig* fig, int NbRows) } - unsigned vectcpt = 0; for (loins* ins = fig->LOINS ; ins ; ins = ins->NEXT) { set inssigset; @@ -293,7 +292,6 @@ PPlacement::Init(lofig* fig, int NbRows) exit(1); } PElem::PNets& netvector = iit->second->GetNets(); - vectcpt = 0; for (locon* con = ins->LOCON ; con ; con = con->NEXT) { losig* sig = con->SIG; @@ -359,7 +357,7 @@ PPlacement::Init(lofig* fig, int NbRows) locon_list* con = (locon_list*)(it->DATA); if (con->TYPE == INTERNAL) { - loins* ins = (loins *)con->ROOT; + loins* ins = (loins*)(con->ROOT); set::iterator liit = siginsset.find(ins); if (liit == siginsset.end()) { @@ -964,10 +962,9 @@ PPlacement::PlotInstances(ofstream& out) const // void PlotAll(char *output) const // ====================================================================== void -PPlacement::PlotAll(char* output) const +PPlacement::PlotAll(const string& output) const { - string name(output); - name += ".gpl"; + string name = output + ".gpl"; ofstream out(name.c_str()); out << "set noxtics\nset noytics\n" @@ -997,10 +994,9 @@ PPlacement::PlotAll(char* output) const // void PlotFinal(char *output) const // ====================================================================== void -PPlacement::PlotFinal(char* output) const +PPlacement::PlotFinal(const string& output) const { - string name(output); - name += ".gpl"; + string name = output + ".gpl"; ofstream out(name.c_str()); out << "set noxtics\nset noytics\n" @@ -1059,10 +1055,9 @@ PPlacement::PlotFinal(char* output) const // void PlotOnlyInstances(char* output) const // ====================================================================== void -PPlacement::PlotOnlyInstances(char* output) const +PPlacement::PlotOnlyInstances(const string& output) const { - string name(output); - name += ".gpl"; + string name = output + ".gpl"; ofstream out(name.c_str()); out << "set noxtics\nset noytics\n" @@ -1084,10 +1079,9 @@ PPlacement::PlotOnlyInstances(char* output) const // void PlotOnlyBins(char* output) const // ====================================================================== void -PPlacement::PlotOnlyBins(char* output) const +PPlacement::PlotOnlyBins(const string& output) const { - string name (output); - name += ".gpl"; + string name = output + ".gpl"; ofstream out(name.c_str()); out << "set noxtics\nset noytics\n" @@ -1358,7 +1352,7 @@ PPlacement::InitPlace(int NbRows) } // Computing Placement BBox - double MaxX = 0.0, MaxY = 0.0, RowMaxX, RowMaxY; + double MaxX = 0.0, MaxY = 0.0, RowMaxX = 0.0, RowMaxY = 0.0; for (PRows::iterator rit = _rows.begin(); rit != _rows.end(); rit++) { RowMaxX = (*rit)->GetMaxX(); diff --git a/alliance/src/ocp/src/placer/PPlacement.h b/alliance/src/ocp/src/placer/PPlacement.h index 8508d018..d43e4b19 100644 --- a/alliance/src/ocp/src/placer/PPlacement.h +++ b/alliance/src/ocp/src/placer/PPlacement.h @@ -27,22 +27,12 @@ #ifndef __PPLACEMENT_H #define __PPLACEMENT_H -#ifdef __GNUC__ -#if __GNUC__ < 3 -#include -#else -#include -#if (__GNUC_MINOR__ == 0) and (__GNUC__ == 3) -#else -using namespace __gnu_cxx; // GCC 3.1 and later -#endif -#endif -#endif - #include #include #include #include +#include + using namespace std; #include "mut.h" @@ -58,122 +48,157 @@ using namespace std; struct eqstr { - bool operator()(const char* s1, const char* s2) const + inline size_t operator()(const char *s) const + { + size_t hash = 1; + for (; *s; ++s) hash = hash * 5 + *s; + return hash; + } + + inline bool operator()(const char* s1, const char* s2) const { return strcmp(s1, s2) == 0; } }; class PPlacement { - public: - typedef vector PRows; - typedef vector PONets; - typedef vector PToPlaceInss; - typedef vector PFixedInss; - typedef vector PCons; - typedef vector PrePlaceRow; - typedef vector PrePlaceTab; - typedef vector PDetSubRows; + public: + typedef vector PRows; + typedef vector PONets; + typedef vector PToPlaceInss; + typedef vector PFixedInss; + typedef vector PCons; + typedef vector PrePlaceRow; + typedef vector PrePlaceTab; + typedef vector PDetSubRows; - private: - typedef map > PRowsYMax; - typedef map > PRowsYMinInv; - typedef hash_map PNetMap; - typedef hash_map, eqstr>PInsMap; - typedef hash_map, eqstr> PConMap; - typedef hash_map, eqstr> PLoconMap; - typedef hash_map, eqstr> PFixedMap; - typedef hash_map, eqstr> PDetInsMap; + private: + typedef map< double, unsigned, less > PRowsYMax; + typedef map< double, unsigned, greater > PRowsYMinInv; + typedef unordered_map PNetMap; + typedef unordered_map PInsMap; + typedef unordered_map PConMap; + typedef unordered_map PLoconMap; + typedef unordered_map PFixedMap; + typedef unordered_map PDetInsMap; - PBBox BBox; - int _dx; - int _dy; + PBBox BBox; + int _dx; + int _dy; - lofig* _fig; - phfig* _prePlaceFig; - PToPlaceInss _toPlaceInss; - PFixedInss _fixedInss; - PCons _cons; - PONets _nets; - PRows _rows; - PRowsYMax _rowsYMax; - PRowsYMinInv _rowsYMinInv; - // placement detaille - PDetSubRows _detSubRows; - double _detInitNetCost; + lofig* _fig; + phfig* _prePlaceFig; + PToPlaceInss _toPlaceInss; + PFixedInss _fixedInss; + PCons _cons; + PONets _nets; + PRows _rows; + PRowsYMax _rowsYMax; + PRowsYMinInv _rowsYMinInv; + // placement detaille + PDetSubRows _detSubRows; + double _detInitNetCost; - bool _rowZeroOrientation; + bool _rowZeroOrientation; - double _initNetCost; - double _initRowCost; - double _initBinCost; + double _initNetCost; + double _initRowCost; + double _initBinCost; - // parametres - double _margin; - double _realMargin; - int _maxDetLoop; // Maximum nb of loops for detailed placement - double RowMult; - double BinMult; - double NetMult; - bool _placeCons; - bool _ringPlaceCons; - con_list* _PtList; - bool _iocFile; - char* _iocFileName; - bool _boolPlot; - bool _verbose; - bool _prePlace; - bool _eqMargin; - unsigned _totalMoves; - unsigned _sourceEqualTargetMovementNumber; - unsigned _surOccupationTargetMovementNumber; - unsigned _impossibleExchangeMovementNumber; - unsigned _acceptedMoveNumber; - unsigned _acceptedExchangeNumber; - unsigned _rejectedMoveNumber; - unsigned _rejectedExchangeNumber; + // parametres + double _margin; + double _realMargin; + int _maxDetLoop; // Maximum nb of loops for detailed placement + double RowMult; + double BinMult; + double NetMult; + bool _placeCons; + bool _ringPlaceCons; + con_list* _PtList; + bool _iocFile; + char* _iocFileName; + bool _boolPlot; + bool _verbose; + bool _prePlace; + bool _eqMargin; + unsigned _totalMoves; + unsigned _sourceEqualTargetMovementNumber; + unsigned _surOccupationTargetMovementNumber; + unsigned _impossibleExchangeMovementNumber; + unsigned _acceptedMoveNumber; + unsigned _acceptedExchangeNumber; + unsigned _rejectedMoveNumber; + unsigned _rejectedExchangeNumber; - // Placement caracteristics - char* _fileName; - unsigned _elems; - unsigned _nIns; - unsigned _nInsToPlace; - double _binsWidth; - double _binsCapa; - double _binsMinWidth; - double _binsMaxWidth; - double _sumToPlaceInssWidth; - double _biggestToPlaceInsWidth; + // Placement caracteristics + char* _fileName; + unsigned _elems; + unsigned _nIns; + unsigned _nInsToPlace; + double _binsWidth; + double _binsCapa; + double _binsMinWidth; + double _binsMaxWidth; + double _sumToPlaceInssWidth; + double _biggestToPlaceInsWidth; - void Init(lofig* cell, int NbRows); - double GetRowCost(); - double GetBinCost(); - double GetNetCost(); - double GetCost(double RowCost, double BinCost, double NetCost); - void PlaceGlobal(); - void PlaceFinal(); + void Init(lofig* cell, int NbRows); + double GetRowCost(); + double GetBinCost(); + double GetNetCost(); + double GetCost(double RowCost, double BinCost, double NetCost); + void PlaceGlobal(); + void PlaceFinal(); - public: - PPlacement(bool conflg, bool ringflg, double rowmult, double binmult, double netmult, - bool iocfile, char *iocfilename, bool plotflg, - bool verbose, bool preflg, bool eqmargin, - struct phfig* physfig, - char* filename): - _prePlaceFig(physfig), - _rowZeroOrientation(false), - RowMult(rowmult), BinMult(binmult), NetMult(netmult), - _placeCons(conflg), _ringPlaceCons(ringflg), _iocFile(iocfile), _iocFileName(iocfilename), - _boolPlot(plotflg), _verbose(verbose), _prePlace(preflg), _eqMargin(eqmargin), - _totalMoves(0) - , _sourceEqualTargetMovementNumber(0) - , _surOccupationTargetMovementNumber(0) - , _impossibleExchangeMovementNumber(0) - , _acceptedMoveNumber(0) - , _acceptedExchangeNumber(0) - , _rejectedMoveNumber(0) - , _rejectedExchangeNumber(0) - , _fileName(filename) - {} + public: + PPlacement(bool conflg, bool ringflg, double rowmult, double binmult, double netmult, + bool iocfile, char *iocfilename, bool plotflg, + bool verbose, bool preflg, bool eqmargin, + struct phfig* physfig, + char* filename) + : _dx (0) + , _dy (0) + , _fig (NULL) + , _prePlaceFig (physfig) + , _detInitNetCost (0.0) + , _rowZeroOrientation (false) + , _initNetCost (0.0) + , _initRowCost (0.0) + , _initBinCost (0.0) + , _margin (0.0) + , _realMargin (0.0) + , _maxDetLoop (0) + , RowMult (rowmult) + , BinMult (binmult) + , NetMult (netmult) + , _placeCons (conflg) + , _ringPlaceCons (ringflg) + , _PtList (NULL) + , _iocFile (iocfile) + , _iocFileName (iocfilename) + , _boolPlot (plotflg) + , _verbose (verbose) + , _prePlace (preflg) + , _eqMargin (eqmargin) + , _totalMoves (0) + , _sourceEqualTargetMovementNumber (0) + , _surOccupationTargetMovementNumber(0) + , _impossibleExchangeMovementNumber (0) + , _acceptedMoveNumber (0) + , _acceptedExchangeNumber (0) + , _rejectedMoveNumber (0) + , _rejectedExchangeNumber (0) + , _fileName (filename) + , _elems (0) + , _nIns (0) + , _nInsToPlace (0) + , _binsWidth (0.0) + , _binsCapa (0.0) + , _binsMinWidth (0.0) + , _binsMaxWidth (0.0) + , _sumToPlaceInssWidth (0.0) + , _biggestToPlaceInsWidth (0.0) + { } ~PPlacement(); @@ -188,11 +213,11 @@ class PPlacement { double GetNetMult() const { return NetMult; } void Place(lofig* cell, int NbRows); - void PlotAll(char* output) const; - void PlotFinal(char* output) const; - void PlotOnlyInstances(char* output) const; + void PlotAll(const string& output) const; + void PlotFinal(const string& output) const; + void PlotOnlyInstances(const string& output) const; void PlotStat(); - void PlotOnlyBins(char* output) const; + void PlotOnlyBins(const string& output) const; double GetBinsSize() const; double GetBinsCapa() const; diff --git a/alliance/src/ocp/src/placer/PPlacementFinal.cpp b/alliance/src/ocp/src/placer/PPlacementFinal.cpp index 08ba09d8..701ab550 100644 --- a/alliance/src/ocp/src/placer/PPlacementFinal.cpp +++ b/alliance/src/ocp/src/placer/PPlacementFinal.cpp @@ -24,17 +24,6 @@ // Author : Christophe Alexandre // // Authors-Tag -#ifdef __GNUC__ -#if __GNUC__ < 3 -#include -#else -#include -#if __GNUC_MINOR__ == 0 -#else -using namespace __gnu_cxx; // GCC 3.1 and later -#endif -#endif -#endif #include #include @@ -228,7 +217,7 @@ bool PPlacement::FinalOptimize() { int Loop = 0; - double NewCost; + //double NewCost; double InitCost = DetPlaceDebugNetCost(); _detInitNetCost = InitCost; if (_verbose) @@ -247,8 +236,8 @@ PPlacement::FinalOptimize() ContinueCondition = true; OptimizationResult = true; } - NewCost = DetPlaceDebugNetCost(); - InitCost = NewCost; + /*NewCost =*/ DetPlaceDebugNetCost(); + //InitCost = NewCost; } ++Loop; } @@ -335,12 +324,14 @@ int PPlacement::AddRowend(struct phfig* physicalfig) { char *nb = strdup(It->INSNAME + 9); if ( atoi(nb) > rowendcount ) rowendcount = atoi(nb); + free( nb ); } if ( strncmp(It->INSNAME,"tiex0_",6) == 0 ) { char *nb = strdup(It->INSNAME + 6); if ( atoi(nb) > tiecount ) tiecount = atoi(nb); + free( nb ); } // fill the tab with instances (true = instance is present) diff --git a/alliance/src/ocp/src/placer/PPlacementGlobal.cpp b/alliance/src/ocp/src/placer/PPlacementGlobal.cpp index 006186c0..428d3f00 100644 --- a/alliance/src/ocp/src/placer/PPlacementGlobal.cpp +++ b/alliance/src/ocp/src/placer/PPlacementGlobal.cpp @@ -192,10 +192,9 @@ PPlacement::PlaceGlobal() { int Iteration; double Cost, RowCost, BinCost, NetCost; - double InitCost; double Temperature = 1e30, OldTemperature = 1e30; int Loop = 0; - double StdDev = 0, StdDevRow = 0, StdDevBin = 0, StdDevNet = 0; + double StdDev = 0 ; double SumCost = 0, SumCostRow = 0, SumCostBin = 0, SumCostNet = 0; double SumSquare = 0, SumSquareRow = 0, SumSquareBin = 0, SumSquareNet = 0; int Accepted = 0; @@ -220,7 +219,7 @@ PPlacement::PlaceGlobal() _initBinCost = BinCost = GetBinCost(); _initNetCost = NetCost = GetNetCost(); - InitCost = Cost = GetCost(RowCost, BinCost, NetCost); + Cost = GetCost(RowCost, BinCost, NetCost); if (_verbose) { @@ -268,9 +267,9 @@ PPlacement::PlaceGlobal() } StdDev = GetStdDev(SumCost, SumSquare, Accepted); - StdDevRow = GetStdDev(SumCostRow, SumSquareRow, Accepted); - StdDevBin = GetStdDev(SumCostBin, SumSquareBin, Accepted); - StdDevNet = GetStdDev(SumCostNet, SumSquareNet, Accepted); + GetStdDev(SumCostRow, SumSquareRow, Accepted); + GetStdDev(SumCostBin, SumSquareBin, Accepted); + GetStdDev(SumCostNet, SumSquareNet, Accepted); Temperature = 20.0 * StdDev; Iteration = (int)(5.0 * pow(GetNInsToPlace(), 1.33)); @@ -336,9 +335,9 @@ PPlacement::PlaceGlobal() Loop += 1; OldTemperature = Temperature; StdDev = GetStdDev(SumCost, SumSquare, Accepted); - StdDevRow = GetStdDev(SumCostRow, SumSquareRow, Accepted); - StdDevBin = GetStdDev(SumCostBin, SumSquareBin, Accepted); - StdDevNet = GetStdDev(SumCostNet, SumSquareNet, Accepted); + GetStdDev(SumCostRow, SumSquareRow, Accepted); + GetStdDev(SumCostBin, SumSquareBin, Accepted); + GetStdDev(SumCostNet, SumSquareNet, Accepted); if (StdDev == 0.0) Temperature = 0.0; diff --git a/alliance/src/ocp/src/placer/PSubRow.cpp b/alliance/src/ocp/src/placer/PSubRow.cpp index a78bf0de..08a162c3 100644 --- a/alliance/src/ocp/src/placer/PSubRow.cpp +++ b/alliance/src/ocp/src/placer/PSubRow.cpp @@ -31,8 +31,14 @@ #include "PSubRow.h" PSubRow::PSubRow() - : PContainer(), _bins(), - _binsXMax() + : PContainer() + , _row (NULL) + , _bins () + , _binsXMax () + , _size (0.0) + , _capa (0.0) + , _max (0.0) + , _nBins (0) {} PSubRow::~PSubRow() diff --git a/alliance/src/ocp/src/placer/iocscan.l b/alliance/src/ocp/src/placer/iocscan.l index 3ccd79eb..db95f606 100644 --- a/alliance/src/ocp/src/placer/iocscan.l +++ b/alliance/src/ocp/src/placer/iocscan.l @@ -1,3 +1,7 @@ + +%option noinput +%option nounput + /* This file is part of the Alliance Project. Copyright (C) Laboratoire LIP6 - Departement ASIM Universite Pierre et Marie Curie diff --git a/alliance/src/pat/src/pat_error.c b/alliance/src/pat/src/pat_error.c index d8d6c6c6..73a1723a 100644 --- a/alliance/src/pat/src/pat_error.c +++ b/alliance/src/pat/src/pat_error.c @@ -46,7 +46,7 @@ unsigned int line; { if (code < 100) - fprintf (stderr,"PAT : Error %d line %d : ", code, line); + fprintf (stderr,"PAT : Error %d line %u : ", code, line); else { if (code < 200) diff --git a/alliance/src/pat/src/pat_warning.c b/alliance/src/pat/src/pat_warning.c index a8cf4577..9817e8c0 100644 --- a/alliance/src/pat/src/pat_warning.c +++ b/alliance/src/pat/src/pat_warning.c @@ -47,7 +47,7 @@ unsigned int line; { if (code > 100) - fprintf (stderr, "PAT : Warning %d line %d : ", code, line); + fprintf (stderr, "PAT : Warning %d line %u : ", code, line); else { fprintf (stderr, "PAT : Warning %d : ", code); diff --git a/alliance/src/pat2spi/src/pat2spi.c b/alliance/src/pat2spi/src/pat2spi.c index f3be066b..ff5e438a 100644 --- a/alliance/src/pat2spi/src/pat2spi.c +++ b/alliance/src/pat2spi/src/pat2spi.c @@ -63,7 +63,7 @@ patfig_list *pat_addpatfig( paseq_list *Sequence ) int Left; int Right; char *Direction; - char *Mode; + char *Mode = NULL; long NumberIO; long NumberBit; @@ -73,9 +73,7 @@ patfig_list *pat_addpatfig( paseq_list *Sequence ) unsigned long TimeScale; unsigned long TimeDelta; unsigned long Delta; - unsigned long TimeCurrent; - unsigned long TimeNext; - char TimeAllZero; +//char TimeAllZero; paiol_list *ScanIol; pagrp_list *ScanGrp; @@ -137,12 +135,12 @@ patfig_list *pat_addpatfig( paseq_list *Sequence ) { if ( ! ScanGrp->FLAG ) { - sscanf( ScanIol->NAME, "%s %d", Name, &Left ); + sscanf( ScanIol->NAME, "%511s %11d", Name, &Left ); ScanIol += ScanGrp->LENGTH - 1; IndexBit += ScanGrp->LENGTH; - sscanf( ScanIol->NAME, "%s %d", Name, &Right ); + sscanf( ScanIol->NAME, "%511s %11d", Name, &Right ); if ( Left < Right ) Direction = "to"; else Direction = "downto"; @@ -255,7 +253,7 @@ patfig_list *pat_addpatfig( paseq_list *Sequence ) # ifdef DEBUG fprintf( stdout, "%ld\n", ScanPaPat->TIME ); # endif - if ( ScanPaPat->TIME != 0 ) TimeAllZero = 0; + //if ( ScanPaPat->TIME != 0 ) TimeAllZero = 0; if ( ScanPaPat->NEXT != (papat_list *)0 ) { @@ -376,8 +374,8 @@ void P2Sdrivepatfig( patfig_list *PatFigure, char *FileName, long Slope ) char *IolName; FILE *File; - unsigned long CurrentTime; - unsigned long NextTime; + unsigned long CurrentTime = 0; +//unsigned long NextTime; NumberBit = PatFigure->IO_NUMBER_BIT; PaSeq = PatFigure->SEQUENCE; @@ -428,14 +426,14 @@ void P2Sdrivepatfig( patfig_list *PatFigure, char *FileName, long Slope ) { CurrentTime = PaPat->TIME; - if ( PaPat->NEXT != (papat_list *)0 ) - { - NextTime = PaPat->NEXT->TIME; - } - else - { - NextTime = CurrentTime + Slope; - } + /* if ( PaPat->NEXT != (papat_list *)0 ) */ + /* { */ + /* NextTime = PaPat->NEXT->TIME; */ + /* } */ + /* else */ + /* { */ + /* NextTime = CurrentTime + Slope; */ + /* } */ if ( ! FirstTime ) { diff --git a/alliance/src/phl/src/pat_debug.c b/alliance/src/phl/src/pat_debug.c index f53641ee..499c9593 100644 --- a/alliance/src/phl/src/pat_debug.c +++ b/alliance/src/phl/src/pat_debug.c @@ -30,6 +30,7 @@ /* ###--------------------------------------------------------------### */ #include +#include #include "mut.h" #include "pat.h" #include "pat_debug.h" @@ -596,7 +597,7 @@ long *indxs ; /* words' index in strgs table */ for (i=0 ; i "); - gets (line); + getline (&line,&lline,stdin); wrdcnt = splitline (words, line); idx = translate (words, wrdcnt, str, nmbrs, flags, indxs); } diff --git a/alliance/src/ppt/src/pat_decl_l.l b/alliance/src/ppt/src/pat_decl_l.l index 160c74d0..feee4b6d 100644 --- a/alliance/src/ppt/src/pat_decl_l.l +++ b/alliance/src/ppt/src/pat_decl_l.l @@ -1,3 +1,7 @@ + +%option noinput +%option nounput + %{ /* * This file is part of the Alliance CAD System diff --git a/alliance/src/ppt/src/pat_decl_y.y b/alliance/src/ppt/src/pat_decl_y.y index da472a21..b107d0a5 100644 --- a/alliance/src/ppt/src/pat_decl_y.y +++ b/alliance/src/ppt/src/pat_decl_y.y @@ -40,6 +40,10 @@ #include "pat_type.h" #include "pat_decl.h" +extern void pat_decl_y_restart ( ); +extern int pat_decl_y_parse ( ); +extern int pat_decl_y_lex ( ); + /* ###--------------------------------------------------------------### */ /* function : yyerror */ /* description : print an error message (errors detected by yacc) */ diff --git a/alliance/src/ppt/src/pat_desc_y.y b/alliance/src/ppt/src/pat_desc_y.y index 43d5b28b..403fc6f6 100644 --- a/alliance/src/ppt/src/pat_desc_y.y +++ b/alliance/src/ppt/src/pat_desc_y.y @@ -40,6 +40,10 @@ #include "pat_type.h" #include "pat_desc.h" +extern int pat_desc_y_parse (); +extern int pat_decl_y_lex (); +extern void pat_decl_y_error (); + /* ###--------------------------------------------------------------### */ /* function : lcl_addpacom */ /* description : create PACOM structure if there is no more structure */ @@ -343,34 +347,34 @@ char *value ; { case 'X': case 'x': - sprintf (extname, "%s %d", gname.ident, i); + sprintf (extname, "%s %ld", gname.ident, i); i += inc; ptini = lcl_addpaini (ptini, extname, frc[0]); - sprintf (extname, "%s %d", gname.ident, i); + sprintf (extname, "%s %ld", gname.ident, i); i += inc; ptini = lcl_addpaini (ptini, extname, frc[1]); - sprintf (extname, "%s %d", gname.ident, i); + sprintf (extname, "%s %ld", gname.ident, i); i += inc; ptini = lcl_addpaini (ptini, extname, frc[2]); - sprintf (extname, "%s %d", gname.ident, i); + sprintf (extname, "%s %ld", gname.ident, i); i += inc; ptini = lcl_addpaini (ptini, extname, frc[3]); break; case 'O': case 'o': - sprintf (extname, "%s %d", gname.ident, i); + sprintf (extname, "%s %ld", gname.ident, i); i += inc; ptini = lcl_addpaini (ptini, extname, frc[1]); - sprintf (extname, "%s %d", gname.ident, i); + sprintf (extname, "%s %ld", gname.ident, i); i += inc; ptini = lcl_addpaini (ptini, extname, frc[2]); - sprintf (extname, "%s %d", gname.ident, i); + sprintf (extname, "%s %ld", gname.ident, i); i += inc; ptini = lcl_addpaini (ptini, extname, frc[3]); break; case 'B': case 'b': - sprintf (extname, "%s %d", gname.ident, i); + sprintf (extname, "%s %ld", gname.ident, i); i += inc; ptini = lcl_addpaini (ptini, extname, frc[3]); break; @@ -1245,7 +1249,7 @@ unlabeled_pattern if ((c != '\0') && ($2 [i] != '\0')) { -printf ("pat : %s < i : %d < index : %d\n", $2, i, idx); +printf ("pat : %s < i : %ld < index : %d\n", $2, i, idx); ERR_FLG += pat_error (3, NULL, ' ', PAT_LINNUM); } diff --git a/alliance/src/ppt/src/pat_drvpat.c b/alliance/src/ppt/src/pat_drvpat.c index 0eeaba3e..43b48270 100644 --- a/alliance/src/ppt/src/pat_drvpat.c +++ b/alliance/src/ppt/src/pat_drvpat.c @@ -66,7 +66,7 @@ struct papat *ptpat; /* ###------------------------------------------------------### */ fprintf (fp,"\n-- modification of registers\n"); - oldred = sscanf (ptini->NAME, "%s %d", oldname, &left); + oldred = sscanf (ptini->NAME, "%255s %22ld", oldname, &left); strcpy (name, oldname); redvar = oldred; @@ -83,7 +83,7 @@ struct papat *ptpat; /* split the register's name into a root name and an index. */ /* ###------------------------------------------------------### */ - redvar = sscanf (ptini->NAME, "%s %d", name, &indx); + redvar = sscanf (ptini->NAME, "%255s %22ld", name, &indx); if ( (!strcmp (name, oldname)) && (oldred == 2) && (redvar == 2) && ( (((direction == '?') || (direction == 'U')) && (indx == right+1)) || @@ -129,15 +129,15 @@ struct papat *ptpat; switch (direction) { case 'U' : - fprintf (fp, "%s (%d to %d) <= B\"%s\";\n", oldname, left, + fprintf (fp, "%s (%ld to %ld) <= B\"%s\";\n", oldname, left, right , buffer); break; case 'D' : - fprintf (fp, "%s (%d downto %d) <= B\"%s\";\n", oldname, left, + fprintf (fp, "%s (%ld downto %ld) <= B\"%s\";\n", oldname, left, right , buffer); break; case '?' : - fprintf (fp, "%s (%d) <= \'%s\';\n", oldname, left, buffer); + fprintf (fp, "%s (%ld) <= \'%s\';\n", oldname, left, buffer); break; } } @@ -168,15 +168,15 @@ struct papat *ptpat; switch (direction) { case 'U' : - fprintf (fp, "%s (%d to %d) <= B\"%s\";\n", oldname, left, + fprintf (fp, "%s (%ld to %ld) <= B\"%s\";\n", oldname, left, right , buffer); break; case 'D' : - fprintf (fp, "%s (%d downto %d) <= B\"%s\";\n", oldname, left, + fprintf (fp, "%s (%ld downto %ld) <= B\"%s\";\n", oldname, left, right , buffer); break; case '?' : - fprintf (fp, "%s (%d) <= \'%s\';\n", oldname, left, buffer); + fprintf (fp, "%s (%ld) <= \'%s\';\n", oldname, left, buffer); break; } } @@ -228,8 +228,8 @@ unsigned long labelsiz; /* length of the longest label */ long i ; long j ; - long compare ; - char sflag = 'S'; /* processed or unprocessed */ + long compare = 0; + char sflag = 'S'; /* processed or unprocessed */ long length ; /* length of string */ long ret_val = 0 ; /* value to be returned */ @@ -384,8 +384,9 @@ unsigned long labelsiz; /* length of the longest label */ case 'U': mode = "signal "; break; default : - mode = "signal "; break; + mode = "signal "; ret_val = pat_error (201, ptiol->NAME, ptiol->MODE, 0); + break; } /* ###------------------------------------------------------### */ @@ -436,17 +437,17 @@ unsigned long labelsiz; /* length of the longest label */ /* print out the declaration of an actual array */ /* ###------------------------------------------------------### */ - sscanf (ptiol->NAME, "%s %d", name, &left); + sscanf (ptiol->NAME, "%255s %22ld", name, &left); ptiol += ptgrp->LENGTH - 1; - sscanf (ptiol->NAME, "%s %d", name, &right); + sscanf (ptiol->NAME, "%255s %22ld", name, &right); if (left < right) direc = "to"; else direc = "downto"; - fprintf (fp, "%s %s (%d %s %d) %c", mode , name, left, direc, - right, format); + fprintf (fp, "%s %s (%ld %s %ld) %c", mode , name, left, direc, + right, format); } else { @@ -459,7 +460,7 @@ unsigned long labelsiz; /* length of the longest label */ fprintf (fp, "%s %s ", mode, ptgrp->NAME); seprt = '('; - oldred = sscanf (ptiol->NAME, "%s %d", oldname, &left); + oldred = sscanf (ptiol->NAME, "%255s %22ld", oldname, &left); redvar = oldred; right = left; strcpy (name, oldname); @@ -467,7 +468,7 @@ unsigned long labelsiz; /* length of the longest label */ ptiol++; for (i=1 ; iLENGTH; i++) { - redvar = sscanf (ptiol->NAME, "%s %d", name, &indx); + redvar = sscanf (ptiol->NAME, "%255s %22ld", name, &indx); if (!strcmp (name, oldname)) right = indx; @@ -481,8 +482,8 @@ unsigned long labelsiz; /* length of the longest label */ direc = "to"; else direc = "downto"; - fprintf (fp, "%c %s (%d %s %d)", seprt, oldname, left, - direc, right); + fprintf (fp, "%c %s (%ld %s %ld)", seprt, oldname, left, + direc, right); } left = indx; oldred = redvar; @@ -502,8 +503,8 @@ unsigned long labelsiz; /* length of the longest label */ else direc = "downto"; - fprintf (fp, "%c %s (%d %s %d) ) %c", seprt, name , left, - direc, right, format); + fprintf (fp, "%c %s (%ld %s %ld) ) %c", seprt, name , left, + direc, right, format); } } iol_idx += ptgrp->LENGTH; @@ -520,11 +521,11 @@ unsigned long labelsiz; /* length of the longest label */ /* - increment the length of the pattern */ /* ###------------------------------------------------------### */ - redvar = sscanf (ptiol->NAME, "%s %d", name, &indx); + redvar = sscanf (ptiol->NAME, "%255s %22ldd", name, &indx); if (redvar == 1) fprintf (fp, "%s %s %c" , mode, name, format); else - fprintf (fp, "%s %s (%d) %c", mode, name, indx, format); + fprintf (fp, "%s %s (%ld) %c", mode, name, indx, format); length = strlen (ptiol->NAME); if (row < length) @@ -791,8 +792,8 @@ unsigned long labelsiz; /* length of the longest label */ { ptiol = ptseq->PAIOL + iol_idx; - if (sscanf (ptiol->NAME, "%s %d", name, &indx) == 2) - fprintf (fp, "-- error on `%s (%d)` : ", name, indx ); + if (sscanf (ptiol->NAME, "%255s %22ld", name, &indx) == 2) + fprintf (fp, "-- error on `%s (%ld)` : ", name, indx ); else fprintf (fp, "-- error on `%s` : " , ptiol->NAME); @@ -818,8 +819,8 @@ unsigned long labelsiz; /* length of the longest label */ if ((ptiol->FLAG & PAT_IOL__SPY) != 0) { - if (sscanf (ptiol->NAME, "%s %d", name, &indx) == 2) - fprintf (fp, "%s (%d) ", name, indx ); + if (sscanf (ptiol->NAME, "%255s %22ld", name, &indx) == 2) + fprintf (fp, "%s (%ld) ", name, indx ); else fprintf (fp, "%s " , ptiol->NAME); } @@ -834,7 +835,7 @@ unsigned long labelsiz; /* length of the longest label */ if (zd_flg == 0) { - sprintf (pat_date, "<%11u %s>", ptpat->TIME * t_step, t_unit); + sprintf (pat_date, "<%11lu %s>", ptpat->TIME * t_step, t_unit); for (i=0 ; i<16 ; i++) buffer [i] = pat_date [i]; diff --git a/alliance/src/proof/src/proof_compile.c b/alliance/src/proof/src/proof_compile.c index 9097b48f..da36f21e 100644 --- a/alliance/src/proof/src/proof_compile.c +++ b/alliance/src/proof/src/proof_compile.c @@ -447,15 +447,12 @@ compileVHDL (file, orderPI, order, par, { befig_list *vhdlloadbefig (); beaux_list *aux; - chain_list *ptChain; biabl_list *biabl; bereg_list *reg; - int coInter; char *path; int i; int indice = 0; char *filep; - chain_list *liste, *pAux = NULL; /* si BEH est NULL, on appelle le compilateur */ diff --git a/alliance/src/proof/src/proof_main.c b/alliance/src/proof/src/proof_main.c index 1f6e250e..91f01bee 100644 --- a/alliance/src/proof/src/proof_main.c +++ b/alliance/src/proof/src/proof_main.c @@ -32,11 +32,13 @@ #include #include +#include #include "mut.h" #include "log.h" #include "beh.h" -# include "proof_compile.h" +#include "proof_compile.h" +#include "proof_util.h" char *GLOB_ABL_DC; char *GLOB_ABL_ONE; @@ -124,7 +126,7 @@ alliancebanner("Proof",VERSION,"Formal Proof","1990", ALLIANCE_VERSION); GLOB_ABL_ONE = namealloc ("'1'"); GLOB_ABL_ZERO = namealloc ("'0'"); -path = (char *)mbkalloc(5); +//path = (char *)mbkalloc(5); auxpath = (char *) mbkalloc (5); path = WORK_LIB; diff --git a/alliance/src/proof/src/proof_util.c b/alliance/src/proof/src/proof_util.c index 3d2d16ca..4e7bbf4e 100644 --- a/alliance/src/proof/src/proof_util.c +++ b/alliance/src/proof/src/proof_util.c @@ -31,6 +31,7 @@ #include #include +#include #include "mut.h" #include "log.h" @@ -1237,11 +1238,11 @@ orderProofBeh (bef1, bef2, varaux) makeBddBeh (bef1, bef1->CIRCUI, 0, 0, 100, 10000000, NULL); - printf ("---> final number of nodes = %d", (sysBdd.pRT)->compteur); + printf ("---> final number of nodes = %ld", (sysBdd.pRT)->compteur); gcNodeBeh (bef1, 0); - printf ("(%d)\n\n", (sysBdd.pRT)->compteur); + printf ("(%ld)\n\n", (sysBdd.pRT)->compteur); /* calcul des graphes pour le 2eme circuit */ @@ -2174,8 +2175,8 @@ proofBeh (beh1, beh2, mode, exitIO) bereg_list *reg1, *reg2; binode_list *binode1, *binode2; biabl_list *biabl1, *biabl2; - pNode *pDC1, *pON1; - pNode *pDC2, *pON2; + pNode *pDC1 = NULL, *pON1; + pNode *pDC2 = NULL, *pON2; int numberError = 0; int countDC1; int countDC2; diff --git a/alliance/src/proof/src/proof_util.h b/alliance/src/proof/src/proof_util.h index 6af1928a..ecd8e3e1 100644 --- a/alliance/src/proof/src/proof_util.h +++ b/alliance/src/proof/src/proof_util.h @@ -61,6 +61,21 @@ | | \------------------------------------------------------------*/ -extern chain_list * berinToChain_list __P(( befig_list *beh )); +extern chain_list* berinToChain_list __P(( befig_list *beh )); +extern char* nameIntVect __P(( char* name )); +extern int mayCoverBdd __P(( pNode on1, pNode dc1, pNode on2, pNode dc2 )); +extern void displayExprLaxInt __P(( chain_list* expr )); +extern void displayExprLax __P(( chain_list* expr )); +extern chain_list* searchExprOutBeh __P(( befig_list* beh, char* name)); +extern void substExprBeh __P(( befig_list* beh, char* name, chain_list* sexpr)); +extern void polarBDBeh __P(( befig_list* beh )); +extern void elimInoutBeh __P(( befig_list* beh )); +extern pNode sumCNDBinode __P(( binode_list* binode )); +extern chain_list* AND2 __P(( chain_list* expr1, chain_list* expr2)); +extern chain_list* OR2 __P(( chain_list* expr1, chain_list* expr2)); +extern chain_list* sumBiabl __P(( biabl_list* biabl )); +extern void orderProofBeh __P(( befig_list* bef1, befig_list* bef2, char varaux )); +extern int elimBusMuxBeh __P(( befig_list* beh )); +extern int proofBeh __P(( befig_list* beh1, befig_list* beh2, int mode, int exitIO)); # endif diff --git a/alliance/src/rds/src/rpr.h b/alliance/src/rds/src/rpr.h index 10afa2e8..89a7d292 100644 --- a/alliance/src/rds/src/rpr.h +++ b/alliance/src/rds/src/rpr.h @@ -457,7 +457,8 @@ | | \------------------------------------------------------------*/ - extern void loadrdsparam __P(()); - extern void viewrdsparam __P(()); + extern void loadrdsparam __P(()); + extern void viewrdsparam __P(()); + extern long RprTranslateParam __P(( double Param )); # endif diff --git a/alliance/src/rds/src/rprparse.c b/alliance/src/rds/src/rprparse.c index b902c72c..8f9d6a7e 100644 --- a/alliance/src/rds/src/rprparse.c +++ b/alliance/src/rds/src/rprparse.c @@ -730,7 +730,7 @@ long RprGetStringValue( String ) if ( strchr( String, '.' )) { - if ( sscanf( String, "%lf", &FloatValue) ) + if ( sscanf( String, "%32lf", &FloatValue) ) return( RprTranslateParam( FloatValue ) ); @@ -738,7 +738,7 @@ long RprGetStringValue( String ) } else { - if ( sscanf( String, "%ld", &Value) ) + if ( sscanf( String, "%22ld", &Value) ) return ( RprTranslateParam( (double)Value) ); @@ -778,7 +778,7 @@ float RprGetStringFloat( String ) { float FloatValue; - if ( sscanf( String, "%f", &FloatValue) ) + if ( sscanf( String, "%32f", &FloatValue) ) return( FloatValue ); @@ -799,7 +799,7 @@ long RprGetNumber( String ) { long Value; - if ( sscanf( String, "%ld", &Value )) return Value; + if ( sscanf( String, "%22ld", &Value )) return Value; rprerror( RPR_UNEXPECTED_LINE, "number", RprCurrentLine ); @@ -2389,7 +2389,7 @@ void RprReadParam() if ( FirstWord == PhysicalGridKeyword ) { - sscanf( SecondWord, "%lf", &FloatValue); + sscanf( SecondWord, "%32lf", &FloatValue); RprComputeRdsUnit( FloatValue ); @@ -2398,7 +2398,7 @@ void RprReadParam() else if ( FirstWord == LambdaKeyword ) { - sscanf( SecondWord, "%lf", &FloatValue); + sscanf( SecondWord, "%32lf", &FloatValue); if ( FloatValue <= 0 ) { @@ -2611,8 +2611,8 @@ void RprPostParam() rdsfreeblock( RDS_STATIC_LAYER ); } - RDS_LAYER_NAME = (char **)rdsallocblock( sizeof( char *) * RDS_MAX_LAYER ); - RDS_STATIC_LAYER = (char *)rdsallocblock( sizeof( char ) * RDS_MAX_LAYER ); + RDS_LAYER_NAME = (char **)rdsallocblock( sizeof( char *) * RDS_MAX_LAYER ); + RDS_STATIC_LAYER = (unsigned char *)rdsallocblock( sizeof( char ) * RDS_MAX_LAYER ); for ( Layer = 0; Layer < RDS_ALL_LAYER; Layer++ ) { diff --git a/alliance/src/rds/src/rprparse.h b/alliance/src/rds/src/rprparse.h index 040cceff..78984935 100644 --- a/alliance/src/rds/src/rprparse.h +++ b/alliance/src/rds/src/rprparse.h @@ -136,4 +136,5 @@ | | \------------------------------------------------------------*/ + # endif diff --git a/alliance/src/rdscif/src/cif_parse.c b/alliance/src/rdscif/src/cif_parse.c index 28af3615..f358f91a 100644 --- a/alliance/src/rdscif/src/cif_parse.c +++ b/alliance/src/rdscif/src/cif_parse.c @@ -789,12 +789,12 @@ static void CifGetPoint( Point ) static void CifGetPolygon() { - long FirstX; - long FirstY; - int Counter; - int NewCounter; - coord_t *NewArray; - coord_t PointArray[ CIF_MAX_POINT ]; + long FirstX; + long FirstY; + int Counter; + unsigned int NewCounter; + coord_t *NewArray; + coord_t PointArray[ CIF_MAX_POINT ]; Counter = 0; FirstX = FirstY = 0; diff --git a/alliance/src/rdsgds/src/gds_drive.c b/alliance/src/rdsgds/src/gds_drive.c index 86a8620a..b7106c1b 100644 --- a/alliance/src/rdsgds/src/gds_drive.c +++ b/alliance/src/rdsgds/src/gds_drive.c @@ -58,10 +58,11 @@ if (a != numb) { \ pv_init_error(); \ pv_error.v_error = ENOSPACE; \ - (void)fclose(fp); \ pv_give_error("controle"); \ + (void)fclose(fp); \ EXIT(1); } + #define entete(a,b) \ infobuf.size = sizeof(hinfo_type) + b/sizeof(char); \ infobuf.gdscode = a; \ @@ -344,6 +345,7 @@ coord_t tab[6]; /* last one reserved for text */ entete(BOUNDARY, 0); entete(LAYER0, sizeof(short)); + controle(1) if (islittle()) { layer = swaps(layer); datatype = swaps(datatype); @@ -382,6 +384,7 @@ coord_t tab[6]; /* last one reserved for text */ char *pindex; char buff [16000]; strncpy (buff, rect->NAME, 16000); + buff[15999] = '\0'; pindex = strchr (buff, (int)' '); if (pindex) { *pindex = '['; diff --git a/alliance/src/rdsgds/src/gds_parse.c b/alliance/src/rdsgds/src/gds_parse.c index 8ea678dd..10d05c61 100644 --- a/alliance/src/rdsgds/src/gds_parse.c +++ b/alliance/src/rdsgds/src/gds_parse.c @@ -419,7 +419,6 @@ static int int layer; { int rds_layer; -char texte[8]; if (layer != -1) for (rds_layer = 0; rds_layer < RDS_MAX_LAYER; rds_layer++) { @@ -900,8 +899,7 @@ int FLAG = 0; free(nom_instance); return(-1); } - if ((CheckPhysicalGridAligned(x) - | CheckPhysicalGridAligned(x)) != 0) { + if ((CheckPhysicalGridAligned(x)) != 0) { pv_emet_warning(pv_model->NAME, "Gds Instance not aligned on grid", NULL); pv_model->INSTANCE = addrdsins(pv_model, nom_modele, @@ -1012,7 +1010,7 @@ FILE *fp; default : pv_init_error(); pv_error.v_error = ENOCODE; - error = TRUE; + //error = TRUE; break; } /* fin du SWITCH */ diff --git a/alliance/src/rdsgds/src/gds_swap.c b/alliance/src/rdsgds/src/gds_swap.c index 41620663..00269a0b 100644 --- a/alliance/src/rdsgds/src/gds_swap.c +++ b/alliance/src/rdsgds/src/gds_swap.c @@ -85,7 +85,7 @@ double swapd(d) double d; #endif { -double t; +double t = 0; *((char *)&t + 7) = *((char *)&d + 0); *((char *)&t + 6) = *((char *)&d + 1); diff --git a/alliance/src/ring/src/deport.c b/alliance/src/ring/src/deport.c index e2d9305c..99974845 100644 --- a/alliance/src/ring/src/deport.c +++ b/alliance/src/ring/src/deport.c @@ -209,7 +209,7 @@ void deport_alim(LST_EQUIPO lst_equipo, BARRE_PLOTS tab_plots[NB_FACES], long largeurmin = 0; int i, nbcolatrouver, face; long largmetalpiste, largmetalcol, piste; - char niveaucol, niveaupiste; + char niveaupiste; LST_SEGMENT * segcol; LST_SEGMENT * segpiste; @@ -244,7 +244,6 @@ void deport_alim(LST_EQUIPO lst_equipo, BARRE_PLOTS tab_plots[NB_FACES], switch (con->face) { case NORD: case SUD : - niveaucol = ymetal; niveaupiste = xmetal; segcol = segy_occ; segpiste = segx_occ; @@ -273,7 +272,6 @@ void deport_alim(LST_EQUIPO lst_equipo, BARRE_PLOTS tab_plots[NB_FACES], case EST : case OUEST: - niveaucol = xmetal; niveaupiste = ymetal; segcol = segx_occ; segpiste = segy_occ; @@ -346,7 +344,6 @@ void deport_alim(LST_EQUIPO lst_equipo, BARRE_PLOTS tab_plots[NB_FACES], switch (con->face) { case NORD: case SUD : - niveaucol = ymetal; niveaupiste = xmetal; segcol = segy_occ; segpiste = segx_occ; @@ -374,7 +371,6 @@ void deport_alim(LST_EQUIPO lst_equipo, BARRE_PLOTS tab_plots[NB_FACES], case EST : case OUEST: - niveaucol = xmetal; niveaupiste = ymetal; segcol = segx_occ; segpiste = segy_occ; @@ -628,7 +624,7 @@ void deport_connecteurs(BARRE_PLOTS tab_plots[NB_FACES], { int face, trouve; - long pistelayercentre, pistelayergauche, pistelayerdroite, piste, pistederniere; + long /*pistelayercentre, pistelayergauche, pistelayerdroite,*/ piste, pistederniere; long largeurmin; LST_PSEUDO_CON liste_coeur, liste_plots, ptcentre, ptdernier; @@ -646,9 +642,9 @@ void deport_connecteurs(BARRE_PLOTS tab_plots[NB_FACES], liste_plots = tab_plots[face].lst_con; liste_coeur = tab_coeur[face]; - pistelayergauche = 0; - pistelayerdroite = 0; - pistelayercentre = 0; + //pistelayergauche = 0; + //pistelayerdroite = 0; + //pistelayercentre = 0; ptcentre = NULL; ptdernier = NULL; pistederniere = (tab_plots[face].coord).piste; @@ -685,7 +681,7 @@ void deport_connecteurs(BARRE_PLOTS tab_plots[NB_FACES], if (mode_debug) printf("deport centre con %s %s piste%ld\n", ptcentre->nom_con, ((loins_list *)(ptcentre->con_lo)->ROOT)->INSNAME, (ptcentre->deport)->piste); - pistelayercentre = 1; + //pistelayercentre = 1; if ((ptcentre->deport)->piste != 1) /* pas uniquement layer */ { /*----------------------------------------------------------------------------*/ @@ -700,8 +696,8 @@ void deport_connecteurs(BARRE_PLOTS tab_plots[NB_FACES], /* on marque qu'il existe des deports layers */ /* ----------------------------------------- */ - if (ptcentre->layer != ymetal) - pistelayercentre = 1; + //if (ptcentre->layer != ymetal) + // pistelayercentre = 1; if (((ptcentre->coord)->prec != NULL) && (((ptcentre->coord)->prec)->proprio == NULL)) /*gauche */ { @@ -731,8 +727,8 @@ void deport_connecteurs(BARRE_PLOTS tab_plots[NB_FACES], piste = pistederniere - 2; /* on laisse une piste pour les deports */ while ((liste_plots != NULL) && ((liste_plots->coord)->xabs < (lecoeur.coord).xabs)) { - if (liste_plots->deport->piste == 1) - pistelayergauche = 1; + //if (liste_plots->deport->piste == 1) + // pistelayergauche = 1; /* -------------------- */ /* ds ts les cas deport */ @@ -772,8 +768,8 @@ void deport_connecteurs(BARRE_PLOTS tab_plots[NB_FACES], piste = pistederniere - 2; /* on laisse une piste pour les deports */ while ((ptdernier != NULL) && ((ptdernier->coord)->xabs > ((lecoeur.coord).xabs + lecoeur.width))) { - if ((ptdernier->deport)->piste == 1) - pistelayerdroite = 1; + //if ((ptdernier->deport)->piste == 1) + // pistelayerdroite = 1; /* -------------------- */ /* ds ts les cas deport */ @@ -855,7 +851,7 @@ void deport_connecteurs(BARRE_PLOTS tab_plots[NB_FACES], if (ptcentre->deport != NULL) { ptcentre->situe_deport = DEPORTC; - pistelayercentre = 1; + //pistelayercentre = 1; if ((ptcentre->deport)->piste != 1) /* pas uniquement layer */ { if (mode_debug) printf("deport centre con %s %s piste%ld\n", ptcentre->nom_con, @@ -873,8 +869,8 @@ void deport_connecteurs(BARRE_PLOTS tab_plots[NB_FACES], /* on marque qu'il existe des deports layers */ /* ----------------------------------------- */ - if (ptcentre->layer != xmetal) - pistelayercentre = 1; + //if (ptcentre->layer != xmetal) + // pistelayercentre = 1; if (((ptcentre->coord)->prec != NULL) && (((ptcentre->coord)->prec)->proprio == NULL)) /*gauche */ { @@ -904,8 +900,8 @@ void deport_connecteurs(BARRE_PLOTS tab_plots[NB_FACES], piste = pistederniere - 2; /* on laisse une piste pour les deports */ while ((liste_plots != NULL) && ((liste_plots->coord)->yabs < (lecoeur.coord).yabs)) { - if (liste_plots->deport->piste == 1) - pistelayergauche = 1; + //if (liste_plots->deport->piste == 1) + // pistelayergauche = 1; /* ds ts les cas deport */ liste_plots->situe_deport = DEPORTG; @@ -942,8 +938,8 @@ void deport_connecteurs(BARRE_PLOTS tab_plots[NB_FACES], piste = pistederniere - 2; /* on laisse une piste pour les deports */ while ((ptdernier != NULL) && ((ptdernier->coord)->yabs > ((lecoeur.coord).yabs + lecoeur.height))) { - if (ptdernier->deport->piste == 1) - pistelayerdroite = 1; + //if (ptdernier->deport->piste == 1) + // pistelayerdroite = 1; /* -------------------- */ /* ds ts les cas deport */ diff --git a/alliance/src/ring/src/distance.c b/alliance/src/ring/src/distance.c index 14bbfdba..949cece0 100644 --- a/alliance/src/ring/src/distance.c +++ b/alliance/src/ring/src/distance.c @@ -58,7 +58,7 @@ long distance_con_con(long x1, long y1, long w1, char l1, long x2, long y2, long w2, char l2, int face) { long dist, xa, ya, wa; - long largeurmin, dminmetalmetal; + long largeurmin; char la; switch (face) { @@ -84,8 +84,6 @@ long distance_con_con(long x1, long y1, long w1, char l1, l2 = la; } - dminmetalmetal = ymetal_dmin; - if ((l1 != ymetal) || (l2 != ymetal)) { if (ymetal_width < xmetal_width) largeurmin = ymetal_width; @@ -131,8 +129,6 @@ long distance_con_con(long x1, long y1, long w1, char l1, l2 = la; } - dminmetalmetal = xmetal_dmin; - if ((l1 != xmetal) || (l2 != xmetal)) { if (ymetal_width < xmetal_width) largeurmin = ymetal_width; @@ -265,7 +261,7 @@ PT_COORDONNEES existe_con_suiv(long x1, long y1, long w1, char l1, case SUD: while (NULL != liste_coor) { if (mode_debug) - printf("ptcoor %;d proprio %;d x %ld\n", (long) liste_coor, (long)liste_coor->proprio, liste_coor->xabs); + printf("ptcoor %ld; proprio %ld; x %ld\n", (long) liste_coor, (long)liste_coor->proprio, liste_coor->xabs); if (NULL != liste_coor->proprio) { con = ((LST_PSEUDO_CON)liste_coor->proprio); diff --git a/alliance/src/ring/src/lireplace.c b/alliance/src/ring/src/lireplace.c index 5f1d0cf0..296bb037 100644 --- a/alliance/src/ring/src/lireplace.c +++ b/alliance/src/ring/src/lireplace.c @@ -53,6 +53,8 @@ #include "lireplace.h" #include "sesame.h" +extern int yyparse ( ); + /*-----------------------------------------------------------------------------------*/ /* Lecture et verification du fichier de parametres , suffixe .rin. Lancement de */ /* l'analyseur syntaxique */ diff --git a/alliance/src/ring/src/placement.c b/alliance/src/ring/src/placement.c index 076aef46..9030658e 100644 --- a/alliance/src/ring/src/placement.c +++ b/alliance/src/ring/src/placement.c @@ -651,7 +651,7 @@ void place_et_cout_barreplot(LST_PSEUDO_CON tab_coeur[NB_FACES], if (mode_debug) printf("diff barre - face coeur %ld\n", diff); - if (diff >= 0) + //if (diff >= 0) barrexmilieu = tab_plots[face].coord.xabs = ((lecoeur.coord.xabs - diff / 2) / SCALE_X) * SCALE_X; @@ -659,9 +659,9 @@ void place_et_cout_barreplot(LST_PSEUDO_CON tab_coeur[NB_FACES], /* Largeur barre de plots >= largeur coeur */ /* --------------------------------------- */ - else - barrexmilieu = tab_plots[face].coord.xabs = ((lecoeur.coord.xabs - diff / 2) / SCALE_X) * - SCALE_X; + //else + //barrexmilieu = tab_plots[face].coord.xabs = ((lecoeur.coord.xabs - diff / 2) / SCALE_X) * + // SCALE_X; /*---------------------------------------------------------------- */ /* Largeur barre de plots < largeur coeur */ @@ -763,7 +763,7 @@ void place_et_cout_barreplot(LST_PSEUDO_CON tab_coeur[NB_FACES], if (mode_debug) printf("diff barre - face coeur %ld\n", diff); - if (diff >= 0) + //if (diff >= 0) barreymilieu = tab_plots[face].coord.yabs = ((lecoeur.coord.yabs - diff / 2) / SCALE_X) * SCALE_X; @@ -771,9 +771,9 @@ void place_et_cout_barreplot(LST_PSEUDO_CON tab_coeur[NB_FACES], /* Hauteur barre de plots >= Hauteur coeur */ /*---------------------------------------- */ - else - barreymilieu = tab_plots[face].coord.yabs = ((lecoeur.coord.yabs - diff / 2) / SCALE_X) * - SCALE_X; + //else + //barreymilieu = tab_plots[face].coord.yabs = ((lecoeur.coord.yabs - diff / 2) / SCALE_X) * + // SCALE_X; /* ------------------------------------------------------------ */ /* Hauteur barre de plots < Hauteur coeur */ @@ -1620,8 +1620,8 @@ void maj_coordplots(BARRE_PLOTS tab_plots[NB_FACES], LST_EQUIPO lst_equipo) LST_EQUIPO liste_eq = lst_equipo; LST_PSEUDO_CON liste; int face; - char niveau; - long position, largeurmin, largeurmax; + //char niveau; + long position, /*largeurmin,*/ largeurmax; if (WVIA_ALU1 > WVIA_ALU2) largeurmax = WVIA_ALU1 * lambda; @@ -1650,8 +1650,8 @@ void maj_coordplots(BARRE_PLOTS tab_plots[NB_FACES], LST_EQUIPO lst_equipo) case NORD: case SUD : - niveau = ymetal; - largeurmin = ymetal_width; + //niveau = ymetal; + //largeurmin = ymetal_width; while (liste != NULL) { if (mode_debug) @@ -1687,8 +1687,8 @@ void maj_coordplots(BARRE_PLOTS tab_plots[NB_FACES], LST_EQUIPO lst_equipo) case EST : case OUEST: - niveau = xmetal; - largeurmin = xmetal_width; + //niveau = xmetal; + //largeurmin = xmetal_width; while (liste != NULL) { if (mode_debug) @@ -1844,8 +1844,8 @@ void fabrique_grille_finale(BARRE_PLOTS tab_plots[NB_FACES], case EST : case OUEST: - niveau = xmetal; - largeurmin = xmetal_width; + //niveau = xmetal; + //largeurmin = xmetal_width; while (liste != NULL) { if (mode_debug) diff --git a/alliance/src/ring/src/posercircuit.c b/alliance/src/ring/src/posercircuit.c index 9fe07d3e..3cc41701 100644 --- a/alliance/src/ring/src/posercircuit.c +++ b/alliance/src/ring/src/posercircuit.c @@ -49,6 +49,7 @@ #include "barre.h" #include "stat.h" #include "sesame.h" +#include "mgn.h" extern long bigvias, ringvias; diff --git a/alliance/src/ring/src/ringram.y b/alliance/src/ring/src/ringram.y index 1d8a4f81..1bb548c6 100644 --- a/alliance/src/ring/src/ringram.y +++ b/alliance/src/ring/src/ringram.y @@ -2,8 +2,13 @@ %{ #include #include "struct.h" + +extern void yyrestart ( ); +extern int yyparse ( ); +extern int yylex ( ); +extern void yyerror ( ); %} -%token M_NORTH, M_SOUTH, M_WEST, M_EAST, M_WIDTH +%token M_NORTH M_SOUTH M_WEST M_EAST M_WIDTH %token NOMBRE %token IDENT %union { diff --git a/alliance/src/ring/src/rinscan.l b/alliance/src/ring/src/rinscan.l index 4ecb2af2..2c74c9e5 100644 --- a/alliance/src/ring/src/rinscan.l +++ b/alliance/src/ring/src/rinscan.l @@ -1,3 +1,7 @@ + +%option noinput +%option nounput + %{ #include "ringram.h" #include "struct.h" diff --git a/alliance/src/ring/src/sesame.c b/alliance/src/ring/src/sesame.c index 52b77f34..9b48fc28 100644 --- a/alliance/src/ring/src/sesame.c +++ b/alliance/src/ring/src/sesame.c @@ -196,7 +196,7 @@ void ringerreur(int code, void *pt_liste, void *pt_liste2) /* modif : chain_list pointe sur des loins maintenant */ /* ------------------------------------------------------------------------- */ - if ((trouve = liste_inst->INSNAME == ((loins_list * ) liste->DATA)->INSNAME )) + if ((trouve = (liste_inst->INSNAME == ((loins_list * ) liste->DATA)->INSNAME) )) break; liste = liste->NEXT; diff --git a/alliance/src/ring/src/struct.c b/alliance/src/ring/src/struct.c index 0f63c397..0a3311ad 100644 --- a/alliance/src/ring/src/struct.c +++ b/alliance/src/ring/src/struct.c @@ -843,7 +843,7 @@ LST_EQUIPO lst_equipo; case NORD : case SUD : while (liste->suiv != NULL) { - if ((trouve = x < (liste->coord)->xabs)) { + if ((trouve = (x < (liste->coord)->xabs))) { inserer_avant_lstcon(con, liste, &(tab_coeur[face])); break; } @@ -863,7 +863,7 @@ LST_EQUIPO lst_equipo; case EST : case OUEST: while (liste->suiv != NULL) { - if ((trouve = y < (liste->coord)->yabs)) { + if ((trouve = (y < (liste->coord)->yabs))) { inserer_avant_lstcon(con, liste, &(tab_coeur[face])); break; } @@ -978,7 +978,7 @@ LST_EQUIPO lst_equipo; case NORD: case SUD: while (liste->suiv != NULL) { - if ((trouve = x < (liste->coord)->xabs)) { + if ((trouve = (x < (liste->coord)->xabs))) { inserer_avant_lstcon(con, liste, &(tab_plots[face].lst_con)); break; } @@ -997,7 +997,7 @@ LST_EQUIPO lst_equipo; case OUEST: case EST: while (liste->suiv != NULL) { - if ((trouve = y < (liste->coord)->yabs)) { + if ((trouve = (y < (liste->coord)->yabs))) { inserer_avant_lstcon(con, liste, &(tab_plots[face].lst_con)); break; } diff --git a/alliance/src/ring/src/struct2.c b/alliance/src/ring/src/struct2.c index 67ceeda4..53b61c20 100644 --- a/alliance/src/ring/src/struct2.c +++ b/alliance/src/ring/src/struct2.c @@ -904,11 +904,11 @@ phfig_list *circuit_ph; phins_list * lst_instph = circuit_ph->PHINS; phcon_list * liste_con; char orientnord = 'N', *nominst = ((loins_list*)con_lo->ROOT)->INSNAME; - char orientplot, *figure = ((loins_list*)con_lo->ROOT)->FIGNAME; + char /*orientplot,*/ *figure = ((loins_list*)con_lo->ROOT)->FIGNAME; while (NULL != lst_instph) { if (lst_instph->INSNAME == nominst) { - orientplot = lst_instph->TRANSF; + //orientplot = lst_instph->TRANSF; break; } @@ -950,7 +950,7 @@ chain_list *ptalim; int i, nbcolatrouver; if (mode_debug) - printf("\tCroisement con avec alim %s larg %ld face %ld x %ld y %ld\n", concoeur->nom_con, concoeur->largeur, + printf("\tCroisement con avec alim %s larg %ld face %d x %ld y %ld\n", concoeur->nom_con, concoeur->largeur, concoeur->face, ptcoor->xabs, ptcoor->yabs); nbcolatrouver = (concoeur->largeur + pitch) / (2 * pitch); @@ -1034,7 +1034,7 @@ long *largvdd, *largvss; char *nom_con; long larg_con, largeurvdd, largeurvss; int existevdd = 0, existevss = 0; - static int mess = 1; + //static int mess = 1; ptvdd = equipo_vdd->lst_con; ptvss = equipo_vss->lst_con; @@ -1091,7 +1091,7 @@ long *largvdd, *largvss; liste = liste->NEXT; } - mess = 0; + //mess = 0; if (!existevdd) vdd_width = (*largvdd) = largeurvdd / 2; if (!existevss) @@ -1115,7 +1115,7 @@ char testlayer; char metalcol = 0; if (mode_debug) - printf("\tCroisement con avec alim equi %s larg %ld face %ld x %ld y %ld\n", concoeur->nom_con, concoeur->largeur, + printf("\tCroisement con avec alim equi %s larg %ld face %d x %ld y %ld\n", concoeur->nom_con, concoeur->largeur, concoeur->face, concoeur->coord->xabs, concoeur->coord->yabs); switch (concoeur->face) { @@ -1147,7 +1147,7 @@ char testlayer; } if (mode_debug) - printf("\tCroisement conplot avec alim equi %s larg %ld face %ld position%ld\n", con->nom_con, + printf("\tCroisement conplot avec alim equi %s larg %ld face %d position%ld\n", con->nom_con, con->largeur, con->face, position); if (position < positioncour) { diff --git a/alliance/src/rtd/src/rtd_parse.c b/alliance/src/rtd/src/rtd_parse.c index 2a4c39b3..d41c8c27 100644 --- a/alliance/src/rtd/src/rtd_parse.c +++ b/alliance/src/rtd/src/rtd_parse.c @@ -232,7 +232,7 @@ static vexexpr *RtlReadPrefixExpr() return( (vexexpr *)0 ); } - sscanf( Name, "{%ld,%ld,%lx}", &Left, &Right, &Type ); + sscanf( Name, "{%22ld,%22ld,%22lx}", &Left, &Right, &Type ); Name = Scan + 1; Oper = getvexoperbyname( Name ); @@ -339,7 +339,7 @@ static vexexpr *RtlReadPrefixExpr() return( (vexexpr *)0 ); } - sscanf( Name, "{%ld,%ld,%lx}", &Left, &Right, &Type ); + sscanf( Name, "{%22ld,%22ld,%22lx}", &Left, &Right, &Type ); Name = Scan + 1; Oper = getvexoperbyname( Name ); @@ -446,7 +446,7 @@ static int RtlLoadFigure( RtlFigure ) if ( Keyword == RtlKeyAsgBiVex ) { - Error = 2 - sscanf( ScanBuffer, "%ld\t%ld", + Error = 2 - sscanf( ScanBuffer, "%22ld\t%22ld", &Value1, &Value2 ); RtlBiVex = addrtlasgbivex( RtlFigure, RtlAsg, (vexexpr *)0, (vexexpr *)0, Value1 ); @@ -473,7 +473,7 @@ static int RtlLoadFigure( RtlFigure ) else if ( Keyword == RtlKeyAsg ) { - Error = 3 - sscanf( ScanBuffer, "%ld\t%ld\t%ld", + Error = 3 - sscanf( ScanBuffer, "%22ld\t%22ld\t%22ld", &Value1, &Value2, &Value3 ); if ( Error ) return( 1 ); @@ -503,7 +503,7 @@ static int RtlLoadFigure( RtlFigure ) else if ( Keyword == RtlKeyDeclar ) { - Error = 5 - sscanf( ScanBuffer, "%ld\t%ld\t%ld\t%ld\t%ld", + Error = 5 - sscanf( ScanBuffer, "%22ld\t%22ld\t%22ld\t%22ld\t%22ld", &Value1, &Value2, &Value3, &Value4, &Value5 ); if ( Error ) return( 1 ); @@ -532,7 +532,7 @@ static int RtlLoadFigure( RtlFigure ) else if ( Keyword == RtlKeySymbol ) { - Error = 6 - sscanf( ScanBuffer, "%ld\t%ld\t%ld\t%ld\t%ld\t%ld", + Error = 6 - sscanf( ScanBuffer, "%22ld\t%22ld\t%22ld\t%22ld\t%22ld\t%22ld", &Value1, &Value2, &Value3, &Value4, &Value5, &Value6 ); if ( Error ) return( 1 ); @@ -548,7 +548,7 @@ static int RtlLoadFigure( RtlFigure ) else if ( Keyword == RtlKeyInstance ) { - Error = 1 - sscanf( ScanBuffer, "%ld", &Value1 ); + Error = 1 - sscanf( ScanBuffer, "%22ld", &Value1 ); if ( Error ) return( 1 ); @@ -568,7 +568,7 @@ static int RtlLoadFigure( RtlFigure ) else if ( Keyword == RtlKeyMap ) { - Error = 1 - sscanf( ScanBuffer, "%ld", &Value1 ); + Error = 1 - sscanf( ScanBuffer, "%22ld", &Value1 ); if ( Error ) return( 1 ); @@ -597,7 +597,7 @@ static int RtlLoadFigure( RtlFigure ) else if ( Keyword == RtlKeyModel ) { - Error = 1 - sscanf( ScanBuffer, "%ld", &Value1 ); + Error = 1 - sscanf( ScanBuffer, "%22ld", &Value1 ); if ( Error ) return( 1 ); @@ -608,7 +608,7 @@ static int RtlLoadFigure( RtlFigure ) else if ( Keyword == RtlKeyPort ) { - Error = 3 - sscanf( ScanBuffer, "%ld\t%ld\t%ld", &Value1, &Value2, &Value3 ); + Error = 3 - sscanf( ScanBuffer, "%22ld\t%22ld\t%22ld", &Value1, &Value2, &Value3 ); if ( Error ) return( 1 ); @@ -622,7 +622,7 @@ static int RtlLoadFigure( RtlFigure ) else if ( Keyword == RtlKeyFigure ) { - Error = 1 - sscanf( ScanBuffer, "%ld", + Error = 1 - sscanf( ScanBuffer, "%22ld", &Value1 ); if ( Error ) return( 1 ); @@ -633,7 +633,7 @@ static int RtlLoadFigure( RtlFigure ) else if ( Keyword == RtlKeyGenMap ) { - Error = 2 - sscanf( ScanBuffer, "%ld\t%ld", &Value1, &Value2 ); + Error = 2 - sscanf( ScanBuffer, "%22ld\t%22ld", &Value1, &Value2 ); if ( Error ) return( 1 ); @@ -649,7 +649,7 @@ static int RtlLoadFigure( RtlFigure ) else if ( Keyword == RtlKeyGenMod ) { - Error = 2 - sscanf( ScanBuffer, "%ld\t%ld", &Value1, &Value2 ); + Error = 2 - sscanf( ScanBuffer, "%22ld\t%22ld", &Value1, &Value2 ); if ( Error ) return( 1 ); diff --git a/alliance/src/s2r/src/postrat.c b/alliance/src/s2r/src/postrat.c index 5ce47e3e..77d20199 100644 --- a/alliance/src/s2r/src/postrat.c +++ b/alliance/src/s2r/src/postrat.c @@ -961,9 +961,6 @@ static void addimp (model, verbose) if (model->INSTANCE == NULL && model->LAYERTAB[RDS_NWELL] != NULL) { - rdsrec_list *rectab = model->LAYERTAB[RDS_ABOX]; - long qty = 0; - model->LAYERTAB[RDS_PIMP] = NULL; model->LAYERTAB[RDS_NIMP] = NULL; diff --git a/alliance/src/scapin/src/scan_insert.c b/alliance/src/scapin/src/scan_insert.c index d3c5e532..e812be44 100644 --- a/alliance/src/scapin/src/scan_insert.c +++ b/alliance/src/scapin/src/scan_insert.c @@ -228,9 +228,6 @@ void ScanInsertScanPath( LoFigure, ScanParam, PathParam, int FlagBuffer; { lofig_list *LoModel; - lofig_list *LoModel2; - lofig_list *LoModel3; - lofig_list *LoModel4; loins_list *LoIns; chain_list *ScanChain; char *RegName; @@ -249,18 +246,17 @@ void ScanInsertScanPath( LoFigure, ScanParam, PathParam, locon_list *LoConVdd; locon_list *LoConVss; locon_list *LoInsCon; - locon_list *LoInsConClk; - locon_list *LoInsConSel; - locon_list *LoInsConInput; - locon_list *LoInsConOutput; - locon_list *LoInsConVdd; - locon_list *LoInsConVss; - locon_list *LoInsConInputSel; - locon_list *LoInsConInputNsel; + locon_list *LoInsConClk = NULL; + locon_list *LoInsConSel = NULL; + locon_list *LoInsConInput = NULL; + locon_list *LoInsConOutput = NULL; + locon_list *LoInsConVdd = NULL; + locon_list *LoInsConVss = NULL; + locon_list *LoInsConInputSel = NULL; + locon_list *LoInsConInputNsel = NULL; scanreg_list *ScanReg; scanregmux_list *ScanRegMux; scanmux_list *ScanMux; - scanmux_list *ScanMux1; scanbuf_list *ScanBuf; authtable *InsHashTable; authtable *RegHashTable; @@ -271,9 +267,7 @@ void ScanInsertScanPath( LoFigure, ScanParam, PathParam, long LoSigIndex; long LoInsIndex; int Number; - locon_list *LoInsConOutputMux; - losig_list *LoSigOutputMux; - + /* ** Compute and Initialize max signal index */ diff --git a/alliance/src/scl/src/scpbuild.c b/alliance/src/scl/src/scpbuild.c index dc4242c3..3bb08363 100644 --- a/alliance/src/scl/src/scpbuild.c +++ b/alliance/src/scl/src/scpbuild.c @@ -1569,7 +1569,7 @@ static schfig_list *loc_buildbox( Figure ) long Y_cont1; long Y_cont2; long MiddleDY; - long MiddleInDY; +//long MiddleInDY; long Delta; int Number; int NumberIn; @@ -1676,25 +1676,25 @@ static schfig_list *loc_buildbox( Figure ) /* TO BE DONE */ Number = 1; MiddleIn = Box0->NUMBER_IN / 2; - MiddleInDY = SCP_BOX_CON_BASE_Y; + //MiddleInDY = SCP_BOX_CON_BASE_Y; for ( Con = Box0->CON_IN; Con != (schcon_list *)0; Con = Con->NEXT ) { - if ( Number < MiddleIn ) - { - MiddleInDY += SCP_BOX_CON_STEP_Y; - } - else - { - if ( ! ( Box0->NUMBER_IN & 0x1 ) ) - { - MiddleInDY += SCP_BOX_CON_STEP_Y / 2; - } + /* if ( Number < MiddleIn ) */ + /* { */ + /* MiddleInDY += SCP_BOX_CON_STEP_Y; */ + /* } */ + /* else */ + /* { */ + /* /\* if ( ! ( Box0->NUMBER_IN & 0x1 ) ) *\/ */ + /* /\* { *\/ */ + /* /\* MiddleInDY += SCP_BOX_CON_STEP_Y / 2; *\/ */ + /* /\* } *\/ */ - break; - } + /* break; */ + /* } */ Number++; } diff --git a/alliance/src/sea/src/DEF_grammar_lex.l b/alliance/src/sea/src/DEF_grammar_lex.l index fa4c70b3..752e2f86 100644 --- a/alliance/src/sea/src/DEF_grammar_lex.l +++ b/alliance/src/sea/src/DEF_grammar_lex.l @@ -1,3 +1,6 @@ + +%option nounput + %{ /* * $Author: jpc $ diff --git a/alliance/src/sea/src/LEF_drive_sxlib.c b/alliance/src/sea/src/LEF_drive_sxlib.c index 7534735d..8b04f629 100644 --- a/alliance/src/sea/src/LEF_drive_sxlib.c +++ b/alliance/src/sea/src/LEF_drive_sxlib.c @@ -355,7 +355,6 @@ static void SxLib2SYMMETRY() static void AddEmptyPowerPIN(asName) char *asName; { - ePIN_t *pPIN; char Use; @@ -364,7 +363,7 @@ static void AddEmptyPowerPIN(asName) if (!strncmp(asName, "vss", 3)) Use = C_USE_GROUND; - if ((pPIN = getPIN(LV_pMACRO, asName)) == (ePIN_t*)NULL) { + if (getPIN(LV_pMACRO, asName) == (ePIN_t*)NULL) { m_AddPin(LV_pMACRO->lPIN, asName); LV_pMACRO->lPIN->DIRECTION = C_DIRECTION_INPUT; LV_pMACRO->lPIN->USE = Use; diff --git a/alliance/src/sea/src/MAC_drive.c b/alliance/src/sea/src/MAC_drive.c index c9da7f1f..89059f1b 100644 --- a/alliance/src/sea/src/MAC_drive.c +++ b/alliance/src/sea/src/MAC_drive.c @@ -163,7 +163,7 @@ extern void macRoute(apPhfig, apLofig, macName, aPower, aFlags) { struct eLoseg_s *pLoseg; struct losig *pLosig; - struct phseg *pPhseg; +//struct phseg *pPhseg; long isRouted, isFirst /*, dx */; char *sigName; char defSigName[SIZE_SNAME]; @@ -247,7 +247,7 @@ extern void macRoute(apPhfig, apLofig, macName, aPower, aFlags) for (; pLoseg != NULL; pLoseg = pLoseg->next) { if (pLoseg->type == LOSEG_SEG) { - pPhseg = (struct phseg*)(pLoseg->MBKobj); + //pPhseg = (struct phseg*)(pLoseg->MBKobj); /* Is this segment touching the AB. */ /*if ( ( (pPhseg->X1 == apPhfig->XAB1) diff --git a/alliance/src/sea/src/a2DEF.c b/alliance/src/sea/src/a2DEF.c index a44d2f41..22864ab3 100644 --- a/alliance/src/sea/src/a2DEF.c +++ b/alliance/src/sea/src/a2DEF.c @@ -312,7 +312,7 @@ extern int main(argc, argv) /* Long options : associated with floorplan. */ if (!strncmp (argv[i], "--margin=", 9)) { argFlags |= A_MARGIN; - if (1 != sscanf (argv[i] + 9, "%ld", &margin)) { + if (1 != sscanf (argv[i] + 9, "%22ld", &margin)) { eprinth (NULL); eprintf ("Invalid value.\n"); printHelp (); @@ -332,7 +332,7 @@ extern int main(argc, argv) argFlags |= A_ROW_NUMBER; floFlags |= F_FLOOR_Y_SIZE; floFlags &= ~F_FLOOR_ASPECT_RATIO; - if (1 != sscanf (argv[i] + 13, "%ld", &ySize)) { + if (1 != sscanf (argv[i] + 13, "%22ld", &ySize)) { eprinth (NULL); eprintf ("Invalid value.\n\n"); printHelp (); @@ -352,7 +352,7 @@ extern int main(argc, argv) argFlags |= A_Y_SIZE; floFlags |= F_FLOOR_Y_SIZE; floFlags &= ~F_FLOOR_ASPECT_RATIO; - if (1 != sscanf (argv[i] + 9, "%ld", &ySize)) { + if (1 != sscanf (argv[i] + 9, "%22ld", &ySize)) { eprinth (NULL); eprintf ("Invalid value.\n\n"); printHelp (); @@ -373,7 +373,7 @@ extern int main(argc, argv) argFlags |= A_X_SIZE; floFlags |= F_FLOOR_X_SIZE; floFlags &= ~F_FLOOR_ASPECT_RATIO; - if (1 != sscanf (argv[i] + 9, "%ld", &xSize)) { + if (1 != sscanf (argv[i] + 9, "%22ld", &xSize)) { eprinth (NULL); eprintf ("Invalid value.\n\n"); printHelp (); @@ -393,7 +393,7 @@ extern int main(argc, argv) optCount += 1; argFlags |= A_ASPECT_RATIO; floFlags |= F_FLOOR_ASPECT_RATIO; - if (1 != sscanf (argv[i] + 15, "%lf", &formFactor)) { + if (1 != sscanf (argv[i] + 15, "%22lf", &formFactor)) { eprinth (NULL); eprintf ("Invalid value.\n\n"); printHelp (); @@ -410,7 +410,7 @@ extern int main(argc, argv) if (!strncmp (argv[i], "--power=", 8)) { argFlags |= A_POWER; - if (1 != sscanf (argv[i] + 8, "%ld", &power)) { + if (1 != sscanf (argv[i] + 8, "%22ld", &power)) { eprinth (NULL); eprintf ("Invalid value.\n\n"); printHelp (); diff --git a/alliance/src/sea/src/util_Defs.h b/alliance/src/sea/src/util_Defs.h index 4d27a2c6..c1fa2ecb 100644 --- a/alliance/src/sea/src/util_Defs.h +++ b/alliance/src/sea/src/util_Defs.h @@ -93,6 +93,7 @@ # include # include # include +# include # include diff --git a/alliance/src/sea/src/util_Floorplan.c b/alliance/src/sea/src/util_Floorplan.c index 5ef72c1c..3ddc898c 100644 --- a/alliance/src/sea/src/util_Floorplan.c +++ b/alliance/src/sea/src/util_Floorplan.c @@ -213,7 +213,6 @@ static struct ulocon_s *getUlocon (apLocon) static struct ulocon_s *newUlocon (apLocon) struct locon *apLocon; { - struct ptype *pType; struct ulocon_s *pUlocon; @@ -223,8 +222,6 @@ static struct ulocon_s *newUlocon (apLocon) pUlocon->flags = 0L; apLocon->USER = addptype (apLocon->USER, PTYPE_ULOCON, (void*)pUlocon); - - pType = apLocon->USER; } @@ -1165,7 +1162,6 @@ extern void protectPowmid(apPhfig) { # if 0 struct phins *pIns; -# endif struct phfig *pModel; char *powmidName; long width, height, expand; @@ -1173,14 +1169,11 @@ extern void protectPowmid(apPhfig) expand = FLOOR_XY_EXPAND; - powmidName = namealloc ("powmid_x0"); - pModel = getphfig ("powmid_x0", 'A'); width = pModel->XAB2 - pModel->XAB1; height = pModel->YAB2 - pModel->YAB1; -# if 0 for (pIns = apPhfig->PHINS; pIns != NULL; pIns = pIns->NEXT) { if (pIns->FIGNAME == powmidName) { if (pIns->YINS == apPhfig->YAB1 + expand) { diff --git a/alliance/src/sea/src/util_LEFDEF.c b/alliance/src/sea/src/util_LEFDEF.c index 288f5f42..46514990 100644 --- a/alliance/src/sea/src/util_LEFDEF.c +++ b/alliance/src/sea/src/util_LEFDEF.c @@ -399,15 +399,15 @@ extern void MBK2DEF_row(apPhref, token = strtoup (getRowToken (NULL, "_", apPhref->NAME)); *apOrient = DEF_a2orient (token); - token = strtoup (getRowToken (NULL, "_", apPhref->NAME)); +/*token =*/ strtoup (getRowToken (NULL, "_", apPhref->NAME)); token = strtoup (getRowToken (NULL, "_", apPhref->NAME)); *apDoNumber = atol (token); - token = strtoup (getRowToken (NULL, "_", apPhref->NAME)); +/*token =*/ strtoup (getRowToken (NULL, "_", apPhref->NAME)); token = strtoup (getRowToken (NULL, "_", apPhref->NAME)); *apByNumber = atol (token); - token = strtoup (getRowToken (NULL, "_", apPhref->NAME)); +/*token =*/ strtoup (getRowToken (NULL, "_", apPhref->NAME)); token = strtoup (getRowToken (NULL, "_", apPhref->NAME)); *apStepX = atol (token); @@ -444,18 +444,18 @@ extern void MBK2DEF_track(apPhref, strcpy (ref_name, apPhref->NAME); - token = getRowToken (ref_name, ".", apPhref->NAME); +/*token =*/ getRowToken (ref_name, ".", apPhref->NAME); token = getRowToken (NULL, "_", apPhref->NAME); *apAxisName = (char)toupper ((int)*token); - token = getRowToken (NULL, "_", apPhref->NAME); +/*token =*/ getRowToken (NULL, "_", apPhref->NAME); *apStart = atol (token); - token = getRowToken (NULL, "_", apPhref->NAME); +/*token =*/ getRowToken (NULL, "_", apPhref->NAME); token = getRowToken (NULL, "_", apPhref->NAME); *apDoNumber = atol (token); - token = getRowToken (NULL, "_", apPhref->NAME); +/*token =*/ getRowToken (NULL, "_", apPhref->NAME); token = getRowToken (NULL, ".", apPhref->NAME); *apStep = atol (token); diff --git a/alliance/src/sea/src/util_MBK.c b/alliance/src/sea/src/util_MBK.c index 9fc97b17..7526d87e 100644 --- a/alliance/src/sea/src/util_MBK.c +++ b/alliance/src/sea/src/util_MBK.c @@ -160,9 +160,10 @@ extern char **makesegnamelist(aName) { static char *tSegAlias[1024]; long mSegAlias; - char *pS, *pVector; + char *pS; char losegName[SIZE_SNAME]; # if 0 + char *pVector; char pathName[SIZE_SNAME]; # endif long iEnd; @@ -176,8 +177,10 @@ extern char **makesegnamelist(aName) /* Add the signal name "as is". */ tSegAlias[mSegAlias++] = namealloc (losegName); +#if 0 /* Try to find if it is a vector. */ pVector = NULL; +#endif for (pS = losegName + iEnd; pS != losegName; pS--) { if (*pS == ' ') { *pS = '_'; @@ -1210,14 +1213,13 @@ extern void addPowerNet(apLoFig, asPower) char *asPower; { chain_list *pChain; - losig_list *pSigPower; char *sPOW; sPOW = namealloc(asPower); - pChain = addchain((chain_list*)NULL, (void*)sPOW); - pSigPower = addlosig(apLoFig, NEWSIGINDEX, pChain, EXTERNAL); + pChain = addchain((chain_list*)NULL, (void*)sPOW); + addlosig(apLoFig, NEWSIGINDEX, pChain, EXTERNAL); } @@ -2314,8 +2316,6 @@ extern void checklosegaccess(apPhfig) if (ptLoseg->tAccess[iLoseg] == 0) { if (!flag) { /* Print the head error message. */ - flag = TRUE; - eprinth (NULL); eprintf ("The following physical net segments are not in the"); eprintf (" netlist :\n"); diff --git a/alliance/src/syf/src/syf_cost.c b/alliance/src/syf/src/syf_cost.c index 735a0dd0..cd7b344e 100644 --- a/alliance/src/syf/src/syf_cost.c +++ b/alliance/src/syf/src/syf_cost.c @@ -147,6 +147,7 @@ long SyfFbhAblGiveCost( FbhFigure ) | | \------------------------------------------------------------*/ +#if THIS_IS_DISABLED static long SyfBddGiveCost( BddNode ) bddnode *BddNode; @@ -184,3 +185,4 @@ static long SyfBddGiveCost( BddNode ) return( 0 ); } +#endif diff --git a/alliance/src/syf/src/syf_jedi.c b/alliance/src/syf/src/syf_jedi.c index 8af24722..3a22ed0f 100644 --- a/alliance/src/syf/src/syf_jedi.c +++ b/alliance/src/syf/src/syf_jedi.c @@ -100,7 +100,7 @@ void SyfFsmJediEncode( FsmFigure ) long *ValueArray; long StateCounter; - long BestState; + long BestState = 0; long SortState; long DoneState; @@ -110,7 +110,7 @@ void SyfFsmJediEncode( FsmFigure ) long SumCost; long LineState; - long LineBest; + long LineBest = 0; long SortIndex; @@ -120,7 +120,7 @@ void SyfFsmJediEncode( FsmFigure ) long EdgeWeight; long Distance; - long BestCode; + long BestCode = 0; long StateCode; long CodeValue; diff --git a/alliance/src/syf/src/syf_synth.c b/alliance/src/syf/src/syf_synth.c index b4ffd4b7..159971a1 100644 --- a/alliance/src/syf/src/syf_synth.c +++ b/alliance/src/syf/src/syf_synth.c @@ -199,7 +199,7 @@ void SyfSynthStack2Abl( FsmFigure ) syfstate *ReturnSyfState; syfinfo *SyfInfo; syfregstack *StackArray; - syfregstack *StackNextArray; + syfregstack *StackNextArray = NULL; syfregstack *StackPrevArray; syfregstate *RegArray; syfctrl *CtrlArray; @@ -572,7 +572,7 @@ void SyfSynthCtrl2Abl( FsmFigure ) } } - addablhexpr( CtrlArray[ ScanStack->CTRL ].ABL, Equation ); + addablhexpr( CtrlArray[ (int)ScanStack->CTRL ].ABL, Equation ); } } @@ -657,7 +657,7 @@ void SyfSynthOut2Abl( FsmFigure ) syfout *ScanSyfOut; syfstate *ScanSyfState; syfcode *ScanSyfCode; - ablexpr *Equation; + ablexpr *Equation = NULL; ablexpr *ScanPath; ablexpr *Atom; char *PrevScan; @@ -1210,8 +1210,8 @@ void SyfSynthCode2Abl( FsmFigure, FlagDc ) syfinfo *SyfInfo; syfcode *CodeArray; syfregstate *RegArray; - ablexpr *Equation; - ablexpr *EquationOut; + ablexpr *Equation; + ablexpr *EquationOut = NULL; long Index; long BitMask; long ScanBit; @@ -1355,7 +1355,7 @@ void SyfSynthTrans2Abl( FsmFigure ) fsmfig_list *FsmFigure; { - syfinfo *SyfInfo; +//syfinfo *SyfInfo; fsmstate_list *ScanState; syfstate *ScanSyfState; syfstate *FromSyfState; @@ -1363,7 +1363,7 @@ void SyfSynthTrans2Abl( FsmFigure ) ablexpr *Atom; fsmtrans_list *ScanTrans; - SyfInfo = FSM_SYF_INFO( FsmFigure ); +//SyfInfo = FSM_SYF_INFO( FsmFigure ); for ( ScanState = FsmFigure->STATE; ScanState != (fsmstate_list *)0; @@ -1472,9 +1472,9 @@ void SyfSynthFsm2Abl( FsmFigure ) fsmfig_list *FsmFigure; { - syfinfo *SyfInfo; +//syfinfo *SyfInfo; - SyfInfo = FSM_SYF_INFO( FsmFigure ); +//SyfInfo = FSM_SYF_INFO( FsmFigure ); SyfSynthTrans2Abl( FsmFigure ); SyfSynthReturn2Abl( FsmFigure ); diff --git a/alliance/src/syf/src/syf_user.c b/alliance/src/syf/src/syf_user.c index 5f5291f9..68102693 100644 --- a/alliance/src/syf/src/syf_user.c +++ b/alliance/src/syf/src/syf_user.c @@ -311,7 +311,7 @@ void SyfFsmUserEncode( FsmFigure, FileName ) { StateName = ScanBuffer; ScanBuffer[ Index ] = '\0'; - sscanf( ScanBuffer + Index + 1, "%lx", &StateCode ); + sscanf( ScanBuffer + Index + 1, "%22lx", &StateCode ); break; } diff --git a/alliance/src/syf/src/syf_verify.c b/alliance/src/syf/src/syf_verify.c index 99db44e6..575ec87c 100644 --- a/alliance/src/syf/src/syf_verify.c +++ b/alliance/src/syf/src/syf_verify.c @@ -719,7 +719,7 @@ void SyfFsmSimplify( FsmFigure, FlagSimplify ) int FlagSimplify; { bddsystem *BddSystem; - bddcircuit *BddCircuit; +//bddcircuit *BddCircuit; syfinfo *SyfInfo; fsmstate_list *ScanState; fsmstack_list *ScanStack; @@ -736,7 +736,7 @@ void SyfFsmSimplify( FsmFigure, FlagSimplify ) BddSystem = createbddsystem( SYF_BDD_VAR_NODE, SYF_BDD_OPER_NODE, 1000, SYF_BDD_MAX_NODE ); reorderbddsystemdynamic( BddSystem, SYF_BDD_REORDER_FUNC, SYF_BDD_REORDER_NODE, SYF_BDD_REORDER_RATIO ); - BddCircuit = SyfFsmMakeBddCircuit( BddSystem, FsmFigure ); + /*BddCircuit =*/ SyfFsmMakeBddCircuit( BddSystem, FsmFigure ); reorderbddsystemsimple( BddSystem ); } diff --git a/alliance/src/vasy/src/vasy_drvalc.c b/alliance/src/vasy/src/vasy_drvalc.c index 2e8b7ea5..8def9639 100644 --- a/alliance/src/vasy/src/vasy_drvalc.c +++ b/alliance/src/vasy/src/vasy_drvalc.c @@ -365,11 +365,11 @@ static vexexpr *VasyAllianceTreatVexArith( VexExpr ) vexexpr *VexSum; vexexpr *VexGen; vexexpr *VexProp; - vexexpr *VexCarry; + vexexpr *VexCarry = NULL; vexexpr *VexAtomCarry; vexexpr *VexAtomSum; - vexexpr *VexAtomGen; - vexexpr *VexAtomProp; + vexexpr *VexAtomGen = NULL; + vexexpr *VexAtomProp = NULL; vexexpr *VexAnd1; vexexpr *VexAnd2; vexexpr *VexAnd3; @@ -1328,7 +1328,6 @@ static void VasyAllianceTreatMap( RtlInst ) char *AtomValue; char *ScanAtomValue; char Buffer[ 64 ]; - int Type; int Left; int Right; int ScanLeft; @@ -1735,7 +1734,6 @@ static void VasyDriveAllianceTreatFigure( RtlFigure, FileName, PRtlFigureVbe, PR rtldecl_list *PortDeclar; rtldecl_list **PrevDeclar; rtlins_list *RtlInst; - rtlmap_list *RtlMap; rtlmod_list *RtlModel; rtlport_list *RtlPort; rtlasg_list *RtlAsg; @@ -1947,7 +1945,7 @@ static void VasyDriveAllianceTreatFigure( RtlFigure, FileName, PRtlFigureVbe, PR VexFormal = dupvexexpr( NewDeclar->VEX_ATOM ); VexActual = dupvexexpr( NewDeclar->VEX_ATOM ); - RtlMap = addrtlinsmap( RtlFigure, RtlInst, VexFormal, VexActual ); + addrtlinsmap( RtlFigure, RtlInst, VexFormal, VexActual ); } } /* @@ -2052,7 +2050,7 @@ static void VasyDriveAllianceDeclar( RtlFigure, Type ) char *AtomValue; vexexpr *VexInit; char *DeclarName; - char *DeclarDir; +//char *DeclarDir; char *DeclarBase; char *DeclarVecDir; char *DeclarKind; @@ -2066,7 +2064,7 @@ static void VasyDriveAllianceDeclar( RtlFigure, Type ) VexDeclar = RtlDeclar->VEX_ATOM; VexInit = RtlDeclar->VEX_INIT; DeclarName = GetVexAtomValue( VexDeclar ); - DeclarDir = RTL_DIR_TYPE[ RtlDeclar->DIR ]; + /*DeclarDir = RTL_DIR_TYPE[ RtlDeclar->DIR ];*/ DeclarBase = VEX_TYPE_NAME[ RtlDeclar->BASE ]; DeclarKind = RTL_KIND_TYPE[ RtlDeclar->KIND ]; diff --git a/alliance/src/vasy/src/vasy_drvsyn.c b/alliance/src/vasy/src/vasy_drvsyn.c index 4c6c2bf3..6118ccc9 100644 --- a/alliance/src/vasy/src/vasy_drvsyn.c +++ b/alliance/src/vasy/src/vasy_drvsyn.c @@ -1543,7 +1543,7 @@ static void VasySynopsysTreatMap( RtlInst, RtlMap ) AtomValue = GetVexAtomValue( VexFormal ); RtlPort = searchrtlmodport( VasyRtlFigure, RtlInst->MODEL, AtomValue ); Type = VasyConvertVexType[ RtlPort->BASE ]; - VasyType = VasyConvertVasyType[ Type ]; +//VasyType = VasyConvertVasyType[ Type ]; SetVexVhdlType( VexFormal, Type ); @@ -1735,7 +1735,7 @@ static void VasyDriveSynopsysDeclar( RtlFigure, Type ) vexexpr *VexInit; char *AtomValue; char *DeclarName; - char *DeclarDir; +//char *DeclarDir; char *DeclarBase; char *DeclarVecDir; @@ -1748,7 +1748,7 @@ static void VasyDriveSynopsysDeclar( RtlFigure, Type ) VexDeclar = RtlDeclar->VEX_ATOM; VexInit = RtlDeclar->VEX_INIT; DeclarName = GetVexAtomValue( VexDeclar ); - DeclarDir = RTL_DIR_TYPE[ RtlDeclar->DIR ]; + /*DeclarDir = RTL_DIR_TYPE[ RtlDeclar->DIR ];*/ DeclarBase = VEX_TYPE_NAME[ RtlDeclar->BASE ]; if ( Type == RTL_DECLAR_CONSTANT ) diff --git a/alliance/src/vasy/src/vasy_drvvlog.c b/alliance/src/vasy/src/vasy_drvvlog.c index 55fb67b5..225888c2 100644 --- a/alliance/src/vasy/src/vasy_drvvlog.c +++ b/alliance/src/vasy/src/vasy_drvvlog.c @@ -259,7 +259,7 @@ static void VasyVerilogTreatMap( RtlFigure, RtlInst ) vexexpr *VexAtom; char *AtomValue; char Buffer[ 64 ]; - int Type; + int Type = 0; for ( RtlMap = RtlInst->MAP; RtlMap != (rtlmap_list *)0; @@ -610,7 +610,7 @@ static void VasyDriveVerilogDeclar( RtlFigure, Type ) vexexpr *VexDeclar; vexexpr *VexInit; char *DeclarName; - char *DeclarDir; +//char *DeclarDir; char *DeclarKind; for ( RtlDeclar = RtlFigure->DECLAR[ Type ]; @@ -620,7 +620,7 @@ static void VasyDriveVerilogDeclar( RtlFigure, Type ) VexDeclar = RtlDeclar->VEX_ATOM; VexInit = RtlDeclar->VEX_INIT; DeclarName = GetVexAtomValue( VexDeclar ); - DeclarDir = VERILOG_DIR_TYPE[ RtlDeclar->DIR ]; + /*DeclarDir = VERILOG_DIR_TYPE[ RtlDeclar->DIR ];*/ DeclarKind = VasyGetVerilogNetType( RtlDeclar ); if ( ! IsVasyRtlDeclarUsed( RtlDeclar ) ) continue; diff --git a/alliance/src/vasy/src/vasy_dynfunc.c b/alliance/src/vasy/src/vasy_dynfunc.c index 246093ff..db1ddb13 100644 --- a/alliance/src/vasy/src/vasy_dynfunc.c +++ b/alliance/src/vasy/src/vasy_dynfunc.c @@ -137,34 +137,27 @@ static vexexpr *VasyExpandDynFuncVexFunc( VexExpr ) vexexpr *VexExpr; { vexexpr *VexAtom; - vexexpr *VexDeclar; vexexpr *Operand; vexexpr *VexVar; vexexpr *VexData; vexexpr *VexCond; vexexpr *VexValue; - authelem *Element; - char *AtomValue; char *ChoiceValue; - vbtyp_list *VbhType; - vbtyp_list *VbhBase; vbcho_list *VbhChoice; vbcas_list *VbhCase; ptype_list *ScanPType; char *FuncName; - int FuncId; +//int FuncId; int DynFuncSize; - int Vector; - int Step; int SizeValue; int IntValue; int Index; FuncName = GetVexFuncValue( VexExpr ); - FuncId = getvexstdfuncid( FuncName ); +/*FuncId =*/ getvexstdfuncid( FuncName ); - VexAtom = GetVexOperand( VexExpr->OPERAND ); - Operand = GetVexOperand( VexExpr->OPERAND->NEXT ); + VexAtom = GetVexOperand( VexExpr->OPERAND ); + Operand = GetVexOperand( VexExpr->OPERAND->NEXT ); SizeValue = Operand->WIDTH; /* diff --git a/alliance/src/vasy/src/vasy_mulwait.c b/alliance/src/vasy/src/vasy_mulwait.c index b51b2433..8e5882d5 100644 --- a/alliance/src/vasy/src/vasy_mulwait.c +++ b/alliance/src/vasy/src/vasy_mulwait.c @@ -255,7 +255,6 @@ static void VasyMultiWaitArcWait2Wait( VpnFigure, VpnProc, BeginTrans, AsgTrans, int AsgMin; int AsgMax; int AsgPos; - auth2table *HashSupport; int NumberWrite; if ( IsVasyDebugLevel0() ) @@ -287,7 +286,6 @@ static void VasyMultiWaitArcWait2Wait( VpnFigure, VpnProc, BeginTrans, AsgTrans, } TransInfo = GetVasyVpnTransInfo( AsgTrans ); - HashSupport = TransInfo->HASH_SUPPORT; NumberWrite = 0; @@ -406,7 +404,7 @@ static void VasyMultiWaitCreateVpnTrans( VpnFigure, VpnProc, BeginTrans ) vpntrans_list *VpnTrans; vpntrans_list *DefTrans; vpntrans_list *AsgTrans; - vpntrans_list *EndTrans; +//vpntrans_list *EndTrans; vpnarc *VpnArc; chain_list *ScanChain; @@ -464,7 +462,7 @@ static void VasyMultiWaitCreateVpnTrans( VpnFigure, VpnProc, BeginTrans ) VpnArc = GetVpnArc( AsgTrans->PLACE_OUT ); EndPlace = GetVpnArcTargetPlace( VpnArc ); VpnArc = GetVpnArc( EndPlace->TRANS_OUT ); - EndTrans = GetVpnArcTargetTrans( VpnArc ); + //EndTrans = GetVpnArcTargetTrans( VpnArc ); /* ** Initialize all action's for support computation */ diff --git a/alliance/src/vasy/src/vasy_parse.c b/alliance/src/vasy/src/vasy_parse.c index 9d7df6b9..a76aed08 100644 --- a/alliance/src/vasy/src/vasy_parse.c +++ b/alliance/src/vasy/src/vasy_parse.c @@ -62,6 +62,7 @@ # include "vasy_generate.h" # include "vasy_loop.h" # include "vasy_array.h" +# include "vasy_dynfunc.h" # include "vasy_error.h" # include "vasy_main.h" @@ -442,14 +443,14 @@ static void VasyParseVbhInstanceAddPower( VbhFigure ) { vbins_list *VbhInstance; vbmap_list *VbhMap; - vbtyp_list *VbhType; +//vbtyp_list *VbhType; vexexpr *VexFormal; vexexpr *VexActual; char *Name; int AddVdd; int AddVss; - VbhType = vbh_getvbtyp( VbhFigure, "bit" ); +//VbhType = vbh_getvbtyp( VbhFigure, "bit" ); for ( VbhInstance = VbhFigure->BEINS; VbhInstance != (vbins_list *)0; @@ -829,9 +830,9 @@ vpnfig_list *VasyParseVbh2VpnFig( VbhFigure ) vpnplace_list *VpnPlace; vpnplace_list *AsgPlace; vpnarc *VpnArc; - vpnact_list *VpnAction; + vpnact_list *VpnAction = NULL; vpndecl_list *VpnDeclar; - vexexpr *VexAtom; + vexexpr *VexAtom = NULL; vexexpr *VexExpr; char *Value; long NumberBus; diff --git a/alliance/src/vasy/src/vasy_redinst.c b/alliance/src/vasy/src/vasy_redinst.c index ccef0670..b609cf90 100644 --- a/alliance/src/vasy/src/vasy_redinst.c +++ b/alliance/src/vasy/src/vasy_redinst.c @@ -157,7 +157,7 @@ static int VasyRedInstHashVpnAct( VpnTrans, VpnAct ) NewAct = addvpnactasgbefore( VasyFigure, VpnTrans, VpnAct, DefAtom, AsgExpr ); unionvpnline( VasyFigure, &NewAct->LINE, VpnAct->LINE ); - AsgExpr = VpnAct->VEX_EXPR; + //AsgExpr = VpnAct->VEX_EXPR; } addauth2elem( VasyHash2Assign, (char*)VpnTrans, (char*)AtomValue, (long)VpnAct ); diff --git a/alliance/src/vasy/src/vasy_redwait.c b/alliance/src/vasy/src/vasy_redwait.c index a92bc8b4..049af8b1 100644 --- a/alliance/src/vasy/src/vasy_redwait.c +++ b/alliance/src/vasy/src/vasy_redwait.c @@ -328,8 +328,8 @@ static void VasyRedWaitStackVpnTrans() VpnArc = GetVpnArc( EndWait->PLACE_IN ); EndPlace = GetVpnArcSourcePlace( VpnArc ); - VpnArc = addvpnarcplace( VasyFigure, BeginPlace, VpnTrans ); - VpnArc = addvpnarctrans( VasyFigure, VpnTrans , EndPlace ); + addvpnarcplace( VasyFigure, BeginPlace, VpnTrans ); + addvpnarctrans( VasyFigure, VpnTrans , EndPlace ); RedAction = 0; diff --git a/alliance/src/vasy/src/vasy_support.c b/alliance/src/vasy/src/vasy_support.c index cb78cfc0..d80ea4cf 100644 --- a/alliance/src/vasy/src/vasy_support.c +++ b/alliance/src/vasy/src/vasy_support.c @@ -603,7 +603,7 @@ static void VasySupportVex( PosSupp, PosFrom, PosTo, Expr, Mode ) if ( IsVasyDebugLevel1() ) { - VasyPrintf( stdout, "VasySupportVex %d %d %d Mode %d-> \n", + VasyPrintf( stdout, "VasySupportVex %u %u %u Mode %d-> \n", PosSupp, PosFrom, PosTo, Mode ); viewvexexprboundln( Expr ); } diff --git a/alliance/src/vasy/src/vasy_synth.c b/alliance/src/vasy/src/vasy_synth.c index ef664bf7..e1b3e123 100644 --- a/alliance/src/vasy/src/vasy_synth.c +++ b/alliance/src/vasy/src/vasy_synth.c @@ -232,8 +232,6 @@ void VasySynthesisVpnModel( VpnFigure, RtlFigure ) rtlmod_list *RtlModel; vpnport_list *VpnPort; vpngen_list *VpnGen; - rtlport_list *RtlPort; - rtlgen_list *RtlGen; vexexpr *Atom; vexexpr *Expr; unsigned char Dir; @@ -259,7 +257,7 @@ void VasySynthesisVpnModel( VpnFigure, RtlFigure ) else Dir = RTL_DIR_INOUT; - RtlPort = addrtlmodport( RtlFigure, RtlModel, Atom, Base, Dir ); + addrtlmodport( RtlFigure, RtlModel, Atom, Base, Dir ); } for ( VpnGen = VpnModel->GENERIC; @@ -270,7 +268,7 @@ void VasySynthesisVpnModel( VpnFigure, RtlFigure ) Expr = dupvexexpr( VpnGen->VEX_EXPR ); Base = VpnGen->BASE; - RtlGen = addrtlmodgen( RtlFigure, RtlModel, Atom, Expr, Base ); + addrtlmodgen( RtlFigure, RtlModel, Atom, Expr, Base ); } } } @@ -290,9 +288,7 @@ void VasySynthesisVpnInstance( VpnFigure, RtlFigure ) rtlins_list *RtlInst; rtlmod_list *RtlModel; vpnmap_list *VpnMap; - rtlmap_list *RtlMap; vpngen_list *VpnGen; - rtlgen_list *RtlGen; vexexpr *Formal; vexexpr *Actual; vexexpr *Atom; @@ -312,7 +308,7 @@ void VasySynthesisVpnInstance( VpnFigure, RtlFigure ) Formal = dupvexexpr( VpnMap->VEX_FORMAL ); Actual = dupvexexpr( VpnMap->VEX_ACTUAL ); - RtlMap = addrtlinsmap( RtlFigure, RtlInst, Formal, Actual ); + addrtlinsmap( RtlFigure, RtlInst, Formal, Actual ); } for ( VpnGen = VpnInst->GENERIC; @@ -322,7 +318,7 @@ void VasySynthesisVpnInstance( VpnFigure, RtlFigure ) Atom = dupvexexpr( VpnGen->VEX_ATOM ); Expr = dupvexexpr( VpnGen->VEX_EXPR ); - RtlGen = addrtlinsgen( RtlFigure, RtlInst, Atom, Expr ); + addrtlinsgen( RtlFigure, RtlInst, Atom, Expr ); } } } @@ -482,7 +478,7 @@ static void VasySynthesisOneWaitVpnTrans( VpnFigure, RtlFigure, VpnTrans ) vasysyminfo *SymInfo; vasybivex_list *SymBiVex; rtldecl_list *RtlDeclar; - char *Flags; + unsigned char *Flags; vpndecl_list *AsgDeclar; vpnsym *AsgSymbol; vexexpr *AsgAtom; @@ -493,7 +489,6 @@ static void VasySynthesisOneWaitVpnTrans( VpnFigure, RtlFigure, VpnTrans ) char *AtomName; int AsgMin; int AsgMax; - int AsgWidth; int AsgIndex; int AsgPos; rtlasg_list *RtlAssign; @@ -519,7 +514,6 @@ static void VasySynthesisOneWaitVpnTrans( VpnFigure, RtlFigure, VpnTrans ) AsgMin = getvexvectormin( AsgAtom ); AsgMax = getvexvectormax( AsgAtom ); - AsgWidth = AsgAtom->WIDTH; RtlDeclar = searchrtldecl( RtlFigure, AtomName ); Used = 0; @@ -676,14 +670,12 @@ void VasySynthesisOneWaitVpnProc( VpnFigure, RtlFigure, VpnProc ) vpntrans_list *VpnTrans; vpnplace_list *SkipPlace; vpnarc *VpnArc; - vasyprocinfo *ProcInfo; if ( IsVasyDebugLevel0() ) { VasyPrintf( stdout, " --> VasySynthesisOneWaitVpnProc %s\n", VpnProc->NAME ); } - ProcInfo = GetVasyVpnProcInfo( VpnProc ); WaitTrans = VpnProc->ELABO; VpnArc = GetVpnArc( WaitTrans->PLACE_OUT ); @@ -722,7 +714,6 @@ void VasySynthesisMultiWaitVpnProc( VpnFigure, RtlFigure, VpnProc ) chain_list *ScanChain; vasywaitinfo *WaitInfo; rtlfsm_list *RtlFsm; - rtlfsmstate_list *RtlState; rtlfsmstate_list *RtlStateFrom; rtlfsmstate_list *RtlStateTo; rtlfsmtrans_list *RtlTrans; @@ -770,7 +761,7 @@ void VasySynthesisMultiWaitVpnProc( VpnFigure, RtlFigure, VpnProc ) if ( WaitTrans->TYPE != VPN_TRANS_INF_WAIT ) continue; StateName = VasyGetFsmStateName( VpnProc, WaitTrans ); - RtlState = addrtlfsmstate( RtlFigure, RtlFsm, StateName ); + addrtlfsmstate( RtlFigure, RtlFsm, StateName ); WaitInfo = GetVasyVpnWaitInfo( WaitTrans ); DefTrans = WaitInfo->DEF_TRANS; diff --git a/alliance/src/vbh/src/vbh_add.c b/alliance/src/vbh/src/vbh_add.c index 5d505989..6a1304a4 100644 --- a/alliance/src/vbh/src/vbh_add.c +++ b/alliance/src/vbh/src/vbh_add.c @@ -784,7 +784,7 @@ struct vbtyp *vbh_prdeftyp( VbFigure ) struct vbtyp *TypeBit; struct vbtyp *TypeReg; struct vbtyp *TypeMux; - struct vbtyp *TypeWor; +//struct vbtyp *TypeWor; struct vbtyp *TypeInt; struct vbtyp *TypeStd_logic; struct vbtyp *TypeStd_ulogic; @@ -897,8 +897,8 @@ struct vbtyp *vbh_prdeftyp( VbFigure ) vbh_addvbtyp( VbFigure,"mux_vector",0,0x7fffffff, NULL, 0,1,TypeMux,VBH_TYPE_MUX_VECTOR,NULL,'U',-1); - TypeWor = vbh_addvbtyp( VbFigure,"wor_bit" ,0,1,bit_vl, - 2,1,NULL,VBH_TYPE_WOR_BIT,NULL,'E',-1); +/*TypeWor =*/ vbh_addvbtyp( VbFigure,"wor_bit" ,0,1,bit_vl, + 2,1,NULL,VBH_TYPE_WOR_BIT,NULL,'E',-1); vbh_addvbtyp( VbFigure,"wor_vector",0,0x7fffffff, NULL, 0,1,TypeMux,VBH_TYPE_WOR_VECTOR,NULL,'U',-1); diff --git a/alliance/src/vbl/src/main.c b/alliance/src/vbl/src/main.c index 0b5454c8..b89ac578 100644 --- a/alliance/src/vbl/src/main.c +++ b/alliance/src/vbl/src/main.c @@ -74,7 +74,7 @@ int main( argc, argv ) int Index; char Option; vbfig_list *VbhFigure; - vbfig_list *VbhGenFigure; +//vbfig_list *VbhGenFigure; vbins_list *VbhInstance; char *Extention; @@ -175,7 +175,7 @@ int main( argc, argv ) { if ( VbhInstance->GEN_MAP != (vbmap_list *)0 ) { - VbhGenFigure = getvbfiggenmap( VbhInstance->MODEL, Extention, VbhInstance->GEN_MAP ); + /*VbhGenFigure =*/ getvbfiggenmap( VbhInstance->MODEL, Extention, VbhInstance->GEN_MAP ); } } diff --git a/alliance/src/vbl/src/vbl_bcomp_l.l b/alliance/src/vbl/src/vbl_bcomp_l.l index 4e6d9adf..3eecfce3 100644 --- a/alliance/src/vbl/src/vbl_bcomp_l.l +++ b/alliance/src/vbl/src/vbl_bcomp_l.l @@ -1,3 +1,7 @@ + +%option noinput +%option nounput + /*------------------------------------------------------------\ | | | This file is part of the Alliance CAD System Copyright | @@ -180,18 +184,12 @@ static long find_mc(s) strcpy(loc,s); while(l--) loc[l]=tolower(loc[l]); /* conversion en minuscules */ pt= (el_mc *) bsearch(loc, (char *)tab_mc,VBL_NB_MC,sizeof(el_mc), - (long (*)(const void *, const void *)) strcmp); + (int (*)(const void *, const void *)) strcmp); if (pt==NULL) return(-1); return(pt->kval); } - -int vbl_y_wrap () -{ - return (1); -} - %} upper_case_letter [A-Z] @@ -283,3 +281,8 @@ base_specifier (B|b|O|o|X|x) return (*yytext); } %% + +int vbl_y_wrap () +{ + return (1); +} diff --git a/alliance/src/vbl/src/vbl_bcomp_y.y b/alliance/src/vbl/src/vbl_bcomp_y.y index 262803bf..c803c558 100644 --- a/alliance/src/vbl/src/vbl_bcomp_y.y +++ b/alliance/src/vbl/src/vbl_bcomp_y.y @@ -44,6 +44,10 @@ #include "vbl_bspec.h" #include "vbl_byacc.h" +extern int yywrap ( ); +extern int yylex ( ); +extern void yyerror ( ); + #if 1 # define my_fprintf fprintf( stdout, "%s %d : ", basename(__FILE__), __LINE__ ); fprintf # define my_vbl_error(N,V) \ @@ -496,13 +500,13 @@ package_declaration chain_list *ScanChain; char *Name; char **FuncArray; - long Index; - long Left; - long Right; - long AttrLeft; - long AttrRight; + long Index; + long Left = 0; + long Right = 0; + long AttrLeft = 0; + long AttrRight = 0; long Dir; - long Signed; + long Signed = 0; vbcst_list *VbhCst; vbaux_list *VbhAux; vbmod_list *VbhMod; @@ -1584,8 +1588,8 @@ local_port_element vbpor_list *VbPort; vbtyp_list *VbType; short Signed; - long Left; - long Right; + long Left = 0; + long Right = 0; long AttrLeft; long AttrRight; @@ -1908,12 +1912,12 @@ entity_declaration char *Name; char **FuncArray; long Index; - long Left; - long Right; - long AttrLeft; - long AttrRight; + long Left = 0; + long Right = 0; + long AttrLeft = 0; + long AttrRight = 0; long Dir; - long Signed; + long Signed = 0; vbcst_list *VbhCst; vbaux_list *VbhAux; vbmod_list *VbhMod; @@ -2448,8 +2452,8 @@ formal_port_element vexexpr *VexInit; char buffer[ 40 ]; short Signed; - long Left; - long Right; + long Left = 0; + long Right = 0; long AttrLeft; long AttrRight; struct vbl_expr expr1; @@ -3481,8 +3485,8 @@ constant_declaration chain_list *ScanChain; vbl_vexstr *VexStr; short Signed; - long Left; - long Right; + long Left = 0; + long Right = 0; short Width; long AttrLeft; long AttrRight; @@ -3611,8 +3615,8 @@ variable_declaration long EnumSize; vbvar_list *VbVar; short Signed; - long Left; - long Right; + long Left = 0; + long Right = 0; long AttrLeft; long AttrRight; char StrFlag; @@ -3826,8 +3830,8 @@ signal_declaration char *codedsigname; vbtyp_list *TypeEnum; short Signed; - long Left; - long Right; + long Left = 0; + long Right = 0; long AttrLeft; long AttrRight; long EnumSize; @@ -4180,13 +4184,13 @@ enumeration_type_definition ...enumeration_literal.. RightParen_ERR { - char buffer[ 128 ]; - char *enumname; - char *enumval; + char buffer[ 128 ]; + char *enumname; + char *enumval; long size; long indice; - long numbit; - char **pnt; + long numbit; + char **pnt = NULL; chain_list *nm1lst; VBL_NM1LST = reverse (VBL_NM1LST); @@ -4316,7 +4320,7 @@ constrained_array_definition my_vbl_error(123,NULL); } - sprintf( buffer, "_subtype_%d", VBL_NUMTYP ); + sprintf( buffer, "_subtype_%ld", VBL_NUMTYP ); name = namealloc( buffer ); NewType = vbh_addvbtyp(VBL_BEFPNT,name,$4.LEFT, @@ -5587,7 +5591,7 @@ timeout_clause $$.DYNAMIC = 1; viewvexexprboundln( $2.VEX ); - fprintf( stdout, " %d\n", $3 ); + fprintf( stdout, " %ld\n", $3 ); } ; @@ -5697,7 +5701,7 @@ variable_assignment_statement char buffer[128]; struct ptype **pnt; vexexpr *vex; - char *LocalName; + char *LocalName = NULL; vbl_vexstr *VexStr; vbl_vexstr *VexStr2; chain_list *ScanChain; @@ -5884,7 +5888,7 @@ signal_assignment_statement long mode; char buffer[128]; char *codedsigname; - char *LocalName; + char *LocalName = NULL; long left ,right; long left_bnd ,right_bnd; struct ptype **pnt; @@ -6175,7 +6179,7 @@ case_statement long indice=0; struct choice_chain *ch; struct vbcho **pnt; - struct vbcho *tab; + struct vbcho *tab = NULL; struct choice_chain *nm1lst; @@ -7916,7 +7920,7 @@ unsigned char kind; unsigned char dynamic; { - ptype_list *GenVar; + ptype_list *GenVar = NULL; void *pnt = NULL; char porflg = 0; char modflg = 0; diff --git a/alliance/src/vbl/src/vbl_bspec.c b/alliance/src/vbl/src/vbl_bspec.c index a7f50b49..80d282e4 100644 --- a/alliance/src/vbl/src/vbl_bspec.c +++ b/alliance/src/vbl/src/vbl_bspec.c @@ -34,6 +34,7 @@ #include "vbl_bedef.h" #include "vbl_bspec.h" +#include "vbl_util.h" static long VblEvalError = 0; @@ -161,9 +162,11 @@ unsigned char dynamic ) vbtyp_list *BaseType2; vbtyp_list *VbhType; - result.IDENT = NULL; - result.VEX = NULL; - result.WIDTH = 0; + result.IDENT = NULL; + result.VEX = NULL; + result.SIGNED = 0; + result.TYPE = 0; + result.WIDTH = 0; result.AGGREG = 0; switch (oper) diff --git a/alliance/src/vbl/src/vbl_byacc.h b/alliance/src/vbl/src/vbl_byacc.h index 982c1363..5addc7a5 100644 --- a/alliance/src/vbl/src/vbl_byacc.h +++ b/alliance/src/vbl/src/vbl_byacc.h @@ -46,8 +46,6 @@ static void *vbl_addstr (); static vbtyp_list *val_type(); static vbtyp_list *get_type(); static struct ptype *reversetype(); -static struct choice_chain *addchoice(); -static struct choice_chain *order_choice(); extern char VBL_ERRFLG; /* set to 1 in case of error */ extern struct vbfig *VBL_HEADFIG; /* head of vbfigs */ diff --git a/alliance/src/vbl/src/vbl_parse.c b/alliance/src/vbl/src/vbl_parse.c index 0ba30334..4a909e49 100644 --- a/alliance/src/vbl/src/vbl_parse.c +++ b/alliance/src/vbl/src/vbl_parse.c @@ -179,7 +179,7 @@ void getvbpkg( FileName, Extention ) if ( Buffer[ 0 ] == '#' ) continue; - if ( sscanf( Buffer, "%s : %s\n", LogicalName, PhysicalName ) == 2 ) + if ( sscanf( Buffer, "%511s : %511s\n", LogicalName, PhysicalName ) == 2 ) { VbhFigure = getvbfiggenmap( PhysicalName, Extention, (vbmap_list *)0 ); diff --git a/alliance/src/vbl/src/vbl_util.c b/alliance/src/vbl/src/vbl_util.c index 07f03b2b..d60375a5 100644 --- a/alliance/src/vbl/src/vbl_util.c +++ b/alliance/src/vbl/src/vbl_util.c @@ -112,7 +112,7 @@ char *str2; long nbr1; { - (void) fprintf (stderr,"Fatal error %d executing `%s`: ", code,str1); + (void) fprintf (stderr,"Fatal error %ld executing `%s`: ", code,str1); switch (code) { case 1: @@ -134,19 +134,19 @@ long nbr1; (void) fprintf (stderr,"cannot make BDD of empty expression\n"); break; case 7: - (void) fprintf (stderr,"unknown type `%c` for IO `%s`\n",nbr1,str2); + (void) fprintf (stderr,"unknown type `%c` for IO `%s`\n",(char)nbr1,str2); break; case 8: - (void) fprintf (stderr,"illegal signal value : hex `%x`\n",nbr1); + (void) fprintf (stderr,"illegal signal value : hex `%lx`\n",(unsigned long)nbr1); break; case 9: - (void) fprintf (stderr,"unknown mode `%c` for IO `%s`\n",nbr1,str2); + (void) fprintf (stderr,"unknown mode `%c` for IO `%s`\n",(char)nbr1,str2); break; case 10: (void) fprintf (stderr,"decompiler called on empty vbfig\n"); break; case 12: - (void) fprintf (stderr,"illegal user value '%c' for IO\n",nbr1); + (void) fprintf (stderr,"illegal user value '%c' for IO\n",(char)nbr1); break; case 13 : (void) fprintf (stderr,"cannot find model of `%s`\n",str2); @@ -155,16 +155,16 @@ long nbr1; (void) fprintf (stderr,"cannot convert empty expression\n"); break; case 15 : - (void) fprintf (stderr,"illegal bit string value : `%c`\n",nbr1); + (void) fprintf (stderr,"illegal bit string value : `%c`\n",(char)nbr1); break; case 16 : (void) fprintf (stderr,"the same expression cannot be used twice\n"); break; case 17 : - (void) fprintf (stderr,"unknown base specifier : `%c`\n",nbr1); + (void) fprintf (stderr,"unknown base specifier : `%c`\n",(char)nbr1); break; case 18: - (void) fprintf (stderr,"unknown mode `%c` for port `%s`\n",nbr1,str2); + (void) fprintf (stderr,"unknown mode `%c` for port `%s`\n",(char)nbr1,str2); break; case 19: (void) fprintf (stderr,"empty guard expression: `%s`\n",str2); @@ -176,7 +176,7 @@ long nbr1; (void) fprintf (stderr,"cannot find structural level\n"); break; case 22: - (void) fprintf (stderr,"`%s` : `%c` unknown resolution function\n",str2,nbr1); + (void) fprintf (stderr,"`%s` : `%c` unknown resolution function\n",str2,(char)nbr1); break; } autexit (1); @@ -216,7 +216,7 @@ long nmb1; (void) fprintf (stdout,"Linking ...\n"); break; case 10: - (void) fprintf (stdout,"###----- processing pattern %d -----###\n",nmb1); + (void) fprintf (stdout,"###----- processing pattern %ld -----###\n",nmb1); break; case 11: (void) fprintf (stdout,"Decompiling ...\n"); @@ -244,7 +244,7 @@ long nmb1; (void) fprintf (stderr," Verify the file and restart \n"); break; default: - (void) fprintf (stderr,"vbl_message : code %d unknown.\n",code); + (void) fprintf (stderr,"vbl_message : code %ld unknown.\n",code); } } @@ -257,7 +257,7 @@ void vbl_error ( long code, char *str1 ) { VBL_ERRFLG++; if (code < 100) - (void)fprintf (stderr,"Error %d line %ld in file %s :",code,VBL_LINNUM, VBL_FILENAME); + (void)fprintf (stderr,"Error %ld line %ld in file %s :",code,VBL_LINNUM, VBL_FILENAME); else { @@ -269,7 +269,7 @@ void vbl_error ( long code, char *str1 ) if (code < 200) (void)fprintf (stderr,"Error %d :",code); #else - (void)fprintf (stderr,"Error %d line %ld in file %s :",code,VBL_LINNUM, VBL_FILENAME); + (void)fprintf (stderr,"Error %ld line %ld in file %s :",code,VBL_LINNUM, VBL_FILENAME); #endif } @@ -515,7 +515,7 @@ void vbl_error ( long code, char *str1 ) void vbl_warning ( long code, char *str1 ) { - (void)fprintf (stderr,"Warning %d line %ld in file %s :",code,VBL_LINNUM, VBL_FILENAME); + (void)fprintf (stderr,"Warning %ld line %ld in file %s :",code,VBL_LINNUM, VBL_FILENAME); switch (code) { diff --git a/alliance/src/vbl/src/vbl_util.h b/alliance/src/vbl/src/vbl_util.h index 7c5170ff..58c2c3ab 100644 --- a/alliance/src/vbl/src/vbl_util.h +++ b/alliance/src/vbl/src/vbl_util.h @@ -40,3 +40,5 @@ extern long VBL_LINNUM; /* file's line number */ extern char VBL_ERRFLG; /* Error flag */ extern char VBL_CURFIL[]; /* current file name */ + + extern void vbl_toolbug (); diff --git a/alliance/src/vex/src/vexget.c b/alliance/src/vex/src/vexget.c index aedb1f8d..55058565 100644 --- a/alliance/src/vex/src/vexget.c +++ b/alliance/src/vex/src/vexget.c @@ -397,7 +397,7 @@ ptype_list *getvexatombitnameptype( Expr ) vexexpr *Expr; { - ptype_list *HeadList; + ptype_list *HeadList = NULL; ptype_list *NewChain; ptype_list **PrevChain; char *Name; diff --git a/alliance/src/vex/src/vexshift.c b/alliance/src/vex/src/vexshift.c index 3a8e6b5a..1afb3acf 100644 --- a/alliance/src/vex/src/vexshift.c +++ b/alliance/src/vex/src/vexshift.c @@ -86,13 +86,11 @@ vexexpr *shiftvexatomleft( Expr, Count ) vexexpr *Expr; short Count; { - char *Value; vexexpr *VexZero; short Width; if ( IsVexNodeAtom( Expr ) ) { - Value = GetVexAtomValue( Expr ); Width = Expr->WIDTH; if ( Count >= Width ) diff --git a/alliance/src/vex/src/vexsimp.c b/alliance/src/vex/src/vexsimp.c index d6917bf4..daad8fa6 100644 --- a/alliance/src/vex/src/vexsimp.c +++ b/alliance/src/vex/src/vexsimp.c @@ -464,7 +464,7 @@ static int loc_isoperandsamewidth( Expr ) { chain_list *ScanOper; vexexpr *Operand; - int Width; + int Width = 0; for ( ScanOper = Expr->OPERAND; ScanOper != (chain_list *)0; diff --git a/alliance/src/vpd/src/vpd_parse.c b/alliance/src/vpd/src/vpd_parse.c index 2247026e..d294b43d 100644 --- a/alliance/src/vpd/src/vpd_parse.c +++ b/alliance/src/vpd/src/vpd_parse.c @@ -255,7 +255,7 @@ static vexexpr *VpnReadPrefixExpr() return( (vexexpr *)0 ); } - sscanf( Name, "{%ld,%ld,%lx}", &Left, &Right, &Type ); + sscanf( Name, "{%22ld,%22ld,%22lx}", &Left, &Right, &Type ); Name = Scan + 1; Oper = getvexoperbyname( Name ); @@ -362,7 +362,7 @@ static vexexpr *VpnReadPrefixExpr() return( (vexexpr *)0 ); } - sscanf( Name, "{%ld,%ld,%lx}", &Left, &Right, &Type ); + sscanf( Name, "{%22ld,%22ld,%22lx}", &Left, &Right, &Type ); Name = Scan + 1; Oper = getvexoperbyname( Name ); @@ -487,7 +487,7 @@ static int VpnLoadFigure( VpnFigure ) if ( Keyword == VpnKeyPlace ) { - Error = 4 - sscanf( ScanBuffer, "%ld\t%ld\t%ld\t%ld", + Error = 4 - sscanf( ScanBuffer, "%22ld\t%22ld\t%22ld\t%22ld", &Value1, &Value2, &Value3, &Value4 ); if ( Error ) return( 1 ); @@ -535,7 +535,7 @@ static int VpnLoadFigure( VpnFigure ) else if ( Keyword == VpnKeyLine ) { - Error = 1 - sscanf( ScanBuffer, "%ld", &Value1 ); + Error = 1 - sscanf( ScanBuffer, "%22ld", &Value1 ); if ( Error ) return( 1 ); @@ -551,7 +551,7 @@ static int VpnLoadFigure( VpnFigure ) else if ( Keyword == VpnKeyTrans ) { - Error = 3 - sscanf( ScanBuffer, "%ld\t%ld\t%ld", + Error = 3 - sscanf( ScanBuffer, "%22ld\t%22ld\t%22ld", &Value1, &Value2, &Value3 ); if ( Error ) return( 1 ); @@ -572,7 +572,7 @@ static int VpnLoadFigure( VpnFigure ) else if ( Keyword == VpnKeyAct ) { - Error = 2 - sscanf( ScanBuffer, "%ld\t%ld", + Error = 2 - sscanf( ScanBuffer, "%22ld\t%22ld", &Value1, &Value2 ); if ( Error ) return( 1 ); @@ -603,7 +603,7 @@ static int VpnLoadFigure( VpnFigure ) else if ( Keyword == VpnKeyArcIn ) { - Error = 2 - sscanf( ScanBuffer, "%ld\t%ld", + Error = 2 - sscanf( ScanBuffer, "%22ld\t%22ld", &Value1, &Value2 ); if ( Error ) return( 1 ); @@ -617,7 +617,7 @@ static int VpnLoadFigure( VpnFigure ) else if ( Keyword == VpnKeyArcOut ) { - Error = 2 - sscanf( ScanBuffer, "%ld\t%ld", + Error = 2 - sscanf( ScanBuffer, "%22ld\t%22ld", &Value1, &Value2 ); if ( Error ) return( 1 ); @@ -640,7 +640,7 @@ static int VpnLoadFigure( VpnFigure ) else if ( Keyword == VpnKeyWait ) { - Error = 1 - sscanf( ScanBuffer, "%ld", &Value1 ); + Error = 1 - sscanf( ScanBuffer, "%22ld", &Value1 ); if ( Error ) return( 1 ); @@ -650,7 +650,7 @@ static int VpnLoadFigure( VpnFigure ) else if ( Keyword == VpnKeyDeclar ) { - Error = 6 - sscanf( ScanBuffer, "%ld\t%ld\t%ld\t%ld\t%ld\t%ld", + Error = 6 - sscanf( ScanBuffer, "%22ld\t%22ld\t%22ld\t%22ld\t%22ld\t%22ld", &Value1, &Value2, &Value3, &Value4, &Value5, &Value6 ); if ( Error ) return( 1 ); @@ -731,7 +731,7 @@ static int VpnLoadFigure( VpnFigure ) else if ( Keyword == VpnKeySymbol ) { - Error = 6 - sscanf( ScanBuffer, "%ld\t%ld\t%ld\t%ld\t%ld\t%ld", + Error = 6 - sscanf( ScanBuffer, "%22ld\t%22ld\t%22ld\t%22ld\t%22ld\t%22ld", &Value1, &Value2, &Value3, &Value4, &Value5, &Value6 ); if ( Error ) return( 1 ); @@ -756,7 +756,7 @@ static int VpnLoadFigure( VpnFigure ) else if ( Keyword == VpnKeyProcess ) { - Error = 2 - sscanf( ScanBuffer, "%ld %ld", &Value1, &Value2 ); + Error = 2 - sscanf( ScanBuffer, "%22ld %22ld", &Value1, &Value2 ); if ( Error ) return( 1 ); @@ -771,7 +771,7 @@ static int VpnLoadFigure( VpnFigure ) else if ( Keyword == VpnKeyFunction ) { - Error = 2 - sscanf( ScanBuffer, "%ld %ld", &Value1, &Value2 ); + Error = 2 - sscanf( ScanBuffer, "%22ld %22ld", &Value1, &Value2 ); if ( Error ) return( 1 ); @@ -810,7 +810,7 @@ static int VpnLoadFigure( VpnFigure ) else if ( Keyword == VpnKeyInstance ) { - Error = 1 - sscanf( ScanBuffer, "%ld", &Value1 ); + Error = 1 - sscanf( ScanBuffer, "%22ld", &Value1 ); if ( Error ) return( 1 ); @@ -832,7 +832,7 @@ static int VpnLoadFigure( VpnFigure ) else if ( Keyword == VpnKeyMap ) { - Error = 1 - sscanf( ScanBuffer, "%ld", &Value1 ); + Error = 1 - sscanf( ScanBuffer, "%22ld", &Value1 ); if ( Error ) return( 1 ); @@ -863,7 +863,7 @@ static int VpnLoadFigure( VpnFigure ) else if ( Keyword == VpnKeyModel ) { - Error = 1 - sscanf( ScanBuffer, "%ld", &Value1 ); + Error = 1 - sscanf( ScanBuffer, "%22ld", &Value1 ); if ( Error ) return( 1 ); @@ -876,7 +876,7 @@ static int VpnLoadFigure( VpnFigure ) else if ( Keyword == VpnKeyPort ) { - Error = 3 - sscanf( ScanBuffer, "%ld\t%ld\t%ld", &Value1, &Value2, &Value3 ); + Error = 3 - sscanf( ScanBuffer, "%22ld\t%22ld\t%22ld", &Value1, &Value2, &Value3 ); if ( Error ) return( 1 ); @@ -892,7 +892,7 @@ static int VpnLoadFigure( VpnFigure ) else if ( Keyword == VpnKeyFigure ) { - Error = 1 - sscanf( ScanBuffer, "%ld", &Value1 ); + Error = 1 - sscanf( ScanBuffer, "%22ld", &Value1 ); if ( Error ) return( 1 ); @@ -902,7 +902,7 @@ static int VpnLoadFigure( VpnFigure ) else if ( Keyword == VpnKeyAttr ) { - Error = 2 - sscanf( ScanBuffer, "%ld\t%ld", &Value1, &Value2 ); + Error = 2 - sscanf( ScanBuffer, "%22ld\t%22ld", &Value1, &Value2 ); if ( Error ) return( 1 ); @@ -926,7 +926,7 @@ static int VpnLoadFigure( VpnFigure ) else if ( Keyword == VpnKeyGenMap ) { - Error = 2 - sscanf( ScanBuffer, "%ld\t%ld", &Value1, &Value2 ); + Error = 2 - sscanf( ScanBuffer, "%22ld\t%22ld", &Value1, &Value2 ); if ( Error ) return( 1 ); @@ -944,7 +944,7 @@ static int VpnLoadFigure( VpnFigure ) else if ( Keyword == VpnKeyGenMod ) { - Error = 2 - sscanf( ScanBuffer, "%ld\t%ld", &Value1, &Value2 ); + Error = 2 - sscanf( ScanBuffer, "%22ld\t%22ld", &Value1, &Value2 ); if ( Error ) return( 1 ); diff --git a/alliance/src/vvh/src/vvh_vbh2vpn.c b/alliance/src/vvh/src/vvh_vbh2vpn.c index e9eb32e4..e5a2156a 100644 --- a/alliance/src/vvh/src/vvh_vbh2vpn.c +++ b/alliance/src/vvh/src/vvh_vbh2vpn.c @@ -270,6 +270,7 @@ static void VvhVbhTreatVarName( Expr ) | | \------------------------------------------------------------*/ +#if THIS_IS_DISABLED static void VvhVbhSubstituteVar( Expr ) vexexpr *Expr; @@ -290,6 +291,7 @@ static void VvhVbhSubstituteVar( Expr ) } } } +#endif /*------------------------------------------------------------\ | | @@ -967,7 +969,7 @@ static void VvhVbhTreatCase( ScanCase ) vpnarc *VpnArc; vexexpr *VexCond; vexexpr *VexOthers; - vexexpr *VexGuard; + vexexpr *VexGuard = NULL; vexexpr *VexSum; vexexpr *VexBoolean; vexexpr *VexAtom; diff --git a/alliance/src/x2y/src/x2y.c b/alliance/src/x2y/src/x2y.c index 56ed3e5c..484cd135 100644 --- a/alliance/src/x2y/src/x2y.c +++ b/alliance/src/x2y/src/x2y.c @@ -26,7 +26,9 @@ #include #include "mut.h" #include "mlo.h" +#include "mlu.h" #include "mph.h" +#include "mpu.h" /* diff --git a/alliance/src/xfsm/src/XFS_error.c b/alliance/src/xfsm/src/XFS_error.c index 49950041..56f8f11c 100644 --- a/alliance/src/xfsm/src/XFS_error.c +++ b/alliance/src/xfsm/src/XFS_error.c @@ -44,6 +44,7 @@ # include # include +# include # include # include # include "mut.h" @@ -311,7 +312,7 @@ char *XfsmGetInformations() if ( XfsmFigureFsm != (fsmfig_list *)NULL ) { - sprintf( Scan, " FIGURE : %s\n\n STATES : %d\n TRANSITIONS : %d\n INPUTS : %d\n OUTPUTS : %d\n\n", XfsmFigureFsm->NAME, + sprintf( Scan, " FIGURE : %s\n\n STATES : %ld\n TRANSITIONS : %ld\n INPUTS : %ld\n OUTPUTS : %ld\n\n", XfsmFigureFsm->NAME, XfsmFigureFsm->NUMBER_STATE, XfsmFigureFsm->NUMBER_TRANS, XfsmFigureFsm->NUMBER_IN, @@ -324,7 +325,7 @@ char *XfsmGetInformations() Scan = Scan + strlen( Scan ); - sprintf( Scan, " BOUNDING BOX : \n\n XMIN : %d\n YMIN : %d\n XMAX : %d\n YMAX : %d\n\n", + sprintf( Scan, " BOUNDING BOX : \n\n XMIN : %ld\n YMIN : %ld\n XMAX : %ld\n YMAX : %ld\n\n", XfsmBoundXmin / XFSM_UNIT, XfsmBoundYmin / XFSM_UNIT, XfsmBoundXmax / XFSM_UNIT, XfsmBoundYmax / XFSM_UNIT ); diff --git a/alliance/src/xfsm/src/XFS_error.h b/alliance/src/xfsm/src/XFS_error.h index 3a03dffc..146cddab 100644 --- a/alliance/src/xfsm/src/XFS_error.h +++ b/alliance/src/xfsm/src/XFS_error.h @@ -71,5 +71,6 @@ \------------------------------------------------------------*/ extern void XfsmFlushErrorMessage(); + extern void XfsmInitializeErrorMessage(); # endif diff --git a/alliance/src/xfsm/src/XFS_fsm.c b/alliance/src/xfsm/src/XFS_fsm.c index f97c24dc..aa9a1b0b 100644 --- a/alliance/src/xfsm/src/XFS_fsm.c +++ b/alliance/src/xfsm/src/XFS_fsm.c @@ -55,6 +55,7 @@ # include "ftl.h" # include "XSB.h" # include "XFS.h" +# include "XFS_error.h" # include "XFS_fsm.h" /*------------------------------------------------------------\ @@ -82,7 +83,6 @@ \------------------------------------------------------------*/ static jmp_buf XfsmJumpBuffer; - static void (*OldExitHandler)() = NULL; /*------------------------------------------------------------\ | | diff --git a/alliance/src/xfsm/src/XME_dialog.c b/alliance/src/xfsm/src/XME_dialog.c index b7b98c0f..6ed81df3 100644 --- a/alliance/src/xfsm/src/XME_dialog.c +++ b/alliance/src/xfsm/src/XME_dialog.c @@ -61,6 +61,7 @@ # include "XME.h" # include "XME_dialog.h" +# include "XME_search.h" # include "XME_edit.h" /*------------------------------------------------------------\ diff --git a/alliance/src/xfsm/src/XME_edit.c b/alliance/src/xfsm/src/XME_edit.c index 3869d561..0e900ce2 100644 --- a/alliance/src/xfsm/src/XME_edit.c +++ b/alliance/src/xfsm/src/XME_edit.c @@ -58,7 +58,11 @@ # include "XFS.h" # include "XME.h" +# include "XTB_dialog.h" +# include "XMV_view.h" # include "XME_edit.h" +# include "XME_panel.h" +# include "XME_select.h" # include "XME_message.h" /*------------------------------------------------------------\ @@ -201,7 +205,6 @@ void XfsmEditIdentify( X1, Y1 ) long Y1; { xfsmselect_list *Select; - xfsmobj_list *Obj; strcpy( XfsmIdentifyMessage, "No element found !" ); @@ -235,7 +238,6 @@ void XfsmEditConnected( X1, Y1 ) long Y1; { xfsmselect_list *Select; - xfsmselect_list **PrevSelect; xfsmobj_list *Obj; if ( XfsmHeadConnect != (xfsmselect_list *)NULL ) diff --git a/alliance/src/xfsm/src/XME_menu.c b/alliance/src/xfsm/src/XME_menu.c index 40c1eb55..3bb8c984 100644 --- a/alliance/src/xfsm/src/XME_menu.c +++ b/alliance/src/xfsm/src/XME_menu.c @@ -131,7 +131,9 @@ (XfsmMenuItem *)NULL } , - NULL + { + NULL + } }; /*------------------------------------------------------------\ diff --git a/alliance/src/xfsm/src/XME_panel.c b/alliance/src/xfsm/src/XME_panel.c index 7f7d326a..6b22e4e4 100644 --- a/alliance/src/xfsm/src/XME_panel.c +++ b/alliance/src/xfsm/src/XME_panel.c @@ -45,6 +45,8 @@ # include # include # include +# include +# include # include # include # include @@ -64,6 +66,7 @@ # include "XME_message.h" # include "XME_dialog.h" # include "XME_edit.h" +# include "XME_select.h" # include "XME_search.h" /*------------------------------------------------------------\ @@ -121,7 +124,9 @@ (Widget)NULL } , - NULL + { + NULL + } }; XfsmPanelItem XfsmEditSearchViewPanel = @@ -191,7 +196,9 @@ (Widget)NULL } , - NULL + { + NULL + } }; XfsmPanelItem XfsmEditIdentifyPanel = @@ -275,7 +282,9 @@ (Widget)NULL } , - NULL + { + NULL + } }; XfsmPanelItem XfsmEditSelectPanel = diff --git a/alliance/src/xfsm/src/XME_panel.h b/alliance/src/xfsm/src/XME_panel.h index 4b9004d3..8eb487cf 100644 --- a/alliance/src/xfsm/src/XME_panel.h +++ b/alliance/src/xfsm/src/XME_panel.h @@ -86,5 +86,6 @@ extern void CallbackEditSelectCancel(); extern void XfsmDisplaySelectList(); + extern void XfsmEditSelectAccept(); # endif diff --git a/alliance/src/xfsm/src/XME_search.c b/alliance/src/xfsm/src/XME_search.c index e6221342..443e99f3 100644 --- a/alliance/src/xfsm/src/XME_search.c +++ b/alliance/src/xfsm/src/XME_search.c @@ -57,8 +57,11 @@ # include "XMX.h" # include "XFS.h" # include "XME.h" +# include "XMV.h" +# include "XMV_view.h" # include "XME_search.h" +# include "XTB_dialog.h" /*------------------------------------------------------------\ | | diff --git a/alliance/src/xfsm/src/XME_select.c b/alliance/src/xfsm/src/XME_select.c index 1832246a..bb1544ef 100644 --- a/alliance/src/xfsm/src/XME_select.c +++ b/alliance/src/xfsm/src/XME_select.c @@ -60,6 +60,8 @@ # include "XFS.h" # include "XME.h" +# include "XME_panel.h" +# include "XMV_view.h" # include "XME_select.h" /*------------------------------------------------------------\ diff --git a/alliance/src/xfsm/src/XME_select.h b/alliance/src/xfsm/src/XME_select.h index 87334735..d73ce074 100644 --- a/alliance/src/xfsm/src/XME_select.h +++ b/alliance/src/xfsm/src/XME_select.h @@ -65,5 +65,8 @@ \------------------------------------------------------------*/ extern void XfsmEditSelectObject(); + extern void XfsmEditSelectPoint(); + extern void XfsmAddSelectList(); + extern void XfsmEditSelectCancel(); # endif diff --git a/alliance/src/xfsm/src/XMF_file.c b/alliance/src/xfsm/src/XMF_file.c index f34d7c47..ae116cc1 100644 --- a/alliance/src/xfsm/src/XMF_file.c +++ b/alliance/src/xfsm/src/XMF_file.c @@ -61,6 +61,8 @@ # include "XMX.h" # include "XTB.h" # include "XMF.h" +# include "XMT.h" +# include "XMV.h" # include "XMF_file.h" diff --git a/alliance/src/xfsm/src/XMF_menu.c b/alliance/src/xfsm/src/XMF_menu.c index f1d39a79..bdb7afd0 100644 --- a/alliance/src/xfsm/src/XMF_menu.c +++ b/alliance/src/xfsm/src/XMF_menu.c @@ -81,7 +81,7 @@ | | \------------------------------------------------------------*/ - static XfsmFirstFileOpen = 1; + static int XfsmFirstFileOpen = 1; /*------------------------------------------------------------\ | | @@ -124,7 +124,9 @@ (XfsmMenuItem *)NULL } , - NULL + { + NULL + } }; /*------------------------------------------------------------\ diff --git a/alliance/src/xfsm/src/XMF_panel.c b/alliance/src/xfsm/src/XMF_panel.c index 37b0d05c..41ea8960 100644 --- a/alliance/src/xfsm/src/XMF_panel.c +++ b/alliance/src/xfsm/src/XMF_panel.c @@ -69,6 +69,7 @@ # include "XMF_panel.h" # include "XMF_dialog.h" +# include "XTB_dialog.h" /*------------------------------------------------------------\ | | diff --git a/alliance/src/xfsm/src/XMH_menu.c b/alliance/src/xfsm/src/XMH_menu.c index 4aefafea..7dbb5bda 100644 --- a/alliance/src/xfsm/src/XMH_menu.c +++ b/alliance/src/xfsm/src/XMH_menu.c @@ -99,7 +99,9 @@ (XfsmMenuItem *)NULL } , - NULL + { + NULL + } }; /*------------------------------------------------------------\ diff --git a/alliance/src/xfsm/src/XMH_panel.c b/alliance/src/xfsm/src/XMH_panel.c index c76e7a62..9c0fced3 100644 --- a/alliance/src/xfsm/src/XMH_panel.c +++ b/alliance/src/xfsm/src/XMH_panel.c @@ -66,6 +66,7 @@ # include "XMX.h" # include "XMH.h" +# include "XTB_dialog.h" # include "XMH_panel.h" # include "LIP6bw.h" diff --git a/alliance/src/xfsm/src/XMS_menu.c b/alliance/src/xfsm/src/XMS_menu.c index 8219c536..bef59719 100644 --- a/alliance/src/xfsm/src/XMS_menu.c +++ b/alliance/src/xfsm/src/XMS_menu.c @@ -142,7 +142,9 @@ (XfsmMenuItem *)NULL } , - NULL + { + NULL + } }; diff --git a/alliance/src/xfsm/src/XMS_panel.c b/alliance/src/xfsm/src/XMS_panel.c index 798892a3..ab68f57a 100644 --- a/alliance/src/xfsm/src/XMS_panel.c +++ b/alliance/src/xfsm/src/XMS_panel.c @@ -45,6 +45,7 @@ # include # include # include +# include # include # include # include @@ -60,6 +61,7 @@ # include "XMS.h" # include "XMS_panel.h" +# include "XTB_dialog.h" /*------------------------------------------------------------\ | | @@ -121,7 +123,9 @@ (Widget)NULL } , - NULL + { + NULL + } }; XfsmPanelItem XfsmSetupInformationsPanel = diff --git a/alliance/src/xfsm/src/XMS_setup.c b/alliance/src/xfsm/src/XMS_setup.c index bc096ebb..bd728da3 100644 --- a/alliance/src/xfsm/src/XMS_setup.c +++ b/alliance/src/xfsm/src/XMS_setup.c @@ -61,6 +61,7 @@ # include "XMS.h" # include "XMH.h" +# include "XMV_panel.h" # include "XMS_setup.h" /*------------------------------------------------------------\ @@ -212,7 +213,7 @@ void XfsmReadPanelValues( Panel ) autbegin(); - fscanf( FileConfig, "X: %d, Y: %d, WIDTH: %d, HEIGHT: %d, MANAGED: %d\n", + fscanf( FileConfig, "X: %11d, Y: %11d, WIDTH: %11d, HEIGHT: %11d, MANAGED: %11d\n", &Values[0], &Values[1], &Values[2], &Values[3], &Values[4] ); XfsmSetPanelValues( Panel, Values ); @@ -234,7 +235,7 @@ char XfsmReadTopLevelValues() autbegin(); - fscanf( FileConfig, "VERSION: %s\n", Version ); + fscanf( FileConfig, "VERSION: %63s\n", Version ); if ( strcmp( Version, VERSION ) ) { @@ -242,7 +243,7 @@ char XfsmReadTopLevelValues() return( 0 ); } - fscanf( FileConfig, "X: %d, Y: %d, WIDTH: %d, HEIGHT: %d, MANAGED: %d\n", + fscanf( FileConfig, "X: %11d, Y: %11d, WIDTH: %11d, HEIGHT: %11d, MANAGED: %11d\n", &Values[0], &Values[1], &Values[2], &Values[3], &Values[4] ); XtVaSetValues( XfsmTopLevel, @@ -271,14 +272,14 @@ void XfsmReadActiveLayers() for ( Layer = 0; Layer < XFSM_MAX_LAYER; Layer++ ) { - fscanf( FileConfig, "ACTIVE: %d\n", &Value ); + fscanf( FileConfig, "ACTIVE: %11d\n", &Value ); XFSM_ACTIVE_LAYER_TABLE[ Layer ] = Value; } for ( Layer = 0; Layer < XFSM_MAX_ACTIVE_NAME; Layer++ ) { - fscanf( FileConfig, "ACTIVE: %d\n", &Value ); + fscanf( FileConfig, "ACTIVE: %11d\n", &Value ); XFSM_ACTIVE_NAME_TABLE[ Layer ] = Value; } @@ -295,14 +296,14 @@ void XfsmReadActiveLayers() void XfsmWriteActiveLayers() { - char Layer; + int Layer; autbegin(); for ( Layer = 0; Layer < XFSM_MAX_LAYER; Layer++ ) { fprintf( FileConfig, "ACTIVE: %d\n", - XFSM_ACTIVE_LAYER_TABLE[ Layer ] ); + XFSM_ACTIVE_LAYER_TABLE[ (int)Layer ] ); } for ( Layer = 0; Layer < XFSM_MAX_ACTIVE_NAME; Layer++ ) diff --git a/alliance/src/xfsm/src/XMT_menu.c b/alliance/src/xfsm/src/XMT_menu.c index c9d6338c..de056be2 100644 --- a/alliance/src/xfsm/src/XMT_menu.c +++ b/alliance/src/xfsm/src/XMT_menu.c @@ -98,7 +98,9 @@ (XfsmMenuItem *)NULL } , - NULL + { + NULL + } }; /*------------------------------------------------------------\ diff --git a/alliance/src/xfsm/src/XMT_panel.c b/alliance/src/xfsm/src/XMT_panel.c index 1c941058..40150165 100644 --- a/alliance/src/xfsm/src/XMT_panel.c +++ b/alliance/src/xfsm/src/XMT_panel.c @@ -45,6 +45,7 @@ # include # include # include +# include # include # include # include @@ -120,7 +121,9 @@ (Widget)NULL } , - NULL + { + NULL + } }; XfsmPanelItem XfsmToolsMessagePanel = diff --git a/alliance/src/xfsm/src/XMV_menu.c b/alliance/src/xfsm/src/XMV_menu.c index 96266d7f..3b45d563 100644 --- a/alliance/src/xfsm/src/XMV_menu.c +++ b/alliance/src/xfsm/src/XMV_menu.c @@ -60,6 +60,7 @@ # include "XMV_menu.h" # include "XMV_dialog.h" # include "XMV_view.h" +# include "XMV_panel.h" # include "XMV_map.h" /*------------------------------------------------------------\ @@ -169,7 +170,9 @@ (XfsmMenuItem *)NULL } , - NULL + { + NULL + } }; /*------------------------------------------------------------\ diff --git a/alliance/src/xfsm/src/XMV_panel.c b/alliance/src/xfsm/src/XMV_panel.c index 5522ff59..50e0c2d1 100644 --- a/alliance/src/xfsm/src/XMV_panel.c +++ b/alliance/src/xfsm/src/XMV_panel.c @@ -240,7 +240,9 @@ (Widget)NULL } , - NULL + { + NULL + } }; XfsmPanelItem XfsmViewArrowsPanel = @@ -428,7 +430,9 @@ (Widget)NULL } , - NULL + { + NULL + } }; XfsmPanelItem XfsmViewZoomPanel = @@ -525,7 +529,9 @@ (Widget)NULL } , - NULL + { + NULL + } }; XfsmPanelItem XfsmViewGridPanel = @@ -952,7 +958,9 @@ (Widget)NULL } , - NULL + { + NULL + } }; XfsmPanelItem XfsmViewLayerPanel = @@ -1605,7 +1613,7 @@ void CallbackLayerForceDisplay( MyWidget, ClientData, CallData ) void XfsmChangeCursor( Type ) - char Type; + int Type; { int Pos; XmString Label; @@ -1633,7 +1641,7 @@ void XfsmChangeCursor( Type ) void XfsmChangeForceDisplay( Index ) - char Index; + int Index; { int Pos; XmString Label; diff --git a/alliance/src/xfsm/src/XMV_panel.h b/alliance/src/xfsm/src/XMV_panel.h index 0a19b206..4de49964 100644 --- a/alliance/src/xfsm/src/XMV_panel.h +++ b/alliance/src/xfsm/src/XMV_panel.h @@ -120,6 +120,7 @@ extern void XfsmChangeForceDisplay(); extern void XfsmChangeCursor(); + extern void XfsmInitializeLayer(); extern void XfsmSetLayerVisible(); extern void XfsmSetLayerInvisible(); extern void XfsmSetNameVisible(); diff --git a/alliance/src/xfsm/src/XMV_view.c b/alliance/src/xfsm/src/XMV_view.c index f63a93b8..adec641a 100644 --- a/alliance/src/xfsm/src/XMV_view.c +++ b/alliance/src/xfsm/src/XMV_view.c @@ -56,6 +56,7 @@ # include "XMX.h" # include "XMV.h" +# include "XMX_grid.h" # include "XMV_view.h" /*------------------------------------------------------------\ diff --git a/alliance/src/xfsm/src/XMX.h b/alliance/src/xfsm/src/XMX.h index f091ecaa..d98efdbc 100644 --- a/alliance/src/xfsm/src/XMX.h +++ b/alliance/src/xfsm/src/XMX.h @@ -192,8 +192,8 @@ | | \------------------------------------------------------------*/ - extern char XfsmCountEventZoom; - extern char XfsmCountEventEdit; + extern int XfsmCountEventZoom; + extern int XfsmCountEventEdit; /*------------------------------------------------------------\ | | diff --git a/alliance/src/xfsm/src/XMX_color.c b/alliance/src/xfsm/src/XMX_color.c index e748ee79..703249c2 100644 --- a/alliance/src/xfsm/src/XMX_color.c +++ b/alliance/src/xfsm/src/XMX_color.c @@ -147,7 +147,6 @@ void XfsmInitializeColors() { XColor ForgetIt; XColor GetIt; - Window Root; int Counter; char Error; char *ColorName; @@ -200,8 +199,6 @@ void XfsmInitializeColors() void XfsmChangeCursorContext() { - XGCValues GraphicValue; - if ( XFSM_XOR_CURSOR == XFSM_TRUE ) { XfsmXorGC = XfsmXorGCXor; diff --git a/alliance/src/xfsm/src/XMX_color.h b/alliance/src/xfsm/src/XMX_color.h index 121c5af8..b6f32571 100644 --- a/alliance/src/xfsm/src/XMX_color.h +++ b/alliance/src/xfsm/src/XMX_color.h @@ -83,6 +83,8 @@ extern void XfsmInitializeColors(); extern void XpatChangeCursorContext(); extern void XpatInitializeColorMap(); + extern void XfsmInitializeColorMap(); + extern void XfsmChangeCursorContext(); # endif diff --git a/alliance/src/xfsm/src/XMX_cursor.c b/alliance/src/xfsm/src/XMX_cursor.c index 9d39eb81..600746a2 100644 --- a/alliance/src/xfsm/src/XMX_cursor.c +++ b/alliance/src/xfsm/src/XMX_cursor.c @@ -166,16 +166,16 @@ void XfsmDisplayCoordinates() { autbegin(); - sprintf( XfsmCursorBuffer, "%d", XfsmUnitCursorX ); + sprintf( XfsmCursorBuffer, "%ld", XfsmUnitCursorX ); XfsmDisplayMessage( XFSM_MESSAGE_X, XfsmCursorBuffer ); - sprintf( XfsmCursorBuffer, "%d", XfsmUnitCursorY ); + sprintf( XfsmCursorBuffer, "%ld", XfsmUnitCursorY ); XfsmDisplayMessage( XFSM_MESSAGE_Y, XfsmCursorBuffer ); - sprintf( XfsmCursorBuffer, "%d", XfsmUnitCursorX - XfsmUnitCursorSaveX[0] ); + sprintf( XfsmCursorBuffer, "%ld", XfsmUnitCursorX - XfsmUnitCursorSaveX[0] ); XfsmDisplayMessage( XFSM_MESSAGE_DX, XfsmCursorBuffer ); - sprintf( XfsmCursorBuffer, "%d", XfsmUnitCursorY - XfsmUnitCursorSaveY[0] ); + sprintf( XfsmCursorBuffer, "%ld", XfsmUnitCursorY - XfsmUnitCursorSaveY[0] ); XfsmDisplayMessage( XFSM_MESSAGE_DY, XfsmCursorBuffer ); autend(); @@ -194,8 +194,8 @@ void XfsmPointCursor() XfsmUndisplayCursor(); - XfsmUnitCursorSaveX[ XfsmCursorIndex ] = XfsmUnitCursorX; - XfsmUnitCursorSaveY[ XfsmCursorIndex ] = XfsmUnitCursorY; + XfsmUnitCursorSaveX[ (int)XfsmCursorIndex ] = XfsmUnitCursorX; + XfsmUnitCursorSaveY[ (int)XfsmCursorIndex ] = XfsmUnitCursorY; XfsmCursorIndex = XfsmCursorIndex + 1; diff --git a/alliance/src/xfsm/src/XMX_dialog.c b/alliance/src/xfsm/src/XMX_dialog.c index 76db7da2..7dbcfdc9 100644 --- a/alliance/src/xfsm/src/XMX_dialog.c +++ b/alliance/src/xfsm/src/XMX_dialog.c @@ -62,6 +62,7 @@ # include "XMS.h" # include "XMH.h" # include "XMX.h" +# include "XME.h" # include "XMX_dialog.h" diff --git a/alliance/src/xfsm/src/XMX_event.c b/alliance/src/xfsm/src/XMX_event.c index 861f22f3..fc71e124 100644 --- a/alliance/src/xfsm/src/XMX_event.c +++ b/alliance/src/xfsm/src/XMX_event.c @@ -67,6 +67,9 @@ # include "XMX_cursor.h" # include "XMX_event.h" # include "XMX_message.h" +# include "XMX_graphic.h" +# include "XMV_view.h" +# include "XMF_file.h" /*------------------------------------------------------------\ | | @@ -118,7 +121,7 @@ | | \------------------------------------------------------------*/ - static char XfsmMaxEventEditTable[] = + static int XfsmMaxEventEditTable[] = { 2, /* XFSM_EDIT_MEASURE */ @@ -126,7 +129,7 @@ 1 /* XFSM_EDIT_CONNECTED */ }; - static char XfsmInputEventEditTable[] = + static int XfsmInputEventEditTable[] = { XFSM_INPUT_HALF_BOX, /* XFSM_EDIT_MEASURE */ @@ -134,7 +137,7 @@ XFSM_INPUT_POINT /* XFSM_EDIT_CONNECTED */ }; - static char XfsmMaxEventZoomTable[] = + static int XfsmMaxEventZoomTable[] = { 1, /* XFSM_ZOOM_CENTER */ @@ -142,7 +145,7 @@ 2 /* XFSM_ZOOM_PAN */ }; - static char XfsmInputEventZoomTable[] = + static int XfsmInputEventZoomTable[] = { XFSM_INPUT_POINT, /* XFSM_ZOOM_CENTER */ @@ -164,15 +167,15 @@ static long XfsmUnitEventZoomX[ 2 ] = { 0, 0 }; static long XfsmUnitEventZoomY[ 2 ] = { 0, 0 }; - static char XfsmMaxEventZoom = 0; - char XfsmCountEventZoom = 0; + static int XfsmMaxEventZoom = 0; + int XfsmCountEventZoom = 0; static long XfsmUnitEventEditX[ 2 ] = { 0, 0 }; static long XfsmUnitEventEditY[ 2 ] = { 0, 0 }; - static char XfsmMaxEventEdit = 2; - char XfsmCountEventEdit = 0; + static int XfsmMaxEventEdit = 2; + int XfsmCountEventEdit = 0; - static char XfsmFirstExpose = XFSM_TRUE; + static int XfsmFirstExpose = XFSM_TRUE; /*------------------------------------------------------------\ | | @@ -180,10 +183,10 @@ | | \------------------------------------------------------------*/ - static char XfsmInputMode = XFSM_INPUT_HALF_BOX; - static char XfsmSaveInputMode = XFSM_INPUT_HALF_BOX; - static char XfsmEditMode = XFSM_EDIT_MEASURE; - static char XfsmSaveEditMode = XFSM_EDIT_MEASURE; + static int XfsmInputMode = XFSM_INPUT_HALF_BOX; + static int XfsmSaveInputMode = XFSM_INPUT_HALF_BOX; + static int XfsmEditMode = XFSM_EDIT_MEASURE; + static int XfsmSaveEditMode = XFSM_EDIT_MEASURE; /*------------------------------------------------------------\ | | @@ -207,7 +210,7 @@ void XfsmChangeEditMode( EditMode , PromptMessage ) - char EditMode; + int EditMode; void (*PromptMessage)(); { autbegin(); @@ -272,9 +275,9 @@ void XfsmChangeEditMode( EditMode , PromptMessage ) void XfsmContinueEditMode( EditMode , PromptMessage, CountEvent ) - char EditMode; + int EditMode; void (*PromptMessage)(); - char CountEvent; + int CountEvent; { autbegin(); @@ -451,7 +454,7 @@ void CallbackEvent ( MyWidget, Event, Args, Argc ) int *Argc; { Display *EventDisplay; - char MouseEvent; + int MouseEvent; Position OldUnitCursorX; Position OldUnitCursorY; diff --git a/alliance/src/xfsm/src/XMX_graphic.h b/alliance/src/xfsm/src/XMX_graphic.h index e6d93f56..f503144e 100644 --- a/alliance/src/xfsm/src/XMX_graphic.h +++ b/alliance/src/xfsm/src/XMX_graphic.h @@ -68,5 +68,6 @@ \------------------------------------------------------------*/ extern void XfsmInitializeGraphic(); + extern void XfsmInitializeGraphicWindow(); # endif diff --git a/alliance/src/xfsm/src/XMX_grid.h b/alliance/src/xfsm/src/XMX_grid.h index b162ed91..556609e1 100644 --- a/alliance/src/xfsm/src/XMX_grid.h +++ b/alliance/src/xfsm/src/XMX_grid.h @@ -73,4 +73,7 @@ | | \------------------------------------------------------------*/ +extern void XfsmInitializeUnitGrid(); +extern char XfsmDisplayUnitGrid(); + # endif diff --git a/alliance/src/xfsm/src/XMX_menu.c b/alliance/src/xfsm/src/XMX_menu.c index e4a479ca..cc53faa6 100644 --- a/alliance/src/xfsm/src/XMX_menu.c +++ b/alliance/src/xfsm/src/XMX_menu.c @@ -173,7 +173,9 @@ XfsmHelpMenu } , - NULL + { + NULL + } }; /*------------------------------------------------------------\ diff --git a/alliance/src/xfsm/src/XMX_message.c b/alliance/src/xfsm/src/XMX_message.c index 5ab5afe5..5c93f30d 100644 --- a/alliance/src/xfsm/src/XMX_message.c +++ b/alliance/src/xfsm/src/XMX_message.c @@ -145,7 +145,7 @@ void XfsmDisplayMessage( Where, Text ) - char Where; + int Where; char *Text; { XmString TextString; diff --git a/alliance/src/xfsm/src/XMX_motif.c b/alliance/src/xfsm/src/XMX_motif.c index bbab9893..054e7410 100644 --- a/alliance/src/xfsm/src/XMX_motif.c +++ b/alliance/src/xfsm/src/XMX_motif.c @@ -58,7 +58,10 @@ # include "XTB.h" # include "XMX.h" # include "XMS.h" +# include "XMV.h" +# include "XMF.h" +# include "XMX_icon.h" # include "XMX_motif.h" # include "XMX_graphic.h" # include "XMX_event.h" diff --git a/alliance/src/xfsm/src/XMX_view.c b/alliance/src/xfsm/src/XMX_view.c index a72b8e63..5a13274a 100644 --- a/alliance/src/xfsm/src/XMX_view.c +++ b/alliance/src/xfsm/src/XMX_view.c @@ -182,9 +182,11 @@ void XfsmDelView() void XfsmInterruptDisplay() { +# ifdef XFSM_CTRL_C XEvent Event; KeySym Key; char Text; +#endif autbegin(); @@ -216,7 +218,9 @@ void XfsmInterruptDisplay() void XfsmFlushEventDisplay() { +# ifdef XFSM_CTRL_C XEvent Event; +#endif autbegin(); diff --git a/alliance/src/xfsm/src/XSB_error.h b/alliance/src/xfsm/src/XSB_error.h index 41cb2a93..a48841bc 100644 --- a/alliance/src/xfsm/src/XSB_error.h +++ b/alliance/src/xfsm/src/XSB_error.h @@ -85,4 +85,6 @@ | | \------------------------------------------------------------*/ +extern void XsbError(); + # endif diff --git a/alliance/src/xfsm/src/XSB_parse.c b/alliance/src/xfsm/src/XSB_parse.c index d387fb56..328b60be 100644 --- a/alliance/src/xfsm/src/XSB_parse.c +++ b/alliance/src/xfsm/src/XSB_parse.c @@ -124,7 +124,7 @@ static keyword KeywordDefine[ XSB_MAX_KEYWORD ] = { - "None", 0 + { "None" , 0 } }; /*------------------------------------------------------------\ @@ -154,7 +154,7 @@ char *XsbFileGetString( String, Size ) int Size; { register char *RegisterString; - register Register; + register int Register = 0; autbegin(); @@ -217,7 +217,7 @@ void XsbGetLine( Buffer ) XsbError( UNEXPECTED_EOF, (char *)NULL, XsbCurrentLine ); } - if ( String = strchr( Buffer, XSB_COMMENT_CHAR )) + if ( (String = strchr( Buffer, XSB_COMMENT_CHAR )) ) { if ( String == Buffer ) { @@ -281,7 +281,7 @@ char *XsbGetFirstWord( Buffer, IsKeyword, Hash ) autbegin(); - if ( String = (char *)strtok( Buffer, XSB_SEPARATORS_STRING )) + if ( (String = (char *)strtok( Buffer, XSB_SEPARATORS_STRING )) ) { if ( Hash ) { @@ -326,7 +326,7 @@ char *XsbGetNextWord( IsKeyword, Hash ) autbegin(); - if ( String = (char *)strtok( (char *)NULL, XSB_SEPARATORS_STRING )) + if ( (String = (char *)strtok( (char *)NULL, XSB_SEPARATORS_STRING )) ) { if ( Hash ) { @@ -384,7 +384,7 @@ long XsbGetStringValue( String ) autbegin(); - if ( sscanf( String, "%d", &Value) ) + if ( sscanf( String, "%22ld", &Value) ) { autend(); return ( Value ); @@ -420,7 +420,7 @@ float XsbGetStringFloat( String ) autbegin(); - if ( ! sscanf( String, "%g", &Value) ) + if ( ! sscanf( String, "%32g", &Value) ) { XsbError( ILLEGAL_FLOAT, String, XsbCurrentLine ); } @@ -443,7 +443,7 @@ long XsbGetNumber( String ) autbegin(); - if ( ! sscanf( String, "%d", &Value )) + if ( ! sscanf( String, "%22ld", &Value )) { XsbError( UNEXPECTED_LINE, "number", XsbCurrentLine ); } @@ -499,7 +499,7 @@ void XsbReadLayerName() } else { - XFSM_LAYER_NAME_TABLE [ Layer ][ Field ] = FirstWord; + XFSM_LAYER_NAME_TABLE [ (int)Layer ][ (int)Field ] = FirstWord; } } diff --git a/alliance/src/xfsm/src/XTB_cursor.c b/alliance/src/xfsm/src/XTB_cursor.c index a424bfcc..9f1291ec 100644 --- a/alliance/src/xfsm/src/XTB_cursor.c +++ b/alliance/src/xfsm/src/XTB_cursor.c @@ -46,6 +46,7 @@ # include # include # include +# include # include "mut.h" # include "aut.h" # include "abl.h" @@ -107,7 +108,7 @@ void XfsmSetMouseCursor( MainWidget, CursorType ) Widget MainWidget; - char CursorType; + int CursorType; { Display *DisplayId; Window MainWindow; diff --git a/alliance/src/xfsm/src/XTB_dialog.c b/alliance/src/xfsm/src/XTB_dialog.c index 71b69db4..2239c079 100644 --- a/alliance/src/xfsm/src/XTB_dialog.c +++ b/alliance/src/xfsm/src/XTB_dialog.c @@ -55,6 +55,7 @@ # include "fsm.h" # include "XTB.h" # include "XSB.h" +# include "XFS.h" # include "XTB_dialog.h" /*------------------------------------------------------------\ @@ -73,7 +74,7 @@ | | \------------------------------------------------------------*/ - static XfsmLockLoop = 0; + static int XfsmLockLoop = 0; static XfsmDialogItem XfsmWarningDialog = diff --git a/alliance/src/xfsm/src/XTB_dialog.h b/alliance/src/xfsm/src/XTB_dialog.h index 96159aeb..f2c3a673 100644 --- a/alliance/src/xfsm/src/XTB_dialog.h +++ b/alliance/src/xfsm/src/XTB_dialog.h @@ -67,4 +67,6 @@ | | \------------------------------------------------------------*/ +extern void XfsmLimitedLoop(); + # endif diff --git a/alliance/src/xfsm/src/xfsm.c b/alliance/src/xfsm/src/xfsm.c index 64e74e01..11a0c760 100644 --- a/alliance/src/xfsm/src/xfsm.c +++ b/alliance/src/xfsm/src/xfsm.c @@ -58,6 +58,7 @@ # include "XFS.h" # include "XMX.h" +# include "XFS_error.h" # include "xfsm.h" /*------------------------------------------------------------\ diff --git a/alliance/src/xgra/src/XGR_error.c b/alliance/src/xgra/src/XGR_error.c index 32044236..c1db56f2 100644 --- a/alliance/src/xgra/src/XGR_error.c +++ b/alliance/src/xgra/src/XGR_error.c @@ -44,6 +44,7 @@ # include # include +# include # include # include # include "mut.h" diff --git a/alliance/src/xgra/src/XGR_error.h b/alliance/src/xgra/src/XGR_error.h index 1d965735..22149e45 100644 --- a/alliance/src/xgra/src/XGR_error.h +++ b/alliance/src/xgra/src/XGR_error.h @@ -71,5 +71,6 @@ \------------------------------------------------------------*/ extern void XgraFlushErrorMessage(); + extern void XgraInitializeErrorMessage(); # endif diff --git a/alliance/src/xgra/src/XGR_graph.c b/alliance/src/xgra/src/XGR_graph.c index 8b5d3a82..21ca3dc7 100644 --- a/alliance/src/xgra/src/XGR_graph.c +++ b/alliance/src/xgra/src/XGR_graph.c @@ -52,6 +52,7 @@ # include "XSB.h" # include "XGR.h" # include "XGR_graph.h" +# include "XGR_error.h" /*------------------------------------------------------------\ | | diff --git a/alliance/src/xgra/src/XGR_place.c b/alliance/src/xgra/src/XGR_place.c index e1619d19..fc26fce5 100644 --- a/alliance/src/xgra/src/XGR_place.c +++ b/alliance/src/xgra/src/XGR_place.c @@ -87,10 +87,6 @@ void XgraPlaceFigure() { autnode_list *ScanNode; - autnode_list *NodeTo; - autnode_list *NodeFrom; - autarc_list *ScanArc; - chain_list *ScanChain; int NumberNode; int PointIndex; float X; diff --git a/alliance/src/xgra/src/XME_dialog.c b/alliance/src/xgra/src/XME_dialog.c index 685dc5c9..fb3166eb 100644 --- a/alliance/src/xgra/src/XME_dialog.c +++ b/alliance/src/xgra/src/XME_dialog.c @@ -58,6 +58,7 @@ # include "XME_dialog.h" # include "XME_edit.h" +# include "XME_search.h" /*------------------------------------------------------------\ | | diff --git a/alliance/src/xgra/src/XME_edit.c b/alliance/src/xgra/src/XME_edit.c index c0f80ed3..c663e54b 100644 --- a/alliance/src/xgra/src/XME_edit.c +++ b/alliance/src/xgra/src/XME_edit.c @@ -56,7 +56,10 @@ # include "XMV.h" # include "XME.h" +# include "XTB_dialog.h" # include "XME_edit.h" +# include "XME_panel.h" +# include "XME_select.h" # include "XME_message.h" /*------------------------------------------------------------\ @@ -82,7 +85,6 @@ static char XgraIdentifyMessage[ XGRA_IDENTIFY_MESSAGE_SIZE ]; static char XgraIdentifyBuffer [ XGRA_IDENTIFY_BUFFER_SIZE ]; - static char XgraIdentifyLocout [ XGRA_IDENTIFY_LOCOUT_SIZE ]; static char *XgraScanIdentify; static long XgraIdentifyLength; @@ -104,7 +106,6 @@ short XgraAddIdentify( Obj ) { autnode_list *Node; autarc_list *Arc; - char *ScanString; long Length; autbegin(); @@ -159,7 +160,6 @@ void XgraEditIdentify( X1, Y1 ) long Y1; { xgraselect_list *Select; - xgraobj_list *Obj; strcpy( XgraIdentifyMessage, "No element found !" ); @@ -193,7 +193,6 @@ void XgraEditConnected( X1, Y1 ) long Y1; { xgraselect_list *Select; - xgraselect_list **PrevSelect; xgraobj_list *Obj; if ( XgraHeadConnect != (xgraselect_list *)NULL ) diff --git a/alliance/src/xgra/src/XME_menu.c b/alliance/src/xgra/src/XME_menu.c index 76377099..5854accc 100644 --- a/alliance/src/xgra/src/XME_menu.c +++ b/alliance/src/xgra/src/XME_menu.c @@ -127,7 +127,9 @@ (XgraMenuItem *)NULL } , - NULL + { + NULL + } }; /*------------------------------------------------------------\ diff --git a/alliance/src/xgra/src/XME_panel.c b/alliance/src/xgra/src/XME_panel.c index 76eb8059..7dfbce3d 100644 --- a/alliance/src/xgra/src/XME_panel.c +++ b/alliance/src/xgra/src/XME_panel.c @@ -45,6 +45,8 @@ # include # include # include +# include +# include # include # include # include @@ -61,6 +63,7 @@ # include "XME_dialog.h" # include "XME_edit.h" # include "XME_search.h" +# include "XME_select.h" /*------------------------------------------------------------\ | | @@ -117,7 +120,9 @@ (Widget)NULL } , - NULL + { + NULL + } }; XgraPanelItem XgraEditSearchViewPanel = @@ -187,7 +192,9 @@ (Widget)NULL } , - NULL + { + NULL + } }; XgraPanelItem XgraEditIdentifyPanel = @@ -271,7 +278,9 @@ (Widget)NULL } , - NULL + { + NULL + } }; XgraPanelItem XgraEditSelectPanel = @@ -485,7 +494,7 @@ void XgraDisplaySelectList( Message ) else { Label = XmStringCreateSimple( Message ); - XmListAddItem( XgraEditSelectButton[ 0 ].BUTTON , Label , NULL ); + XmListAddItem( XgraEditSelectButton[ 0 ].BUTTON , Label , 0 ); XmStringFree( Label ); } diff --git a/alliance/src/xgra/src/XME_search.c b/alliance/src/xgra/src/XME_search.c index 409714e3..df3bd020 100644 --- a/alliance/src/xgra/src/XME_search.c +++ b/alliance/src/xgra/src/XME_search.c @@ -57,6 +57,7 @@ # include "XMV.h" # include "XME_search.h" +# include "XTB_dialog.h" /*------------------------------------------------------------\ | | diff --git a/alliance/src/xgra/src/XME_select.c b/alliance/src/xgra/src/XME_select.c index effd34ad..637b6729 100644 --- a/alliance/src/xgra/src/XME_select.c +++ b/alliance/src/xgra/src/XME_select.c @@ -59,6 +59,7 @@ # include "XMV.h" # include "XME_select.h" +# include "XME_panel.h" /*------------------------------------------------------------\ | | diff --git a/alliance/src/xgra/src/XME_select.h b/alliance/src/xgra/src/XME_select.h index f72c9c02..ac4380b3 100644 --- a/alliance/src/xgra/src/XME_select.h +++ b/alliance/src/xgra/src/XME_select.h @@ -65,5 +65,9 @@ \------------------------------------------------------------*/ extern void XgraEditSelectObject(); + extern void XgraEditSelectPoint(); + extern void XgraAddSelectList(); + extern void XgraEditSelectAccept(); + extern void XgraEditSelectCancel(); # endif diff --git a/alliance/src/xgra/src/XMF_menu.c b/alliance/src/xgra/src/XMF_menu.c index 1f68ec29..d5117e1f 100644 --- a/alliance/src/xgra/src/XMF_menu.c +++ b/alliance/src/xgra/src/XMF_menu.c @@ -77,7 +77,7 @@ | | \------------------------------------------------------------*/ - static XgraFirstFileOpen = 1; + static int XgraFirstFileOpen = 1; /*------------------------------------------------------------\ | | @@ -120,7 +120,9 @@ (XgraMenuItem *)NULL } , - NULL + { + NULL + } }; /*------------------------------------------------------------\ diff --git a/alliance/src/xgra/src/XMF_panel.c b/alliance/src/xgra/src/XMF_panel.c index 87cef184..1c56b988 100644 --- a/alliance/src/xgra/src/XMF_panel.c +++ b/alliance/src/xgra/src/XMF_panel.c @@ -65,6 +65,7 @@ # include "XMF_panel.h" # include "XMF_dialog.h" +# include "XTB_dialog.h" /*------------------------------------------------------------\ | | @@ -113,7 +114,7 @@ static char *XGRA_WORK_LIB = (char *)NULL; static char *XGRA_DEFAULT_LIB = (char *)NULL; - static char XgraFirstLibrary = 1; + static int XgraFirstLibrary = 1; /*------------------------------------------------------------\ | | @@ -191,12 +192,12 @@ void XgraSetLibraryList() Index++ ) { Label = XmStringCreateSimple( XGRA_CATA_LIB[ Index ] ); - XmListAddItem( XgraLibraryList , Label , NULL ); + XmListAddItem( XgraLibraryList , Label , 0 ); XmStringFree( Label ); } Label = XmStringCreateSimple( XGRA_WORK_LIB ); - XmListAddItem( XgraLibraryList , Label , NULL ); + XmListAddItem( XgraLibraryList , Label , 0 ); XmStringFree( Label ); XGRA_DEFAULT_LIB = (char *)NULL; diff --git a/alliance/src/xgra/src/XMF_panel.h b/alliance/src/xgra/src/XMF_panel.h index 23f688e1..15e4cc05 100644 --- a/alliance/src/xgra/src/XMF_panel.h +++ b/alliance/src/xgra/src/XMF_panel.h @@ -75,5 +75,6 @@ extern void CallbackLibraryUpdate(); extern void CallbackLibraryCancel(); extern void CallbackEnterLibrary(); + extern void XgraBuildPanelLibrary(); # endif diff --git a/alliance/src/xgra/src/XMH_menu.c b/alliance/src/xgra/src/XMH_menu.c index 341b05d6..29ceebc5 100644 --- a/alliance/src/xgra/src/XMH_menu.c +++ b/alliance/src/xgra/src/XMH_menu.c @@ -96,7 +96,9 @@ (XgraMenuItem *)NULL } , - NULL + { + NULL + } }; /*------------------------------------------------------------\ diff --git a/alliance/src/xgra/src/XMH_panel.c b/alliance/src/xgra/src/XMH_panel.c index 446e7294..1a224607 100644 --- a/alliance/src/xgra/src/XMH_panel.c +++ b/alliance/src/xgra/src/XMH_panel.c @@ -64,6 +64,7 @@ # include "XMH.h" # include "XMH_panel.h" +# include "XTB_dialog.h" /*------------------------------------------------------------\ | | diff --git a/alliance/src/xgra/src/XMS_menu.c b/alliance/src/xgra/src/XMS_menu.c index 1ece033d..653b11ae 100644 --- a/alliance/src/xgra/src/XMS_menu.c +++ b/alliance/src/xgra/src/XMS_menu.c @@ -139,7 +139,9 @@ (XgraMenuItem *)NULL } , - NULL + { + NULL + } }; diff --git a/alliance/src/xgra/src/XMS_panel.c b/alliance/src/xgra/src/XMS_panel.c index 457d6567..2ca243cf 100644 --- a/alliance/src/xgra/src/XMS_panel.c +++ b/alliance/src/xgra/src/XMS_panel.c @@ -45,6 +45,7 @@ # include # include # include +# include # include # include # include @@ -57,6 +58,7 @@ # include "XMS.h" # include "XMS_panel.h" +# include "XTB_dialog.h" /*------------------------------------------------------------\ | | @@ -118,7 +120,9 @@ (Widget)NULL } , - NULL + { + NULL + } }; XgraPanelItem XgraSetupInformationsPanel = diff --git a/alliance/src/xgra/src/XMS_setup.c b/alliance/src/xgra/src/XMS_setup.c index 43ea62d0..44b55579 100644 --- a/alliance/src/xgra/src/XMS_setup.c +++ b/alliance/src/xgra/src/XMS_setup.c @@ -59,6 +59,7 @@ # include "XMH.h" # include "XMS_setup.h" +# include "XMV_panel.h" /*------------------------------------------------------------\ | | @@ -209,7 +210,7 @@ void XgraReadPanelValues( Panel ) autbegin(); - fscanf( FileConfig, "X: %d, Y: %d, WIDTH: %d, HEIGHT: %d, MANAGED: %d\n", + fscanf( FileConfig, "X: %11d, Y: %11d, WIDTH: %11d, HEIGHT: %11d, MANAGED: %11d\n", &Values[0], &Values[1], &Values[2], &Values[3], &Values[4] ); XgraSetPanelValues( Panel, Values ); @@ -231,7 +232,7 @@ char XgraReadTopLevelValues() autbegin(); - fscanf( FileConfig, "VERSION: %s\n", Version ); + fscanf( FileConfig, "VERSION: %63s\n", Version ); if ( strcmp( Version, ALLIANCE_VERSION ) ) { @@ -239,7 +240,7 @@ char XgraReadTopLevelValues() return( 0 ); } - fscanf( FileConfig, "X: %d, Y: %d, WIDTH: %d, HEIGHT: %d, MANAGED: %d\n", + fscanf( FileConfig, "X: %11d, Y: %11d, WIDTH: %11d, HEIGHT: %11d, MANAGED: %11d\n", &Values[0], &Values[1], &Values[2], &Values[3], &Values[4] ); XtVaSetValues( XgraTopLevel, @@ -268,14 +269,14 @@ void XgraReadActiveLayers() for ( Layer = 0; Layer < XGRA_MAX_LAYER; Layer++ ) { - fscanf( FileConfig, "ACTIVE: %d\n", &Value ); + fscanf( FileConfig, "ACTIVE: %11d\n", &Value ); XGRA_ACTIVE_LAYER_TABLE[ Layer ] = Value; } for ( Layer = 0; Layer < XGRA_MAX_ACTIVE_NAME; Layer++ ) { - fscanf( FileConfig, "ACTIVE: %d\n", &Value ); + fscanf( FileConfig, "ACTIVE: %11d\n", &Value ); XGRA_ACTIVE_NAME_TABLE[ Layer ] = Value; } @@ -292,7 +293,7 @@ void XgraReadActiveLayers() void XgraWriteActiveLayers() { - char Layer; + int Layer; autbegin(); @@ -424,7 +425,7 @@ void XgraLoadTopLevelConfig() void XgraLoadConfig( Message ) - char Message; + int Message; { autbegin(); diff --git a/alliance/src/xgra/src/XMT_menu.c b/alliance/src/xgra/src/XMT_menu.c index 9c9ec582..7ed13745 100644 --- a/alliance/src/xgra/src/XMT_menu.c +++ b/alliance/src/xgra/src/XMT_menu.c @@ -94,7 +94,9 @@ (XgraMenuItem *)NULL } , - NULL + { + NULL + } }; /*------------------------------------------------------------\ diff --git a/alliance/src/xgra/src/XMT_panel.c b/alliance/src/xgra/src/XMT_panel.c index 06bcb6b8..ad98a8c5 100644 --- a/alliance/src/xgra/src/XMT_panel.c +++ b/alliance/src/xgra/src/XMT_panel.c @@ -45,6 +45,7 @@ # include # include # include +# include # include # include # include @@ -117,7 +118,9 @@ (Widget)NULL } , - NULL + { + NULL + } }; XgraPanelItem XgraToolsMessagePanel = diff --git a/alliance/src/xgra/src/XMV_map.c b/alliance/src/xgra/src/XMV_map.c index d5c9167a..8298ee50 100644 --- a/alliance/src/xgra/src/XMV_map.c +++ b/alliance/src/xgra/src/XMV_map.c @@ -218,14 +218,12 @@ void CallbackMapEvent ( MyWidget, Event, Args, Argc ) String *Args; int *Argc; { - Display *EventDisplay; char MouseEvent; long X; long Y; autbegin(); - EventDisplay = Event->display; MouseEvent = Args[ 0 ][ 0 ] - '0'; X = Event->x; @@ -302,12 +300,8 @@ void CallbackMapExpose( MyWidget, ClientData, CallData ) XtPointer ClientData; XmDrawingAreaCallbackStruct *CallData; { - XExposeEvent *ExposeEvent; - autbegin(); - ExposeEvent = (XExposeEvent *)CallData->event; - if ( XgraFirstExpose ) { XgraFirstExpose = XGRA_FALSE; diff --git a/alliance/src/xgra/src/XMV_menu.c b/alliance/src/xgra/src/XMV_menu.c index a23554cf..3ee6da43 100644 --- a/alliance/src/xgra/src/XMV_menu.c +++ b/alliance/src/xgra/src/XMV_menu.c @@ -58,6 +58,7 @@ # include "XMV_dialog.h" # include "XMV_view.h" # include "XMV_map.h" +# include "XMV_panel.h" /*------------------------------------------------------------\ | | @@ -166,7 +167,9 @@ (XgraMenuItem *)NULL } , - NULL + { + NULL + } }; /*------------------------------------------------------------\ diff --git a/alliance/src/xgra/src/XMV_panel.c b/alliance/src/xgra/src/XMV_panel.c index afe0f0d7..1a260c9e 100644 --- a/alliance/src/xgra/src/XMV_panel.c +++ b/alliance/src/xgra/src/XMV_panel.c @@ -236,7 +236,9 @@ (Widget)NULL } , - NULL + { + NULL + } }; XgraPanelItem XgraViewArrowsPanel = @@ -424,7 +426,9 @@ (Widget)NULL } , - NULL + { + NULL + } }; XgraPanelItem XgraViewZoomPanel = @@ -521,7 +525,9 @@ (Widget)NULL } , - NULL + { + NULL + } }; XgraPanelItem XgraViewGridPanel = @@ -910,7 +916,9 @@ (Widget)NULL } , - NULL + { + NULL + } }; XgraPanelItem XgraViewLayerPanel = diff --git a/alliance/src/xgra/src/XMV_panel.h b/alliance/src/xgra/src/XMV_panel.h index 8e3ac8a5..16715216 100644 --- a/alliance/src/xgra/src/XMV_panel.h +++ b/alliance/src/xgra/src/XMV_panel.h @@ -115,6 +115,7 @@ extern void CallbackLayerApply(); extern void CallbackCloseLayer(); + extern void XgraInitializeLayer(); extern void XgraSetLayerVisible(); extern void XgraSetLayerInvisible(); extern void XgraSetNameVisible(); diff --git a/alliance/src/xgra/src/XMV_view.c b/alliance/src/xgra/src/XMV_view.c index deb76429..15ab678d 100644 --- a/alliance/src/xgra/src/XMV_view.c +++ b/alliance/src/xgra/src/XMV_view.c @@ -54,6 +54,7 @@ # include "XMV.h" # include "XMV_view.h" +# include "XMX_grid.h" /*------------------------------------------------------------\ | | diff --git a/alliance/src/xgra/src/XMX.h b/alliance/src/xgra/src/XMX.h index d104f7b8..fd84ae17 100644 --- a/alliance/src/xgra/src/XMX.h +++ b/alliance/src/xgra/src/XMX.h @@ -192,8 +192,8 @@ | | \------------------------------------------------------------*/ - extern char XgraCountEventZoom; - extern char XgraCountEventEdit; + extern int XgraCountEventZoom; + extern int XgraCountEventEdit; /*------------------------------------------------------------\ | | diff --git a/alliance/src/xgra/src/XMX_color.c b/alliance/src/xgra/src/XMX_color.c index 95843775..2be3b83c 100644 --- a/alliance/src/xgra/src/XMX_color.c +++ b/alliance/src/xgra/src/XMX_color.c @@ -117,7 +117,6 @@ void XgraInitializeColors() { XColor ForgetIt; XColor GetIt; - Window Root; int Counter; Colormap ColorMap; char Error; diff --git a/alliance/src/xgra/src/XMX_cursor.c b/alliance/src/xgra/src/XMX_cursor.c index 9352c27c..f6f996f1 100644 --- a/alliance/src/xgra/src/XMX_cursor.c +++ b/alliance/src/xgra/src/XMX_cursor.c @@ -88,9 +88,9 @@ Position XgraCursorY = 0; Position XgraCursorSaveX = 0; Position XgraCursorSaveY = 0; - char XgraCursorSaved = XGRA_FALSE; - char XgraCursorInside = XGRA_FALSE; - char XgraCursorType = XGRA_INPUT_HALF_BOX; + int XgraCursorSaved = XGRA_FALSE; + int XgraCursorInside = XGRA_FALSE; + int XgraCursorType = XGRA_INPUT_HALF_BOX; long XgraUnitCursorX = 0; long XgraUnitCursorY = 0; @@ -99,7 +99,7 @@ long XgraUnitCursorSaveX[ 2 ] = { 0, 0 }; long XgraUnitCursorSaveY[ 2 ] = { 0, 0 }; - char XgraCursorIndex = 0; + int XgraCursorIndex = 0; /*------------------------------------------------------------\ | | @@ -163,16 +163,16 @@ void XgraDisplayCoordinates() { autbegin(); - sprintf( XgraCursorBuffer, "%d", XgraUnitCursorX ); + sprintf( XgraCursorBuffer, "%ld", XgraUnitCursorX ); XgraDisplayMessage( XGRA_MESSAGE_X, XgraCursorBuffer ); - sprintf( XgraCursorBuffer, "%d", XgraUnitCursorY ); + sprintf( XgraCursorBuffer, "%ld", XgraUnitCursorY ); XgraDisplayMessage( XGRA_MESSAGE_Y, XgraCursorBuffer ); - sprintf( XgraCursorBuffer, "%d", XgraUnitCursorX - XgraUnitCursorSaveX[0] ); + sprintf( XgraCursorBuffer, "%ld", XgraUnitCursorX - XgraUnitCursorSaveX[0] ); XgraDisplayMessage( XGRA_MESSAGE_DX, XgraCursorBuffer ); - sprintf( XgraCursorBuffer, "%d", XgraUnitCursorY - XgraUnitCursorSaveY[0] ); + sprintf( XgraCursorBuffer, "%ld", XgraUnitCursorY - XgraUnitCursorSaveY[0] ); XgraDisplayMessage( XGRA_MESSAGE_DY, XgraCursorBuffer ); autend(); diff --git a/alliance/src/xgra/src/XMX_cursor.h b/alliance/src/xgra/src/XMX_cursor.h index f304872e..97d04fbe 100644 --- a/alliance/src/xgra/src/XMX_cursor.h +++ b/alliance/src/xgra/src/XMX_cursor.h @@ -69,8 +69,8 @@ extern Position XgraCursorY; extern Position XgraCursorSaveX; extern Position XgraCursorSaveY; - extern char XgraCursorSaved; - extern char XgraCursorInside; + extern int XgraCursorSaved; + extern int XgraCursorInside; extern long XgraLambdaCursorX; extern long XgraLambdaCursorY; diff --git a/alliance/src/xgra/src/XMX_event.c b/alliance/src/xgra/src/XMX_event.c index 776be062..24725703 100644 --- a/alliance/src/xgra/src/XMX_event.c +++ b/alliance/src/xgra/src/XMX_event.c @@ -59,12 +59,17 @@ # include "XMF.h" # include "XMS.h" # include "XMH.h" +# include "XGR.h" +# include "XMF_file.h" +# include "XMX_view.h" +# include "XMX_graphic.h" # include "XMX_motif.h" # include "XMX_grid.h" # include "XMX_cursor.h" # include "XMX_event.h" # include "XMX_message.h" +# include "XMV_view.h" /*------------------------------------------------------------\ | | @@ -160,15 +165,15 @@ static long XgraUnitEventZoomX[ 2 ] = { 0, 0 }; static long XgraUnitEventZoomY[ 2 ] = { 0, 0 }; - static char XgraMaxEventZoom = 0; - char XgraCountEventZoom = 0; + static int XgraMaxEventZoom = 0; + int XgraCountEventZoom = 0; static long XgraUnitEventEditX[ 2 ] = { 0, 0 }; static long XgraUnitEventEditY[ 2 ] = { 0, 0 }; - static char XgraMaxEventEdit = 2; - char XgraCountEventEdit = 0; + static int XgraMaxEventEdit = 2; + int XgraCountEventEdit = 0; - static char XgraFirstExpose = XGRA_TRUE; + static int XgraFirstExpose = XGRA_TRUE; /*------------------------------------------------------------\ | | @@ -176,10 +181,10 @@ | | \------------------------------------------------------------*/ - static char XgraInputMode = XGRA_INPUT_HALF_BOX; - static char XgraSaveInputMode = XGRA_INPUT_HALF_BOX; - static char XgraEditMode = XGRA_EDIT_MEASURE; - static char XgraSaveEditMode = XGRA_EDIT_MEASURE; + static int XgraInputMode = XGRA_INPUT_HALF_BOX; + static int XgraSaveInputMode = XGRA_INPUT_HALF_BOX; + static int XgraEditMode = XGRA_EDIT_MEASURE; + static int XgraSaveEditMode = XGRA_EDIT_MEASURE; /*------------------------------------------------------------\ | | @@ -203,7 +208,7 @@ void XgraChangeEditMode( EditMode , PromptMessage ) - char EditMode; + int EditMode; void (*PromptMessage)(); { autbegin(); @@ -268,9 +273,9 @@ void XgraChangeEditMode( EditMode , PromptMessage ) void XgraContinueEditMode( EditMode , PromptMessage, CountEvent ) - char EditMode; + int EditMode; void (*PromptMessage)(); - char CountEvent; + int CountEvent; { autbegin(); @@ -446,15 +451,12 @@ void CallbackEvent ( MyWidget, Event, Args, Argc ) String *Args; int *Argc; { - Display *EventDisplay; char MouseEvent; Position OldUnitCursorX; Position OldUnitCursorY; autbegin(); - EventDisplay = Event->display; - MouseEvent = atoi( Args[ 0 ] ); if ( MouseEvent == XGRA_LEAVE ) diff --git a/alliance/src/xgra/src/XMX_graphic.h b/alliance/src/xgra/src/XMX_graphic.h index 94aa8f8f..cf4870d8 100644 --- a/alliance/src/xgra/src/XMX_graphic.h +++ b/alliance/src/xgra/src/XMX_graphic.h @@ -68,5 +68,6 @@ \------------------------------------------------------------*/ extern void XgraInitializeGraphic(); + extern void XgraInitializeGraphicWindow(); # endif diff --git a/alliance/src/xgra/src/XMX_grid.c b/alliance/src/xgra/src/XMX_grid.c index 65806290..829f66ce 100644 --- a/alliance/src/xgra/src/XMX_grid.c +++ b/alliance/src/xgra/src/XMX_grid.c @@ -212,6 +212,8 @@ char XgraDisplayUnitGrid( GraphicX1, GraphicY1, GraphicX2, GraphicY2 ) if ( XgraUnitUserGrid == 1 ) { + Check = ( XGRA_LOWER_GRID_STEP * 2 / XgraUnitUserGridDy ); +#if 0 if ( XgraUnitUserGridDx > XgraUnitUserGridDy ) { Check = ( XGRA_LOWER_GRID_STEP * 2 / XgraUnitUserGridDy ); @@ -220,6 +222,7 @@ char XgraDisplayUnitGrid( GraphicX1, GraphicY1, GraphicX2, GraphicY2 ) { Check = ( XGRA_LOWER_GRID_STEP * 2 / XgraUnitUserGridDy ); } +#endif if ( XgraUnitGridStep < Check ) UserGrid = 0; else UserGrid = 1; diff --git a/alliance/src/xgra/src/XMX_grid.h b/alliance/src/xgra/src/XMX_grid.h index c4017e1f..3a2caaf4 100644 --- a/alliance/src/xgra/src/XMX_grid.h +++ b/alliance/src/xgra/src/XMX_grid.h @@ -73,4 +73,7 @@ | | \------------------------------------------------------------*/ + extern void XgraInitializeUnitGrid(); + extern char XgraDisplayUnitGrid(); + # endif diff --git a/alliance/src/xgra/src/XMX_menu.c b/alliance/src/xgra/src/XMX_menu.c index b69d3d7b..872ff6fb 100644 --- a/alliance/src/xgra/src/XMX_menu.c +++ b/alliance/src/xgra/src/XMX_menu.c @@ -170,7 +170,9 @@ XgraHelpMenu } , - NULL + { + NULL + } }; /*------------------------------------------------------------\ diff --git a/alliance/src/xgra/src/XMX_message.c b/alliance/src/xgra/src/XMX_message.c index c01743d1..6560a1dc 100644 --- a/alliance/src/xgra/src/XMX_message.c +++ b/alliance/src/xgra/src/XMX_message.c @@ -142,7 +142,7 @@ void XgraDisplayMessage( Where, Text ) - char Where; + int Where; char *Text; { XmString TextString; diff --git a/alliance/src/xgra/src/XMX_motif.c b/alliance/src/xgra/src/XMX_motif.c index 4c4b90d3..af0f9cb7 100644 --- a/alliance/src/xgra/src/XMX_motif.c +++ b/alliance/src/xgra/src/XMX_motif.c @@ -65,6 +65,8 @@ # include "XMX_color.h" # include "XMX_panel.h" # include "XMX_dialog.h" +# include "XMX_icon.h" +# include "XMF_panel.h" /*------------------------------------------------------------\ | | diff --git a/alliance/src/xgra/src/XMX_view.c b/alliance/src/xgra/src/XMX_view.c index 22a93395..92e996b3 100644 --- a/alliance/src/xgra/src/XMX_view.c +++ b/alliance/src/xgra/src/XMX_view.c @@ -179,13 +179,13 @@ void XgraDelView() void XgraInterruptDisplay() { + autbegin(); + +# ifdef XGRA_CTRL_C XEvent Event; KeySym Key; char Text; - autbegin(); - -# ifdef XGRA_CTRL_C if ( XCheckTypedEvent( XgraGraphicDisplay, KeyPress, &Event ) ) { XLookupString( &Event.xkey, &Text, 1, &Key, 0 ); @@ -213,11 +213,11 @@ void XgraInterruptDisplay() void XgraFlushEventDisplay() { - XEvent Event; - autbegin(); # ifdef XGRA_CTRL_C + XEvent Event; + while ( XCheckTypedEvent( XgraGraphicDisplay, KeyPress, &Event ) ); # endif diff --git a/alliance/src/xgra/src/XMX_view.h b/alliance/src/xgra/src/XMX_view.h index b6e83f4e..53b4fcde 100644 --- a/alliance/src/xgra/src/XMX_view.h +++ b/alliance/src/xgra/src/XMX_view.h @@ -43,8 +43,8 @@ | | \------------------------------------------------------------*/ -# ifndef XGRA_VIEW -# define XGRA_VIEW +# ifndef XGRA_XMX_VIEW +# define XGRA_XMX_VIEW /*------------------------------------------------------------\ | | diff --git a/alliance/src/xgra/src/XSB_error.h b/alliance/src/xgra/src/XSB_error.h index c002b72f..594d6799 100644 --- a/alliance/src/xgra/src/XSB_error.h +++ b/alliance/src/xgra/src/XSB_error.h @@ -85,4 +85,6 @@ | | \------------------------------------------------------------*/ + extern void XsbError(); + # endif diff --git a/alliance/src/xgra/src/XSB_parse.c b/alliance/src/xgra/src/XSB_parse.c index 6fe281d0..baba3e79 100644 --- a/alliance/src/xgra/src/XSB_parse.c +++ b/alliance/src/xgra/src/XSB_parse.c @@ -122,7 +122,7 @@ static keyword KeywordDefine[ XSB_MAX_KEYWORD ] = { - "None", 0 + { "None", 0 } }; /*------------------------------------------------------------\ @@ -152,7 +152,7 @@ char *XsbFileGetString( String, Size ) int Size; { register char *RegisterString; - register Register; + register int Register = 0; autbegin(); @@ -215,7 +215,7 @@ void XsbGetLine( Buffer ) XsbError( UNEXPECTED_EOF, (char *)NULL, XsbCurrentLine ); } - if ( String = strchr( Buffer, XSB_COMMENT_CHAR )) + if ( (String = strchr( Buffer, XSB_COMMENT_CHAR )) ) { if ( String == Buffer ) { @@ -279,7 +279,7 @@ char *XsbGetFirstWord( Buffer, IsKeyword, Hash ) autbegin(); - if ( String = (char *)strtok( Buffer, XSB_SEPARATORS_STRING )) + if ( (String = (char *)strtok( Buffer, XSB_SEPARATORS_STRING )) ) { if ( Hash ) { @@ -324,7 +324,7 @@ char *XsbGetNextWord( IsKeyword, Hash ) autbegin(); - if ( String = (char *)strtok( (char *)NULL, XSB_SEPARATORS_STRING )) + if ( (String = (char *)strtok( (char *)NULL, XSB_SEPARATORS_STRING )) ) { if ( Hash ) { @@ -382,7 +382,7 @@ long XsbGetStringValue( String ) autbegin(); - if ( sscanf( String, "%d", &Value) ) + if ( sscanf( String, "%22ld", &Value) ) { autend(); return ( Value ); @@ -418,7 +418,7 @@ float XsbGetStringFloat( String ) autbegin(); - if ( ! sscanf( String, "%g", &Value) ) + if ( ! sscanf( String, "%32g", &Value) ) { XsbError( ILLEGAL_FLOAT, String, XsbCurrentLine ); } @@ -441,7 +441,7 @@ long XsbGetNumber( String ) autbegin(); - if ( ! sscanf( String, "%d", &Value )) + if ( ! sscanf( String, "%22ld", &Value )) { XsbError( UNEXPECTED_LINE, "number", XsbCurrentLine ); } @@ -460,10 +460,10 @@ long XsbGetNumber( String ) void XsbReadLayerName() { - char Layer; - char LayerCount; - char EndTable; - char Field; + int Layer; + int LayerCount; + int EndTable; + int Field; char *FirstWord; autbegin(); diff --git a/alliance/src/xgra/src/XTB_cursor.c b/alliance/src/xgra/src/XTB_cursor.c index 7f6aedb2..ab01bd70 100644 --- a/alliance/src/xgra/src/XTB_cursor.c +++ b/alliance/src/xgra/src/XTB_cursor.c @@ -46,6 +46,7 @@ # include # include # include +# include # include "mut.h" # include "aut.h" # include "XTB.h" @@ -104,7 +105,7 @@ void XgraSetMouseCursor( MainWidget, CursorType ) Widget MainWidget; - char CursorType; + int CursorType; { Display *DisplayId; Window MainWindow; diff --git a/alliance/src/xgra/src/XTB_dialog.c b/alliance/src/xgra/src/XTB_dialog.c index 0a62545d..d44a76dd 100644 --- a/alliance/src/xgra/src/XTB_dialog.c +++ b/alliance/src/xgra/src/XTB_dialog.c @@ -71,7 +71,7 @@ | | \------------------------------------------------------------*/ - static XgraLockLoop = 0; + static int XgraLockLoop = 0; static XgraDialogItem XgraWarningDialog = diff --git a/alliance/src/xgra/src/XTB_dialog.h b/alliance/src/xgra/src/XTB_dialog.h index d4086ab4..2ab025cd 100644 --- a/alliance/src/xgra/src/XTB_dialog.h +++ b/alliance/src/xgra/src/XTB_dialog.h @@ -67,4 +67,6 @@ | | \------------------------------------------------------------*/ + extern void XgraLimitedLoop(); + # endif diff --git a/alliance/src/xgra/src/xgra.c b/alliance/src/xgra/src/xgra.c index c912078d..b42e52cd 100644 --- a/alliance/src/xgra/src/xgra.c +++ b/alliance/src/xgra/src/xgra.c @@ -54,6 +54,7 @@ # include "XSB.h" # include "XMX.h" +# include "XGR_error.h" # include "xgra.h" /*------------------------------------------------------------\ diff --git a/alliance/src/xpat/src/XME_dialog.c b/alliance/src/xpat/src/XME_dialog.c index 591fcb8a..9b69066a 100644 --- a/alliance/src/xpat/src/XME_dialog.c +++ b/alliance/src/xpat/src/XME_dialog.c @@ -60,6 +60,7 @@ # include "XME_dialog.h" # include "XME_edit.h" +# include "XME_search.h" /*------------------------------------------------------------\ | | diff --git a/alliance/src/xpat/src/XME_edit.c b/alliance/src/xpat/src/XME_edit.c index d452deb2..6f14ea14 100644 --- a/alliance/src/xpat/src/XME_edit.c +++ b/alliance/src/xpat/src/XME_edit.c @@ -58,6 +58,10 @@ # include "XME_edit.h" # include "XME_message.h" +# include "XME_select.h" +# include "XME_panel.h" +# include "XMV_view.h" +# include "XTB_dialog.h" /*------------------------------------------------------------\ | | @@ -82,7 +86,6 @@ static char XpatIdentifyMessage[ XPAT_IDENTIFY_MESSAGE_SIZE ]; static char XpatIdentifyBuffer [ XPAT_IDENTIFY_BUFFER_SIZE ]; - static char XpatIdentifyLocout [ XPAT_IDENTIFY_LOCOUT_SIZE ]; static char *XpatScanIdentify; static long XpatIdentifyLength; @@ -133,10 +136,10 @@ short XpatAddIdentify( Obj, X1, Y1 ) if ( ( Y < NumberIO ) && ( Y >= 0 ) ) { - Unit = XpatTimeUnit[ XpatFigurePat->TIME_UNIT ]; + Unit = XpatTimeUnit[ (int)XpatFigurePat->TIME_UNIT ]; TimeDelta = XpatFigurePat->TIME_DELTA; - sprintf( XpatIdentifyBuffer, " IO NAME : %s\n IO MODE: %s\n PREV CHANGE : %d %s\n CURRENT TIME : %d %s\n NEXT CHANGE : %d %s\n VALUE : %s\n\n", + sprintf( XpatIdentifyBuffer, " IO NAME : %s\n IO MODE: %s\n PREV CHANGE : %ld %s\n CURRENT TIME : %ld %s\n NEXT CHANGE : %ld %s\n VALUE : %s\n\n", NameArray[ Y ], ModeArray[ Y ], X * TimeDelta, Unit, X1 * TimeDelta, Unit, @@ -172,7 +175,6 @@ void XpatEditIdentify( X1, Y1 ) long Y1; { xpatselect_list *Select; - xpatobj_list *Obj; strcpy( XpatIdentifyMessage, "No element found !" ); @@ -210,7 +212,6 @@ void XpatEditConnected( X1, Y1 ) long Y1; { xpatselect_list *Select; - xpatselect_list **PrevSelect; xpatobj_list *Obj; if ( XpatHeadConnect != (xpatselect_list *)NULL ) @@ -319,8 +320,6 @@ void XpatEditDelCursor( X1, Y1 ) long Y1; { xpatselect_list *Select; - xpatselect_list **PrevSelect; - xpatobj_list *Obj; if ( XpatHeadConnect != (xpatselect_list *)NULL ) { diff --git a/alliance/src/xpat/src/XME_menu.c b/alliance/src/xpat/src/XME_menu.c index d2492e6d..72600a76 100644 --- a/alliance/src/xpat/src/XME_menu.c +++ b/alliance/src/xpat/src/XME_menu.c @@ -161,7 +161,9 @@ (XpatMenuItem *)NULL } , - NULL + { + NULL + } }; /*------------------------------------------------------------\ diff --git a/alliance/src/xpat/src/XME_panel.c b/alliance/src/xpat/src/XME_panel.c index 1011e62d..24548066 100644 --- a/alliance/src/xpat/src/XME_panel.c +++ b/alliance/src/xpat/src/XME_panel.c @@ -45,6 +45,8 @@ # include # include # include +# include +# include # include # include # include @@ -63,6 +65,7 @@ # include "XME_dialog.h" # include "XME_edit.h" # include "XME_search.h" +# include "XME_select.h" /*------------------------------------------------------------\ | | @@ -119,7 +122,9 @@ (Widget)NULL } , - NULL + { + NULL + } }; XpatPanelItem XpatEditSearchViewPanel = @@ -189,7 +194,9 @@ (Widget)NULL } , - NULL + { + NULL + } }; XpatPanelItem XpatEditIdentifyPanel = @@ -273,7 +280,9 @@ (Widget)NULL } , - NULL + { + NULL + } }; XpatPanelItem XpatEditSelectPanel = diff --git a/alliance/src/xpat/src/XME_search.c b/alliance/src/xpat/src/XME_search.c index bf087e9b..40fd1961 100644 --- a/alliance/src/xpat/src/XME_search.c +++ b/alliance/src/xpat/src/XME_search.c @@ -55,8 +55,11 @@ # include "XMX.h" # include "XPT.h" # include "XME.h" +# include "XMV.h" # include "XME_search.h" +# include "XTB_dialog.h" +# include "XMV_view.h" /*------------------------------------------------------------\ | | diff --git a/alliance/src/xpat/src/XME_select.c b/alliance/src/xpat/src/XME_select.c index 12bed761..2ebfeb3f 100644 --- a/alliance/src/xpat/src/XME_select.c +++ b/alliance/src/xpat/src/XME_select.c @@ -59,6 +59,8 @@ # include "XME.h" # include "XME_select.h" +# include "XME_panel.h" +# include "XMV_view.h" /*------------------------------------------------------------\ | | @@ -232,7 +234,6 @@ char XpatEditObjectNearPoint( Obj, X1, Y1 ) float LineY; float Norm; float Distance; - float MinDistance; Type = GetXpatObjectType( Obj ); diff --git a/alliance/src/xpat/src/XME_select.h b/alliance/src/xpat/src/XME_select.h index dcac873a..b9be15b7 100644 --- a/alliance/src/xpat/src/XME_select.h +++ b/alliance/src/xpat/src/XME_select.h @@ -65,5 +65,9 @@ \------------------------------------------------------------*/ extern void XpatEditSelectObject(); + extern void XpatEditSelectPoint(); + extern void XpatAddSelectList(); + extern void XpatEditSelectAccept(); + extern void XpatEditSelectCancel(); # endif diff --git a/alliance/src/xpat/src/XMF_file.c b/alliance/src/xpat/src/XMF_file.c index 03854db9..941b2544 100644 --- a/alliance/src/xpat/src/XMF_file.c +++ b/alliance/src/xpat/src/XMF_file.c @@ -58,6 +58,8 @@ # include "XMX.h" # include "XTB.h" # include "XMF.h" +# include "XMT.h" +# include "XMV.h" # include "XMF_file.h" diff --git a/alliance/src/xpat/src/XMF_menu.c b/alliance/src/xpat/src/XMF_menu.c index eb90e8a6..300e329c 100644 --- a/alliance/src/xpat/src/XMF_menu.c +++ b/alliance/src/xpat/src/XMF_menu.c @@ -78,7 +78,7 @@ | | \------------------------------------------------------------*/ - static XpatFirstFileOpen = 1; + static int XpatFirstFileOpen = 1; /*------------------------------------------------------------\ | | @@ -121,7 +121,9 @@ (XpatMenuItem *)NULL } , - NULL + { + NULL + } }; /*------------------------------------------------------------\ diff --git a/alliance/src/xpat/src/XMF_panel.c b/alliance/src/xpat/src/XMF_panel.c index 0615d638..9654394d 100644 --- a/alliance/src/xpat/src/XMF_panel.c +++ b/alliance/src/xpat/src/XMF_panel.c @@ -67,6 +67,7 @@ # include "XMF_panel.h" # include "XMF_dialog.h" +# include "XTB_dialog.h" /*------------------------------------------------------------\ | | diff --git a/alliance/src/xpat/src/XMH_menu.c b/alliance/src/xpat/src/XMH_menu.c index dac77be4..6664b171 100644 --- a/alliance/src/xpat/src/XMH_menu.c +++ b/alliance/src/xpat/src/XMH_menu.c @@ -97,7 +97,9 @@ (XpatMenuItem *)NULL } , - NULL + { + NULL + } }; /*------------------------------------------------------------\ diff --git a/alliance/src/xpat/src/XMH_panel.c b/alliance/src/xpat/src/XMH_panel.c index e5e335c2..368d4dd3 100644 --- a/alliance/src/xpat/src/XMH_panel.c +++ b/alliance/src/xpat/src/XMH_panel.c @@ -64,6 +64,7 @@ # include "XMX.h" # include "XMH.h" +# include "XTB_dialog.h" # include "XMH_panel.h" # include "LIP6bw.h" diff --git a/alliance/src/xpat/src/XMS_menu.c b/alliance/src/xpat/src/XMS_menu.c index 4c19e4f1..727cad6f 100644 --- a/alliance/src/xpat/src/XMS_menu.c +++ b/alliance/src/xpat/src/XMS_menu.c @@ -140,7 +140,9 @@ (XpatMenuItem *)NULL } , - NULL + { + NULL + } }; diff --git a/alliance/src/xpat/src/XMS_panel.c b/alliance/src/xpat/src/XMS_panel.c index 14f6e304..73d4c2a0 100644 --- a/alliance/src/xpat/src/XMS_panel.c +++ b/alliance/src/xpat/src/XMS_panel.c @@ -45,6 +45,7 @@ # include # include # include +# include # include # include # include @@ -58,6 +59,7 @@ # include "XMS.h" # include "XMS_panel.h" +# include "XTB_dialog.h" /*------------------------------------------------------------\ | | @@ -119,7 +121,9 @@ (Widget)NULL } , - NULL + { + NULL + } }; XpatPanelItem XpatSetupInformationsPanel = diff --git a/alliance/src/xpat/src/XMS_setup.c b/alliance/src/xpat/src/XMS_setup.c index 472e78d5..cad25ff6 100644 --- a/alliance/src/xpat/src/XMS_setup.c +++ b/alliance/src/xpat/src/XMS_setup.c @@ -60,6 +60,7 @@ # include "XMH.h" # include "XMS_setup.h" +# include "XMV_panel.h" /*------------------------------------------------------------\ | | @@ -210,7 +211,7 @@ void XpatReadPanelValues( Panel ) autbegin(); - fscanf( FileConfig, "X: %d, Y: %d, WIDTH: %d, HEIGHT: %d, MANAGED: %d\n", + fscanf( FileConfig, "X: %11d, Y: %11d, WIDTH: %11d, HEIGHT: %11d, MANAGED: %11d\n", &Values[0], &Values[1], &Values[2], &Values[3], &Values[4] ); XpatSetPanelValues( Panel, Values ); @@ -232,7 +233,7 @@ char XpatReadTopLevelValues() autbegin(); - fscanf( FileConfig, "VERSION: %s\n", Version ); + fscanf( FileConfig, "VERSION: %63s\n", Version ); if ( strcmp( Version, VERSION ) ) { @@ -240,7 +241,7 @@ char XpatReadTopLevelValues() return( 0 ); } - fscanf( FileConfig, "X: %d, Y: %d, WIDTH: %d, HEIGHT: %d, MANAGED: %d\n", + fscanf( FileConfig, "X: %11d, Y: %11d, WIDTH: %11d, HEIGHT: %11d, MANAGED: %11d\n", &Values[0], &Values[1], &Values[2], &Values[3], &Values[4] ); XtVaSetValues( XpatTopLevel, @@ -262,21 +263,21 @@ char XpatReadTopLevelValues() void XpatReadActiveLayers() { - short Layer; - int Value; + int Layer; + int Value; autbegin(); for ( Layer = 0; Layer < XPAT_MAX_LAYER; Layer++ ) { - fscanf( FileConfig, "ACTIVE: %d\n", &Value ); + fscanf( FileConfig, "ACTIVE: %11d\n", &Value ); XPAT_ACTIVE_LAYER_TABLE[ Layer ] = Value; } for ( Layer = 0; Layer < XPAT_MAX_ACTIVE_NAME; Layer++ ) { - fscanf( FileConfig, "ACTIVE: %d\n", &Value ); + fscanf( FileConfig, "ACTIVE: %11d\n", &Value ); XPAT_ACTIVE_NAME_TABLE[ Layer ] = Value; } @@ -293,7 +294,7 @@ void XpatReadActiveLayers() void XpatWriteActiveLayers() { - char Layer; + int Layer; autbegin(); diff --git a/alliance/src/xpat/src/XMT_menu.c b/alliance/src/xpat/src/XMT_menu.c index ea6ec749..e9968380 100644 --- a/alliance/src/xpat/src/XMT_menu.c +++ b/alliance/src/xpat/src/XMT_menu.c @@ -96,7 +96,9 @@ (XpatMenuItem *)NULL } , - NULL + { + NULL + } }; /*------------------------------------------------------------\ diff --git a/alliance/src/xpat/src/XMT_panel.c b/alliance/src/xpat/src/XMT_panel.c index 6f5be281..0cfdde26 100644 --- a/alliance/src/xpat/src/XMT_panel.c +++ b/alliance/src/xpat/src/XMT_panel.c @@ -45,6 +45,7 @@ # include # include # include +# include # include # include # include @@ -118,7 +119,9 @@ (Widget)NULL } , - NULL + { + NULL + } }; XpatPanelItem XpatToolsMessagePanel = diff --git a/alliance/src/xpat/src/XMV_map.c b/alliance/src/xpat/src/XMV_map.c index 287e8e5c..cc29816d 100644 --- a/alliance/src/xpat/src/XMV_map.c +++ b/alliance/src/xpat/src/XMV_map.c @@ -219,14 +219,12 @@ void CallbackMapEvent ( MyWidget, Event, Args, Argc ) String *Args; int *Argc; { - Display *EventDisplay; char MouseEvent; long X; long Y; autbegin(); - EventDisplay = Event->display; MouseEvent = Args[ 0 ][ 0 ] - '0'; X = Event->x; @@ -303,12 +301,8 @@ void CallbackMapExpose( MyWidget, ClientData, CallData ) XtPointer ClientData; XmDrawingAreaCallbackStruct *CallData; { - XExposeEvent *ExposeEvent; - autbegin(); - ExposeEvent = (XExposeEvent *)CallData->event; - if ( XpatFirstExpose ) { XpatFirstExpose = XPAT_FALSE; diff --git a/alliance/src/xpat/src/XMV_menu.c b/alliance/src/xpat/src/XMV_menu.c index 976d6edf..b927954f 100644 --- a/alliance/src/xpat/src/XMV_menu.c +++ b/alliance/src/xpat/src/XMV_menu.c @@ -59,6 +59,7 @@ # include "XMV_dialog.h" # include "XMV_view.h" # include "XMV_map.h" +# include "XMV_panel.h" /*------------------------------------------------------------\ | | @@ -167,7 +168,9 @@ (XpatMenuItem *)NULL } , - NULL + { + NULL + } }; /*------------------------------------------------------------\ diff --git a/alliance/src/xpat/src/XMV_panel.c b/alliance/src/xpat/src/XMV_panel.c index 0cccca54..acfb408c 100644 --- a/alliance/src/xpat/src/XMV_panel.c +++ b/alliance/src/xpat/src/XMV_panel.c @@ -60,6 +60,7 @@ # include "XMV_dialog.h" # include "XMV_view.h" # include "XMV_message.h" +# include "XMX_color.h" /*------------------------------------------------------------\ | | @@ -238,7 +239,9 @@ (Widget)NULL } , - NULL + { + NULL + } }; XpatPanelItem XpatViewArrowsPanel = @@ -426,7 +429,9 @@ (Widget)NULL } , - NULL + { + NULL + } }; XpatPanelItem XpatViewZoomPanel = @@ -523,7 +528,9 @@ (Widget)NULL } , - NULL + { + NULL + } }; XpatPanelItem XpatViewGridPanel = @@ -980,7 +987,9 @@ (Widget)NULL } , - NULL + { + NULL + } }; XpatPanelItem XpatViewLayerPanel = @@ -1651,7 +1660,7 @@ void CallbackLayerScale( MyWidget, ClientData, CallData ) void XpatChangeCursor( Type ) - char Type; + int Type; { int Pos; XmString Label; @@ -1679,7 +1688,7 @@ void XpatChangeCursor( Type ) void XpatChangeForceDisplay( Index ) - char Index; + int Index; { int Pos; XmString Label; diff --git a/alliance/src/xpat/src/XMV_panel.h b/alliance/src/xpat/src/XMV_panel.h index f969bfcc..f2313a33 100644 --- a/alliance/src/xpat/src/XMV_panel.h +++ b/alliance/src/xpat/src/XMV_panel.h @@ -122,6 +122,7 @@ extern void XpatChangeForceDisplay(); extern void XpatChangeCursor(); + extern void XpatInitializeLayer(); extern void XpatSetLayerVisible(); extern void XpatSetLayerInvisible(); extern void XpatSetNameVisible(); diff --git a/alliance/src/xpat/src/XMV_view.c b/alliance/src/xpat/src/XMV_view.c index bacc254c..04dff33c 100644 --- a/alliance/src/xpat/src/XMV_view.c +++ b/alliance/src/xpat/src/XMV_view.c @@ -55,6 +55,7 @@ # include "XMV.h" # include "XMV_view.h" +# include "XMX_grid.h" /*------------------------------------------------------------\ | | diff --git a/alliance/src/xpat/src/XMX.h b/alliance/src/xpat/src/XMX.h index 7f9de7b2..a11b9f76 100644 --- a/alliance/src/xpat/src/XMX.h +++ b/alliance/src/xpat/src/XMX.h @@ -191,8 +191,8 @@ | | \------------------------------------------------------------*/ - extern char XpatCountEventZoom; - extern char XpatCountEventEdit; + extern int XpatCountEventZoom; + extern int XpatCountEventEdit; /*------------------------------------------------------------\ | | diff --git a/alliance/src/xpat/src/XMX_color.c b/alliance/src/xpat/src/XMX_color.c index 5a470a58..847e9731 100644 --- a/alliance/src/xpat/src/XMX_color.c +++ b/alliance/src/xpat/src/XMX_color.c @@ -145,7 +145,6 @@ void XpatInitializeColors() { XColor ForgetIt; XColor GetIt; - Window Root; int Counter; char Error; char *ColorName; @@ -198,8 +197,6 @@ void XpatInitializeColors() void XpatChangeCursorContext() { - XGCValues GraphicValue; - if ( XPAT_XOR_CURSOR == XPAT_TRUE ) { XpatXorGC = XpatXorGCXor; diff --git a/alliance/src/xpat/src/XMX_cursor.c b/alliance/src/xpat/src/XMX_cursor.c index 91a370d8..639a3103 100644 --- a/alliance/src/xpat/src/XMX_cursor.c +++ b/alliance/src/xpat/src/XMX_cursor.c @@ -100,9 +100,9 @@ Position XpatCursorY = 0; Position XpatCursorSaveX = 0; Position XpatCursorSaveY = 0; - char XpatCursorSaved = XPAT_FALSE; - char XpatCursorInside = XPAT_FALSE; - char XpatCursorType = XPAT_INPUT_HALF_BOX; + int XpatCursorSaved = XPAT_FALSE; + int XpatCursorInside = XPAT_FALSE; + int XpatCursorType = XPAT_INPUT_HALF_BOX; long XpatUnitCursorX = 0; long XpatUnitCursorY = 0; @@ -111,7 +111,7 @@ long XpatUnitCursorSaveX[ 2 ] = { 0, 0 }; long XpatUnitCursorSaveY[ 2 ] = { 0, 0 }; - char XpatCursorIndex = 0; + int XpatCursorIndex = 0; /*------------------------------------------------------------\ | | @@ -175,13 +175,11 @@ void XpatDisplayCoordinates() { char **NameArray; long NumberIO; - char *NameX; char *NameY; int Unit; long X; long Y; long Dx; - long Dy; long TimeDelta; autbegin(); @@ -189,9 +187,7 @@ void XpatDisplayCoordinates() X = XpatUnitCursorX / XPAT_PATTERN_STEP_X; Y = XpatUnitCursorY / XPAT_PATTERN_STEP_Y; Dx = X - ( XpatUnitCursorSaveX[0] / XPAT_PATTERN_STEP_X ); - Dy = Y - ( XpatUnitCursorSaveX[1] / XPAT_PATTERN_STEP_Y ); - NameX = (char *)0; NameY = (char *)0; if ( XpatFigurePat != (patfig_list *)0 ) diff --git a/alliance/src/xpat/src/XMX_cursor.h b/alliance/src/xpat/src/XMX_cursor.h index 4780eb0b..b6b5ebe2 100644 --- a/alliance/src/xpat/src/XMX_cursor.h +++ b/alliance/src/xpat/src/XMX_cursor.h @@ -69,8 +69,8 @@ extern Position XpatCursorY; extern Position XpatCursorSaveX; extern Position XpatCursorSaveY; - extern char XpatCursorSaved; - extern char XpatCursorInside; + extern int XpatCursorSaved; + extern int XpatCursorInside; extern long XpatLambdaCursorX; extern long XpatLambdaCursorY; diff --git a/alliance/src/xpat/src/XMX_dialog.c b/alliance/src/xpat/src/XMX_dialog.c index 0235648d..2a2319ea 100644 --- a/alliance/src/xpat/src/XMX_dialog.c +++ b/alliance/src/xpat/src/XMX_dialog.c @@ -60,6 +60,7 @@ # include "XMS.h" # include "XMH.h" # include "XMX.h" +# include "XME.h" # include "XMX_dialog.h" diff --git a/alliance/src/xpat/src/XMX_event.c b/alliance/src/xpat/src/XMX_event.c index 13e4e74d..d9787bb5 100644 --- a/alliance/src/xpat/src/XMX_event.c +++ b/alliance/src/xpat/src/XMX_event.c @@ -65,6 +65,9 @@ # include "XMX_cursor.h" # include "XMX_event.h" # include "XMX_message.h" +# include "XMX_graphic.h" +# include "XMV_view.h" +# include "XMF_file.h" /*------------------------------------------------------------\ | | @@ -169,14 +172,14 @@ static long XpatUnitEventZoomX[ 2 ] = { 0, 0 }; static long XpatUnitEventZoomY[ 2 ] = { 0, 0 }; static char XpatMaxEventZoom = 0; - char XpatCountEventZoom = 0; + int XpatCountEventZoom = 0; static long XpatUnitEventEditX[ 2 ] = { 0, 0 }; static long XpatUnitEventEditY[ 2 ] = { 0, 0 }; static char XpatMaxEventEdit = 2; - char XpatCountEventEdit = 0; + int XpatCountEventEdit = 0; - static char XpatFirstExpose = XPAT_TRUE; + static int XpatFirstExpose = XPAT_TRUE; /*------------------------------------------------------------\ | | @@ -211,7 +214,7 @@ void XpatChangeEditMode( EditMode , PromptMessage ) - char EditMode; + int EditMode; void (*PromptMessage)(); { autbegin(); @@ -276,9 +279,9 @@ void XpatChangeEditMode( EditMode , PromptMessage ) void XpatContinueEditMode( EditMode , PromptMessage, CountEvent ) - char EditMode; + int EditMode; void (*PromptMessage)(); - char CountEvent; + int CountEvent; { autbegin(); @@ -468,15 +471,12 @@ void CallbackEvent ( MyWidget, Event, Args, Argc ) String *Args; int *Argc; { - Display *EventDisplay; char MouseEvent; Position OldUnitCursorX; Position OldUnitCursorY; autbegin(); - EventDisplay = Event->display; - MouseEvent = atoi( Args[ 0 ] ); if ( MouseEvent == XPAT_LEAVE ) diff --git a/alliance/src/xpat/src/XMX_graphic.h b/alliance/src/xpat/src/XMX_graphic.h index 1976daec..8dc4f865 100644 --- a/alliance/src/xpat/src/XMX_graphic.h +++ b/alliance/src/xpat/src/XMX_graphic.h @@ -68,5 +68,6 @@ \------------------------------------------------------------*/ extern void XpatInitializeGraphic(); + extern void XpatInitializeGraphicWindow(); # endif diff --git a/alliance/src/xpat/src/XMX_grid.c b/alliance/src/xpat/src/XMX_grid.c index 4c2c7670..0dee3a5e 100644 --- a/alliance/src/xpat/src/XMX_grid.c +++ b/alliance/src/xpat/src/XMX_grid.c @@ -214,6 +214,8 @@ char XpatDisplayUnitGrid( GraphicX1, GraphicY1, GraphicX2, GraphicY2 ) if ( XpatUnitUserGrid == 1 ) { + Check = ( XPAT_LOWER_GRID_STEP * 2 / XpatUnitUserGridDy ); +#if THIS_IS_DISABLED if ( XpatUnitUserGridDx > XpatUnitUserGridDy ) { Check = ( XPAT_LOWER_GRID_STEP * 2 / XpatUnitUserGridDy ); @@ -222,6 +224,7 @@ char XpatDisplayUnitGrid( GraphicX1, GraphicY1, GraphicX2, GraphicY2 ) { Check = ( XPAT_LOWER_GRID_STEP * 2 / XpatUnitUserGridDy ); } +#endif if ( XpatUnitGridStep < Check ) UserGrid = 0; else UserGrid = 1; diff --git a/alliance/src/xpat/src/XMX_grid.h b/alliance/src/xpat/src/XMX_grid.h index 1a4d4fd3..f71bfb21 100644 --- a/alliance/src/xpat/src/XMX_grid.h +++ b/alliance/src/xpat/src/XMX_grid.h @@ -73,4 +73,7 @@ | | \------------------------------------------------------------*/ + extern void XpatInitializeUnitGrid(); + extern char XpatDisplayUnitGrid(); + # endif diff --git a/alliance/src/xpat/src/XMX_menu.c b/alliance/src/xpat/src/XMX_menu.c index d65231c0..554b429e 100644 --- a/alliance/src/xpat/src/XMX_menu.c +++ b/alliance/src/xpat/src/XMX_menu.c @@ -171,7 +171,9 @@ XpatHelpMenu } , - NULL + { + NULL + } }; /*------------------------------------------------------------\ diff --git a/alliance/src/xpat/src/XMX_message.c b/alliance/src/xpat/src/XMX_message.c index 2bf8192e..afd4a25b 100644 --- a/alliance/src/xpat/src/XMX_message.c +++ b/alliance/src/xpat/src/XMX_message.c @@ -139,7 +139,7 @@ void XpatDisplayMessage( Where, Text ) - char Where; + int Where; char *Text; { XmString TextString; diff --git a/alliance/src/xpat/src/XMX_motif.c b/alliance/src/xpat/src/XMX_motif.c index 995efe25..8bdd4963 100644 --- a/alliance/src/xpat/src/XMX_motif.c +++ b/alliance/src/xpat/src/XMX_motif.c @@ -56,6 +56,8 @@ # include "XTB.h" # include "XMX.h" # include "XMS.h" +# include "XMV.h" +# include "XMF.h" # include "XMX_motif.h" # include "XMX_graphic.h" @@ -65,6 +67,7 @@ # include "XMX_color.h" # include "XMX_panel.h" # include "XMX_dialog.h" +# include "XMX_icon.h" /*------------------------------------------------------------\ | | diff --git a/alliance/src/xpat/src/XMX_view.c b/alliance/src/xpat/src/XMX_view.c index a46c1811..f532de87 100644 --- a/alliance/src/xpat/src/XMX_view.c +++ b/alliance/src/xpat/src/XMX_view.c @@ -180,13 +180,13 @@ void XpatDelView() void XpatInterruptDisplay() { + autbegin(); + +# ifdef XPAT_CTRL_C XEvent Event; KeySym Key; char Text; - autbegin(); - -# ifdef XPAT_CTRL_C if ( XCheckTypedEvent( XpatGraphicDisplay, KeyPress, &Event ) ) { XLookupString( &Event.xkey, &Text, 1, &Key, 0 ); @@ -214,11 +214,11 @@ void XpatInterruptDisplay() void XpatFlushEventDisplay() { - XEvent Event; - autbegin(); # ifdef XPAT_CTRL_C + XEvent Event; + while ( XCheckTypedEvent( XpatGraphicDisplay, KeyPress, &Event ) ); # endif @@ -518,8 +518,6 @@ void XpatDisplayOneString( Obj ) long X2r; long Y1r; long Y2r; - long DeltaX; - long DeltaY; long WidthText; long HeightText; int Length; @@ -556,12 +554,6 @@ void XpatDisplayOneString( Obj ) Y1r = ( Y1r / XPAT_UNIT ) - XpatPixelGridY; Y2r = ( Y2r / XPAT_UNIT ) - XpatPixelGridY; - DeltaX = X2r - X1r; - DeltaY = Y2r - Y1r; - - if ( DeltaX <= 0 ) DeltaX = 1; - if ( DeltaY <= 0 ) DeltaY = 1; - if ( IsXpatIO( Obj ) ) { Length = strlen( Obj->NAME ); diff --git a/alliance/src/xpat/src/XPT_error.c b/alliance/src/xpat/src/XPT_error.c index f6ea33eb..f22c44f3 100644 --- a/alliance/src/xpat/src/XPT_error.c +++ b/alliance/src/xpat/src/XPT_error.c @@ -321,7 +321,7 @@ char *XpatGetInformations() Scan = Scan + strlen( Scan ); - sprintf( Scan, " BOUNDING BOX : \n\n XMIN : %d\n YMIN : %d\n XMAX : %d\n YMAX : %d\n\n", + sprintf( Scan, " BOUNDING BOX : \n\n XMIN : %ld\n YMIN : %ld\n XMAX : %ld\n YMAX : %ld\n\n", XpatBoundXmin / XPAT_UNIT, XpatBoundYmin / XPAT_UNIT, XpatBoundXmax / XPAT_UNIT, XpatBoundYmax / XPAT_UNIT ); diff --git a/alliance/src/xpat/src/XPT_error.h b/alliance/src/xpat/src/XPT_error.h index ce073778..8afeae3b 100644 --- a/alliance/src/xpat/src/XPT_error.h +++ b/alliance/src/xpat/src/XPT_error.h @@ -71,5 +71,6 @@ \------------------------------------------------------------*/ extern void XpatFlushErrorMessage(); + extern void XpatInitializeErrorMessage(); # endif diff --git a/alliance/src/xpat/src/XPT_pat.c b/alliance/src/xpat/src/XPT_pat.c index df192326..c5038943 100644 --- a/alliance/src/xpat/src/XPT_pat.c +++ b/alliance/src/xpat/src/XPT_pat.c @@ -54,6 +54,7 @@ # include "XSB.h" # include "XPT.h" # include "XPT_pat.h" +# include "XPT_error.h" /*------------------------------------------------------------\ | | @@ -216,7 +217,7 @@ patfig_list *pat_addpatfig( Sequence ) int Left; int Right; char *Direction; - char *Mode; + char *Mode = NULL; long NumberIO; long NumberBit; @@ -226,9 +227,7 @@ patfig_list *pat_addpatfig( Sequence ) unsigned long TimeScale; unsigned long TimeDelta; unsigned long Delta; - unsigned long TimeCurrent; - unsigned long TimeNext; - char TimeAllZero; +//char TimeAllZero; paiol_list *ScanIol; pagrp_list *ScanGrp; @@ -287,7 +286,7 @@ patfig_list *pat_addpatfig( Sequence ) # ifdef DEBUG if ( ScanGrp != (pagrp_list *)0 ) { - fprintf( stdout, "ScanGrp %s %d %d %d\n", + fprintf( stdout, "ScanGrp %255s %11d %11d %11d\n", ScanGrp->NAME, ScanGrp->FINDEX, ScanGrp->LENGTH, ScanGrp->FLAG ); } # endif @@ -302,12 +301,12 @@ patfig_list *pat_addpatfig( Sequence ) { if ( ! ScanGrp->FLAG ) { - sscanf( ScanIol->NAME, "%s %d", Name, &Left ); + sscanf( ScanIol->NAME, "%255s %11d", Name, &Left ); ScanIol += ScanGrp->LENGTH - 1; IndexBit += ScanGrp->LENGTH; - sscanf( ScanIol->NAME, "%s %d", Name, &Right ); + sscanf( ScanIol->NAME, "%255s %11d", Name, &Right ); if ( Left < Right ) Direction = "to"; else Direction = "downto"; @@ -417,7 +416,7 @@ patfig_list *pat_addpatfig( Sequence ) # ifdef DEBUG fprintf( stdout, "%ld\n", ScanPaPat->TIME ); # endif - if ( ScanPaPat->TIME != 0 ) TimeAllZero = 0; + //if ( ScanPaPat->TIME != 0 ) TimeAllZero = 0; if ( ScanPaPat->NEXT != (papat_list *)0 ) { diff --git a/alliance/src/xpat/src/XPT_pat.h b/alliance/src/xpat/src/XPT_pat.h index 4f4e3d82..39efd817 100644 --- a/alliance/src/xpat/src/XPT_pat.h +++ b/alliance/src/xpat/src/XPT_pat.h @@ -68,5 +68,6 @@ \------------------------------------------------------------*/ extern patfig_list *Xpatloadpatfig(); + extern void pat_delpatfig(); # endif diff --git a/alliance/src/xpat/src/XPT_place.c b/alliance/src/xpat/src/XPT_place.c index 61449838..56d0e3d2 100644 --- a/alliance/src/xpat/src/XPT_place.c +++ b/alliance/src/xpat/src/XPT_place.c @@ -261,7 +261,7 @@ void XpatPlacePattern() char Event; char *NextString; char *CurrentString; - char *Name; + char *Name = NULL; char FirstTime; long NumberIO; long NumberBit; @@ -273,7 +273,6 @@ void XpatPlacePattern() long StepX; long StepY; long Height; - long HalfHeight; unsigned long CurrentTime; unsigned long NextTime; @@ -299,7 +298,6 @@ void XpatPlacePattern() StepX = ( XPAT_UNIT * XPAT_PATTERN_STEP_X ); StepY = ( XPAT_UNIT * XPAT_PATTERN_STEP_Y ); - HalfHeight = ( StepY / 4 ); Height = ( StepY / 2 ); X = 0; FirstTime = 1; @@ -523,9 +521,9 @@ xpatobj_list *XpatAddCursor( X ) if ( X >= 0 ) { NumberIO = XpatFigurePat->IO_NUMBER; - Unit = XpatTimeUnit[ XpatFigurePat->TIME_UNIT ]; + Unit = XpatTimeUnit[ (int)XpatFigurePat->TIME_UNIT ]; - sprintf( Buffer, "<%d %s>", X, Unit ); + sprintf( Buffer, "<%ld %s>", X, Unit ); X *= XPAT_UNIT; Y1 = ( -1 ) * XPAT_PATTERN_STEP_Y * XPAT_UNIT; diff --git a/alliance/src/xpat/src/XSB_error.h b/alliance/src/xpat/src/XSB_error.h index 4902dfc5..b7053dd0 100644 --- a/alliance/src/xpat/src/XSB_error.h +++ b/alliance/src/xpat/src/XSB_error.h @@ -85,4 +85,6 @@ | | \------------------------------------------------------------*/ + extern void XsbError(); + # endif diff --git a/alliance/src/xpat/src/XSB_parse.c b/alliance/src/xpat/src/XSB_parse.c index 4732fd49..ec270c2b 100644 --- a/alliance/src/xpat/src/XSB_parse.c +++ b/alliance/src/xpat/src/XSB_parse.c @@ -122,7 +122,7 @@ static keyword KeywordDefine[ XSB_MAX_KEYWORD ] = { - "None", 0 + { "None", 0 } }; /*------------------------------------------------------------\ @@ -152,7 +152,7 @@ char *XsbFileGetString( String, Size ) int Size; { register char *RegisterString; - register Register; + register int Register = 0; autbegin(); @@ -215,7 +215,7 @@ void XsbGetLine( Buffer ) XsbError( UNEXPECTED_EOF, (char *)NULL, XsbCurrentLine ); } - if ( String = strchr( Buffer, XSB_COMMENT_CHAR )) + if ( (String = strchr( Buffer, XSB_COMMENT_CHAR )) ) { if ( String == Buffer ) { @@ -279,7 +279,7 @@ char *XsbGetFirstWord( Buffer, IsKeyword, Hash ) autbegin(); - if ( String = (char *)strtok( Buffer, XSB_SEPARATORS_STRING )) + if ( (String = (char *)strtok( Buffer, XSB_SEPARATORS_STRING )) ) { if ( Hash ) { @@ -324,7 +324,7 @@ char *XsbGetNextWord( IsKeyword, Hash ) autbegin(); - if ( String = (char *)strtok( (char *)NULL, XSB_SEPARATORS_STRING )) + if ( (String = (char *)strtok( (char *)NULL, XSB_SEPARATORS_STRING )) ) { if ( Hash ) { @@ -382,7 +382,7 @@ long XsbGetStringValue( String ) autbegin(); - if ( sscanf( String, "%d", &Value) ) + if ( sscanf( String, "%22ld", &Value) ) { autend(); return ( Value ); @@ -418,7 +418,7 @@ float XsbGetStringFloat( String ) autbegin(); - if ( ! sscanf( String, "%g", &Value) ) + if ( ! sscanf( String, "%32g", &Value) ) { XsbError( ILLEGAL_FLOAT, String, XsbCurrentLine ); } @@ -441,7 +441,7 @@ long XsbGetNumber( String ) autbegin(); - if ( ! sscanf( String, "%d", &Value )) + if ( ! sscanf( String, "%22ld", &Value )) { XsbError( UNEXPECTED_LINE, "number", XsbCurrentLine ); } @@ -460,10 +460,10 @@ long XsbGetNumber( String ) void XsbReadLayerName() { - char Layer; - char LayerCount; - char EndTable; - char Field; + int Layer; + int LayerCount; + int EndTable; + int Field; char *FirstWord; autbegin(); diff --git a/alliance/src/xpat/src/XTB_cursor.c b/alliance/src/xpat/src/XTB_cursor.c index 75ad0704..a4dd3a4a 100644 --- a/alliance/src/xpat/src/XTB_cursor.c +++ b/alliance/src/xpat/src/XTB_cursor.c @@ -46,6 +46,7 @@ # include # include # include +# include # include "mut.h" # include "aut.h" # include "pat.h" @@ -105,7 +106,7 @@ void XpatSetMouseCursor( MainWidget, CursorType ) Widget MainWidget; - char CursorType; + int CursorType; { Display *DisplayId; Window MainWindow; diff --git a/alliance/src/xpat/src/XTB_dialog.c b/alliance/src/xpat/src/XTB_dialog.c index 0ac13a9a..f34bc236 100644 --- a/alliance/src/xpat/src/XTB_dialog.c +++ b/alliance/src/xpat/src/XTB_dialog.c @@ -53,6 +53,7 @@ # include "pat.h" # include "XTB.h" # include "XSB.h" +# include "XPT.h" # include "XTB_dialog.h" /*------------------------------------------------------------\ @@ -71,7 +72,7 @@ | | \------------------------------------------------------------*/ - static XpatLockLoop = 0; + static int XpatLockLoop = 0; static XpatDialogItem XpatWarningDialog = diff --git a/alliance/src/xpat/src/XTB_dialog.h b/alliance/src/xpat/src/XTB_dialog.h index b762f43a..27eacbd0 100644 --- a/alliance/src/xpat/src/XTB_dialog.h +++ b/alliance/src/xpat/src/XTB_dialog.h @@ -67,4 +67,6 @@ | | \------------------------------------------------------------*/ + extern void XpatLimitedLoop(); + # endif diff --git a/alliance/src/xpat/src/xpat.c b/alliance/src/xpat/src/xpat.c index b2dfd4c1..205e5657 100644 --- a/alliance/src/xpat/src/xpat.c +++ b/alliance/src/xpat/src/xpat.c @@ -55,6 +55,7 @@ # include "XPT.h" # include "XMX.h" +# include "XPT_error.h" # include "xpat.h" /*------------------------------------------------------------\ diff --git a/alliance/src/xsch/src/XME_menu.c b/alliance/src/xsch/src/XME_menu.c index 162babfa..4c4f2873 100644 --- a/alliance/src/xsch/src/XME_menu.c +++ b/alliance/src/xsch/src/XME_menu.c @@ -130,7 +130,9 @@ (XschMenuItem *)NULL } , - NULL + { + NULL + } }; /*------------------------------------------------------------\ diff --git a/alliance/src/xsch/src/XME_panel.c b/alliance/src/xsch/src/XME_panel.c index f0f367e5..0862ad13 100644 --- a/alliance/src/xsch/src/XME_panel.c +++ b/alliance/src/xsch/src/XME_panel.c @@ -123,7 +123,9 @@ (Widget)NULL } , - NULL + { + NULL + } }; XschPanelItem XschEditSearchViewPanel = @@ -193,7 +195,9 @@ (Widget)NULL } , - NULL + { + NULL + } }; XschPanelItem XschEditIdentifyPanel = @@ -277,7 +281,9 @@ (Widget)NULL } , - NULL + { + NULL + } }; XschPanelItem XschEditSelectPanel = diff --git a/alliance/src/xsch/src/XME_select.c b/alliance/src/xsch/src/XME_select.c index ec0979a9..19420822 100644 --- a/alliance/src/xsch/src/XME_select.c +++ b/alliance/src/xsch/src/XME_select.c @@ -59,6 +59,7 @@ # include "XSC.h" # include "XME.h" # include "XMV.h" +# include "XMT.h" # include "XME_select.h" # include "XME_panel.h" diff --git a/alliance/src/xsch/src/XMF_menu.c b/alliance/src/xsch/src/XMF_menu.c index d5ef4a3e..8a3a1d68 100644 --- a/alliance/src/xsch/src/XMF_menu.c +++ b/alliance/src/xsch/src/XMF_menu.c @@ -79,7 +79,7 @@ | | \------------------------------------------------------------*/ - static XschFirstFileOpen = 1; + static int XschFirstFileOpen = 1; /*------------------------------------------------------------\ | | @@ -122,7 +122,9 @@ (XschMenuItem *)NULL } , - NULL + { + NULL + } }; /*------------------------------------------------------------\ diff --git a/alliance/src/xsch/src/XMH_menu.c b/alliance/src/xsch/src/XMH_menu.c index f62181aa..87d47794 100644 --- a/alliance/src/xsch/src/XMH_menu.c +++ b/alliance/src/xsch/src/XMH_menu.c @@ -97,7 +97,9 @@ (XschMenuItem *)NULL } , - NULL + { + NULL + } }; /*------------------------------------------------------------\ diff --git a/alliance/src/xsch/src/XMH_panel.c b/alliance/src/xsch/src/XMH_panel.c index 6d8dcbfd..be7cd970 100644 --- a/alliance/src/xsch/src/XMH_panel.c +++ b/alliance/src/xsch/src/XMH_panel.c @@ -202,17 +202,17 @@ void XschBuildPresentPanel() ); PanelPixmap = XschCreatePixmap( XschMainWindow, - LIP6bw_bits, - LIP6bw_width, - LIP6bw_height); + LIP6bw_bits, + LIP6bw_width, + LIP6bw_height); PanelLabel = XtVaCreateManagedWidget( "", - xmLabelGadgetClass, - XschHelpPresentPanel.FORM, - XmNlabelType , XmPIXMAP, - XmNlabelPixmap , PanelPixmap, - NULL - ); + xmLabelGadgetClass, + XschHelpPresentPanel.FORM, + XmNlabelType , XmPIXMAP, + XmNlabelPixmap , PanelPixmap, + NULL + ); sprintf( Buffer, "ALLIANCE CAD SYSTEM %s\n", ALLIANCE_VERSION ); diff --git a/alliance/src/xsch/src/XMS_menu.c b/alliance/src/xsch/src/XMS_menu.c index d775eb19..66eab6c2 100644 --- a/alliance/src/xsch/src/XMS_menu.c +++ b/alliance/src/xsch/src/XMS_menu.c @@ -140,7 +140,9 @@ (XschMenuItem *)NULL } , - NULL + { + NULL + } }; diff --git a/alliance/src/xsch/src/XMS_panel.c b/alliance/src/xsch/src/XMS_panel.c index 05e3a527..0eba7e76 100644 --- a/alliance/src/xsch/src/XMS_panel.c +++ b/alliance/src/xsch/src/XMS_panel.c @@ -122,7 +122,9 @@ (Widget)NULL } , - NULL + { + NULL + } }; XschPanelItem XschSetupInformationsPanel = diff --git a/alliance/src/xsch/src/XMS_setup.c b/alliance/src/xsch/src/XMS_setup.c index 96490ae0..a2f629c4 100644 --- a/alliance/src/xsch/src/XMS_setup.c +++ b/alliance/src/xsch/src/XMS_setup.c @@ -210,7 +210,7 @@ void XschReadPanelValues( Panel ) autbegin(); - fscanf( FileConfig, "X: %d, Y: %d, WIDTH: %d, HEIGHT: %d, MANAGED: %d\n", + fscanf( FileConfig, "X: %11d, Y: %11d, WIDTH: %11d, HEIGHT: %11d, MANAGED: %11d\n", &Values[0], &Values[1], &Values[2], &Values[3], &Values[4] ); XschSetPanelValues( Panel, Values ); @@ -232,7 +232,7 @@ char XschReadTopLevelValues() autbegin(); - fscanf( FileConfig, "VERSION: %s\n", Version ); + fscanf( FileConfig, "VERSION: %63s\n", Version ); if ( strcmp( Version, VERSION ) ) { @@ -240,7 +240,7 @@ char XschReadTopLevelValues() return( 0 ); } - fscanf( FileConfig, "X: %d, Y: %d, WIDTH: %d, HEIGHT: %d, MANAGED: %d\n", + fscanf( FileConfig, "X: %11d, Y: %11d, WIDTH: %11d, HEIGHT: %11d, MANAGED: %11d\n", &Values[0], &Values[1], &Values[2], &Values[3], &Values[4] ); XtVaSetValues( XschTopLevel, @@ -269,14 +269,14 @@ void XschReadActiveLayers() for ( Layer = 0; Layer < XSCH_MAX_LAYER; Layer++ ) { - fscanf( FileConfig, "ACTIVE: %d\n", &Value ); + fscanf( FileConfig, "ACTIVE: %11d\n", &Value ); XSCH_ACTIVE_LAYER_TABLE[ Layer ] = Value; } for ( Layer = 0; Layer < XSCH_MAX_ACTIVE_NAME; Layer++ ) { - fscanf( FileConfig, "ACTIVE: %d\n", &Value ); + fscanf( FileConfig, "ACTIVE: %11d\n", &Value ); XSCH_ACTIVE_NAME_TABLE[ Layer ] = Value; } diff --git a/alliance/src/xsch/src/XMT_menu.c b/alliance/src/xsch/src/XMT_menu.c index 9cf021c1..f88f82d3 100644 --- a/alliance/src/xsch/src/XMT_menu.c +++ b/alliance/src/xsch/src/XMT_menu.c @@ -130,7 +130,9 @@ (XschMenuItem *)NULL } , - NULL + { + NULL + } }; /*------------------------------------------------------------\ diff --git a/alliance/src/xsch/src/XMT_panel.c b/alliance/src/xsch/src/XMT_panel.c index 3ede54a4..8a2631b6 100644 --- a/alliance/src/xsch/src/XMT_panel.c +++ b/alliance/src/xsch/src/XMT_panel.c @@ -121,7 +121,9 @@ (Widget)NULL } , - NULL + { + NULL + } }; XschPanelItem XschToolsMessagePanel = @@ -217,7 +219,9 @@ (Widget)NULL } , - NULL + { + NULL + } }; XschPanelItem XschToolsHierarchyPanel = diff --git a/alliance/src/xsch/src/XMT_tools.c b/alliance/src/xsch/src/XMT_tools.c index 61d51ff0..6f1fcc9c 100644 --- a/alliance/src/xsch/src/XMT_tools.c +++ b/alliance/src/xsch/src/XMT_tools.c @@ -55,9 +55,11 @@ # include "XMX.h" # include "XSC.h" # include "XMT.h" +# include "XMV.h" # include "XMT_tools.h" # include "XMT_message.h" +# include "XMX_event.h" /*------------------------------------------------------------\ | | @@ -179,7 +181,6 @@ char XschDelHierarchy() void XschToolsHierarchyDown() { - xschselect_list *Select; xschobj_list *Obj; schbox_list *SchBox; loins_list *LoIns; @@ -324,7 +325,7 @@ static void XschToolsSaveXfigLine( X1r, Y1r, X2r, Y2r ) * + Poly Line */ - fprintf( XschXfigFile, " %ld %ld %ld %dl\n", X1r, XschXfigDy - Y1r, + fprintf( XschXfigFile, " %ld %ld %ld %ld\n", X1r, XschXfigDy - Y1r, X2r, XschXfigDy - Y2r ); } @@ -394,15 +395,15 @@ static void XschToolsSaveXfigCircle( X1r, Y1r, Dx, Dy ) Rady = Dy / 2; fprintf( XschXfigFile, - "1 3 0 1 %d 0 %d 0 -1 0.000 1 0.000 %d %d %d %d %d %d %d %d\n", - /* ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ - * | | | | | | | | | | | | | | | | | | | + end_y - * | | | | | | | | | | | | | | | | | | + end_x - * | | | | | | | | | | | | | | | | | + start_y - * | | | | | | | | | | | | | | | | + start_x - * | | | | | | | | | | | | | | | + rad_y - * | | | | | | | | | | | | | | + rad_x - * | | | | | | | | | | | | | + Cy + "1 3 0 1 %d 0 %d 0 -1 0.000 1 0.000 %ld %ld %ld %ld %ld %ld %ld %ld\n", + /* ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ + * | | | | | | | | | | | | | | | | | | | + end_y + * | | | | | | | | | | | | | | | | | | + end_x + * | | | | | | | | | | | | | | | | | + start_y + * | | | | | | | | | | | | | | | | + start_x + * | | | | | | | | | | | | | | | + rad_y + * | | | | | | | | | | | | | | + rad_x + * | | | | | | | | | | | | | + Cy * | | | | | | | | | | | | + Cx * | | | | | | | | | | | + Angle * | | | | | | | | | | + Direction @@ -506,7 +507,6 @@ static void XschToolsSaveXfigArc( X1r, Y1r, Dx, Dy, AngleFrom, AngleTo ) long AngleFrom; long AngleTo; { - long MiddleAngle; long Xc; long Yc; long Width; @@ -587,7 +587,7 @@ static void XschToolsSaveXfigBuffer( X1r, Y1r, X2r, Y2r, Ycr, Obj ) ** Fred Petrot (The King ) has initially written those lines ! ** Ludo Jacomme (The Slave) has modified them :-) */ - long gs; +/*long gs;*/ long is_x; long is_y; long cs; @@ -601,7 +601,7 @@ static void XschToolsSaveXfigBuffer( X1r, Y1r, X2r, Y2r, Ycr, Obj ) if ( DeltaX <= 0 ) DeltaX = 1; if ( DeltaY <= 0 ) DeltaY = 1; - gs = DeltaX; +/*gs = DeltaX;*/ is_x = ( 5 * DeltaX ) / 16; is_y = ( 5 * DeltaY ) / 8; cs = DeltaX / 8; @@ -658,12 +658,12 @@ static void XschToolsSaveXfigTristate( X1r, Y1r, X2r, Y2r, Ycr, Obj ) ** Fred Petrot (The King ) has initially written those lines ! ** Ludo Jacomme (The Slave) has modified them :-) */ - long gs; +/*long gs;*/ long is_x; long is_y; long cs; long csm; - long x, x1, y1, y2,y0; + long x, y1, y2,y0; long DeltaX; long DeltaY; @@ -673,14 +673,14 @@ static void XschToolsSaveXfigTristate( X1r, Y1r, X2r, Y2r, Ycr, Obj ) if ( DeltaX <= 0 ) DeltaX = 1; if ( DeltaY <= 0 ) DeltaY = 1; - gs = DeltaX; +/*gs = DeltaX;*/ is_x = ( 5 * DeltaX ) / 16; is_y = ( 5 * DeltaY ) / 16; cs = DeltaX / 8; csm = DeltaX / 10; y1 = Ycr; - x1 = (X2r + X1r) / 2; +/*x1 = (X2r + X1r) / 2;*/ x = X1r + cs; XschToolsSaveXfigLine( x, y1 - is_y/2, x, y1 + is_y/2); @@ -756,22 +756,20 @@ static void XschToolsSaveXfigConstant( X1r, Y1r, X2r, Y2r, Ycr, Obj ) long Ycr; xschobj_list *Obj; { - long is_x; - long is_y; long cs; long x, yc, y1,y2,y3; long DeltaX; - long DeltaY; +/*long DeltaY;*/ int i; int n; n = Obj->ARG1; DeltaX = X2r - X1r; - DeltaY = Y2r - Y1r; +/* DeltaY = Y2r - Y1r;*/ if ( DeltaX <= 0 ) DeltaX = 1; - if ( DeltaY <= 0 ) DeltaY = 1; +/* if ( DeltaY <= 0 ) DeltaY = 1;*/ cs = DeltaX / 8; x = X1r + cs; @@ -837,24 +835,17 @@ static void XschToolsSaveXfigTransistor( X1r, Y1r, X2r, Y2r, Ycr, Obj ) ** Fred Petrot (The King ) has initially written those lines ! ** Ludo Jacomme (The Slave) has modified them :-) */ - long gs; - long is_x; - long is_y; long cs; - long csm; long x, x1, y1, y2,y0; long DeltaX; - long DeltaY; +/*long DeltaY;*/ DeltaX = X2r - X1r; - DeltaY = Y2r - Y1r; +/*DeltaY = Y2r - Y1r;*/ if ( DeltaX <= 0 ) DeltaX = 1; - if ( DeltaY <= 0 ) DeltaY = 1; +/*if ( DeltaY <= 0 ) DeltaY = 1;*/ - gs = DeltaX; - is_x = ( 5 * DeltaX ) / 16; - is_y = ( 5 * DeltaY ) / 16; cs = DeltaX / 8; y0 = Obj->Y + ( SCP_BOX_CON_BASE_Y * XSCH_UNIT ); @@ -1467,7 +1458,6 @@ static void XschToolsSaveXfigMux( X1r, Y1r, X2r, Y2r, Ycr, Obj ) long Ycr; xschobj_list *Obj; { - long gs_y; long gs_x; long ms_x; long ms_y; @@ -1476,25 +1466,25 @@ static void XschToolsSaveXfigMux( X1r, Y1r, X2r, Y2r, Ycr, Obj ) int ni; int ns; - long x, y; + long x; long yc; long y1; long y2; long y3; long x3; long DeltaX; - long DeltaY; +/*long DeltaY;*/ DeltaX = X2r - X1r; - DeltaY = Y2r - Y1r; +/* DeltaY = Y2r - Y1r;*/ if ( DeltaX <= 0 ) DeltaX = 1; - if ( DeltaY <= 0 ) DeltaY = 1; +/* if ( DeltaY <= 0 ) DeltaY = 1;*/ ns = Obj->ARG1; ni = Obj->ARG2; - gs_y = ( 7 * DeltaY ) / 8; +/*gs_y = ( 7 * DeltaY ) / 8;*/ gs_x = ( 6 * DeltaX ) / 8; cs = DeltaX / 8; @@ -1512,8 +1502,6 @@ static void XschToolsSaveXfigMux( X1r, Y1r, X2r, Y2r, Ycr, Obj ) y2 = y1; ms_y = y2 - Y1r; - y2 = y2; - XschToolsSaveXfigRectangle( x, y2, x + ms_x, y2 - ms_y ); XschToolsSaveXfigLine( x, y2, x + ms_x, y2 - ms_y / 2 ); @@ -1593,7 +1581,7 @@ static void XschToolsSaveXfigOrAnd( X1r, Y1r, X2r, Y2r, Ycr, Obj ) long Ycr; xschobj_list *Obj; { - long gs_y; +/*long gs_y;*/ long gs_x; long cs; int i; @@ -1605,7 +1593,7 @@ static void XschToolsSaveXfigOrAnd( X1r, Y1r, X2r, Y2r, Ycr, Obj ) long gas_x; long Radius; - long x, y; + long x /*, y*/; long yc; long y1; long DeltaX; @@ -1619,12 +1607,12 @@ static void XschToolsSaveXfigOrAnd( X1r, Y1r, X2r, Y2r, Ycr, Obj ) n = Obj->ARG1; - gs_y = ( 7 * DeltaY ) / 8; +/*gs_y = ( 7 * DeltaY ) / 8;*/ gs_x = ( 6 * DeltaX ) / 8; cs = DeltaX / 8; yc = Ycr; - y = Ycr - gs_y/2; +/*y = Ycr - gs_y/2;*/ x = X1r + cs; if ( Obj->ARG3 == 0 ) @@ -1707,7 +1695,7 @@ static void XschToolsSaveXfigOrAnd( X1r, Y1r, X2r, Y2r, Ycr, Obj ) gas_y = 2 * DeltaY / 3; gas_x = ( 2 * gs_x ) / 3; yc = Ycr; - y = yc + gas_y /2; +/*y = yc + gas_y /2;*/ x = x + gos_x; XschToolsSaveXfigLine( x, yc - gas_y /2, x, yc + gas_y/2); @@ -1818,7 +1806,6 @@ void XschToolsSaveXfigObject( Obj ) xschobj_list *Obj; { - int Index; long X1r; long X2r; long Y1r; @@ -1827,9 +1814,6 @@ void XschToolsSaveXfigObject( Obj ) long DeltaX; long DeltaY; short ObjType; - long Length; - long WidthText; - long HeightText; if ( IsXschLineLeft( Obj ) ) { @@ -1993,10 +1977,6 @@ void XschToolsSaveXfigObject( Obj ) ( ( IsXschSchNet( Obj ) && XSCH_ACTIVE_NAME_TABLE[ XSCH_NET_NAME ] ) ) ) { - Length = strlen( Obj->NAME ); - WidthText = Length * 15; - HeightText = 15; - if ( Obj->TYPE == XSCH_OBJECT_TEXT_RIGHT ) { /* Left */ @@ -2033,7 +2013,6 @@ void XschToolsSaveXfig( FileName ) char *FileName; { xschobj_list *Obj; - char *NewFileName; int Layer; @@ -2059,7 +2038,7 @@ void XschToolsSaveXfig( FileName ) for ( Layer = 0; Layer < XSCH_MAX_LAYER; Layer++ ) { - fprintf( XschXfigFile, "0 %d #%06x\n", Layer + 32, XSCH_LAYER_XFIG_COLOR[ Layer ] ); + fprintf( XschXfigFile, "0 %d #%06lx\n", Layer + 32, (unsigned long)XSCH_LAYER_XFIG_COLOR[ Layer ] ); } for ( Layer = 0; Layer < XSCH_MAX_LAYER; Layer++ ) diff --git a/alliance/src/xsch/src/XMV_menu.c b/alliance/src/xsch/src/XMV_menu.c index e7030fa9..dceed198 100644 --- a/alliance/src/xsch/src/XMV_menu.c +++ b/alliance/src/xsch/src/XMV_menu.c @@ -168,7 +168,9 @@ (XschMenuItem *)NULL } , - NULL + { + NULL + } }; /*------------------------------------------------------------\ diff --git a/alliance/src/xsch/src/XMV_panel.c b/alliance/src/xsch/src/XMV_panel.c index a1414cf8..5051b638 100644 --- a/alliance/src/xsch/src/XMV_panel.c +++ b/alliance/src/xsch/src/XMV_panel.c @@ -237,7 +237,9 @@ (Widget)NULL } , - NULL + { + NULL + } }; XschPanelItem XschViewArrowsPanel = @@ -425,7 +427,9 @@ (Widget)NULL } , - NULL + { + NULL + } }; XschPanelItem XschViewZoomPanel = @@ -522,7 +526,9 @@ (Widget)NULL } , - NULL + { + NULL + } }; XschPanelItem XschViewGridPanel = @@ -1671,7 +1677,9 @@ (Widget)NULL } , - NULL + { + NULL + } }; XschPanelItem XschViewLayerPanel = @@ -2419,7 +2427,7 @@ void CallbackLayerForceDisplay( MyWidget, ClientData, CallData ) void XschChangeCursor( Type ) - char Type; + int Type; { int Pos; XmString Label; @@ -2447,7 +2455,7 @@ void XschChangeCursor( Type ) void XschChangeForceDisplay( Index ) - char Index; + int Index; { int Pos; XmString Label; diff --git a/alliance/src/xsch/src/XMX_event.c b/alliance/src/xsch/src/XMX_event.c index ef03e5ed..8baf98e4 100644 --- a/alliance/src/xsch/src/XMX_event.c +++ b/alliance/src/xsch/src/XMX_event.c @@ -461,15 +461,12 @@ void CallbackEvent ( MyWidget, Event, Args, Argc ) String *Args; int *Argc; { - Display *EventDisplay; int MouseEvent; Position OldUnitCursorX; Position OldUnitCursorY; autbegin(); - EventDisplay = Event->display; - MouseEvent = atoi( Args[ 0 ] ); if ( MouseEvent == XSCH_LEAVE ) diff --git a/alliance/src/xsch/src/XMX_grid.c b/alliance/src/xsch/src/XMX_grid.c index 2261b8e0..f84af90d 100644 --- a/alliance/src/xsch/src/XMX_grid.c +++ b/alliance/src/xsch/src/XMX_grid.c @@ -215,6 +215,8 @@ int XschDisplayUnitGrid( GraphicX1, GraphicY1, GraphicX2, GraphicY2 ) if ( XschUnitUserGrid == 1 ) { + Check = ( XSCH_LOWER_GRID_STEP * 2 / XschUnitUserGridDy ); +#if THIS_IS_DISABLED if ( XschUnitUserGridDx > XschUnitUserGridDy ) { Check = ( XSCH_LOWER_GRID_STEP * 2 / XschUnitUserGridDy ); @@ -223,6 +225,7 @@ int XschDisplayUnitGrid( GraphicX1, GraphicY1, GraphicX2, GraphicY2 ) { Check = ( XSCH_LOWER_GRID_STEP * 2 / XschUnitUserGridDy ); } +#endif if ( XschUnitGridStep < Check ) UserGrid = 0; else UserGrid = 1; diff --git a/alliance/src/xsch/src/XMX_menu.c b/alliance/src/xsch/src/XMX_menu.c index a9cd988c..82d9b870 100644 --- a/alliance/src/xsch/src/XMX_menu.c +++ b/alliance/src/xsch/src/XMX_menu.c @@ -172,7 +172,9 @@ XschHelpMenu } , - NULL + { + NULL + } }; /*------------------------------------------------------------\ diff --git a/alliance/src/xsch/src/XMX_view.c b/alliance/src/xsch/src/XMX_view.c index 6860f9fa..89dfafe3 100644 --- a/alliance/src/xsch/src/XMX_view.c +++ b/alliance/src/xsch/src/XMX_view.c @@ -298,12 +298,12 @@ static void XschDrawTristate( X1r, Y1r, X2r, Y2r, Ycr, Obj ) ** Fred Petrot (The King ) has initially written those lines ! ** Ludo Jacomme (The Slave) has modified them :-) */ - long gs; +/*long gs;*/ long is_x; long is_y; long cs; long csm; - long x, x1, y1, y2,y0; + long x, /*x1,*/ y1, y2,y0; long DeltaX; long DeltaY; @@ -321,14 +321,14 @@ static void XschDrawTristate( X1r, Y1r, X2r, Y2r, Ycr, Obj ) DeltaX, DeltaY ); # endif - gs = DeltaX; +/*gs = DeltaX;*/ is_x = ( 5 * DeltaX ) / 16; is_y = ( 5 * DeltaY ) / 16; cs = DeltaX / 8; csm = DeltaX / 10; y1 = XschGraphicDy - Ycr; - x1 = (X2r + X1r) / 2; +/*x1 = (X2r + X1r) / 2;*/ x = X1r + cs; XDrawLine( XschGraphicDisplay, @@ -430,29 +430,30 @@ static void XschDrawConstant( X1r, Y1r, X2r, Y2r, Ycr, Obj ) long Ycr; xschobj_list *Obj; { - long is_x; - long is_y; long cs; long x, yc, y1,y2,y3; long DeltaX; +#if 0 long DeltaY; +#endif int i; int n; n = Obj->ARG1; DeltaX = X2r - X1r; - DeltaY = Y2r - Y1r; if ( DeltaX <= 0 ) DeltaX = 1; - if ( DeltaY <= 0 ) DeltaY = 1; # if 0 - XDrawRectangle( XschGraphicDisplay, - XschGraphicPixmap, - XschDrawGC, - X1r, XschGraphicDy - Y2r, - DeltaX, DeltaY ); + DeltaY = Y2r - Y1r; + if ( DeltaY <= 0 ) DeltaY = 1; + + XDrawRectangle( XschGraphicDisplay, + XschGraphicPixmap, + XschDrawGC, + X1r, XschGraphicDy - Y2r, + DeltaX, DeltaY ); # endif cs = DeltaX / 8; @@ -588,7 +589,6 @@ static void XschDrawBuffer( X1r, Y1r, X2r, Y2r, Ycr, Obj ) ** Fred Petrot (The King ) has initially written those lines ! ** Ludo Jacomme (The Slave) has modified them :-) */ - long gs; long is_x; long is_y; long cs; @@ -610,7 +610,6 @@ static void XschDrawBuffer( X1r, Y1r, X2r, Y2r, Ycr, Obj ) DeltaX, DeltaY ); # endif - gs = DeltaX; is_x = ( 5 * DeltaX ) / 16; is_y = ( 5 * DeltaY ) / 8; cs = DeltaX / 8; @@ -683,11 +682,7 @@ static void XschDrawTransistor( X1r, Y1r, X2r, Y2r, Ycr, Obj ) ** Fred Petrot (The King ) has initially written those lines ! ** Ludo Jacomme (The Slave) has modified them :-) */ - long gs; - long is_x; - long is_y; long cs; - long csm; long x, x1, y1, y2,y0; long DeltaX; long DeltaY; @@ -698,9 +693,6 @@ static void XschDrawTransistor( X1r, Y1r, X2r, Y2r, Ycr, Obj ) if ( DeltaX <= 0 ) DeltaX = 1; if ( DeltaY <= 0 ) DeltaY = 1; - gs = DeltaX; - is_x = ( 5 * DeltaX ) / 16; - is_y = ( 5 * DeltaY ) / 16; cs = DeltaX / 8; y0 = Obj->Y + ( SCP_BOX_CON_BASE_Y * XSCH_UNIT ); @@ -1555,7 +1547,9 @@ static void XschDrawMux( X1r, Y1r, X2r, Y2r, Ycr, Obj ) long Ycr; xschobj_list *Obj; { +#if 0 long gs_y; +#endif long gs_x; long ms_x; long ms_y; @@ -1564,7 +1558,7 @@ static void XschDrawMux( X1r, Y1r, X2r, Y2r, Ycr, Obj ) int ni; int ns; - long x, y; + long x; long yc; long y1; long y2; @@ -1588,9 +1582,10 @@ XDrawRectangle( XschGraphicDisplay, XschDrawGC, X1r, XschGraphicDy - Y2r, DeltaX, DeltaY ); -# endif gs_y = ( 7 * DeltaY ) / 8; +# endif + gs_x = ( 6 * DeltaX ) / 8; cs = DeltaX / 8; @@ -1844,20 +1839,22 @@ static void XschDrawOrAnd( X1r, Y1r, X2r, Y2r, Ycr, Obj ) DeltaY = Y2r - Y1r; if ( DeltaX <= 0 ) DeltaX = 1; - if ( DeltaY <= 0 ) DeltaY = 1; # if 0 + if ( DeltaY <= 0 ) DeltaY = 1; + XDrawRectangle( XschGraphicDisplay, XschGraphicPixmap, XschDrawGC, X1r, XschGraphicDy - Y2r, DeltaX, DeltaY ); + # endif n = Obj->ARG1; - gs_y = ( 7 * DeltaY ) / 8; gs_x = ( 6 * DeltaX ) / 8; + gs_y = ( 7 * DeltaY ) / 8; cs = DeltaX / 8; yc = XschGraphicDy - Ycr; @@ -1980,7 +1977,7 @@ XDrawRectangle( XschGraphicDisplay, gas_y = 2 * DeltaY / 3; gas_x = ( 2 * gs_x ) / 3; yc = XschGraphicDy - Ycr; - y = yc + gas_y /2; +/*y = yc + gas_y /2;*/ x = x + gos_x; XDrawLine( XschGraphicDisplay, diff --git a/alliance/src/xsch/src/XSB_parse.c b/alliance/src/xsch/src/XSB_parse.c index f89ec0d8..9da2d901 100644 --- a/alliance/src/xsch/src/XSB_parse.c +++ b/alliance/src/xsch/src/XSB_parse.c @@ -167,7 +167,7 @@ char *XsbFileGetString( String, Size ) int Size; { register char *RegisterString; - register Register; + register int Register = 0; autbegin(); @@ -399,7 +399,7 @@ long XsbGetStringValue( String ) autbegin(); - if ( sscanf( String, "%ld", &Value) != 0 ) + if ( sscanf( String, "%22ld", &Value) != 0 ) { autend(); return ( Value ); @@ -435,7 +435,7 @@ float XsbGetStringFloat( String ) autbegin(); - if ( ! sscanf( String, "%g", &Value) ) + if ( ! sscanf( String, "%32g", &Value) ) { XsbError( ILLEGAL_FLOAT, String, XsbCurrentLine ); } @@ -458,7 +458,7 @@ long XsbGetNumber( String ) autbegin(); - if ( ! sscanf( String, "%ld", &Value )) + if ( ! sscanf( String, "%22ld", &Value )) { XsbError( UNEXPECTED_LINE, "number", XsbCurrentLine ); } @@ -676,7 +676,7 @@ void XsbReadLayerName() } else { - sscanf( FirstWord, "%lx", &XSCH_LAYER_XFIG_COLOR[ Layer ] ); + sscanf( FirstWord, "%32lx", &XSCH_LAYER_XFIG_COLOR[ Layer ] ); } } @@ -705,7 +705,6 @@ void XsbReadParam() { char *FirstWord; char *SecondWord; - short Continue; long Mask; autbegin(); diff --git a/alliance/src/xsch/src/XSC_error.c b/alliance/src/xsch/src/XSC_error.c index 54dfed3c..c9503780 100644 --- a/alliance/src/xsch/src/XSC_error.c +++ b/alliance/src/xsch/src/XSC_error.c @@ -44,6 +44,7 @@ # include # include +# include # include # include # include "mut.h" diff --git a/alliance/src/xsch/src/XSC_place.c b/alliance/src/xsch/src/XSC_place.c index 318cbd1c..1481e2f5 100644 --- a/alliance/src/xsch/src/XSC_place.c +++ b/alliance/src/xsch/src/XSC_place.c @@ -694,7 +694,7 @@ void XschPlaceFigure( SchFig ) xschobj_list *FirstObj; xschobj_list *PrevObj; ptype_list *InfoPType; - xschpath_list *PathInfo; + xschpath_list *PathInfo = NULL; authelem *Element; xschicon *XschIcon; loins_list *LoIns; diff --git a/alliance/src/xsch/src/XTB_dialog.c b/alliance/src/xsch/src/XTB_dialog.c index 227cfcff..b9ac70a1 100644 --- a/alliance/src/xsch/src/XTB_dialog.c +++ b/alliance/src/xsch/src/XTB_dialog.c @@ -74,7 +74,7 @@ | | \------------------------------------------------------------*/ - static XschLockLoop = 0; + static int XschLockLoop = 0; static XschDialogItem XschWarningDialog = diff --git a/alliance/src/xsch/src/icone.c b/alliance/src/xsch/src/icone.c index d1f97ccb..adb916b6 100644 --- a/alliance/src/xsch/src/icone.c +++ b/alliance/src/xsch/src/icone.c @@ -234,8 +234,7 @@ void XschBuf(x0, y0, scale, cflag) int gs = GSIZE * scale; int is = (2 * GSIZE * scale) / 3; int cs = CSIZE * scale; /* Size of the circle when an io is complemented */ -int i; -int x, y, x1, y1; +int x, y; x = x0; y = y0 - gs/2; diff --git a/alliance/src/xsch/src/xsch.c b/alliance/src/xsch/src/xsch.c index 9b782d3c..3dcaddaf 100644 --- a/alliance/src/xsch/src/xsch.c +++ b/alliance/src/xsch/src/xsch.c @@ -54,6 +54,8 @@ # include "XSB.h" # include "XSC.h" # include "XMX.h" +# include "XTB.h" +# include "XMF.h" # include "xsch.h" diff --git a/alliance/src/xvpn/src/XMF_menu.c b/alliance/src/xvpn/src/XMF_menu.c index f2d2b988..395514c3 100644 --- a/alliance/src/xvpn/src/XMF_menu.c +++ b/alliance/src/xvpn/src/XMF_menu.c @@ -80,7 +80,7 @@ | | \------------------------------------------------------------*/ - static XvpnFirstFileOpen = 1; + static int XvpnFirstFileOpen = 1; /*------------------------------------------------------------\ | | diff --git a/alliance/src/xvpn/src/XMS_setup.c b/alliance/src/xvpn/src/XMS_setup.c index 07e2a17e..80308efa 100644 --- a/alliance/src/xvpn/src/XMS_setup.c +++ b/alliance/src/xvpn/src/XMS_setup.c @@ -209,7 +209,7 @@ void XvpnReadPanelValues( Panel ) autbegin(); - fscanf( FileConfig, "X: %d, Y: %d, WIDTH: %d, HEIGHT: %d, MANAGED: %d\n", + fscanf( FileConfig, "X: %11d, Y: %11d, WIDTH: %11d, HEIGHT: %11d, MANAGED: %11d\n", &Values[0], &Values[1], &Values[2], &Values[3], &Values[4] ); XvpnSetPanelValues( Panel, Values ); @@ -231,7 +231,7 @@ short XvpnReadTopLevelValues() autbegin(); - fscanf( FileConfig, "VERSION: %s\n", Version ); + fscanf( FileConfig, "VERSION: %63s\n", Version ); if ( strcmp( Version, VERSION ) ) { @@ -239,7 +239,7 @@ short XvpnReadTopLevelValues() return( 0 ); } - fscanf( FileConfig, "X: %d, Y: %d, WIDTH: %d, HEIGHT: %d, MANAGED: %d\n", + fscanf( FileConfig, "X: %11d, Y: %11d, WIDTH: %11d, HEIGHT: %11d, MANAGED: %11d\n", &Values[0], &Values[1], &Values[2], &Values[3], &Values[4] ); XtVaSetValues( XvpnTopLevel, @@ -268,14 +268,14 @@ void XvpnReadActiveLayers() for ( Layer = 0; Layer < XVPN_MAX_LAYER; Layer++ ) { - fscanf( FileConfig, "ACTIVE: %d\n", &Value ); + fscanf( FileConfig, "ACTIVE: %11d\n", &Value ); XVPN_ACTIVE_LAYER_TABLE[ Layer ] = Value; } for ( Layer = 0; Layer < XVPN_MAX_ACTIVE_NAME; Layer++ ) { - fscanf( FileConfig, "ACTIVE: %d\n", &Value ); + fscanf( FileConfig, "ACTIVE: %11d\n", &Value ); XVPN_ACTIVE_NAME_TABLE[ Layer ] = Value; } diff --git a/alliance/src/xvpn/src/XMV_map.c b/alliance/src/xvpn/src/XMV_map.c index a77eb2c6..e931f7f9 100644 --- a/alliance/src/xvpn/src/XMV_map.c +++ b/alliance/src/xvpn/src/XMV_map.c @@ -220,14 +220,12 @@ void CallbackMapEvent ( MyWidget, Event, Args, Argc ) String *Args; int *Argc; { - Display *EventDisplay; char MouseEvent; long X; long Y; autbegin(); - EventDisplay = Event->display; MouseEvent = Args[ 0 ][ 0 ] - '0'; X = Event->x; @@ -304,12 +302,8 @@ void CallbackMapExpose( MyWidget, ClientData, CallData ) XtPointer ClientData; XmDrawingAreaCallbackStruct *CallData; { - XExposeEvent *ExposeEvent; - autbegin(); - ExposeEvent = (XExposeEvent *)CallData->event; - if ( XvpnFirstExpose ) { XvpnFirstExpose = XVPN_FALSE; diff --git a/alliance/src/xvpn/src/XMV_panel.c b/alliance/src/xvpn/src/XMV_panel.c index 38684fb0..fd83aeb4 100644 --- a/alliance/src/xvpn/src/XMV_panel.c +++ b/alliance/src/xvpn/src/XMV_panel.c @@ -58,6 +58,7 @@ # include "XMV_dialog.h" # include "XMV_view.h" # include "XMV_message.h" +# include "XMX_color.h" /*------------------------------------------------------------\ | | @@ -1601,7 +1602,7 @@ void CallbackLayerForceDisplay( MyWidget, ClientData, CallData ) void XvpnChangeCursor( Type ) - char Type; + int Type; { int Pos; XmString Label; @@ -1629,7 +1630,7 @@ void XvpnChangeCursor( Type ) void XvpnChangeForceDisplay( Index ) - char Index; + int Index; { int Pos; XmString Label; diff --git a/alliance/src/xvpn/src/XMX_color.h b/alliance/src/xvpn/src/XMX_color.h index ca278fd3..8cee1109 100644 --- a/alliance/src/xvpn/src/XMX_color.h +++ b/alliance/src/xvpn/src/XMX_color.h @@ -83,5 +83,6 @@ extern void XvpnInitializeColors(); extern void XpatChangeCursorContext(); extern void XpatInitializeColorMap(); + extern void XvpnChangeCursorContext(); # endif diff --git a/alliance/src/xvpn/src/XMX_event.c b/alliance/src/xvpn/src/XMX_event.c index ead13413..9ae503e4 100644 --- a/alliance/src/xvpn/src/XMX_event.c +++ b/alliance/src/xvpn/src/XMX_event.c @@ -451,15 +451,12 @@ void CallbackEvent ( MyWidget, Event, Args, Argc ) String *Args; int *Argc; { - Display *EventDisplay; short MouseEvent; Position OldUnitCursorX; Position OldUnitCursorY; autbegin(); - EventDisplay = Event->display; - MouseEvent = atoi( Args[ 0 ] ); if ( MouseEvent == XVPN_LEAVE ) diff --git a/alliance/src/xvpn/src/XMX_grid.c b/alliance/src/xvpn/src/XMX_grid.c index d7df0ace..b29c320b 100644 --- a/alliance/src/xvpn/src/XMX_grid.c +++ b/alliance/src/xvpn/src/XMX_grid.c @@ -212,6 +212,8 @@ short XvpnDisplayUnitGrid( GraphicX1, GraphicY1, GraphicX2, GraphicY2 ) if ( XvpnUnitUserGrid == 1 ) { + Check = ( XVPN_LOWER_GRID_STEP * 2 / XvpnUnitUserGridDy ); +#if THIS_IS_DISABLED if ( XvpnUnitUserGridDx > XvpnUnitUserGridDy ) { Check = ( XVPN_LOWER_GRID_STEP * 2 / XvpnUnitUserGridDy ); @@ -220,6 +222,7 @@ short XvpnDisplayUnitGrid( GraphicX1, GraphicY1, GraphicX2, GraphicY2 ) { Check = ( XVPN_LOWER_GRID_STEP * 2 / XvpnUnitUserGridDy ); } +#endif if ( XvpnUnitGridStep < Check ) UserGrid = 0; else UserGrid = 1; diff --git a/alliance/src/xvpn/src/XMX_motif.c b/alliance/src/xvpn/src/XMX_motif.c index 057b3f60..5e5b6e7c 100644 --- a/alliance/src/xvpn/src/XMX_motif.c +++ b/alliance/src/xvpn/src/XMX_motif.c @@ -66,6 +66,7 @@ # include "XMX_panel.h" # include "XMX_dialog.h" # include "XMX_icon.h" +# include "XMX_motif.h" /*------------------------------------------------------------\ | | diff --git a/alliance/src/xvpn/src/XMX_motif.h b/alliance/src/xvpn/src/XMX_motif.h index b61ad656..edd1f9ef 100644 --- a/alliance/src/xvpn/src/XMX_motif.h +++ b/alliance/src/xvpn/src/XMX_motif.h @@ -67,4 +67,6 @@ | | \------------------------------------------------------------*/ + extern void XvpnInitializeColorMap(); + # endif diff --git a/alliance/src/xvpn/src/XSB_parse.c b/alliance/src/xvpn/src/XSB_parse.c index 8adaaa95..d04667dc 100644 --- a/alliance/src/xvpn/src/XSB_parse.c +++ b/alliance/src/xvpn/src/XSB_parse.c @@ -127,7 +127,7 @@ char *XsbFileGetString( String, Size ) int Size; { register char *RegisterString; - register Register; + register int Register = 0; autbegin(); @@ -357,7 +357,7 @@ long XsbGetStringValue( String ) autbegin(); - if ( sscanf( String, "%ld", &Value) ) + if ( sscanf( String, "%22ld", &Value) ) { autend(); return ( Value ); @@ -393,7 +393,7 @@ float XsbGetStringFloat( String ) autbegin(); - if ( ! sscanf( String, "%g", &Value) ) + if ( ! sscanf( String, "%32g", &Value) ) { XsbError( ILLEGAL_FLOAT, String, XsbCurrentLine ); } @@ -416,7 +416,7 @@ long XsbGetNumber( String ) autbegin(); - if ( ! sscanf( String, "%ld", &Value )) + if ( ! sscanf( String, "%22ld", &Value )) { XsbError( UNEXPECTED_LINE, "number", XsbCurrentLine ); } diff --git a/alliance/src/xvpn/src/XTB_dialog.c b/alliance/src/xvpn/src/XTB_dialog.c index 6a09ed9e..6b21cf10 100644 --- a/alliance/src/xvpn/src/XTB_dialog.c +++ b/alliance/src/xvpn/src/XTB_dialog.c @@ -72,7 +72,7 @@ | | \------------------------------------------------------------*/ - static XvpnLockLoop = 0; + static int XvpnLockLoop = 0; static XvpnDialogItem XvpnWarningDialog = diff --git a/alliance/src/xvpn/src/xvpn.c b/alliance/src/xvpn/src/xvpn.c index e37398d8..c0ea20c0 100644 --- a/alliance/src/xvpn/src/xvpn.c +++ b/alliance/src/xvpn/src/xvpn.c @@ -56,6 +56,8 @@ # include "XSB.h" # include "XVP.h" # include "XMX.h" +# include "XTB.h" +# include "XMF.h" # include "xvpn.h" diff --git a/dev/scripts/cppcheck.sh b/dev/scripts/cppcheck.sh index 2261f4a9..24982188 100755 --- a/dev/scripts/cppcheck.sh +++ b/dev/scripts/cppcheck.sh @@ -3,6 +3,37 @@ scriptsDir="${HOME}/alliance/dev/scripts" cppCheckDir="${scriptsDir}/cppcheck" + tools="`cat ${scriptsDir}/tools.lst`" + +# Find all include directories + toolDirs="" + for tool in ${tools}; do + toolDirs="${toolDirs} ${HOME}/alliance/alliance/src/${tool}" + done + + echo "Building the include directories list..." + find ${toolDirs} -name '*.h' -exec dirname {} \; | sort | uniq > ${cppCheckDir}/alliance.incs + + toolsMax="`wc -l ${scriptsDir}/tools.lst | cut -d ' ' -f1`" + toolsNb="0" + echo "$toolsMax tools to process." + for tool in ${tools}; do + toolsNb=`expr ${toolsNb} + 1` + if [ ${toolsNb} -gt ${toolsMax} ]; then exit 0; fi + + toolDir="${HOME}/alliance/alliance/src/${tool}" + sources=`find ${toolDir} -name \*.h -o -name \*.c -o -name \*.hpp -o -name \*.cpp` + + echo "Checking tool <${tool}>..." + cppcheck -j3 $action --enable=all \ + --includes-file=${cppCheckDir}/alliance.incs \ + ${sources} 2>&1 \ + | grep -v 'The scope of the variable .* can be reduced' \ + > ${cppCheckDir}/${tool}.log + + done + + exit 0 # Look for missing includes. #action="--check-config"