From 2af38a41915b6c4c09d4560ee0acaf65d991876b Mon Sep 17 00:00:00 2001 From: Tim Edwards Date: Sat, 23 May 2020 17:13:14 -0400 Subject: [PATCH] Updates from running the fix-ending-whitespace script. --- Makefile | 7 - VERSION | 2 +- bplane/bpBins.c | 124 +++---- bplane/bpDump.c | 48 +-- bplane/bpEnum.c | 30 +- bplane/bpEnum.h | 110 +++--- bplane/bpMain.c | 38 +-- bplane/bpOpaque.h | 54 +-- bplane/bpStat.c | 66 ++-- bplane/bpTest.c | 100 +++--- bplane/bpUtils.c | 20 +- bplane/bplane.h | 82 ++--- bplane/bplaneInt.h | 24 +- calma/CalmaRdcl.c | 34 +- calma/CalmaRdio.c | 38 +-- calma/CalmaRdpt.c | 46 +-- calma/CalmaRead.c | 38 +-- calma/CalmaWrite.c | 72 ++-- calma/calma.h | 20 +- calma/calmaInt.h | 22 +- cif/CIFgen.c | 98 +++--- cif/CIFhier.c | 84 ++--- cif/CIFint.h | 24 +- cif/CIFmain.c | 32 +- cif/CIFrdcl.c | 82 ++--- cif/CIFrdpoly.c | 34 +- cif/CIFrdpt.c | 44 +-- cif/CIFrdtech.c | 78 ++--- cif/CIFrdutils.c | 78 ++--- cif/CIFread.h | 20 +- cif/CIFsee.c | 28 +- cif/CIFtech.c | 82 ++--- cif/CIFwrite.c | 58 ++-- cif/cif.h | 20 +- cmwind/CMWcmmnds.c | 36 +- cmwind/CMWmain.c | 38 +-- cmwind/CMWrgbhsv.c | 22 +- cmwind/CMWundo.c | 30 +- cmwind/cmwind.h | 20 +- commands/CmdAB.c | 48 +-- commands/CmdAuto.c | 20 +- commands/CmdCD.c | 106 +++--- commands/CmdE.c | 46 +-- commands/CmdFI.c | 106 +++--- commands/CmdLQ.c | 58 ++-- commands/CmdRS.c | 98 +++--- commands/CmdSubrs.c | 64 ++-- commands/CmdTZ.c | 82 ++--- commands/CmdWizard.c | 36 +- commands/commands.h | 20 +- database/DBbound.c | 26 +- database/DBcell.c | 28 +- database/DBcellbox.c | 46 +-- database/DBcellcopy.c | 50 +-- database/DBcellname.c | 88 ++--- database/DBcellsel.c | 28 +- database/DBcellsrch.c | 60 ++-- database/DBcellsubr.c | 32 +- database/DBconnect.c | 58 ++-- database/DBcount.c | 24 +- database/DBexpand.c | 26 +- database/DBio.c | 80 ++--- database/DBlabel.c | 78 ++--- database/DBlabel2.c | 38 +-- database/DBpaint.c | 60 ++-- database/DBpaint2.c | 32 +- database/DBprop.c | 38 +-- database/DBtcontact.c | 38 +-- database/DBtech.c | 32 +- database/DBtechname.c | 40 +-- database/DBtechtype.c | 36 +- database/DBtiles.c | 62 ++-- database/DBtimestmp.c | 28 +- database/DBtpaint.c | 44 +-- database/DBtpaint2.c | 42 +-- database/DBundo.c | 52 +-- database/databaseInt.h | 24 +- database/fonts.h | 2 +- dbwind/DBWbuttons.c | 32 +- dbwind/DBWcommands.c | 32 +- dbwind/DBWdisplay.c | 114 +++---- dbwind/DBWelement.c | 38 +-- dbwind/DBWfdback.c | 40 +-- dbwind/DBWhlights.c | 46 +-- dbwind/DBWprocs.c | 56 +-- dbwind/DBWtools.c | 64 ++-- dbwind/DBWundo.c | 32 +- dbwind/dbwind.h | 22 +- debug/debug.h | 22 +- debug/debugFlags.c | 28 +- debug/hist.c | 28 +- drc/DRCarray.c | 38 +-- drc/DRCbasic.c | 46 +-- drc/DRCcif.c | 96 +++--- drc/DRCcontin.c | 42 +-- drc/DRCextend.c | 30 +- drc/DRCmain.c | 62 ++-- drc/DRCprint.c | 24 +- drc/DRCsubcell.c | 62 ++-- drc/DRCtech.c | 142 ++++---- drc/drc.h | 24 +- ext2sim/ext2sim.c | 74 ++-- ext2sim/sim2simp.c | 14 +- ext2spice/ext2hier.c | 76 ++--- ext2spice/ext2spice.c | 210 ++++++------ ext2spice/ext2spice.h | 24 +- extcheck/extcheck.c | 26 +- extflat/EFantenna.c | 24 +- extflat/EFargs.c | 26 +- extflat/EFbuild.c | 62 ++-- extflat/EFdef.c | 28 +- extflat/EFerr.c | 22 +- extflat/EFflat.c | 46 +-- extflat/EFhier.c | 24 +- extflat/EFint.h | 20 +- extflat/EFname.c | 58 ++-- extflat/EFread.c | 30 +- extflat/EFsym.c | 28 +- extflat/EFvisit.c | 48 +-- extflat/extflat.h | 22 +- extract/ExtArray.c | 40 +-- extract/ExtBasic.c | 122 +++---- extract/ExtCell.c | 30 +- extract/ExtCouple.c | 80 ++--- extract/ExtHard.c | 28 +- extract/ExtHier.c | 38 +-- extract/ExtInter.c | 34 +- extract/ExtLength.c | 50 +-- extract/ExtMain.c | 34 +- extract/ExtNghbors.c | 22 +- extract/ExtPerim.c | 20 +- extract/ExtRegion.c | 36 +- extract/ExtSubtree.c | 48 +-- extract/ExtTech.c | 84 ++--- extract/ExtTest.c | 34 +- extract/ExtTimes.c | 56 +-- extract/ExtUnique.c | 24 +- extract/ExtYank.c | 26 +- extract/extDebugInt.h | 20 +- extract/extract.h | 20 +- extract/extractInt.h | 42 +-- garouter/gaChannel.c | 36 +- garouter/gaDebug.h | 20 +- garouter/gaInternal.h | 26 +- garouter/gaMain.c | 36 +- garouter/gaMaze.c | 54 +-- garouter/gaSimple.c | 96 +++--- garouter/gaStem.c | 92 ++--- garouter/gaTest.c | 36 +- garouter/garouter.h | 20 +- gcr/gcr.h | 24 +- gcr/gcrChannel.c | 32 +- gcr/gcrColl.c | 34 +- gcr/gcrDebug.c | 44 +-- gcr/gcrEdge.c | 26 +- gcr/gcrFeas.c | 26 +- gcr/gcrFlags.c | 22 +- gcr/gcrInit.c | 32 +- gcr/gcrLib.c | 40 +-- gcr/gcrRiver.c | 24 +- gcr/gcrRoute.c | 26 +- gcr/gcrShwFlgs.c | 24 +- gcr/gcrUnsplit.c | 36 +- graphics/W3Dmain.c | 36 +- graphics/X11Helper.c | 14 +- graphics/cairo_new/grTCairo1.c | 36 +- graphics/cairo_new/grTCairo2.c | 10 +- graphics/cairo_new/grTCairo3.c | 14 +- graphics/cairo_new/grTCairo4.c | 14 +- graphics/cairo_new/grTCairo5.c | 4 +- graphics/cairo_orig/grTCairo1.c | 34 +- graphics/cairo_orig/grTCairo2.c | 10 +- graphics/cairo_orig/grTCairo3.c | 14 +- graphics/cairo_orig/grTCairo4.c | 14 +- graphics/cairo_orig/grTCairo5.c | 4 +- graphics/glyphs.h | 22 +- graphics/grCMap.c | 34 +- graphics/grClip.c | 84 ++--- graphics/grDStyle.c | 48 +-- graphics/grGlyphs.c | 36 +- graphics/grLock.c | 26 +- graphics/grMain.c | 58 ++-- graphics/grNull.c | 34 +- graphics/grOGL1.c | 42 +-- graphics/grOGL2.c | 38 +-- graphics/grOGL3.c | 64 ++-- graphics/grOGL4.c | 36 +- graphics/grOGL5.c | 50 +-- graphics/grTCairo1.c | 36 +- graphics/grTCairo2.c | 10 +- graphics/grTCairo3.c | 12 +- graphics/grTCairo4.c | 14 +- graphics/grTCairo5.c | 4 +- graphics/grTOGL1.c | 86 ++--- graphics/grTOGL2.c | 8 +- graphics/grTOGL3.c | 34 +- graphics/grTOGL4.c | 14 +- graphics/grTOGL5.c | 20 +- graphics/grText.c | 34 +- graphics/grTk1.c | 78 ++--- graphics/grTk2.c | 16 +- graphics/grTk3.c | 30 +- graphics/grTk4.c | 14 +- graphics/grTk5.c | 14 +- graphics/grTkCommon.c | 56 +-- graphics/grX11su1.c | 106 +++--- graphics/grX11su2.c | 34 +- graphics/grX11su3.c | 60 ++-- graphics/grX11su4.c | 34 +- graphics/grX11su5.c | 40 +-- graphics/grX11thread.c | 10 +- graphics/graphics.h | 36 +- graphics/graphicsInt.h | 28 +- grouter/grouteChan.c | 44 +-- grouter/grouteCrss.c | 40 +-- grouter/grouteDebug.h | 20 +- grouter/grouteDens.c | 32 +- grouter/grouteMain.c | 28 +- grouter/grouteMaze.c | 36 +- grouter/grouteMult.c | 28 +- grouter/grouteName.c | 24 +- grouter/grouteNet.c | 60 ++-- grouter/groutePath.c | 30 +- grouter/groutePen.c | 46 +-- grouter/groutePin.c | 36 +- grouter/grouteTest.c | 36 +- grouter/grouteTile.c | 36 +- grouter/grouter.h | 20 +- irouter/irCommand.c | 340 +++++++++---------- irouter/irDebug.h | 18 +- irouter/irInternal.h | 28 +- irouter/irMain.c | 28 +- irouter/irRoute.c | 134 ++++---- irouter/irTestCmd.c | 42 +-- irouter/irUtils.c | 40 +-- irouter/irouter.h | 18 +- lef/defRead.c | 42 +-- lef/defWrite.c | 56 +-- lef/lefCmd.c | 6 +- lef/lefRead.c | 30 +- lef/lefTech.c | 6 +- lef/lefWrite.c | 2 +- lisp/lisp.h | 2 +- lisp/lispA-Z.c | 28 +- lisp/lispA-Z.h | 2 +- lisp/lispArith.c | 8 +- lisp/lispEval.c | 10 +- lisp/lispFrame.c | 8 +- lisp/lispGC.c | 22 +- lisp/lispIO.c | 12 +- lisp/lispInt.h | 6 +- lisp/lispMagic.c | 36 +- lisp/lispMain.c | 4 +- lisp/lispParse.c | 12 +- lisp/lispPrint.c | 2 +- lisp/lispString.c | 2 +- lisp/lispTrace.c | 4 +- lisp/lispargs.h | 2 +- magic/magicTop.c | 26 +- mzrouter/mzBlock.c | 240 ++++++------- mzrouter/mzDebug.c | 92 ++--- mzrouter/mzDebug.h | 18 +- mzrouter/mzEstimate.c | 242 ++++++------- mzrouter/mzHint.c | 56 +-- mzrouter/mzInit.c | 56 +-- mzrouter/mzInternal.h | 76 ++--- mzrouter/mzMain.c | 138 ++++---- mzrouter/mzNumLine.c | 40 +-- mzrouter/mzSearch.c | 132 +++---- mzrouter/mzStart.c | 52 +-- mzrouter/mzSubrs.c | 88 ++--- mzrouter/mzTech.c | 142 ++++---- mzrouter/mzTestCmd.c | 86 ++--- mzrouter/mzWalk.c | 44 +-- mzrouter/mzXtndDown.c | 94 ++--- mzrouter/mzXtndLeft.c | 96 +++--- mzrouter/mzXtndRght.c | 106 +++--- mzrouter/mzXtndUp.c | 94 ++--- mzrouter/mzrouter.h | 62 ++-- net2ir/net2ir.c | 10 +- netmenu/NMbutton.c | 42 +-- netmenu/NMcmdAK.c | 40 +-- netmenu/NMcmdLZ.c | 36 +- netmenu/NMlabel.c | 56 +-- netmenu/NMmain.c | 46 +-- netmenu/NMnetlist.c | 66 ++-- netmenu/NMshowcell.c | 46 +-- netmenu/NMshowpt.c | 32 +- netmenu/NMundo.c | 28 +- netmenu/NMwiring.c | 106 +++--- netmenu/netmenu.h | 20 +- netmenu/nmInt.h | 20 +- oa/magicInit.cpp | 36 +- oa/magicOA.cpp | 44 +-- oa/magicOA.h | 18 +- oa/oa.c | 2 +- plot/plot.h | 20 +- plot/plotCmd.c | 40 +-- plot/plotGremln.c | 56 +-- plot/plotHP.c | 16 +- plot/plotInt.h | 26 +- plot/plotMain.c | 34 +- plot/plotPNM.c | 60 ++-- plot/plotPS.c | 68 ++-- plot/plotPixels.c | 96 +++--- plot/plotRutils.c | 90 ++--- plot/plotVers.c | 90 ++--- plow/PlowCmd.c | 22 +- plow/PlowJogs.c | 34 +- plow/PlowMain.c | 70 ++-- plow/PlowQueue.c | 30 +- plow/PlowRandom.c | 30 +- plow/PlowRules1.c | 38 +-- plow/PlowRules2.c | 48 +-- plow/PlowRules3.c | 22 +- plow/PlowSearch.c | 40 +-- plow/PlowTech.c | 44 +-- plow/PlowTest.c | 38 +-- plow/PlowWidth.c | 32 +- plow/PlowYank.c | 36 +- plow/plow.h | 20 +- plow/plowDebugInt.h | 20 +- plow/plowInt.h | 20 +- readline/readline-4.3/bind.c | 12 +- readline/readline-4.3/callback.c | 2 +- readline/readline-4.3/complete.c | 12 +- readline/readline-4.3/display.c | 12 +- readline/readline-4.3/emacs_keymap.c | 2 +- readline/readline-4.3/examples/excallback.c | 6 +- readline/readline-4.3/examples/fileman.c | 2 +- readline/readline-4.3/examples/manexamp.c | 2 +- readline/readline-4.3/examples/readlinebuf.h | 26 +- readline/readline-4.3/examples/rlfe.c | 22 +- readline/readline-4.3/funmap.c | 2 +- readline/readline-4.3/histexpand.c | 12 +- readline/readline-4.3/histfile.c | 4 +- readline/readline-4.3/history.c | 2 +- readline/readline-4.3/history.h | 2 +- readline/readline-4.3/input.c | 8 +- readline/readline-4.3/kill.c | 4 +- readline/readline-4.3/mbutil.c | 16 +- readline/readline-4.3/misc.c | 2 +- readline/readline-4.3/nls.c | 4 +- readline/readline-4.3/readline.c | 8 +- readline/readline-4.3/readline.h | 8 +- readline/readline-4.3/rltty.c | 4 +- readline/readline-4.3/signals.c | 2 +- readline/readline-4.3/support/wcwidth.c | 2 +- readline/readline-4.3/terminal.c | 4 +- readline/readline-4.3/text.c | 14 +- readline/readline-4.3/tilde.c | 4 +- readline/readline-4.3/vi_mode.c | 6 +- resis/ResBasic.c | 28 +- resis/ResChecks.c | 12 +- resis/ResConDCS.c | 48 +-- resis/ResDebug.c | 8 +- resis/ResFract.c | 58 ++-- resis/ResJunct.c | 12 +- resis/ResMain.c | 104 +++--- resis/ResMakeRes.c | 120 +++---- resis/ResMerge.c | 116 +++---- resis/ResPrint.c | 28 +- resis/ResReadSim.c | 96 +++--- resis/ResRex.c | 122 +++---- resis/ResSimple.c | 178 +++++----- resis/ResUtils.c | 62 ++-- resis/ResWrite.c | 28 +- resis/resis.h | 40 +-- router/router.h | 20 +- router/routerInt.h | 22 +- router/rtrChannel.c | 36 +- router/rtrCmd.c | 24 +- router/rtrDcmpose.c | 52 +-- router/rtrDcmpose.h | 22 +- router/rtrFdback.c | 30 +- router/rtrHazards.c | 34 +- router/rtrMain.c | 28 +- router/rtrPaint.c | 42 +-- router/rtrPin.c | 36 +- router/rtrSide.c | 30 +- router/rtrStem.c | 56 +-- router/rtrTech.c | 30 +- router/rtrTravers.c | 46 +-- router/rtrVia.c | 50 +-- router/tclroute.c | 2 +- select/selCreate.c | 62 ++-- select/selDisplay.c | 30 +- select/selEnum.c | 48 +-- select/selInt.h | 20 +- select/selOps.c | 66 ++-- select/selUndo.c | 32 +- select/selUnselect.c | 18 +- select/select.h | 20 +- sim/SimDBstuff.c | 58 ++-- sim/SimExtract.c | 36 +- sim/SimRsim.c | 50 +-- sim/SimSelect.c | 60 ++-- tcltk/bsitools.tcl | 2 +- tcltk/console.tcl | 6 +- tcltk/drcmgr.tcl | 2 +- tcltk/libmgr.tcl | 4 +- tcltk/mazeroute.tcl | 12 +- tcltk/socketcmd.tcl | 2 +- tcltk/strip_reflibs.tcl | 2 +- tcltk/tclmagic.c | 36 +- tcltk/texthelper.tcl | 6 +- tcltk/tkcon.tcl | 90 ++--- tcltk/toolkit.tcl | 28 +- tcltk/toolkit_rev0.tcl | 8 +- tcltk/tools.tcl | 10 +- tcltk/wrapper.tcl | 18 +- textio/textio.h | 20 +- textio/textioInt.h | 22 +- textio/txCommands.c | 92 ++--- textio/txInput.c | 108 +++--- textio/txMain.c | 24 +- textio/txMore.c | 22 +- textio/txOutput.c | 68 ++-- textio/txcommands.h | 46 +-- tiles/search.c | 22 +- tiles/tile.c | 46 +-- tiles/tile.h | 30 +- utils/LIBdbio.c | 22 +- utils/LIBmain.c | 24 +- utils/LIBtextio.c | 34 +- utils/args.c | 22 +- utils/child.c | 4 +- utils/dqueue.c | 28 +- utils/dqueue.h | 22 +- utils/finddisp.c | 24 +- utils/flock.c | 8 +- utils/flsbuf.c | 20 +- utils/fraction.c | 22 +- utils/geofast.h | 20 +- utils/geometry.c | 74 ++-- utils/geometry.h | 26 +- utils/getrect.c | 20 +- utils/hash.c | 46 +-- utils/hash.h | 22 +- utils/heap.c | 40 +-- utils/heap.h | 26 +- utils/ihash.c | 76 ++--- utils/ihash.h | 26 +- utils/list.c | 36 +- utils/list.h | 24 +- utils/lookup.c | 56 +-- utils/lookupany.c | 22 +- utils/lookupfull.c | 28 +- utils/macros.c | 30 +- utils/macros.h | 22 +- utils/magic.h | 24 +- utils/magsgtty.h | 20 +- utils/main.c | 66 ++-- utils/main.h | 22 +- utils/malloc.c | 26 +- utils/malloc.h | 20 +- utils/match.c | 36 +- utils/maxrect.c | 8 +- utils/maxrect.h | 20 +- utils/netlist.c | 32 +- utils/netlist.h | 20 +- utils/niceabort.c | 28 +- utils/parser.c | 28 +- utils/parsetest.c | 2 +- utils/path.c | 36 +- utils/paths.h | 20 +- utils/pathvisit.c | 28 +- utils/pathvisit.h | 20 +- utils/port.c | 20 +- utils/runstats.c | 22 +- utils/runstats.h | 20 +- utils/set.c | 40 +-- utils/show.c | 22 +- utils/signals.c | 56 +-- utils/signals.h | 22 +- utils/stack.c | 34 +- utils/stack.h | 20 +- utils/strdup.c | 28 +- utils/styles.h | 22 +- utils/tech.c | 38 +-- utils/tech.h | 20 +- utils/touchingtypes.h | 22 +- utils/touchtypes.c | 42 +-- utils/undo.c | 48 +-- utils/undo.h | 24 +- utils/utils.h | 20 +- windows/windClient.c | 70 ++-- windows/windCmdAM.c | 60 ++-- windows/windCmdNR.c | 44 +-- windows/windCmdSZ.c | 78 ++--- windows/windDebug.c | 36 +- windows/windDisp.c | 80 ++--- windows/windInt.h | 22 +- windows/windMain.c | 54 +-- windows/windMove.c | 88 ++--- windows/windSearch.c | 34 +- windows/windSend.c | 44 +-- windows/windTrans.c | 54 +-- windows/windView.c | 54 +-- windows/windows.h | 50 +-- wiring/wireInt.h | 20 +- wiring/wireOps.c | 48 +-- wiring/wireTech.c | 26 +- wiring/wireUndo.c | 26 +- wiring/wiring.h | 20 +- 505 files changed, 10013 insertions(+), 10020 deletions(-) diff --git a/Makefile b/Makefile index 06d96f3d..7fc163dc 100644 --- a/Makefile +++ b/Makefile @@ -131,16 +131,9 @@ TAGS: ${RM} TAGS find . ${MODULES} ${PROGRAMS} -name "*.[ch]" -maxdepth 1 | xargs etags -o TAGS -<<<<<<< HEAD -fix-trailing-whitespace: - find -name "*.[ch]" | xargs sed -i -e's/\s\+$$//' - find -name "*.cpp" | xargs sed -i -e's/\s\+$$//' - find -name "*.tcl" | xargs sed -i -e's/\s\+$$//' -======= setup-git: git config --local include.path ../.gitconfig git stash save rm .git/index git checkout HEAD -- "$$(git rev-parse --show-toplevel)" git stash pop ->>>>>>> Adding git expanding command. diff --git a/VERSION b/VERSION index b20417a6..e0ec0803 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -8.3.13 +8.3.14 diff --git a/bplane/bpBins.c b/bplane/bpBins.c index 24a777f7..594984de 100644 --- a/bplane/bpBins.c +++ b/bplane/bpBins.c @@ -1,28 +1,28 @@ // ************************************************************************ -// +// // Copyright (c) 1995-2002 Juniper Networks, Inc. All rights reserved. -// +// // Permission is hereby granted, without written agreement and without // license or royalty fees, to use, copy, modify, and distribute this // software and its documentation for any purpose, provided that the // above copyright notice and the following three paragraphs appear in // all copies of this software. -// +// // IN NO EVENT SHALL JUNIPER NETWORKS, INC. BE LIABLE TO ANY PARTY FOR // DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES // ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN IF // JUNIPER NETWORKS, INC. HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH // DAMAGE. -// +// // JUNIPER NETWORKS, INC. SPECIFICALLY DISCLAIMS ANY WARRANTIES, // INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF // MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, AND // NON-INFRINGEMENT. -// +// // THE SOFTWARE PROVIDED HEREUNDER IS ON AN "AS IS" BASIS, AND JUNIPER // NETWORKS, INC. HAS NO OBLIGATION TO PROVIDE MAINTENANCE, SUPPORT, // UPDATES, ENHANCEMENTS, OR MODIFICATIONS. -// +// // ************************************************************************ @@ -47,8 +47,8 @@ /* Tcl linked Parameters */ int bpMinBAPop = 10; /* don't sub(bin) when count less than this */ -double bpMinAvgBinPop = 1.0; /* try to keep average bin pop at or - * below this +double bpMinAvgBinPop = 1.0; /* try to keep average bin pop at or + * below this */ /* @@ -73,10 +73,10 @@ static __inline__ int roundUp(int i, int res) * bpBinArrayNew -- allocate new bin array. * * ---------------------------------------------------------------------------- - */ -static BinArray *bpBinArrayNew(int dx, /* x diameter of bins */ + */ +static BinArray *bpBinArrayNew(int dx, /* x diameter of bins */ int dy, /* y diameter of bins */ - Rect *bbox) /* area covered */ + Rect *bbox) /* area covered */ { BinArray *new; @@ -92,7 +92,7 @@ static BinArray *bpBinArrayNew(int dx, /* x diameter of bins */ numBins = dimX*dimY; /* allocate array */ - size = sizeof(BinArray) + numBins*(sizeof(void *)); + size = sizeof(BinArray) + numBins*(sizeof(void *)); new = (BinArray *)callocMagic(size); /* initial */ @@ -100,7 +100,7 @@ static BinArray *bpBinArrayNew(int dx, /* x diameter of bins */ new->ba_dx = dx; new->ba_dy = dy; new->ba_dimX = dimX; - new->ba_numBins = numBins; + new->ba_numBins = numBins; /* pull bbox back one from top-edge, right-edge, to simplify index * computation in bpEnumPush @@ -119,11 +119,11 @@ static BinArray *bpBinArrayNew(int dx, /* x diameter of bins */ * bpBinAdd -- add element to bin array * * ---------------------------------------------------------------------------- - */ + */ void bpBinAdd(BinArray *ba, Element *e) { - int i; /* bin index */ + int i; /* bin index */ /* compute bin index */ if(GEO_WIDTH(&e->e_rect) >= ba->ba_dx || @@ -170,7 +170,7 @@ void bpBinAdd(BinArray *ba, * Returns: (singly linked) list of elements formerly in the array * * ---------------------------------------------------------------------------- - */ + */ static Element *bpBinArrayUnbuild(BinArray *ba) { Element *elements = NULL; @@ -206,7 +206,7 @@ static Element *bpBinArrayUnbuild(BinArray *ba) /* free the array */ freeMagic((char *)ba); - + return elements; } @@ -216,15 +216,15 @@ static Element *bpBinArrayUnbuild(BinArray *ba) * ---------------------------------------------------------------------------- * bpListExceedsQ -- * - * check if element list exceeds given length + * check if element list exceeds given length * * Returns size of list. * * ---------------------------------------------------------------------------- - */ -static __inline__ int + */ +static __inline__ int bpListExceedsQ(Element *e, /* list */ - int n) /* length to check against */ + int n) /* length to check against */ { n++; @@ -243,21 +243,21 @@ bpListExceedsQ(Element *e, /* list */ * bpBinArraySizeIt -- choose bin sizes for new bin array. * * RESULT: - * + * * normally returns TRUE, * returns FALSE on failure: could not come up with binning that * makes progress. * - * NOTE: the various 'return' parameters are not set on failure. + * NOTE: the various 'return' parameters are not set on failure. * * ---------------------------------------------------------------------------- - */ -static __inline__ bool + */ +static __inline__ bool bpBinArraySizeIt(Rect *bbox, /* bin array bbox */ Element *elements, /* initial elements */ int *dxp, /* return bin x-diameter here */ int *dyp, /* return bin y-diameter here */ - int *maxDXp, + int *maxDXp, int *maxDYp, int *numBinsp, /* return number of bins here */ int *countp) /* return number of elements here */ @@ -269,15 +269,15 @@ bpBinArraySizeIt(Rect *bbox, /* bin array bbox */ int w = GEO_WIDTH(bbox); int dx,dy; /* individual bin diameter */ - int maxEX, maxEY; /* max element dimensions */ + int maxEX, maxEY; /* max element dimensions */ int maxDX, maxDY; /* max bin diameter allowed */ int xDim, yDim; /* array dimensions */ int maxBins; /* max number of bins - * (due to bpMinAvgBinPop) + * (due to bpMinAvgBinPop) */ - /* compute max element dimensions + /* compute max element dimensions * (would like bins coarser than max dimensisons) */ { @@ -298,15 +298,15 @@ bpBinArraySizeIt(Rect *bbox, /* bin array bbox */ count++; } } - + /* if too few elements, don't bother with binning */ if(count < bpMinBAPop) return FALSE; - /* if too tiny don't subbin, + /* if too tiny don't subbin, * avoid nasty corner-cases in code below */ if(h<2 || w<2) return FALSE; - + /* tentatively choose bin size to fit all elements */ dx = maxEX+1; dy = maxEY+1; @@ -380,7 +380,7 @@ bpBinArraySizeIt(Rect *bbox, /* bin array bbox */ dx = maxDX; dy = h+1; } - else + else { /* are we making progress? */ if(yOver == count) return FALSE; @@ -423,16 +423,16 @@ bpBinArraySizeIt(Rect *bbox, /* bin array bbox */ dx = (w+1) / MAX(xDimTarget,1); dx = MIN(dx,maxDX); } - else - { + else + { /* try for square bins */ double area = h * (w + 0.0); int d = MAX(sqrt(area/maxBins),1); - if(dmaxDX) { /* d too big for x-dim @@ -473,7 +473,7 @@ bpBinArraySizeIt(Rect *bbox, /* bin array bbox */ } else { - /* we're cool, create square bins */ + /* we're cool, create square bins */ dx = d; dy = d; } @@ -485,7 +485,7 @@ bpBinArraySizeIt(Rect *bbox, /* bin array bbox */ numBins = xDim*yDim; } - + /* DEBUG */ if(BPD) { @@ -518,15 +518,15 @@ bpBinArraySizeIt(Rect *bbox, /* bin array bbox */ * Returns: pointer to new bin array. * * ---------------------------------------------------------------------------- - */ -static BinArray *bpBinArrayBuild1(Rect *bbox, + */ +static BinArray *bpBinArrayBuild1(Rect *bbox, Element *elements, /* initial elements */ int dx, /* bin diameter */ int dy) - -{ + +{ BinArray *ba; - + /* build bin array */ ba = bpBinArrayNew(dx, dy, bbox); @@ -538,10 +538,10 @@ static BinArray *bpBinArrayBuild1(Rect *bbox, /* pop list */ e = elements; elements = e->e_link; - + bpBinAdd(ba, e); } - + return ba; } @@ -550,20 +550,20 @@ static BinArray *bpBinArrayBuild1(Rect *bbox, * * bpBinArrayBuild -- build and populate bin array of given area, * - * NOTE: optimal bin size determined by trial and error. - * oversized subbinned, as indicated. + * NOTE: optimal bin size determined by trial and error. + * oversized subbinned, as indicated. * * Returns: pointer to new bin array, NULL on failure. * * ---------------------------------------------------------------------------- - */ -BinArray *bpBinArrayBuild(Rect bbox, + */ +BinArray *bpBinArrayBuild(Rect bbox, Element *elements, /* initial elements */ bool subbin) /* subbin as needed */ { BinArray *ba; int dx,dy; /* individual bin diameter */ - int maxDX, maxDY; + int maxDX, maxDY; int numBins; int count; @@ -594,13 +594,13 @@ BinArray *bpBinArrayBuild(Rect bbox, { BinArray *sub; - sub = bpBinArrayBuild(bpBinArea(ba,i), + sub = bpBinArrayBuild(bpBinArea(ba,i), bpBinList(ba, i), TRUE); if(sub) { - ba->ba_bins[i] = + ba->ba_bins[i] = (void *) ((pointertype) sub | BT_ARRAY); } } @@ -609,14 +609,14 @@ BinArray *bpBinArrayBuild(Rect bbox, /* sub-bin oversized */ { BinArray *sub; - + sub = bpBinArrayBuild(bbox, bpBinList(ba, numBins), TRUE); if(sub) { - ba->ba_bins[numBins] = + ba->ba_bins[numBins] = (void *) ((pointertype) sub | BT_ARRAY); } } @@ -637,7 +637,7 @@ BinArray *bpBinArrayBuild(Rect bbox, * Called prior to enumerations. * * ---------------------------------------------------------------------------- - */ + */ int bpBinLife = 0; void bpBinsUpdate(BPlane *bp) { @@ -651,7 +651,7 @@ void bpBinsUpdate(BPlane *bp) /* do bins already exist ? */ oldBins = (bp->bp_rootNode != 0); - + /* if bins exist, dissolve them */ if(oldBins) { @@ -668,7 +668,7 @@ void bpBinsUpdate(BPlane *bp) e->e_link = elist; elist = e; } - + bp->bp_inBox = elist; } @@ -703,8 +703,8 @@ void bpBinsUpdate(BPlane *bp) bp->bp_inAdds = 0; /* if(BPD) bpDump(bp, 0); */ } - - + + diff --git a/bplane/bpDump.c b/bplane/bpDump.c index 10b617cd..e73e9a84 100644 --- a/bplane/bpDump.c +++ b/bplane/bpDump.c @@ -1,35 +1,35 @@ // ************************************************************************ -// +// // Copyright (c) 1995-2002 Juniper Networks, Inc. All rights reserved. -// +// // Permission is hereby granted, without written agreement and without // license or royalty fees, to use, copy, modify, and distribute this // software and its documentation for any purpose, provided that the // above copyright notice and the following three paragraphs appear in // all copies of this software. -// +// // IN NO EVENT SHALL JUNIPER NETWORKS, INC. BE LIABLE TO ANY PARTY FOR // DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES // ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN IF // JUNIPER NETWORKS, INC. HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH // DAMAGE. -// +// // JUNIPER NETWORKS, INC. SPECIFICALLY DISCLAIMS ANY WARRANTIES, // INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF // MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, AND // NON-INFRINGEMENT. -// +// // THE SOFTWARE PROVIDED HEREUNDER IS ON AN "AS IS" BASIS, AND JUNIPER // NETWORKS, INC. HAS NO OBLIGATION TO PROVIDE MAINTENANCE, SUPPORT, // UPDATES, ENHANCEMENTS, OR MODIFICATIONS. -// +// // ************************************************************************ /* bpDump.c * - * routines to dump bin system (for debugging) + * routines to dump bin system (for debugging) * */ @@ -49,8 +49,8 @@ static int bpDumpFlags; /* set by bpDump, used by subroutines */ * tab over n spaces on stderr * * ---------------------------------------------------------------------------- - */ -static void bpIndent(int n) + */ +static void bpIndent(int n) { int i; @@ -60,11 +60,11 @@ static void bpIndent(int n) /* * ---------------------------------------------------------------------------- * bpDumpRect -- - * + * * list rects. * * ---------------------------------------------------------------------------- - */ + */ void bpDumpRect(Rect *r) { if(bpDumpFlags & BPD_INTERNAL_UNITS) @@ -98,16 +98,16 @@ void bpDumpRect(Rect *r) /* * ---------------------------------------------------------------------------- * bpDumpElements -- - * + * * list rects. * * ---------------------------------------------------------------------------- - */ + */ void bpDumpElements(Element *list, int indent) { Element *e; - for(e = list; e; e=e->e_link) + for(e = list; e; e=e->e_link) { bpIndent(indent); fprintf(stderr,"{element "); @@ -127,11 +127,11 @@ void bpDumpElements(Element *list, int indent) /* * ---------------------------------------------------------------------------- * bpDumpEnums -- - * + * * list active enumerations * * ---------------------------------------------------------------------------- - */ + */ void bpDumpEnums(BPEnum *bpe, int indent) { for(; bpe; bpe=bpe->bpe_next) @@ -146,10 +146,10 @@ void bpDumpEnums(BPEnum *bpe, int indent) * ---------------------------------------------------------------------------- * bpBinArrayDump -- * - * recursively dump hierarchical bin system + * recursively dump hierarchical bin system * * ---------------------------------------------------------------------------- - */ + */ static void bpBinArrayDump(BinArray *ba, int indent) { @@ -207,7 +207,7 @@ static void bpBinArrayDump(BinArray *ba, int indent) /* open bin */ bpIndent(indent+2); fprintf(stderr,"{bin {number %d} { bbox ", - i); + i); bpDumpRect(&area); fprintf(stderr," }\n"); @@ -269,7 +269,7 @@ static void bpBinArrayDump(BinArray *ba, int indent) * dump bplane (for debugging) * * ---------------------------------------------------------------------------- - */ + */ void bpDump(BPlane *bp, int flags) { fprintf(stderr, "======= BPLANE DUMP ======\n"); @@ -277,7 +277,7 @@ void bpDump(BPlane *bp, int flags) bpDumpFlags = flags; /* open bplane */ - fprintf(stderr,"{bplane {count %d} {bbox ", + fprintf(stderr,"{bplane {count %d} {bbox ", bp->bp_count); bpDumpRect(&bp->bp_bbox); fprintf(stderr,"}\n"); @@ -292,7 +292,7 @@ void bpDump(BPlane *bp, int flags) /*** bins ***/ bpIndent(2); - fprintf(stderr,"{binned {area "); + fprintf(stderr,"{binned {area "); bpDumpRect(&bp->bp_binArea); fprintf(stderr,"}\n"); @@ -302,8 +302,8 @@ void bpDump(BPlane *bp, int flags) /*** enums ***/ bpIndent(2); - fprintf(stderr,"{enums\n"); - + fprintf(stderr,"{enums\n"); + bpDumpEnums(bp->bp_enums,4); bpIndent(2); diff --git a/bplane/bpEnum.c b/bplane/bpEnum.c index 542b5bb3..c63a0e41 100644 --- a/bplane/bpEnum.c +++ b/bplane/bpEnum.c @@ -1,28 +1,28 @@ // ************************************************************************ -// +// // Copyright (c) 1995-2002 Juniper Networks, Inc. All rights reserved. -// +// // Permission is hereby granted, without written agreement and without // license or royalty fees, to use, copy, modify, and distribute this // software and its documentation for any purpose, provided that the // above copyright notice and the following three paragraphs appear in // all copies of this software. -// +// // IN NO EVENT SHALL JUNIPER NETWORKS, INC. BE LIABLE TO ANY PARTY FOR // DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES // ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN IF // JUNIPER NETWORKS, INC. HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH // DAMAGE. -// +// // JUNIPER NETWORKS, INC. SPECIFICALLY DISCLAIMS ANY WARRANTIES, // INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF // MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, AND // NON-INFRINGEMENT. -// +// // THE SOFTWARE PROVIDED HEREUNDER IS ON AN "AS IS" BASIS, AND JUNIPER // NETWORKS, INC. HAS NO OBLIGATION TO PROVIDE MAINTENANCE, SUPPORT, // UPDATES, ENHANCEMENTS, OR MODIFICATIONS. -// +// // ************************************************************************ @@ -47,11 +47,11 @@ * set up search. * * ---------------------------------------------------------------------------- - */ + */ void BPEnumInit(BPEnum *bpe, /* enum to initialize */ - BPlane *bp, + BPlane *bp, Rect *area, /* search area */ - int match, + int match, char *id) /* for debugging */ { bool inside = FALSE; @@ -79,7 +79,7 @@ void BPEnumInit(BPEnum *bpe, /* enum to initialize */ /* don't need to setup stack, just return */ return; - case BPE_ALL: + case BPE_ALL: /* If we start 'INSIDE', no match checks will be done */ bpe->bpe_top->bps_state = BPS_BINS_INSIDE; inside = TRUE; @@ -94,7 +94,7 @@ void BPEnumInit(BPEnum *bpe, /* enum to initialize */ } else { - bpe->bpe_top->bps_state = BPS_BINS; + bpe->bpe_top->bps_state = BPS_BINS; bpe->bpe_subBinMinX = GEO_WIDTH(&bpe->bpe_srchArea)/2; bpe->bpe_subBinMinY = GEO_HEIGHT(&bpe->bpe_srchArea)/2; bpBinsUpdate(bp); @@ -111,7 +111,7 @@ void BPEnumInit(BPEnum *bpe, /* enum to initialize */ } else { - bpe->bpe_top->bps_state = BPS_BINS; + bpe->bpe_top->bps_state = BPS_BINS; bpe->bpe_subBinMinX = GEO_WIDTH(&bpe->bpe_srchArea)/2; bpe->bpe_subBinMinY = GEO_HEIGHT(&bpe->bpe_srchArea)/2; bpBinsUpdate(bp); @@ -119,14 +119,14 @@ void BPEnumInit(BPEnum *bpe, /* enum to initialize */ break; default: - ASSERT(FALSE,"BPEnumInit, bad match value"); + ASSERT(FALSE,"BPEnumInit, bad match value"); } /* push rootnode */ if(bp->bp_rootNode) { bpEnumPush(bpe, bp->bp_rootNode, inside); - bpe->bpe_nextElement = NULL; + bpe->bpe_nextElement = NULL; } else { @@ -143,7 +143,7 @@ void BPEnumInit(BPEnum *bpe, /* enum to initialize */ * terminate enumeration * * ---------------------------------------------------------------------------- - */ + */ void BPEnumTerm(BPEnum *bpe) { BPEnum **linkp; diff --git a/bplane/bpEnum.h b/bplane/bpEnum.h index 0de4050f..d1535635 100644 --- a/bplane/bpEnum.h +++ b/bplane/bpEnum.h @@ -1,28 +1,28 @@ // ************************************************************************ -// +// // Copyright (c) 1995-2002 Juniper Networks, Inc. All rights reserved. -// +// // Permission is hereby granted, without written agreement and without // license or royalty fees, to use, copy, modify, and distribute this // software and its documentation for any purpose, provided that the // above copyright notice and the following three paragraphs appear in // all copies of this software. -// +// // IN NO EVENT SHALL JUNIPER NETWORKS, INC. BE LIABLE TO ANY PARTY FOR // DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES // ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN IF // JUNIPER NETWORKS, INC. HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH // DAMAGE. -// +// // JUNIPER NETWORKS, INC. SPECIFICALLY DISCLAIMS ANY WARRANTIES, // INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF // MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, AND // NON-INFRINGEMENT. -// +// // THE SOFTWARE PROVIDED HEREUNDER IS ON AN "AS IS" BASIS, AND JUNIPER // NETWORKS, INC. HAS NO OBLIGATION TO PROVIDE MAINTENANCE, SUPPORT, // UPDATES, ENHANCEMENTS, OR MODIFICATIONS. -// +// // ************************************************************************ #ifndef _BPENUM_H @@ -44,12 +44,12 @@ extern void DumpRect(char *msg, Rect *r); /* state machine states */ -#define BPS_BINS 0 -#define BPS_BINS_INSIDE 1 -#define BPS_INBOX 2 -#define BPS_INBOX_INSIDE 3 -#define BPS_HASH 4 -#define BPS_DONE 5 +#define BPS_BINS 0 +#define BPS_BINS_INSIDE 1 +#define BPS_INBOX 2 +#define BPS_INBOX_INSIDE 3 +#define BPS_HASH 4 +#define BPS_DONE 5 /* range code */ #define R_LEFT 1 @@ -65,7 +65,7 @@ extern void DumpRect(char *msg, Rect *r); * Returns: bin area. * * ---------------------------------------------------------------------------- - */ + */ static __inline__ Rect bpBinArea(BinArray *ba, int i) { int dimX = ba->ba_dimX; @@ -74,9 +74,9 @@ static __inline__ Rect bpBinArea(BinArray *ba, int i) int xi = i % dimX; int yi = i / dimX; Rect area; - - area.r_xbot = ba->ba_bbox.r_xbot + dx*xi; - area.r_ybot = ba->ba_bbox.r_ybot + dy*yi; + + area.r_xbot = ba->ba_bbox.r_xbot + dx*xi; + area.r_ybot = ba->ba_bbox.r_ybot + dy*yi; area.r_xtop = area.r_xbot + dx; area.r_ytop = area.r_ybot + dy; @@ -96,7 +96,7 @@ static __inline__ Rect bpBinArea(BinArray *ba, int i) * Returns: int encoding 'range'. * * ---------------------------------------------------------------------------- - */ + */ static __inline__ int bpEnumRange(Rect *bin, Rect *srch) { @@ -125,7 +125,7 @@ bpEnumRange(Rect *bin, Rect *srch) * Returns: TRUE on match, FALSE otherwise. * * ---------------------------------------------------------------------------- - */ + */ static __inline__ bool bpEnumMatchQ(BPEnum *bpe, Element *e) { @@ -149,8 +149,8 @@ bpEnumMatchQ(BPEnum *bpe, Element *e) * push a bin array onto an enum stack. * * ---------------------------------------------------------------------------- - */ -static __inline__ bool bpEnumPushInside(BPEnum *bpe, + */ +static __inline__ bool bpEnumPushInside(BPEnum *bpe, BinArray *ba) { BPStack *bps; @@ -164,7 +164,7 @@ static __inline__ bool bpEnumPushInside(BPEnum *bpe, /* set up indices to scan entire bin array */ bps->bps_i = -1; bps->bps_max = ba->ba_numBins; - + return TRUE; } @@ -174,11 +174,11 @@ static __inline__ bool bpEnumPushInside(BPEnum *bpe, * * push a bin array onto an enum stack. * - * normally returns TRUE, returns FALSE on (possible) state change. + * normally returns TRUE, returns FALSE on (possible) state change. * * ---------------------------------------------------------------------------- - */ -static __inline__ bool bpEnumPush(BPEnum *bpe, + */ +static __inline__ bool bpEnumPush(BPEnum *bpe, BinArray *ba, bool inside) { @@ -194,7 +194,7 @@ static __inline__ bool bpEnumPush(BPEnum *bpe, /* special case inside */ if(inside) return bpEnumPushInside(bpe,ba); - + bbox = &ba->ba_bbox; if(GEO_SURROUND(&bpe->bpe_srchArea,bbox)) { @@ -210,13 +210,13 @@ static __inline__ bool bpEnumPush(BPEnum *bpe, bps->bps_subbin = FALSE; bps->bps_rejects = 0; - /* compute search area for this bin array */ + /* compute search area for this bin array */ dx = ba->ba_dx; dy = ba->ba_dy; - area.r_xbot = bpe->bpe_srchArea.r_xbot - dx; - area.r_xtop = bpe->bpe_srchArea.r_xtop + 1; - area.r_ybot = bpe->bpe_srchArea.r_ybot - dy; - area.r_ytop = bpe->bpe_srchArea.r_ytop + 1; + area.r_xbot = bpe->bpe_srchArea.r_xbot - dx; + area.r_xtop = bpe->bpe_srchArea.r_xtop + 1; + area.r_ybot = bpe->bpe_srchArea.r_ybot - dy; + area.r_ytop = bpe->bpe_srchArea.r_ytop + 1; GEOCLIP(&area,bbox); if(GEO_RECTNULL(&area)) @@ -238,7 +238,7 @@ static __inline__ bool bpEnumPush(BPEnum *bpe, area.r_ybot -= bbox->r_ybot; area.r_ytop -= bbox->r_ybot; - /* DumpRect("area relative to bin bbox = ",&area); */ + /* DumpRect("area relative to bin bbox = ",&area); */ area.r_xbot /= ba->ba_dx; area.r_xtop /= ba->ba_dx; @@ -246,7 +246,7 @@ static __inline__ bool bpEnumPush(BPEnum *bpe, area.r_ytop /= ba->ba_dy; i = area.r_ybot*dimX + area.r_xbot; /* next index */ - bps->bps_i = i-1; + bps->bps_i = i-1; bps->bps_rowMax = i + area.r_xtop - area.r_xbot; bps->bps_max = area.r_ytop*dimX + area.r_xtop; bps->bps_rowDelta = dimX + area.r_xbot - area.r_xtop; @@ -259,19 +259,19 @@ static __inline__ bool bpEnumPush(BPEnum *bpe, } } - return TRUE; + return TRUE; } /* * ---------------------------------------------------------------------------- * bpEnumNextBin1 -- * - * called by bpEnumNextBin() after indexes for new bin are setup + * called by bpEnumNextBin() after indexes for new bin are setup * * returns: normally returns TRUE, returns FALSE on state change. * * ---------------------------------------------------------------------------- - */ + */ static __inline__ bool bpEnumNextBin1(BPEnum *bpe, BPStack *bps, bool inside) { @@ -290,8 +290,8 @@ bpEnumNextBin1(BPEnum *bpe, BPStack *bps, bool inside) * bpEnumNextBin -- * * called by bpEnumNextBINS to advance to next bin (bucket). - * - * cycles through normal bins first, then oversized, + * + * cycles through normal bins first, then oversized, * finally, for toplevel, sets INBOX state. * * sets bpe->bpe_nextElement to first element in next bin. @@ -299,7 +299,7 @@ bpEnumNextBin1(BPEnum *bpe, BPStack *bps, bool inside) * returns: normally returns TRUE, returns FALSE on state change. * * ---------------------------------------------------------------------------- - */ + */ static __inline__ bool bpEnumNextBin(BPEnum *bpe, bool inside) { @@ -308,7 +308,7 @@ bpEnumNextBin(BPEnum *bpe, bool inside) #ifdef PARANOID ASSERT(bps,"bpEnumNextBin"); ASSERT(!bpe->bpe_nextElement,"bpEnumNextBin"); -#endif +#endif /* fprintf(stderr,"DEBUG bpEnumNextBin TOP inside=%d nextElement=%x\n", @@ -318,7 +318,7 @@ bpEnumNextBin(BPEnum *bpe, bool inside) /* consider subbining this bin before advancing to next */ if(!inside) { - if(bps->bps_rejects >= bpMinBAPop + if(bps->bps_rejects >= bpMinBAPop && (bps->bps_subbin || bps->bps_i == bps->bps_node->ba_numBins)) { int i = bps->bps_i; @@ -338,7 +338,7 @@ bpEnumNextBin(BPEnum *bpe, bool inside) } bps->bps_rejects = 0; } - + /* handle inside case first */ if(inside) { @@ -354,7 +354,7 @@ bpEnumNextBin(BPEnum *bpe, bool inside) else { /* cycle only through relevant bins */ - + /* next in row */ if(bps->bps_ibps_rowMax) { @@ -365,7 +365,7 @@ bpEnumNextBin(BPEnum *bpe, bool inside) /* next row */ if(bps->bps_ibps_max) { - bps->bps_i += bps->bps_rowDelta; + bps->bps_i += bps->bps_rowDelta; bps->bps_rowMax += bps->bps_dimX; goto bin; } @@ -382,7 +382,7 @@ bpEnumNextBin(BPEnum *bpe, bool inside) /* fprintf(stderr,"DEBUG BPEnumNextBin Pop.\n"); */ bpe->bpe_top--; if(bpe->bpe_top>bpe->bpe_stack) return FALSE; /* state may have changed */ - + /* inbox */ /* fprintf(stderr,"DEBUG BPEnumNextBin INBOX.\n"); */ bpe->bpe_nextElement = bpe->bpe_plane->bp_inBox; @@ -403,14 +403,14 @@ bpEnumNextBin(BPEnum *bpe, bool inside) * (bin enumeration.) * * ---------------------------------------------------------------------------- - */ -static __inline__ Element* bpEnumNextBINS(BPEnum *bpe, bool inside) + */ +static __inline__ Element* bpEnumNextBINS(BPEnum *bpe, bool inside) { /* bin by bin */ do { - /* search this bin */ - Element *e = bpe->bpe_nextElement; + /* search this bin */ + Element *e = bpe->bpe_nextElement; while(e && !inside && !bpEnumMatchQ(bpe,e)) { @@ -427,7 +427,7 @@ static __inline__ Element* bpEnumNextBINS(BPEnum *bpe, bool inside) bpe->bpe_nextElement = NULL; } - while(bpEnumNextBin(bpe,inside)); + while(bpEnumNextBin(bpe,inside)); /* next state */ return NULL; @@ -442,8 +442,8 @@ static __inline__ Element* bpEnumNextBINS(BPEnum *bpe, bool inside) * unbinned enumeration. * * ---------------------------------------------------------------------------- - */ -static __inline__ Element *bpEnumNextINBOX(BPEnum *bpe, + */ +static __inline__ Element *bpEnumNextINBOX(BPEnum *bpe, bool inside) { Element *e = bpe->bpe_nextElement; @@ -469,14 +469,14 @@ static __inline__ Element *bpEnumNextINBOX(BPEnum *bpe, * (hash based (EQUALS) enumerations.) * * ---------------------------------------------------------------------------- - */ -static __inline__ Element *bpEnumNextHASH(BPEnum *bpe) + */ +static __inline__ Element *bpEnumNextHASH(BPEnum *bpe) { Element *e = bpe->bpe_nextElement; if(e) { - bpe->bpe_nextElement = + bpe->bpe_nextElement = IHashLookUpNext(bpe->bpe_plane->bp_hashTable, e); } else @@ -493,7 +493,7 @@ static __inline__ Element *bpEnumNextHASH(BPEnum *bpe) * get next element in enumeration. * * ---------------------------------------------------------------------------- - */ + */ static __inline__ void *BPEnumNext(BPEnum *bpe) { Element *e; diff --git a/bplane/bpMain.c b/bplane/bpMain.c index 93f94379..f435cf2d 100644 --- a/bplane/bpMain.c +++ b/bplane/bpMain.c @@ -1,28 +1,28 @@ // ************************************************************************ -// +// // Copyright (c) 1995-2002 Juniper Networks, Inc. All rights reserved. -// +// // Permission is hereby granted, without written agreement and without // license or royalty fees, to use, copy, modify, and distribute this // software and its documentation for any purpose, provided that the // above copyright notice and the following three paragraphs appear in // all copies of this software. -// +// // IN NO EVENT SHALL JUNIPER NETWORKS, INC. BE LIABLE TO ANY PARTY FOR // DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES // ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN IF // JUNIPER NETWORKS, INC. HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH // DAMAGE. -// +// // JUNIPER NETWORKS, INC. SPECIFICALLY DISCLAIMS ANY WARRANTIES, // INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF // MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, AND // NON-INFRINGEMENT. -// +// // THE SOFTWARE PROVIDED HEREUNDER IS ON AN "AS IS" BASIS, AND JUNIPER // NETWORKS, INC. HAS NO OBLIGATION TO PROVIDE MAINTENANCE, SUPPORT, // UPDATES, ENHANCEMENTS, OR MODIFICATIONS. -// +// // ************************************************************************ @@ -51,7 +51,7 @@ * Return newly created BPlane. * * ---------------------------------------------------------------------------- - */ + */ BPlane *BPNew(void) { BPlane *new; @@ -92,7 +92,7 @@ BPlane *BPNew(void) * free (empty) BPlane * * ---------------------------------------------------------------------------- - */ + */ void BPFree(BPlane *bp) { ASSERT(bp->bp_count == 0,"BPFree"); @@ -109,7 +109,7 @@ void BPFree(BPlane *bp) * NOTE: e_rect better be canonical! * * ---------------------------------------------------------------------------- - */ + */ void BPAdd(BPlane *bp, void *element) { int size; @@ -126,8 +126,8 @@ void BPAdd(BPlane *bp, void *element) ASSERT(!bp->bp_enums, "BPAdd, attempted during active enumerations"); - /* element rect must be canonical! */ -#ifdef PARANOID + /* element rect must be canonical! */ +#ifdef PARANOID ASSERT(GeoIsCanonicalRect(r),"BPAdd, rect must be canonical."); #endif @@ -145,7 +145,7 @@ void BPAdd(BPlane *bp, void *element) { GeoIncludeRectInBBox(r,&bp->bp_bbox); } - + /* no bins? */ if(!bp->bp_rootNode) goto inBox; @@ -175,10 +175,10 @@ void BPAdd(BPlane *bp, void *element) * remove element from bplane * * ---------------------------------------------------------------------------- - */ + */ void BPDelete(BPlane *bp, void *element) { - Element *e = element; + Element *e = element; ASSERT(e,"BPDelete"); if (bp->bp_count == 0) @@ -219,7 +219,7 @@ void BPDelete(BPlane *bp, void *element) } } - IHashDelete(bp->bp_hashTable, e); + IHashDelete(bp->bp_hashTable, e); /* next pointer of prev element */ *e->e_linkp = e->e_link; @@ -234,11 +234,11 @@ void BPDelete(BPlane *bp, void *element) * * Get current bplane bbox. * - * returns: current bplane bbox - * (returns an inverted rect, if bplane is empty) + * returns: current bplane bbox + * (returns an inverted rect, if bplane is empty) * * ---------------------------------------------------------------------------- - */ + */ Rect BPBBox(BPlane *bp) { @@ -261,7 +261,7 @@ Rect BPBBox(BPlane *bp) e = BPEnumNext(&bpe); bp->bp_bbox = e->e_rect; - while(e = BPEnumNext(&bpe)) + while(e = BPEnumNext(&bpe)) { GeoIncludeRectInBBox(&e->e_rect, &bp->bp_bbox); } diff --git a/bplane/bpOpaque.h b/bplane/bpOpaque.h index fb5440d3..c92b3a60 100644 --- a/bplane/bpOpaque.h +++ b/bplane/bpOpaque.h @@ -1,28 +1,28 @@ // ************************************************************************ -// +// // Copyright (c) 1995-2002 Juniper Networks, Inc. All rights reserved. -// +// // Permission is hereby granted, without written agreement and without // license or royalty fees, to use, copy, modify, and distribute this // software and its documentation for any purpose, provided that the // above copyright notice and the following three paragraphs appear in // all copies of this software. -// +// // IN NO EVENT SHALL JUNIPER NETWORKS, INC. BE LIABLE TO ANY PARTY FOR // DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES // ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN IF // JUNIPER NETWORKS, INC. HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH // DAMAGE. -// +// // JUNIPER NETWORKS, INC. SPECIFICALLY DISCLAIMS ANY WARRANTIES, // INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF // MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, AND // NON-INFRINGEMENT. -// +// // THE SOFTWARE PROVIDED HEREUNDER IS ON AN "AS IS" BASIS, AND JUNIPER // NETWORKS, INC. HAS NO OBLIGATION TO PROVIDE MAINTENANCE, SUPPORT, // UPDATES, ENHANCEMENTS, OR MODIFICATIONS. -// +// // ************************************************************************ @@ -45,8 +45,8 @@ * */ -/* data element, stored in BPlane - * +/* data element, stored in BPlane + * * Storage managed by caller. * Inital part must correspond to below. */ @@ -59,8 +59,8 @@ typedef struct element /* client data goes here */ } Element; -/* number of link fields in element - * +/* number of link fields in element + * * user code should not depend on more than 1 link. * (and should only use/ref that link when element is not in a bplane) */ @@ -72,24 +72,24 @@ typedef struct binarray Rect ba_bbox; /* area covered by array */ int ba_dx; /* dimensions of a single bin */ int ba_dy; - int ba_dimX; /* number of bins in a row */ + int ba_dimX; /* number of bins in a row */ int ba_numBins; /* number of regular bins (size of array - 1) */ - + void *ba_bins[1]; /* low order bit(s) used to encode type info. - * DON'T ACCESS DIRECTLY, USE MACROS BELOW + * DON'T ACCESS DIRECTLY, USE MACROS BELOW * * (last bin is for oversized) */ } BinArray; -/* bin types +/* bin types * * NOTE: its important that simple lists have type 0, i.e. are * just standard pointers. This is so that the list head * 'link' can be treated just as any other link, during * deletion etc. */ - + #define BT_TYPE_MASK 1 #define BT_LIST 0 #define BT_ARRAY 1 @@ -106,7 +106,7 @@ static __inline__ bool bpBinType(BinArray *ba, int i) static __inline__ Element *bpBinList(BinArray *ba, int i) { -#ifdef PARANOID +#ifdef PARANOID ASSERT(bpBinType(ba,i)==BT_LIST,"bpBinList"); #endif return (Element *) ba->ba_bins[i]; @@ -114,7 +114,7 @@ static __inline__ Element *bpBinList(BinArray *ba, int i) static __inline__ Element **bpBinListHead(BinArray *ba, int i) { -#ifdef PARANOID +#ifdef PARANOID ASSERT(bpBinType(ba,i)==BT_LIST,"bpBinList"); #endif return (Element **) &ba->ba_bins[i]; @@ -122,7 +122,7 @@ static __inline__ Element **bpBinListHead(BinArray *ba, int i) static __inline__ BinArray *bpSubArray(BinArray *ba, int i) { -#ifdef PARANOID +#ifdef PARANOID ASSERT(bpBinType(ba,i)==BT_ARRAY,"bpSubArray"); #endif return (BinArray *) ((pointertype) ba->ba_bins[i] & ~BT_TYPE_MASK); @@ -136,12 +136,12 @@ typedef struct bplane * if reset bp_bbox may be over-sized. */ int bp_count; /* total number of elements in bplane */ - struct bpenum *bp_enums; /* list of active enums */ + struct bpenum *bp_enums; /* list of active enums */ /* HASH TABLE */ - IHashTable *bp_hashTable; /* hash table - * (for expediting BP_EQUAL searches) */ - /* IN BOX */ + IHashTable *bp_hashTable; /* hash table + * (for expediting BP_EQUAL searches) */ + /* IN BOX */ Element *bp_inBox; /* elements not yet added to bin system */ /* BINS */ @@ -159,7 +159,7 @@ typedef struct bplane typedef struct bpStack { int bps_state; /* where we are at rolled in one convenient - * number (see BPS_* defs in bpEnum.h) + * number (see BPS_* defs in bpEnum.h) */ BinArray *bps_node; /* current bin array */ int bps_i; /* current index */ @@ -178,17 +178,17 @@ typedef struct bpStack /* enumeration 'handle' */ typedef struct bpenum { - struct bpenum *bpe_next; /* all enums for bplane linked together */ + struct bpenum *bpe_next; /* all enums for bplane linked together */ BPlane *bpe_plane; /* plane being searched */ Rect bpe_srchArea; /* area being searched */ int bpe_match; /* match criteria */ char *bpe_id; /* for debug */ int bpe_subBinMinX; - int bpe_subBinMinY; /* consider subbinning + int bpe_subBinMinY; /* consider subbinning * for bins bigger than this. */ - Element *bpe_nextElement; /* next element in current list */ - BPStack *bpe_top; /* top of stack */ + Element *bpe_nextElement; /* next element in current list */ + BPStack *bpe_top; /* top of stack */ BPStack bpe_stack[10000]; /* stack for tree traversal during enum */ } BPEnum; diff --git a/bplane/bpStat.c b/bplane/bpStat.c index dbee6d2c..b32ec4d0 100644 --- a/bplane/bpStat.c +++ b/bplane/bpStat.c @@ -1,28 +1,28 @@ // ************************************************************************ -// +// // Copyright (c) 1995-2002 Juniper Networks, Inc. All rights reserved. -// +// // Permission is hereby granted, without written agreement and without // license or royalty fees, to use, copy, modify, and distribute this // software and its documentation for any purpose, provided that the // above copyright notice and the following three paragraphs appear in // all copies of this software. -// +// // IN NO EVENT SHALL JUNIPER NETWORKS, INC. BE LIABLE TO ANY PARTY FOR // DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES // ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN IF // JUNIPER NETWORKS, INC. HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH // DAMAGE. -// +// // JUNIPER NETWORKS, INC. SPECIFICALLY DISCLAIMS ANY WARRANTIES, // INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF // MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, AND // NON-INFRINGEMENT. -// +// // THE SOFTWARE PROVIDED HEREUNDER IS ON AN "AS IS" BASIS, AND JUNIPER // NETWORKS, INC. HAS NO OBLIGATION TO PROVIDE MAINTENANCE, SUPPORT, // UPDATES, ENHANCEMENTS, OR MODIFICATIONS. -// +// // ************************************************************************ @@ -49,11 +49,11 @@ * Returns size of list. * * ---------------------------------------------------------------------------- - */ + */ int bpCount(Element *e) { int i = 0; - + while(e) { i++; @@ -69,13 +69,13 @@ int bpCount(Element *e) * * compute bin array statistics. * (includes sub-arrays) - * + * * * Returns memory used by bplane (excluding elements) * * ---------------------------------------------------------------------------- - */ -unsigned int bpStatBA(BinArray *ba, + */ +unsigned int bpStatBA(BinArray *ba, int *totCount, /* total number of elements */ int *totBins, /* ret tot num of bins */ int *emptyBins, /* ret num of empty bins */ @@ -91,12 +91,12 @@ unsigned int bpStatBA(BinArray *ba, int numBins = ba->ba_numBins; int dimX = ba->ba_dimX; int dimY = numBins/dimX; - int w = GEO_WIDTH(bbox); + int w = GEO_WIDTH(bbox); int h = GEO_HEIGHT(bbox); - + /* initial statistics */ unsigned int mem = 0; - int tot = 0; + int tot = 0; int bins = 0; int emptys = 0; int binArrays = 1; @@ -112,13 +112,13 @@ unsigned int bpStatBA(BinArray *ba, /* add bins in this array */ bins += numBins; - /* add memory usage for this array (sub arrays already tabulated) */ + /* add memory usage for this array (sub arrays already tabulated) */ if(ba) mem += sizeof(BinArray) + numBins*sizeof(void*); /* gather stats bin by bin */ for(i=0;ibp_rootNode, &tot, /* total number of elements */ &bins, /* ret tot num of bins */ - &emptys, /* ret tot num of empty bins */ + &emptys, /* ret tot num of empty bins */ &binArrays, /* ret tot num of bin arrays */ &maxEff, /* ret max effective list length */ &maxCount, /* ret max count for regular bin */ @@ -260,9 +260,9 @@ unsigned int BPStat(BPlane *bp, maxEff += in; unbinned += in; - /* add in memory usage for bplane */ + /* add in memory usage for bplane */ mem += sizeof(BPlane); - mem += IHashStats2(bp->bp_hashTable,NULL,NULL); + mem += IHashStats2(bp->bp_hashTable,NULL,NULL); /* set results */ if(totCount) *totCount = tot; @@ -277,28 +277,28 @@ unsigned int BPStat(BPlane *bp, return mem; } - + /* * ---------------------------------------------------------------------------- * BPStatMemory -- * - * returns memory usage of BPlane in bytes + * returns memory usage of BPlane in bytes * (exclusive of elements contained by the BPlane) * * ---------------------------------------------------------------------------- - */ + */ unsigned int BPStatMemory(BPlane *bp) { - return BPStat(bp, - NULL, - NULL, - NULL, + return BPStat(bp, NULL, - NULL, - NULL, - NULL, NULL, - NULL); + NULL, + NULL, + NULL, + NULL, + NULL, + NULL, + NULL); } diff --git a/bplane/bpTest.c b/bplane/bpTest.c index 82c4f131..de048bb8 100644 --- a/bplane/bpTest.c +++ b/bplane/bpTest.c @@ -1,28 +1,28 @@ // ************************************************************************ -// +// // Copyright (c) 1995-2002 Juniper Networks, Inc. All rights reserved. -// +// // Permission is hereby granted, without written agreement and without // license or royalty fees, to use, copy, modify, and distribute this // software and its documentation for any purpose, provided that the // above copyright notice and the following three paragraphs appear in // all copies of this software. -// +// // IN NO EVENT SHALL JUNIPER NETWORKS, INC. BE LIABLE TO ANY PARTY FOR // DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES // ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN IF // JUNIPER NETWORKS, INC. HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH // DAMAGE. -// +// // JUNIPER NETWORKS, INC. SPECIFICALLY DISCLAIMS ANY WARRANTIES, // INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF // MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, AND // NON-INFRINGEMENT. -// +// // THE SOFTWARE PROVIDED HEREUNDER IS ON AN "AS IS" BASIS, AND JUNIPER // NETWORKS, INC. HAS NO OBLIGATION TO PROVIDE MAINTENANCE, SUPPORT, // UPDATES, ENHANCEMENTS, OR MODIFICATIONS. -// +// // ************************************************************************ @@ -45,7 +45,7 @@ #include "cifInt.h" -/* +/* * elements used by test code. */ typedef struct rectc @@ -57,26 +57,26 @@ typedef struct rectc /* * ---------------------------------------------------------------------------- - * bpRand -- + * bpRand -- * generate a random int in given range. * * side effects: sets coords of input rect. * ---------------------------------------------------------------------------- - */ + */ int bpRand(int min, int max) { double f = rand()/ (double) RAND_MAX; /* random number in unit interval */ return min + (int) ((max-min+1)*f); } - + /* * ---------------------------------------------------------------------------- - * bpTestRandRect -- + * bpTestRandRect -- * generate a random unit rectangle inside bbox * * side effects: sets coords of input rect. * ---------------------------------------------------------------------------- - */ + */ static void bpTestRandRect(Rect *r, Rect *bbox) { r->r_xbot = bpRand(bbox->r_xbot,bbox->r_xtop-1); @@ -91,11 +91,11 @@ static void bpTestRandRect(Rect *r, Rect *bbox) /* * ---------------------------------------------------------------------------- - * bpTestIntersectGold -- - * + * bpTestIntersectGold -- + * * check whether rc intersects list * ---------------------------------------------------------------------------- - */ + */ static bool bpTestIntersectGold(RectC *rc, RectC *list) { while(list) @@ -108,20 +108,20 @@ static bool bpTestIntersectGold(RectC *rc, RectC *list) /* * ---------------------------------------------------------------------------- - * bpTestSnowGold -- - * populate square of dimension 'size' with non-overlapping random unit + * bpTestSnowGold -- + * populate square of dimension 'size' with non-overlapping random unit * rectangles. Keep adding rectangles until failures exceed successes. * (stop when maxFailures reached.) * * coded with simple linked list. * - * ---------------------------------------------------------------------------- */ + * ---------------------------------------------------------------------------- */ void bpTestSnowGold(int size, bool trace) { int failures = 0; int successes = 0; int i = 0; - int crc = 0; + int crc = 0; RectC *result = NULL; RectC *rc = NULL; Rect area; @@ -143,9 +143,9 @@ void bpTestSnowGold(int size, bool trace) if(!bpTestIntersectGold(rc,result)) { - if(trace) DumpRect("success ",&rc->rc_rect); + if(trace) DumpRect("success ",&rc->rc_rect); crc ^= i+ 3*rc->rc_rect.r_xbot+ 5*rc->rc_rect.r_ybot; - + rc->rc_links[0] = result; result = rc; rc = NULL; @@ -154,7 +154,7 @@ void bpTestSnowGold(int size, bool trace) } else { - if(trace) DumpRect("failure ",&rc->rc_rect); + if(trace) DumpRect("failure ",&rc->rc_rect); failures++; } @@ -179,20 +179,20 @@ void bpTestSnowGold(int size, bool trace) } /* ====== bplane snow test. - */ + */ /* * ---------------------------------------------------------------------------- - * bpTestIntersect -- - * + * bpTestIntersect -- + * * check whether rc intersects list * ---------------------------------------------------------------------------- - */ + */ static bool bpTestIntersect(RectC *rc, BPlane *bp) { BPEnum bpe; int result; - + BPEnumInit(&bpe,bp, &rc->rc_rect, BPE_TOUCH,"bpTestIntersect"); result = (BPEnumNext(&bpe)!=NULL); BPEnumTerm(&bpe); @@ -202,19 +202,19 @@ static bool bpTestIntersect(RectC *rc, BPlane *bp) /* * ---------------------------------------------------------------------------- - * bpTestSnow -- - * populate area with non-overlapping random unit rectangles. + * bpTestSnow -- + * populate area with non-overlapping random unit rectangles. * * using bplane. * * ---------------------------------------------------------------------------- - */ + */ BPlane *bpTestSnow(int size, bool trace) { int failures = 0; int successes = 0; int i = 0; - int crc = 0; + int crc = 0; RectC *result = NULL; RectC *rc = NULL; BPlane *bp = BPNew(); @@ -227,7 +227,7 @@ BPlane *bpTestSnow(int size, bool trace) area.r_ybot = 0; area.r_xtop = size; area.r_ytop = size; - + while(failures<=successes) { i++; @@ -237,9 +237,9 @@ BPlane *bpTestSnow(int size, bool trace) if(!bpTestIntersect(rc,bp)) { - if(trace) DumpRect("success ",&rc->rc_rect); + if(trace) DumpRect("success ",&rc->rc_rect); crc ^= i+ 3*rc->rc_rect.r_xbot+ 5*rc->rc_rect.r_ybot; - + BPAdd(bp,rc); rc = NULL; @@ -247,7 +247,7 @@ BPlane *bpTestSnow(int size, bool trace) } else { - if(trace) DumpRect("failure ",&rc->rc_rect); + if(trace) DumpRect("failure ",&rc->rc_rect); failures++; } } @@ -257,7 +257,7 @@ BPlane *bpTestSnow(int size, bool trace) failures, successes, crc); - + return bp; } @@ -266,14 +266,14 @@ BPlane *bpTestSnow(int size, bool trace) /* * ---------------------------------------------------------------------------- - * bpTestIntersectTile -- - * + * bpTestIntersectTile -- + * * check whether r intersects existing tiles * * ---------------------------------------------------------------------------- - */ + */ -int bpTestIntersectTileFunc(Tile *tile, ClientData cd) +int bpTestIntersectTileFunc(Tile *tile, ClientData cd) { return 1; } @@ -290,7 +290,7 @@ static bool bpTestIntersectTile(Rect *r, Plane *plane) area.r_xtop += 1; area.r_ytop += 1; - return DBPlaneEnumAreaPaint((Tile *) NULL, + return DBPlaneEnumAreaPaint((Tile *) NULL, plane, &area, &DBAllButSpaceBits, @@ -300,19 +300,19 @@ static bool bpTestIntersectTile(Rect *r, Plane *plane) /* * ---------------------------------------------------------------------------- - * bpTestSnowTile -- - * populate area with non-overlapping random unit rectangles. - * + * bpTestSnowTile -- + * populate area with non-overlapping random unit rectangles. + * * using tile plane * * ---------------------------------------------------------------------------- - */ + */ Plane *bpTestSnowTile(int size, bool trace) { int failures = 0; int successes = 0; int i = 0; - int crc = 0; + int crc = 0; RectC *result = NULL; RectC *rc = NULL; Plane *plane = DBPlaneNew((ClientData) TT_SPACE); @@ -325,7 +325,7 @@ Plane *bpTestSnowTile(int size, bool trace) area.r_ybot = 0; area.r_xtop = size; area.r_ytop = size; - + while(failures<=successes) { Rect r; @@ -335,9 +335,9 @@ Plane *bpTestSnowTile(int size, bool trace) if(!bpTestIntersectTile(&r,plane)) { - if(trace) DumpRect("success ",&r); + if(trace) DumpRect("success ",&r); crc ^= i+ 3*r.r_xbot + 5*r.r_ybot; - + DBPaintPlane(plane, &r, CIFPaintTable, (PaintUndoInfo *) NULL); rc = NULL; @@ -345,7 +345,7 @@ Plane *bpTestSnowTile(int size, bool trace) } else { - if(trace) DumpRect("failure ",&r); + if(trace) DumpRect("failure ",&r); failures++; } } diff --git a/bplane/bpUtils.c b/bplane/bpUtils.c index 209a9f7c..c22b5058 100644 --- a/bplane/bpUtils.c +++ b/bplane/bpUtils.c @@ -1,28 +1,28 @@ // ************************************************************************ -// +// // Copyright (c) 1995-2002 Juniper Networks, Inc. All rights reserved. -// +// // Permission is hereby granted, without written agreement and without // license or royalty fees, to use, copy, modify, and distribute this // software and its documentation for any purpose, provided that the // above copyright notice and the following three paragraphs appear in // all copies of this software. -// +// // IN NO EVENT SHALL JUNIPER NETWORKS, INC. BE LIABLE TO ANY PARTY FOR // DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES // ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN IF // JUNIPER NETWORKS, INC. HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH // DAMAGE. -// +// // JUNIPER NETWORKS, INC. SPECIFICALLY DISCLAIMS ANY WARRANTIES, // INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF // MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, AND // NON-INFRINGEMENT. -// +// // THE SOFTWARE PROVIDED HEREUNDER IS ON AN "AS IS" BASIS, AND JUNIPER // NETWORKS, INC. HAS NO OBLIGATION TO PROVIDE MAINTENANCE, SUPPORT, // UPDATES, ENHANCEMENTS, OR MODIFICATIONS. -// +// // ************************************************************************ @@ -48,7 +48,7 @@ * return dimension of rectangle in xDir * * ---------------------------------------------------------------------------- - */ + */ int bpRectDim(Rect *r, bool xDir) { return xDir ? r->r_xtop - r->r_xbot : r->r_ytop - r->r_ybot; @@ -61,8 +61,8 @@ int bpRectDim(Rect *r, bool xDir) * compute bin indices corresponding to area. * * ---------------------------------------------------------------------------- - */ -static __inline__ void + */ +static __inline__ void bpBinIndices(Rect area, /* area */ Rect binArea, /* lower left corner of bin system */ int indexBits, @@ -71,7 +71,7 @@ bpBinIndices(Rect area, /* area */ int *min, /* results go here */ int *max) { - int ref, coord; + int ref, coord; int index; } diff --git a/bplane/bplane.h b/bplane/bplane.h index cf6dfe1f..1747bf3a 100644 --- a/bplane/bplane.h +++ b/bplane/bplane.h @@ -1,28 +1,28 @@ // ************************************************************************ -// +// // Copyright (c) 1995-2002 Juniper Networks, Inc. All rights reserved. -// +// // Permission is hereby granted, without written agreement and without // license or royalty fees, to use, copy, modify, and distribute this // software and its documentation for any purpose, provided that the // above copyright notice and the following three paragraphs appear in // all copies of this software. -// +// // IN NO EVENT SHALL JUNIPER NETWORKS, INC. BE LIABLE TO ANY PARTY FOR // DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES // ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN IF // JUNIPER NETWORKS, INC. HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH // DAMAGE. -// +// // JUNIPER NETWORKS, INC. SPECIFICALLY DISCLAIMS ANY WARRANTIES, // INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF // MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, AND // NON-INFRINGEMENT. -// +// // THE SOFTWARE PROVIDED HEREUNDER IS ON AN "AS IS" BASIS, AND JUNIPER // NETWORKS, INC. HAS NO OBLIGATION TO PROVIDE MAINTENANCE, SUPPORT, // UPDATES, ENHANCEMENTS, OR MODIFICATIONS. -// +// // ************************************************************************ @@ -33,13 +33,13 @@ /* * bplane.h -- * - * This file defines the interface between the bplane + * This file defines the interface between the bplane * module and the rest of max. * * BUGS * ==== * - * NOTE nested enums are currently broken do to dynamic binning. + * NOTE nested enums are currently broken do to dynamic binning. * * OVERVIEW OF BPLANES * =================== @@ -47,17 +47,17 @@ * BPlanes ('Binned' Planes) are a data-structure for storing, sorting, * and accessing two dimensional geometric objects. * - * BPlanes are an alternative to Planes, i.e. corner-stitched tile planes, + * BPlanes are an alternative to Planes, i.e. corner-stitched tile planes, * defined in the tile module. * * Differences between Planes and BPlanes: * -------------------------------------- * * 1. BPlanes are more memory efficient. - * Three pointers (+ a modest amount of binning overhead) - * replaces approximately 8 pointers (4/tile, approx. 1 space - * tile for each data tile). - * + * Three pointers (+ a modest amount of binning overhead) + * replaces approximately 8 pointers (4/tile, approx. 1 space + * tile for each data tile). + * * 2. BPlanes use a 'next' procedure for enumeration, instead of * function call-backs. This allows client code to be simpler * and more readable, partcularly with regard to passing state info. @@ -67,20 +67,20 @@ * * 3. Planes fundamentally assume objects don't overlap, while BPlanes * make no such assumption. This makes BPlanes more generally useful. - * In particular they are a natural choice for instance uses, + * In particular they are a natural choice for instance uses, * labels, and non-manhattan polygons (sorted on bounding boxes). * - * 4. Planes are optimized for merging (merging recangles - * into maximal horizontal strips) and neighbor access - * (finding nearest elements to current element). BPlanes are less + * 4. Planes are optimized for merging (merging recangles + * into maximal horizontal strips) and neighbor access + * (finding nearest elements to current element). BPlanes are less * efficient for these operations. * * 5. Planes generally cannot be safely modified during an enumeration, * but BPlanes can. This makes operations such as delete, copy, and * move simpler in BPlanes. * - * Interface - * --------- + * Interface + * --------- * * 1. The structure of elements to be stored in BPlanes must be as * follows: @@ -88,7 +88,7 @@ * typedef struct foo * { * struct void *foo_bpLinks[BP_NUM_LINKS]; - * Rect foo_rect; + * Rect foo_rect; * * } Foo * @@ -97,7 +97,7 @@ * 3. The client must set foo_rect before adding the element * to a BPlane. foo_rect must be canonical: not inverted. * - * 4. The BPlane module does not access or modify any client fields. + * 4. The BPlane module does not access or modify any client fields. * * 5. The client may access/modify client fields at any time. * @@ -116,7 +116,7 @@ * element does not belong to a bplane. * * 8. Concurrent (nested) enumerations of a bplane are permitted. - * + * * 9. Elements may not be added to a bplane during active enumeration(s) * on that bplane. * @@ -127,7 +127,7 @@ * * Example * ------- - * + * * Here is a procedure that takes an array of id'ed rectangles and an * area as input, and prints the ids of all rectangles impinging on the * area. @@ -135,18 +135,18 @@ * typedef struct rid * { * struct rid *rid_bpLinks[BP_NUM_LINKS]; - * Rect rid_rect; + * Rect rid_rect; * char *rid_id; * } RId; - * - * void findRects(RId data[], // ided rects - * int n, // number of rects in data + * + * void findRects(RId data[], // ided rects + * int n, // number of rects in data * Rect *area) // area to search * { * int i; * BPEnum bpe; * BPlane *bp; - * RId *rid; + * RId *rid; * * bp = BPNew(); * for(i=0;irid_id); * } * BPEnumTerm(&bpe); - * - */ + * + */ /* offset of a structure member (used to gen offsets for ihash stuff) */ #if _MSC_VER @@ -182,12 +182,12 @@ extern BPlane *BPNew(void); */ extern void BPFree(BPlane *bp); -/* add an element to a BPlane */ -extern void BPAdd(BPlane *bp, +/* add an element to a BPlane */ +extern void BPAdd(BPlane *bp, void *element); -/* remove an element from a BPlane */ -extern void BPDelete(BPlane *bp, +/* remove an element from a BPlane */ +extern void BPDelete(BPlane *bp, void *element); /* begin an enumeration */ @@ -201,7 +201,7 @@ extern void BPEnumInit(BPEnum *bpe, /* this procedure initializes this char *id); /* for debugging */ /* match values */ - /* enum all elements in the bplane (area arg must be null) */ + /* enum all elements in the bplane (area arg must be null) */ #define BPE_ALL 0 /* element need only touch area */ #define BPE_TOUCH 1 @@ -209,13 +209,13 @@ extern void BPEnumInit(BPEnum *bpe, /* this procedure initializes this #define BPE_OVERLAP 2 /* elements rect must be identical to area */ #define BPE_EQUAL 3 - + /* return next element in enumeration (returns NULL if none) */ #include "bplane/bpEnum.h" /* inlined extern void *BPEnumNext(BPEnum *bpe); */ -/* terminate enumeration - * +/* terminate enumeration + * * (unterminated enumerations can cause great inefficiency since * all active enumerations for a bplane must be considered whenever * an element is added or deleted.) @@ -225,14 +225,14 @@ extern void BPEnumTerm(BPEnum *bpe); /* get current bounding box of BPlane */ extern Rect BPBBox(BPlane *bp); -/* compute number of bytes used by BPlane +/* compute number of bytes used by BPlane * (does not count memory of the elements themselves) */ extern unsigned int BPStatMemory(BPlane *bp); /* tabulate statistics on a bplane */ -extern unsigned int -BPStat(BPlane *bp, +extern unsigned int +BPStat(BPlane *bp, int *totCount, /* ret total number of elements */ int *inBox, /* ret num of elements in inBox */ int *totBins, /* ret tot num of bins */ diff --git a/bplane/bplaneInt.h b/bplane/bplaneInt.h index 05814216..6f0a38bf 100644 --- a/bplane/bplaneInt.h +++ b/bplane/bplaneInt.h @@ -1,28 +1,28 @@ // ************************************************************************ -// +// // Copyright (c) 1995-2002 Juniper Networks, Inc. All rights reserved. -// +// // Permission is hereby granted, without written agreement and without // license or royalty fees, to use, copy, modify, and distribute this // software and its documentation for any purpose, provided that the // above copyright notice and the following three paragraphs appear in // all copies of this software. -// +// // IN NO EVENT SHALL JUNIPER NETWORKS, INC. BE LIABLE TO ANY PARTY FOR // DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES // ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN IF // JUNIPER NETWORKS, INC. HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH // DAMAGE. -// +// // JUNIPER NETWORKS, INC. SPECIFICALLY DISCLAIMS ANY WARRANTIES, // INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF // MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, AND // NON-INFRINGEMENT. -// +// // THE SOFTWARE PROVIDED HEREUNDER IS ON AN "AS IS" BASIS, AND JUNIPER // NETWORKS, INC. HAS NO OBLIGATION TO PROVIDE MAINTENANCE, SUPPORT, // UPDATES, ENHANCEMENTS, OR MODIFICATIONS. -// +// // ************************************************************************ @@ -30,21 +30,21 @@ /* * bplaneInt.h -- * - * This file defines constants and datastructures used internally by the + * This file defines constants and datastructures used internally by the * bplane module, but not exported to the rest of the world. */ #ifndef _BPLANEINT_H #define _BPLANEINT_H /* Tcl linked Parameters */ -extern int bpMinBAPop; /* don't sub(bin) when count less than this +extern int bpMinBAPop; /* don't sub(bin) when count less than this */ -extern double bpMinAvgBinPop; /* try to keep average bin pop at or - * below this +extern double bpMinAvgBinPop; /* try to keep average bin pop at or + * below this */ /* LabeledElement - * + * * Used in this module as elements for test bplanes. */ typedef struct labeledelement @@ -60,7 +60,7 @@ extern void bpBinsUpdate(BPlane *bp); extern void bpBinAdd(BinArray *ba, Element *e); -extern BinArray *bpBinArrayBuild(Rect bbox, +extern BinArray *bpBinArrayBuild(Rect bbox, Element *elements, /* initial elements */ bool subbin); /* subbin as needed */ diff --git a/calma/CalmaRdcl.c b/calma/CalmaRdcl.c index 02a97f59..f7a80472 100644 --- a/calma/CalmaRdcl.c +++ b/calma/CalmaRdcl.c @@ -4,16 +4,16 @@ * Input of Calma GDS-II stream format. * Processing for cells. * - * ********************************************************************* - * * Copyright (C) 1985, 1990 Regents of the University of California. * - * * Permission to use, copy, modify, and distribute this * - * * software and its documentation for any purpose and without * - * * fee is hereby granted, provided that the above copyright * - * * notice appear in all copies. The University of California * - * * makes no representations about the suitability of this * - * * software for any purpose. It is provided "as is" without * - * * express or implied warranty. Export of this software outside * - * * of the United States of America may require an export license. * + * ********************************************************************* + * * Copyright (C) 1985, 1990 Regents of the University of California. * + * * Permission to use, copy, modify, and distribute this * + * * software and its documentation for any purpose and without * + * * fee is hereby granted, provided that the above copyright * + * * notice appear in all copies. The University of California * + * * makes no representations about the suitability of this * + * * software for any purpose. It is provided "as is" without * + * * express or implied warranty. Export of this software outside * + * * of the United States of America may require an export license. * * ********************************************************************* */ @@ -256,7 +256,7 @@ calmaExact() } - + /* * ---------------------------------------------------------------------------- * @@ -483,7 +483,7 @@ syntaxerror: return (calmaSkipTo(CALMA_ENDSTR)); } - + /* * ---------------------------------------------------------------------------- * @@ -530,7 +530,7 @@ calmaParseElement(filename, pnsrefs, pnpaths) if (madeinst >= 0) (*pnsrefs) += madeinst; break; - case CALMA_BOUNDARY: + case CALMA_BOUNDARY: calmaElementBoundary(); (*pnpaths)++; break; @@ -538,11 +538,11 @@ calmaParseElement(filename, pnsrefs, pnpaths) calmaElementBox(); (*pnpaths)++; break; - case CALMA_PATH: + case CALMA_PATH: calmaElementPath(); (*pnpaths)++; break; - case CALMA_TEXT: + case CALMA_TEXT: calmaElementText(); break; case CALMA_NODE: @@ -969,7 +969,7 @@ calmaElementSref(filename) return ((def->cd_flags & CDFLATGDS) ? (madeinst ? 1 : 0) : 1); } - + /* Callback function for determining if a cell has at least one subcell */ @@ -1008,7 +1008,7 @@ gdsCopyPaintFunc(tile, gdsCopyRec) DBNMPaintPlane(plane, dinfo, &targetRect, CIFPaintTable, (PaintUndoInfo *)NULL); - + return 0; } diff --git a/calma/CalmaRdio.c b/calma/CalmaRdio.c index 24fc6c21..e9d6e679 100644 --- a/calma/CalmaRdio.c +++ b/calma/CalmaRdio.c @@ -4,16 +4,16 @@ * Input of Calma GDS-II stream format. * Low-level input. * - * ********************************************************************* - * * Copyright (C) 1985, 1990 Regents of the University of California. * - * * Permission to use, copy, modify, and distribute this * - * * software and its documentation for any purpose and without * - * * fee is hereby granted, provided that the above copyright * - * * notice appear in all copies. The University of California * - * * makes no representations about the suitability of this * - * * software for any purpose. It is provided "as is" without * - * * express or implied warranty. Export of this software outside * - * * of the United States of America may require an export license. * + * ********************************************************************* + * * Copyright (C) 1985, 1990 Regents of the University of California. * + * * Permission to use, copy, modify, and distribute this * + * * software and its documentation for any purpose and without * + * * fee is hereby granted, provided that the above copyright * + * * notice appear in all copies. The University of California * + * * makes no representations about the suitability of this * + * * software for any purpose. It is provided "as is" without * + * * express or implied warranty. Export of this software outside * + * * of the United States of America may require an export license. * * ********************************************************************* */ @@ -49,7 +49,7 @@ static char rcsid[] __attribute__ ((unused)) = "$Header: /usr/cvsroot/magic-8.0/ bool calmaReadR8(); bool calmaSkipBytes(); - + /* * ---------------------------------------------------------------------------- * @@ -180,7 +180,7 @@ calmaReadTransform(ptrans, name) return (TRUE); } - + /* * ---------------------------------------------------------------------------- * @@ -226,7 +226,7 @@ eof: CalmaReadError("Unexpected EOF.\n"); return (FALSE); } - + /* * ---------------------------------------------------------------------------- * @@ -271,7 +271,7 @@ eof: CalmaReadError("Unexpected EOF.\n"); return (FALSE); } - + /* * ---------------------------------------------------------------------------- * @@ -320,7 +320,7 @@ eof: CalmaReadError("Unexpected EOF.\n"); return (FALSE); } - + /* * ---------------------------------------------------------------------------- * @@ -387,7 +387,7 @@ calmaReadR8(pd) *pd = d; return (TRUE); } - + /* * ---------------------------------------------------------------------------- * @@ -433,7 +433,7 @@ skipit: (void) calmaSkipBytes(nbytes - CALMAHEADERLENGTH); } } - + /* * ---------------------------------------------------------------------------- * @@ -481,7 +481,7 @@ eof: CalmaReadError("Unexpected EOF.\n"); return (FALSE); } - + /* * ---------------------------------------------------------------------------- * @@ -515,7 +515,7 @@ calmaSkipTo(what) return (TRUE); } - + /* * ---------------------------------------------------------------------------- * diff --git a/calma/CalmaRdpt.c b/calma/CalmaRdpt.c index cbfe6ff4..a3f64969 100644 --- a/calma/CalmaRdpt.c +++ b/calma/CalmaRdpt.c @@ -4,16 +4,16 @@ * Input of Calma GDS-II stream format. * Processing of paint (paths, boxes, and boundaries) and text. * - * ********************************************************************* - * * Copyright (C) 1985, 1990 Regents of the University of California. * - * * Permission to use, copy, modify, and distribute this * - * * software and its documentation for any purpose and without * - * * fee is hereby granted, provided that the above copyright * - * * notice appear in all copies. The University of California * - * * makes no representations about the suitability of this * - * * software for any purpose. It is provided "as is" without * - * * express or implied warranty. Export of this software outside * - * * of the United States of America may require an export license. * + * ********************************************************************* + * * Copyright (C) 1985, 1990 Regents of the University of California. * + * * Permission to use, copy, modify, and distribute this * + * * software and its documentation for any purpose and without * + * * fee is hereby granted, provided that the above copyright * + * * notice appear in all copies. The University of California * + * * makes no representations about the suitability of this * + * * software for any purpose. It is provided "as is" without * + * * express or implied warranty. Export of this software outside * + * * of the United States of America may require an export license. * * ********************************************************************* */ @@ -184,7 +184,7 @@ calmaReadPoint(p, iscale) p->p_y /= calmaReadScale2; } - + /* * ---------------------------------------------------------------------------- * @@ -233,7 +233,7 @@ calmaElementBoundary() plane = cifCurReadPlanes[ciftype]; /* Read the path itself, building up a path structure */ - if (!calmaReadPath(&pathheadp, (plane == NULL) ? 0 : 1)) + if (!calmaReadPath(&pathheadp, (plane == NULL) ? 0 : 1)) { if (plane != NULL) CalmaReadError("Error while reading path for boundary/box; ignored.\n"); @@ -347,7 +347,7 @@ calmaElementBoundary() DBPlaceCell(use, cifReadCellDef); } } - + /* * ---------------------------------------------------------------------------- * @@ -502,10 +502,10 @@ calmaElementPath() * Allow zero-width paths; we will ignore them later. */ width = 0; - PEEKRH(nbytes, rtype) + PEEKRH(nbytes, rtype) if (nbytes > 0 && rtype == CALMA_WIDTH) { - if (!calmaReadI4Record(CALMA_WIDTH, &width)) + if (!calmaReadI4Record(CALMA_WIDTH, &width)) { CalmaReadError("Error in reading WIDTH in calmaElementPath()\n") ; return; @@ -558,7 +558,7 @@ calmaElementPath() /* Read the points in the path */ savescale = calmaReadScale1; - if (!calmaReadPath(&pathheadp, 2)) + if (!calmaReadPath(&pathheadp, 2)) { CalmaReadError("Improper path; ignored.\n"); return; @@ -714,7 +714,7 @@ calmaElementText() cifnum = CIFCalmaLayerToCifLayer(layer, textt, cifCurReadStyle); if (cifnum < 0) { - if (cifCurReadStyle->crs_flags & CRF_IGNORE_UNKNOWNLAYER_LABELS) + if (cifCurReadStyle->crs_flags & CRF_IGNORE_UNKNOWNLAYER_LABELS) type = -1; else { calmaLayerError("Label on unknown layer/datatype", layer, textt); @@ -781,7 +781,7 @@ calmaElementText() int width; /* Use WIDTH value to set the font size */ - if (!calmaReadI4Record(CALMA_WIDTH, &width)) + if (!calmaReadI4Record(CALMA_WIDTH, &width)) { CalmaReadError("Error in reading WIDTH in calmaElementText()\n") ; return; @@ -865,7 +865,7 @@ calmaElementText() * a flag for that in the "cifoutput" section of the techfile. */ -#if 0 +#if 0 { static bool algmsg = FALSE; @@ -874,7 +874,7 @@ calmaElementText() char *savstring; for (cp = textbody; *cp; cp++) { - if (*cp <= ' ' | *cp > '~') + if (*cp <= ' ' | *cp > '~') { if (!changed) { @@ -883,7 +883,7 @@ calmaElementText() } if (*cp == '\r' && *(cp+1) == '\0') *cp = '\0'; - else if (*cp == '\r') + else if (*cp == '\r') *cp = '_'; else if (*cp == ' ') *cp = '_'; @@ -1006,7 +1006,7 @@ calmaElementText() /* done with textbody */ if (textbody != NULL) freeMagic(textbody); } - + /* * ---------------------------------------------------------------------------- * @@ -1113,7 +1113,7 @@ calmaReadPath(pathheadpp, iscale) } return (*pathheadpp != NULL); } - + /* * ---------------------------------------------------------------------------- * diff --git a/calma/CalmaRead.c b/calma/CalmaRead.c index 0f4cab1d..a145078b 100644 --- a/calma/CalmaRead.c +++ b/calma/CalmaRead.c @@ -3,16 +3,16 @@ * * Input of Calma GDS-II stream format. * - * ********************************************************************* - * * Copyright (C) 1985, 1990 Regents of the University of California. * - * * Permission to use, copy, modify, and distribute this * - * * software and its documentation for any purpose and without * - * * fee is hereby granted, provided that the above copyright * - * * notice appear in all copies. The University of California * - * * makes no representations about the suitability of this * - * * software for any purpose. It is provided "as is" without * - * * express or implied warranty. Export of this software outside * - * * of the United States of America may require an export license. * + * ********************************************************************* + * * Copyright (C) 1985, 1990 Regents of the University of California. * + * * Permission to use, copy, modify, and distribute this * + * * software and its documentation for any purpose and without * + * * fee is hereby granted, provided that the above copyright * + * * notice appear in all copies. The University of California * + * * makes no representations about the suitability of this * + * * software for any purpose. It is provided "as is" without * + * * express or implied warranty. Export of this software outside * + * * of the United States of America may require an export license. * * ********************************************************************* */ @@ -115,7 +115,7 @@ HashTable calmaDefInitHash; /* Common stuff to ignore */ int calmaElementIgnore[] = { CALMA_ELFLAGS, CALMA_PLEX, -1 }; - + /* * ---------------------------------------------------------------------------- * @@ -144,7 +144,7 @@ CalmaReadFile(file, filename) static int hdrSkip[] = { CALMA_FORMAT, CALMA_MASK, CALMA_ENDMASKS, CALMA_REFLIBS, CALMA_FONTS, CALMA_ATTRTABLE, CALMA_STYPTABLE, CALMA_GENERATIONS, -1 }; - static int skipBeforeLib[] = { CALMA_LIBDIRSIZE, CALMA_SRFNAME, + static int skipBeforeLib[] = { CALMA_LIBDIRSIZE, CALMA_SRFNAME, CALMA_LIBSECUR, -1 }; /* We will use full cell names as keys in this hash table */ @@ -181,7 +181,7 @@ CalmaReadFile(file, filename) if (version < 600) TxPrintf("Library written using GDS-II Release %d.0\n", version); else - TxPrintf("Library written using GDS-II Release %d.%d\n", + TxPrintf("Library written using GDS-II Release %d.%d\n", version / 100, version % 100); if (!calmaSkipExact(CALMA_BGNLIB)) goto done; calmaSkipSet(skipBeforeLib); @@ -326,7 +326,7 @@ calmaParseUnits() return (TRUE); } - + /* * ---------------------------------------------------------------------------- * @@ -359,7 +359,7 @@ CalmaReadError(format, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10) if (CIFWarningLevel == CIF_WARN_NONE) return; if ((calmaTotalErrors < 100) || (CIFWarningLevel != CIF_WARN_LIMIT)) - { + { filepos = ftello(calmaInputFile); if (CIFWarningLevel == CIF_WARN_REDIRECT) @@ -370,7 +370,7 @@ CalmaReadError(format, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10) cifReadCellDef->cd_name); fprintf(calmaErrorFile, "(byte position %"DLONG_PREFIX"ld): ", (dlong)filepos); - fprintf(calmaErrorFile, format, a1, a2, a3, a4, a5, a6, a7, + fprintf(calmaErrorFile, format, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10); } } @@ -386,7 +386,7 @@ CalmaReadError(format, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10) TxError("Error limit set: Remaining errors will not be reported.\n"); } } - + /* * ---------------------------------------------------------------------------- * @@ -429,7 +429,7 @@ calmaUnexpected(wanted, got) } } } - + /* * ---------------------------------------------------------------------------- * @@ -478,7 +478,7 @@ calmaRecordName(rtype) return (calmaRecordNames[rtype]); } - + /* * ---------------------------------------------------------------------------- * diff --git a/calma/CalmaWrite.c b/calma/CalmaWrite.c index e29059c6..a02a3d8c 100644 --- a/calma/CalmaWrite.c +++ b/calma/CalmaWrite.c @@ -3,16 +3,16 @@ * * Output of Calma GDS-II stream format. * - * ********************************************************************* - * * Copyright (C) 1985, 1990 Regents of the University of California. * - * * Permission to use, copy, modify, and distribute this * - * * software and its documentation for any purpose and without * - * * fee is hereby granted, provided that the above copyright * - * * notice appear in all copies. The University of California * - * * makes no representations about the suitability of this * - * * software for any purpose. It is provided "as is" without * - * * express or implied warranty. Export of this software outside * - * * of the United States of America may require an export license. * + * ********************************************************************* + * * Copyright (C) 1985, 1990 Regents of the University of California. * + * * Permission to use, copy, modify, and distribute this * + * * software and its documentation for any purpose and without * + * * fee is hereby granted, provided that the above copyright * + * * notice appear in all copies. The University of California * + * * makes no representations about the suitability of this * + * * software for any purpose. It is provided "as is" without * + * * express or implied warranty. Export of this software outside * + * * of the United States of America may require an export license. * * ********************************************************************* */ @@ -118,7 +118,7 @@ typedef struct BT1 { int bt_points; /* Number of points in this list */ struct BT1 *bt_next; /* Next polygon record */ } BoundaryTop; - + /*--------------------------------------------------------------*/ /* Number assigned to each cell */ @@ -146,7 +146,7 @@ HashTable calmaPrefixHash; /* Imports */ extern time_t time(); - + /* -------------------------------------------------------------------- */ /* @@ -238,7 +238,7 @@ static char calmaMapTablePermissive[] = 'x', 'y', 'z', '{', '|', '}', '~', 0, /* x - DEL */ }; - + /* * ---------------------------------------------------------------------------- * @@ -340,7 +340,7 @@ CalmaWrite(rootDef, f) TxPrintf("%d problems occurred. See feedback entries.\n", problems); /* - * Destroy all contact cell definitions + * Destroy all contact cell definitions */ if (CalmaContactArrays) calmaDelContacts(); @@ -348,7 +348,7 @@ CalmaWrite(rootDef, f) HashKill(&calmaPrefixHash); return (good); } - + /* * ---------------------------------------------------------------------------- @@ -498,7 +498,7 @@ calmaDumpStructure(def, outf, calmaDefHash, filename) /* for handling any AREF or SREF names, which need name */ /* checks. */ - while (1) + while (1) { int datatype; @@ -785,7 +785,7 @@ calmaProcessDef(def, outf) * not, or if there is any problem obtaining the original cell * definition, resort to writing out magic's version of the def, * and print a warning message. - * + * * Treat the lack of a GDS_START property as an indication * that we should treat this cell like a reference-only * cell. That is, the instance will be called but no @@ -912,7 +912,7 @@ calmaProcessDef(def, outf) return (0); } - + /* * ---------------------------------------------------------------------------- * @@ -1315,7 +1315,7 @@ calmaWriteUseFunc(use, f) return (0); } - + /* * ---------------------------------------------------------------------------- * @@ -1346,7 +1346,7 @@ calmaOutStructName(type, def, f) int calmanum; char *table; - if (CIFCurStyle->cs_flags & CWF_PERMISSIVE_LABELS) + if (CIFCurStyle->cs_flags & CWF_PERMISSIVE_LABELS) { table = calmaMapTablePermissive; } else { @@ -1545,7 +1545,7 @@ calmaWriteContacts(f) /* the proper contact cut drawn. It is turned on again at the end */ /* of the routine. Note that this routine is not called unless */ /* CalmaContactArrays is TRUE. */ - + CalmaContactArrays = FALSE; DBEnumerateTypes(&tMask); @@ -1649,7 +1649,7 @@ calmaDelContacts() * this should be most efficient. * * Side effects: - * May allocate memory. + * May allocate memory. * --------------------------------------------------------------------------- */ @@ -1756,7 +1756,7 @@ calmaRemoveDegenerate(blist) freeMagic(curseg->lb_next); freeMagic(curseg); - + /* Make sure record doesn't point to a free'd segment */ bounds->bt_first = lastseg; bounds->bt_points -= 2; @@ -1806,7 +1806,7 @@ calmaRemoveColinear(blist) (lastseg->lb_start.p_y == curseg->lb_next->lb_start.p_y))) { lastseg->lb_next = curseg->lb_next; - + /* Make sure record doesn't point to a free'd segment */ if (curseg == bounds->bt_first) bounds->bt_first = lastseg; @@ -1872,7 +1872,7 @@ calmaRemoveColinear(blist) * Still, each segment is never checked against more than 200 points, * because when a boundary reaches this number (the maximum for GDS * boundary records), the record will tend to be skipped (it should - * probably be output here. . .) + * probably be output here. . .) * * Results: * None. @@ -1885,7 +1885,7 @@ calmaRemoveColinear(blist) void calmaMergeSegments(edge, blist, num_points) - LinkedBoundary *edge; + LinkedBoundary *edge; BoundaryTop **blist; int num_points; { @@ -1933,7 +1933,7 @@ calmaMergeSegments(edge, blist, num_points) freeMagic(compseg); freeMagic(curseg); - + /* Make sure the record doesn't point to the free'd segment */ if (compseg == bounds->bt_first) bounds->bt_first = complast; bounds->bt_points += num_points - 2; @@ -1944,7 +1944,7 @@ calmaMergeSegments(edge, blist, num_points) } /* If still no connecting edge was found, or if we overflowed the GDS max */ - /* number of records for a boundary, then start a new entry. */ + /* number of records for a boundary, then start a new entry. */ make_new_bound: @@ -2029,7 +2029,7 @@ calmaProcessBoundary(blist, cos) { if (lbref != listtop) TxPrintf("->"); - else + else lbstop = listtop; switch(lbref->lb_type) @@ -2343,7 +2343,7 @@ done_searches: /* tiles, we may have expanded it. This could use a LOT of */ /* optimizing. 1) remove colinear points in calmaAddSegment */ /* when both subsegments are external paths, and 2) here, */ - /* take the shortest path to making "edge" exactly 4 points.*/ + /* take the shortest path to making "edge" exactly 4 points.*/ /* Note that in non-Manhattan mode, num_points may be 3. */ if (num_points != 4) @@ -2484,7 +2484,7 @@ calmaWritePaintFunc(tile, cos) return 0; } - + /* * ---------------------------------------------------------------------------- * @@ -2648,7 +2648,7 @@ calmaWriteLabelFunc(lab, type, f) calmaOutRH(4, CALMA_ENDEL, CALMA_NODATA, f); } } - + /* * ---------------------------------------------------------------------------- * @@ -2704,7 +2704,7 @@ calmaOutHeader(rootDef, f) if (CIFCurStyle->cs_flags & CWF_ANGSTROMS) mum = 1e-10; calmaOutR8(mum, f); /* Meters per database unit */ } - + /* * ---------------------------------------------------------------------------- * @@ -2737,7 +2737,7 @@ calmaOutDate(t, f) calmaOutI2(datep->tm_min, f); calmaOutI2(datep->tm_sec, f); } - + /* * ---------------------------------------------------------------------------- * @@ -2769,7 +2769,7 @@ calmaOutStringRecord(type, str, f) char *table, *locstr, *origstr = NULL; char *locstrprv; /* Added by BSI */ - if(CIFCurStyle->cs_flags & CWF_PERMISSIVE_LABELS) + if(CIFCurStyle->cs_flags & CWF_PERMISSIVE_LABELS) { table = calmaMapTablePermissive; } else { @@ -2917,7 +2917,7 @@ calmaOutR8(d, f) } } - + /* * ---------------------------------------------------------------------------- * diff --git a/calma/calma.h b/calma/calma.h index 8c98ed4e..f810e7a1 100644 --- a/calma/calma.h +++ b/calma/calma.h @@ -4,16 +4,16 @@ * This file defines things that are exported by the * calma module to the rest of the world. * - * ********************************************************************* - * * Copyright (C) 1985, 1990 Regents of the University of California. * - * * Permission to use, copy, modify, and distribute this * - * * software and its documentation for any purpose and without * - * * fee is hereby granted, provided that the above copyright * - * * notice appear in all copies. The University of California * - * * makes no representations about the suitability of this * - * * software for any purpose. It is provided "as is" without * - * * express or implied warranty. Export of this software outside * - * * of the United States of America may require an export license. * + * ********************************************************************* + * * Copyright (C) 1985, 1990 Regents of the University of California. * + * * Permission to use, copy, modify, and distribute this * + * * software and its documentation for any purpose and without * + * * fee is hereby granted, provided that the above copyright * + * * notice appear in all copies. The University of California * + * * makes no representations about the suitability of this * + * * software for any purpose. It is provided "as is" without * + * * express or implied warranty. Export of this software outside * + * * of the United States of America may require an export license. * * ********************************************************************* * * rcsid $Header: /usr/cvsroot/magic-8.0/calma/calma.h,v 1.1.1.1 2008/02/03 20:43:50 tim Exp $ diff --git a/calma/calmaInt.h b/calma/calmaInt.h index 407d5c40..297ceb4d 100644 --- a/calma/calmaInt.h +++ b/calma/calmaInt.h @@ -4,16 +4,16 @@ * This file defines constants used internally by the calma * module, but not exported to the rest of the world. * - * ********************************************************************* - * * Copyright (C) 1985, 1990 Regents of the University of California. * - * * Permission to use, copy, modify, and distribute this * - * * software and its documentation for any purpose and without * - * * fee is hereby granted, provided that the above copyright * - * * notice appear in all copies. The University of California * - * * makes no representations about the suitability of this * - * * software for any purpose. It is provided "as is" without * - * * express or implied warranty. Export of this software outside * - * * of the United States of America may require an export license. * + * ********************************************************************* + * * Copyright (C) 1985, 1990 Regents of the University of California. * + * * Permission to use, copy, modify, and distribute this * + * * software and its documentation for any purpose and without * + * * fee is hereby granted, provided that the above copyright * + * * notice appear in all copies. The University of California * + * * makes no representations about the suitability of this * + * * software for any purpose. It is provided "as is" without * + * * express or implied warranty. Export of this software outside * + * * of the United States of America may require an export license. * * ********************************************************************* * * rcsid $Header: /usr/cvsroot/magic-8.0/calma/calmaInt.h,v 1.2 2010/06/24 12:37:15 tim Exp $ @@ -157,7 +157,7 @@ extern int calmaLArtype; # define ntohs(x) (x) # define htonl(x) (x) # define htons(x) (x) -# endif +# endif #endif typedef union { char uc[2]; unsigned short us; } TwoByteInt; diff --git a/cif/CIFgen.c b/cif/CIFgen.c index c03ba4bf..7ed4549a 100644 --- a/cif/CIFgen.c +++ b/cif/CIFgen.c @@ -4,16 +4,16 @@ * tile information, using one of the styles read from the * technology file. * - * ********************************************************************* - * * Copyright (C) 1985, 1990 Regents of the University of California. * - * * Permission to use, copy, modify, and distribute this * - * * software and its documentation for any purpose and without * - * * fee is hereby granted, provided that the above copyright * - * * notice appear in all copies. The University of California * - * * makes no representations about the suitability of this * - * * software for any purpose. It is provided "as is" without * - * * express or implied warranty. Export of this software outside * - * * of the United States of America may require an export license. * + * ********************************************************************* + * * Copyright (C) 1985, 1990 Regents of the University of California. * + * * Permission to use, copy, modify, and distribute this * + * * software and its documentation for any purpose and without * + * * fee is hereby granted, provided that the above copyright * + * * notice appear in all copies. The University of California * + * * makes no representations about the suitability of this * + * * software for any purpose. It is provided "as is" without * + * * express or implied warranty. Export of this software outside * + * * of the United States of America may require an export license. * * ********************************************************************* */ @@ -135,7 +135,7 @@ cifPaintFunc(tile, table) * needed for implants on FET gates to maintain the implant width for * small gates, the "rect_only" requirement is not particularly * constraining. - * + * * ---------------------------------------------------------------------------- */ @@ -352,7 +352,7 @@ cifGrowGridFunc(tile, table) * create a euclidean distance to the edge of growDistance while * keeping corner points on-grid. This requires a substantially * different algorithm from cifGrowFunc. - * + * * Results: * Always returns 0 to keep the search alive. * @@ -733,7 +733,7 @@ cifBloatFunc(tile, clientData) cifArea.r_ytop *= cifScale; /* This is a modified version of the nonmanhattan grow function. */ - /* We grow only in the direction of the diagonal. */ + /* We grow only in the direction of the diagonal. */ /* This will not work in all situations! Corner extensions are not */ /* considered (but should be, for completeness). */ @@ -839,7 +839,7 @@ cifBloatFunc(tile, clientData) * Start with the left side, and output the bloats along that * side, if any. */ - + tilestop = tileArea.r_ytop; cifstop = cifArea.r_ytop; type = oldType; @@ -1144,7 +1144,7 @@ cifBloatAllFunc(tile, bls) t = (Tile *) STACKPOP(BloatStack); if (t->ti_client != (ClientData)CIF_PENDING) continue; t->ti_client = (ClientData)CIF_PROCESSED; - + /* Get the tile into CIF coordinates. */ TiToRect(t, &area); @@ -1441,7 +1441,7 @@ cifSquaresStripFunc(tile, stripsData) if ((height < stripsData->size) || (height >= (stripsData->size + stripsData->pitch))) return 0; - + /* Ignore strips that are part of a larger */ /* collection of non-manhattan geometry. */ @@ -1487,7 +1487,7 @@ cifSquaresStripFunc(tile, stripsData) TTMaskHasType(&DBSpaceBits, TiGetBottomType(tp))) tp = BL(tp); segstart = MAX(LEFT(tile), RIGHT(tp)); - if (segend <= segstart) break; + if (segend <= segstart) break; /* Find matching segments along the bottom of the tile */ @@ -1504,7 +1504,7 @@ cifSquaresStripFunc(tile, stripsData) TTMaskHasType(&DBSpaceBits, TiGetTopType(tp2))) tp2 = TR(tp2); matchend = MIN(LEFT(tp2), segend); - if (matchend <= matchstart) break; + if (matchend <= matchstart) break; /* Process the strip */ @@ -1615,14 +1615,14 @@ cifRectBoundingBox(op, cellDef, plane) simple = TRUE; tile = plane->pl_hint; TiToRect(tile, &bbox); - + PUSHTILE(tile, BoxStack); while (!StackEmpty(BoxStack)) { t = (Tile *) STACKPOP(BoxStack); if (t->ti_client != (ClientData)CIF_PENDING) continue; t->ti_client = (ClientData)CIF_PROCESSED; - + /* Adjust bounding box */ TiToRect(t, &area); GeoInclude(&area, &bbox); @@ -1739,7 +1739,7 @@ cifRectBoundingBox(op, cellDef, plane) * tile-based contact cut generation by collecting all connected tiles * in an area, and placing cuts relative to that area's bounding box. * A tile search is used to select the parts of any non-rectangular area - * inside the bounding box that allow contact cuts, which lets cuts + * inside the bounding box that allow contact cuts, which lets cuts * be placed across tile boundaries and inside non-manhattan tiles. * It also allows contacts to be placed inside complex structures such * as (possibly intersecting) guardrings. @@ -1802,7 +1802,7 @@ cifSquaresFillArea(op, cellDef, plane) while (stripList != NULL) { Rect stripLess = stripList->area; - + if (diff > 0) { if (stripList->vertical) @@ -1888,14 +1888,14 @@ cifSquaresFillArea(op, cellDef, plane) simple = TRUE; tile = plane->pl_hint; TiToRect(tile, &bbox); - + PUSHTILE(tile, CutStack); while (!StackEmpty(CutStack)) { t = (Tile *) STACKPOP(CutStack); if (t->ti_client != (ClientData)CIF_PENDING) continue; t->ti_client = (ClientData)CIF_PROCESSED; - + /* Adjust bounding box */ TiToRect(t, &area); GeoInclude(&area, &bbox); @@ -2139,7 +2139,7 @@ cifSlotsFillArea(op, cellDef, plane) while (stripList != NULL) { Rect stripLess = stripList->area; - + if (diff > 0) { if (stripList->vertical) @@ -2230,14 +2230,14 @@ cifSlotsFillArea(op, cellDef, plane) simple = TRUE; tile = plane->pl_hint; TiToRect(tile, &bbox); - + PUSHTILE(tile, CutStack); while (!StackEmpty(CutStack)) { t = (Tile *) STACKPOP(CutStack); if (t->ti_client != (ClientData)CIF_PENDING) continue; t->ti_client = (ClientData)CIF_PROCESSED; - + /* Adjust bounding box */ TiToRect(t, &area); GeoInclude(&area, &bbox); @@ -2478,7 +2478,7 @@ cifBloatMaxFunc(tile, op) if (op->co_opcode == CIFOP_BLOATMAX) bloat = -10000000; else bloat = 10000000; for (t = BL(tile); BOTTOM(t) < TOP(tile); t = RT(t)) - { + { otherType = TiGetType(t); if (otherType == type) continue; tmp = bloats->bl_distance[otherType]; @@ -2496,7 +2496,7 @@ cifBloatMaxFunc(tile, op) if (op->co_opcode == CIFOP_BLOATMAX) bloat = -10000000; else bloat = 10000000; for (t = RT(tile); RIGHT(t) > LEFT(tile); t = BL(t)) - { + { otherType = TiGetType(t); if (otherType == type) continue; tmp = bloats->bl_distance[otherType]; @@ -2510,11 +2510,11 @@ cifBloatMaxFunc(tile, op) area.r_ytop += bloat; /* Now the right side. */ - + if (op->co_opcode == CIFOP_BLOATMAX) bloat = -10000000; else bloat = 10000000; for (t = TR(tile); TOP(t) > BOTTOM(tile); t = LB(t)) - { + { otherType = TiGetType(t); if (otherType == type) continue; tmp = bloats->bl_distance[otherType]; @@ -2532,7 +2532,7 @@ cifBloatMaxFunc(tile, op) if (op->co_opcode == CIFOP_BLOATMAX) bloat = -10000000; else bloat = 10000000; for (t = LB(tile); LEFT(t) < RIGHT(tile); t = TR(t)) - { + { otherType = TiGetType(t); if (otherType == type) continue; tmp = bloats->bl_distance[otherType]; @@ -3004,7 +3004,7 @@ cifSquareGridFunc(area, op, rows, columns, cut) *rows = 0; return 0; } - + *rows = (locarea.r_ytop - bottom + squares->sq_sep) / pitch; if (*rows == 0) return 0; @@ -3023,7 +3023,7 @@ cifSquareGridFunc(area, op, rows, columns, cut) return 0; } - + /* * ---------------------------------------------------------------------------- * @@ -3104,7 +3104,7 @@ cifSrTiles(cifOp, area, cellDef, temps, func, cdArg) (void) DBSrPaintArea((Tile *) NULL, *temps, &TiPlaneRect, &CIFSolidBits, func, (ClientData) cdArg); } - + /* * ---------------------------------------------------------------------------- * @@ -3191,7 +3191,7 @@ CIFGenLayer(op, area, cellDef, temps, clientdata) &DBSpaceBits, cifPaintFunc, (ClientData) CIFEraseTable); break; - + /* For OR, just use cifPaintFunc to OR the areas of all * relevant tiles into plane. HOWEVER, if the co_client * record is non-NULL and CalmaContactArrays is TRUE, @@ -3269,7 +3269,7 @@ CIFGenLayer(op, area, cellDef, temps, clientdata) (ClientData) CIFPaintTable); } break; - + /* For ANDNOT, do exactly the same thing as OR, except erase * instead of paint. */ @@ -3279,12 +3279,12 @@ CIFGenLayer(op, area, cellDef, temps, clientdata) cifSrTiles(op, area, cellDef, temps, cifPaintFunc, (ClientData) CIFEraseTable); break; - + /* For GROW, just find all solid tiles in the current plane, * and paint a larger version into a new plane. The switch * the current and new planes. */ - + case CIFOP_GROW: growDistance = op->co_distance; DBClearPaintPlane(nextPlane); @@ -3324,7 +3324,7 @@ CIFGenLayer(op, area, cellDef, temps, clientdata) curPlane = nextPlane; nextPlane = temp; break; - + /* SHRINK is just like grow except work from the space tiles. */ case CIFOP_SHRINK: @@ -3340,7 +3340,7 @@ CIFGenLayer(op, area, cellDef, temps, clientdata) curPlane = nextPlane; nextPlane = temp; break; - + case CIFOP_CLOSE: growDistance = op->co_distance; DBClearPaintPlane(nextPlane); @@ -3362,7 +3362,7 @@ CIFGenLayer(op, area, cellDef, temps, clientdata) cifSrTiles(op, area, cellDef, temps, cifBloatFunc, op->co_client); break; - + case CIFOP_BLOATMAX: case CIFOP_BLOATMIN: cifPlane = curPlane; @@ -3377,7 +3377,7 @@ CIFGenLayer(op, area, cellDef, temps, clientdata) cifSrTiles(op, area, cellDef, temps, cifBloatAllFunc, (ClientData)&bls); break; - + case CIFOP_SQUARES: if (CalmaContactArrays == FALSE) { @@ -3458,7 +3458,7 @@ CIFGenLayer(op, area, cellDef, temps, clientdata) bbox.r_ybot *= cifScale; bbox.r_ytop *= cifScale; DBNMPaintPlane(cifPlane, CIF_SOLIDTYPE, &bbox, - CIFPaintTable, (PaintUndoInfo *)NULL); + CIFPaintTable, (PaintUndoInfo *)NULL); } break; @@ -3493,7 +3493,7 @@ CIFGenLayer(op, area, cellDef, temps, clientdata) bbox.r_ybot *= cifScale; bbox.r_ytop *= cifScale; DBNMPaintPlane(curPlane, CIF_SOLIDTYPE, &bbox, - CIFPaintTable, (PaintUndoInfo *)NULL); + CIFPaintTable, (PaintUndoInfo *)NULL); break; default: @@ -3503,7 +3503,7 @@ CIFGenLayer(op, area, cellDef, temps, clientdata) return curPlane; } - + /* * ---------------------------------------------------------------------------- * @@ -3621,7 +3621,7 @@ CIFGen(cellDef, area, planes, layers, replace, genAllPlanes, clientdata) else planes[i] = new[i]; } } - + /* * ---------------------------------------------------------------------------- * @@ -3670,7 +3670,7 @@ cifClipPlane(plane, clip) DBPaintPlane(plane, &r, CIFEraseTable, (PaintUndoInfo *) NULL); } } - + /* * ---------------------------------------------------------------------------- * @@ -3725,7 +3725,7 @@ cifGenClip(area, expanded, clip) } else clip->r_ytop = expanded->r_ytop = area->r_ytop; } - + /* * ---------------------------------------------------------------------------- * diff --git a/cif/CIFhier.c b/cif/CIFhier.c index f52a80f6..97d3e465 100644 --- a/cif/CIFhier.c +++ b/cif/CIFhier.c @@ -8,16 +8,16 @@ * separately. This module computes the extra CIF that may be * needed. * - * ********************************************************************* - * * Copyright (C) 1985, 1990 Regents of the University of California. * - * * Permission to use, copy, modify, and distribute this * - * * software and its documentation for any purpose and without * - * * fee is hereby granted, provided that the above copyright * - * * notice appear in all copies. The University of California * - * * makes no representations about the suitability of this * - * * software for any purpose. It is provided "as is" without * - * * express or implied warranty. Export of this software outside * - * * of the United States of America may require an export license. * + * ********************************************************************* + * * Copyright (C) 1985, 1990 Regents of the University of California. * + * * Permission to use, copy, modify, and distribute this * + * * software and its documentation for any purpose and without * + * * fee is hereby granted, provided that the above copyright * + * * notice appear in all copies. The University of California * + * * makes no representations about the suitability of this * + * * software for any purpose. It is provided "as is" without * + * * express or implied warranty. Export of this software outside * + * * of the United States of America may require an export license. * * ********************************************************************* */ @@ -82,7 +82,7 @@ static CIFLayer *CurCifLayer; (dst)->r_ybot = (src)->r_ybot * scale; \ (dst)->r_xtop = (src)->r_xtop * scale; \ (dst)->r_ytop = (src)->r_ytop * scale; - + /* * ---------------------------------------------------------------------------- @@ -148,7 +148,7 @@ CIFInitCells() CIFDummyUse = DBCellNewUse(CIFTotalDef, (char *) NULL); DBSetTrans (CIFDummyUse, &GeoIdentityTransform); } - + /* * ---------------------------------------------------------------------------- * @@ -198,7 +198,7 @@ cifHierCleanup() SigEnableInterrupts(); } - + /* * ---------------------------------------------------------------------------- * @@ -274,7 +274,7 @@ cifHierCopyFunc(tile, cxp) } return 0; } - + /* * ---------------------------------------------------------------------------- * @@ -317,7 +317,7 @@ cifHierCellFunc(scx) GEO_EXPAND(&scx->scx_area, CIFCurStyle->cs_radius, &newscx.scx_area); (void) DBTreeSrTiles(&newscx, &CIFCurStyle->cs_yankLayers, 0, cifHierCopyFunc, (ClientData) CIFComponentDef); - + /* Set CIFErrorDef to NULL to ignore errors here... these will * get reported anyway when the cell is CIF'ed non-hierarchically, * so there's no point in making a second report here. @@ -329,7 +329,7 @@ cifHierCellFunc(scx) &CIFCurStyle->cs_hierLayers, FALSE, TRUE); return 0; } - + /* * ---------------------------------------------------------------------------- * @@ -370,7 +370,7 @@ cifHierErrorFunc(tile, checkArea) return 0; } - + /* * ---------------------------------------------------------------------------- * @@ -453,7 +453,7 @@ cifHierPaintFunc(tile, plane) CIFTileOps += 1; return 0; } - + /* * ---------------------------------------------------------------------------- * @@ -482,7 +482,7 @@ cifCheckAndErase(style) int i; /* Process all of the bits of CIF in CIFComponentPlanes. */ - + for (i=0; ics_nLayers; i++) { CIFErrorLayer = i; @@ -492,7 +492,7 @@ cifCheckAndErase(style) (ClientData) CIFTotalPlanes[i]); } } - + /* * ---------------------------------------------------------------------------- * @@ -548,7 +548,7 @@ CIFGenSubcells(def, area, output) * out if there are any subcell interactions within one * radius of the square. */ - + totalArea = *area; GeoClip(&totalArea, &def->cd_bbox); for (y = totalArea.r_ybot; y < totalArea.r_ytop; y += stepSize) @@ -565,12 +565,12 @@ CIFGenSubcells(def, area, output) GEO_EXPAND(&square, radius, &square); if (!DRCFindInteractions(def, &square, radius, &interaction)) continue; - + /* We've found an interaction. Flatten it into CIFTotalUse, then * make CIF from what's flattened. Yank extra material to * ensure that CIF is generated correctly. */ - + GEO_EXPAND(&interaction, CIFCurStyle->cs_radius, &scx.scx_area); (void) DBTreeSrTiles(&scx, &CIFCurStyle->cs_yankLayers, 0, cifHierCopyFunc, (ClientData) CIFTotalDef); @@ -582,10 +582,10 @@ CIFGenSubcells(def, area, output) * and generate CIF for each subcell individually. OR this * combined CIF together into CIFComponentPlanes. */ - + scx.scx_area = interaction; (void) DBCellSrArea(&scx, cifHierCellFunc, (ClientData) NULL); - + /* Also generate CIF for the paint in the parent alone. Ignore * CIF generation errors here, since they will already have been * recorded when the parent was CIF'ed by itself. @@ -599,14 +599,14 @@ CIFGenSubcells(def, area, output) * CIF, then erase the piece stuff from the overall, and * throw away the pieces. */ - + CIFErrorDef = def; cifCheckAndErase(CIFCurStyle); /* Lastly, paint everything from the pieces into the result * planes. */ - + oldTileOps2 = CIFTileOps; for (i=0; ics_nLayers; i++) { @@ -619,11 +619,11 @@ CIFGenSubcells(def, area, output) cifHierCleanup(); } - + CIFHierTileOps += CIFTileOps - oldTileOps; UndoEnable(); } - + /* * ---------------------------------------------------------------------------- * @@ -684,14 +684,14 @@ cifHierElementFunc(use, transform, x, y, checkArea) return 0; } - + /* * --------------------------------------------------------------------------- * cifGrowSliver() -- * * This function is passed the address of a "sliver" rectangle. It then - * grows the shortest dimension of the sliver so that it is at least minimum + * grows the shortest dimension of the sliver so that it is at least minimum * width. The minimum width is found through the variable CurCifLayer which * identifies the current layer being generated. A "minwidth" command has been * added to the cifoutput section for which the minimum width of each layer @@ -744,7 +744,7 @@ cifGrowSliver(tile, area) return 0; } - + /* * ---------------------------------------------------------------------------- * @@ -794,7 +794,7 @@ cifHierPaintArrayFunc(tile) } return 0; } - + /* * ---------------------------------------------------------------------------- * @@ -852,7 +852,7 @@ cifHierArrayFunc(scx, output) radius = CIFCurStyle->cs_radius; if ((use->cu_xlo == use->cu_xhi) && (use->cu_ylo == use->cu_yhi)) return 2; - + /* We only want interactions between neighboring cells, so reduce */ /* the array size to at most 2x2, process, then restore the */ /* original array count. */ @@ -869,7 +869,7 @@ cifHierArrayFunc(scx, output) * of the parent. If the array is 1-dimensional, we set the * corresponding spacing to an impossibly large distance. */ - + childArea.r_xbot = 0; childArea.r_ybot = 0; @@ -956,7 +956,7 @@ cifHierArrayFunc(scx, output) CIFErrorDef = use->cu_parent; CIFGen(CIFTotalDef, &B, CIFTotalPlanes, &CIFCurStyle->cs_hierLayers, FALSE, TRUE); - + /* D */ D.r_xbot = use->cu_bbox.r_xtop - xsep + radius; @@ -977,7 +977,7 @@ cifHierArrayFunc(scx, output) /* Remove redundant CIF that's already in the children, and * make sure everything in the kids is in the parent too. */ - + CIFErrorDef = use->cu_parent; cifCheckAndErase(CIFCurStyle); @@ -986,7 +986,7 @@ cifHierArrayFunc(scx, output) * be replicated many times over to cover each of the array * interaction areas. */ - + oldTileOps = CIFTileOps; for (i=0; ics_nLayers; i++) { @@ -1037,7 +1037,7 @@ cifHierArrayFunc(scx, output) (void) DBSrPaintArea((Tile *) NULL, CIFTotalPlanes[i], &cifArea, &CIFSolidBits, cifHierPaintArrayFunc, (ClientData) NULL); - + /* The right edge of the array (from D). */ cifHierXSpacing = 0; @@ -1048,7 +1048,7 @@ cifHierArrayFunc(scx, output) (void) DBSrPaintArea((Tile *) NULL, CIFTotalPlanes[i], &cifArea, &CIFSolidBits, cifHierPaintArrayFunc, (ClientData) NULL); - + /* The core of the array (from A and B). This code is a bit * tricky in order to work correctly even for arrays where * radius < ysep. The "if" statement handles this case. @@ -1081,7 +1081,7 @@ cifHierArrayFunc(scx, output) return 2; } - + /* * ---------------------------------------------------------------------------- * @@ -1122,7 +1122,7 @@ CIFGenArrays(def, area, output) /* Bill all tile operations here to hierarchical processing in * addition to adding to the total. */ - + oldTileOps = CIFTileOps; if (output == NULL) diff --git a/cif/CIFint.h b/cif/CIFint.h index a3a59788..c3d630fe 100644 --- a/cif/CIFint.h +++ b/cif/CIFint.h @@ -4,16 +4,16 @@ * Defines things shared internally by the cif module of Magic, * but not generally needed outside the cif module. * - * ********************************************************************* - * * Copyright (C) 1985, 1990 Regents of the University of California. * - * * Permission to use, copy, modify, and distribute this * - * * software and its documentation for any purpose and without * - * * fee is hereby granted, provided that the above copyright * - * * notice appear in all copies. The University of California * - * * makes no representations about the suitability of this * - * * software for any purpose. It is provided "as is" without * - * * express or implied warranty. Export of this software outside * - * * of the United States of America may require an export license. * + * ********************************************************************* + * * Copyright (C) 1985, 1990 Regents of the University of California. * + * * Permission to use, copy, modify, and distribute this * + * * software and its documentation for any purpose and without * + * * fee is hereby granted, provided that the above copyright * + * * notice appear in all copies. The University of California * + * * makes no representations about the suitability of this * + * * software for any purpose. It is provided "as is" without * + * * express or implied warranty. Export of this software outside * + * * of the United States of America may require an export license. * * ********************************************************************* * * rcsid "$Header: /usr/cvsroot/magic-8.0/cif/CIFint.h,v 1.3 2008/12/04 17:10:29 tim Exp $" @@ -198,7 +198,7 @@ typedef struct */ int min_width; /* the minimum width rule in centi-microns * for the layer. This is used by Grow Sliver - * to generate drc correct parent slivers + * to generate drc correct parent slivers */ #ifdef THREE_D int cl_renderStyle; /* Style to render CIF layer with */ @@ -258,7 +258,7 @@ typedef struct cifstyle * file more readable). Default of 1. * Unused for GDS input/output. */ - int cs_expander; /* cs_scaleFactor / cs_expander = scale in + int cs_expander; /* cs_scaleFactor / cs_expander = scale in * centimicrons. Default of 1. Value 10 * means cs_scaleFactor is measured in * nanometers (millimicrons) diff --git a/cif/CIFmain.c b/cif/CIFmain.c index 3975529e..d81a794a 100644 --- a/cif/CIFmain.c +++ b/cif/CIFmain.c @@ -3,16 +3,16 @@ * This file contains global information for the CIF module, * such as performance statistics. * - * ********************************************************************* - * * Copyright (C) 1985, 1990 Regents of the University of California. * - * * Permission to use, copy, modify, and distribute this * - * * software and its documentation for any purpose and without * - * * fee is hereby granted, provided that the above copyright * - * * notice appear in all copies. The University of California * - * * makes no representations about the suitability of this * - * * software for any purpose. It is provided "as is" without * - * * express or implied warranty. Export of this software outside * - * * of the United States of America may require an export license. * + * ********************************************************************* + * * Copyright (C) 1985, 1990 Regents of the University of California. * + * * Permission to use, copy, modify, and distribute this * + * * software and its documentation for any purpose and without * + * * fee is hereby granted, provided that the above copyright * + * * notice appear in all copies. The University of California * + * * makes no representations about the suitability of this * + * * software for any purpose. It is provided "as is" without * + * * express or implied warranty. Export of this software outside * + * * of the United States of America may require an export license. * * ********************************************************************* */ @@ -76,7 +76,7 @@ static int cifTotalHierRects = 0; global CellDef *CIFErrorDef; /* Definition in which to record errors. */ global int CIFErrorLayer; /* Index of CIF layer associated with errors.*/ - + /* * ---------------------------------------------------------------------------- * @@ -128,7 +128,7 @@ CIFPrintStats() * Results: * Internal units-to-(nanometers * convert) conversion factor (float). * Use convert = 1000 for centimicrons-to-microns conversion - * + * * Side effects: * None. * @@ -212,7 +212,7 @@ CIFPrintStyle(dolist, doforall, docurrent) } } - + /* * ---------------------------------------------------------------------------- * @@ -269,7 +269,7 @@ CIFSetStyle(name) TxError("\"%s\" is not one of the CIF output styles Magic knows.\n", name); CIFPrintStyle(FALSE, TRUE, TRUE); } - + /* * ---------------------------------------------------------------------------- * @@ -346,7 +346,7 @@ CIFNameToMask(name, result, depend) TxError(".\n"); return FALSE; } - + /* * ---------------------------------------------------------------------------- * @@ -385,7 +385,7 @@ CIFError(area, message) DBWFeedbackAdd(area, msg, CIFErrorDef, CIFCurStyle->cs_scaleFactor, STYLE_PALEHIGHLIGHTS); } - + /* * ---------------------------------------------------------------------------- * diff --git a/cif/CIFrdcl.c b/cif/CIFrdcl.c index 5ab52a7e..4cd26365 100644 --- a/cif/CIFrdcl.c +++ b/cif/CIFrdcl.c @@ -5,16 +5,16 @@ * both definitions and calls, and user-defined features * like labels. * - * ********************************************************************* - * * Copyright (C) 1985, 1990 Regents of the University of California. * - * * Permission to use, copy, modify, and distribute this * - * * software and its documentation for any purpose and without * - * * fee is hereby granted, provided that the above copyright * - * * notice appear in all copies. The University of California * - * * makes no representations about the suitability of this * - * * software for any purpose. It is provided "as is" without * - * * express or implied warranty. Export of this software outside * - * * of the United States of America may require an export license. * + * ********************************************************************* + * * Copyright (C) 1985, 1990 Regents of the University of California. * + * * Permission to use, copy, modify, and distribute this * + * * software and its documentation for any purpose and without * + * * fee is hereby granted, provided that the above copyright * + * * notice appear in all copies. The University of California * + * * makes no representations about the suitability of this * + * * software for any purpose. It is provided "as is" without * + * * express or implied warranty. Export of this software outside * + * * of the United States of America may require an export license. * * ********************************************************************* */ @@ -103,7 +103,7 @@ typedef struct { */ char *cifSubcellId = NULL; - + /* * ---------------------------------------------------------------------------- * @@ -150,7 +150,7 @@ CIFReadCellInit(ptrkeys) * cifForgetCell -- * * This local procedure is used to find a cell in the subcell - * table and remove its CellDef entry. + * table and remove its CellDef entry. * * Results: * FALSE if no such entry was found, otherwise TRUE. @@ -234,7 +234,7 @@ cifUniqueCell(cifNum) CIFReadError("Warning: cell definition %d reused.\n", cifNum); } - + /* * ---------------------------------------------------------------------------- * @@ -346,7 +346,7 @@ CIFScalePlanes(scalen, scaled, planearray) * * ---------------------------------------------------------------------------- */ - + void CIFInputRescale(n, d) int n, d; @@ -418,7 +418,7 @@ bool CIFParseStart() { int number; - + if (cifSubcellBeingRead) { CIFReadError("definition start inside other definition; ignored.\n"); @@ -489,7 +489,7 @@ CIFParseStart() cifCurReadPlanes = cifSubcellPlanes; return TRUE; } - + /* * ---------------------------------------------------------------------------- @@ -573,7 +573,7 @@ CIFPaintCurrent(filetype) plane = CIFGenLayer(cifCurReadStyle->crs_layers[i]->crl_ops, &TiPlaneRect, (CellDef *) NULL, cifCurReadPlanes); - + /* Generate a paint/erase table, then paint from the CIF * plane into the current Magic cell. */ @@ -607,7 +607,7 @@ CIFPaintCurrent(filetype) * is set in flags. This condition has occurred, though, and * needs to be debugged. */ - if ((cifReadCellDef->cd_flags & CDFLATGDS) && + if ((cifReadCellDef->cd_flags & CDFLATGDS) && (cifReadCellDef->cd_client != (ClientData)CLIENTDEFAULT)) parray = (Plane **)cifReadCellDef->cd_client; else @@ -672,7 +672,7 @@ CIFPaintCurrent(filetype) DBSrPaintArea((Tile *) NULL, plane, &TiPlaneRect, &CIFSolidBits, cifPaintCurrentFunc, (ClientData)type); - } + } /* Recycle the plane, which was dynamically allocated. */ @@ -827,7 +827,7 @@ cifPaintCurrentFunc(tile, type) return 0; /* To keep the search alive. */ } - + /* * ---------------------------------------------------------------------------- * @@ -855,12 +855,12 @@ CIFParseFinish() CIFSkipToSemi(); return FALSE; } - if (cifSubcellId != NULL) + if (cifSubcellId != NULL) { CIFReadError("pending call identifier %s discarded.\n", cifSubcellId); (void) StrDup(&cifSubcellId, (char *) NULL); } - + /* Take the `F'. */ TAKE(); @@ -869,7 +869,7 @@ CIFParseFinish() * the appropriate cell of the database. Then restore the saved * layer info. */ - + CIFPaintCurrent(FILE_CIF); DBAdjustLabels(cifReadCellDef, &TiPlaneRect); @@ -882,7 +882,7 @@ CIFParseFinish() cifCurReadPlanes = cifEditCellPlanes; return TRUE; } - + /* * ---------------------------------------------------------------------------- * @@ -922,7 +922,7 @@ CIFParseDelete() CIFSkipToSemi(); return TRUE; } - + /* * ---------------------------------------------------------------------------- * @@ -954,7 +954,7 @@ cifParseName() for (ch = PEEK() ; ch == ' ' || ch == '\t' ; ch = PEEK()) TAKE(); - + /* Read the string. */ bufferp = &buffer[0]; @@ -965,7 +965,7 @@ cifParseName() *bufferp = '\0'; return buffer; } - + /* * ---------------------------------------------------------------------------- * @@ -998,7 +998,7 @@ cifParseUser9() } return TRUE; } - + /* * ---------------------------------------------------------------------------- * @@ -1024,7 +1024,7 @@ CIFParseCall() Transform transform; CellUse *use; CellDef *def; - + /* Take the `C'. */ TAKE(); @@ -1063,7 +1063,7 @@ CIFParseCall() (void) StrDup(&cifSubcellId, (char *) NULL); return TRUE; } - + /* * ---------------------------------------------------------------------------- * @@ -1095,7 +1095,7 @@ cifParseUser91() (void) StrDup(&cifSubcellId, cifParseName()); return TRUE; } - + /* * ---------------------------------------------------------------------------- * @@ -1148,7 +1148,7 @@ cifParseUser94() * current cell. Tricky business: in order for the default * label location to be computed */ - + CIFSkipBlanks(); if (PEEK() != ';') { @@ -1185,7 +1185,7 @@ cifParseUser94() freeMagic(name); return TRUE; } - + /* * ---------------------------------------------------------------------------- * @@ -1224,12 +1224,12 @@ cifParseUser95() CIFSkipToSemi(); return FALSE; } - + savescale = cifCurReadStyle->crs_scaleFactor; /* The center coordinates returned are in CIF units *2 */ /* the values will be halved later before conversion to magic units */ - + if (! CIFParsePoint(¢er, 2)) { CIFReadError("95 command, but no location; ignored.\n"); @@ -1253,10 +1253,10 @@ cifParseUser95() lowerleft.p_x = center.p_x - size.p_x; lowerleft.p_y = center.p_y - size.p_y; - + upperright.p_x = center.p_x + size.p_x; upperright.p_y = center.p_y + size.p_y; - + if ((lowerleft.p_x % 2 == 0) && (lowerleft.p_y % 2 == 0)) { /* if possible convert values to CIF units by dividing by two */ @@ -1274,9 +1274,9 @@ cifParseUser95() CIFInputRescale(2, 1); } - + /* now scale each of the co-ordinates in turn */ - + lowerleft.p_x = CIFScaleCoord(lowerleft.p_x, COORD_ANY); savescale = cifCurReadStyle->crs_scaleFactor; @@ -1347,7 +1347,7 @@ cifParseUser95() freeMagic(name); return TRUE; } - + /* * ---------------------------------------------------------------------------- * @@ -1395,7 +1395,7 @@ CIFParseUser() return FALSE; } } - + /* * ---------------------------------------------------------------------------- * diff --git a/cif/CIFrdpoly.c b/cif/CIFrdpoly.c index 109fdaeb..edd79664 100644 --- a/cif/CIFrdpoly.c +++ b/cif/CIFrdpoly.c @@ -3,16 +3,16 @@ * This file contains procedures that turn polygons into * rectangles, as part of CIF file reading. * - * ********************************************************************* - * * Copyright (C) 1985, 1990 Regents of the University of California. * - * * Permission to use, copy, modify, and distribute this * - * * software and its documentation for any purpose and without * - * * fee is hereby granted, provided that the above copyright * - * * notice appear in all copies. The University of California * - * * makes no representations about the suitability of this * - * * software for any purpose. It is provided "as is" without * - * * express or implied warranty. Export of this software outside * - * * of the United States of America may require an export license. * + * ********************************************************************* + * * Copyright (C) 1985, 1990 Regents of the University of California. * + * * Permission to use, copy, modify, and distribute this * + * * software and its documentation for any purpose and without * + * * fee is hereby granted, provided that the above copyright * + * * notice appear in all copies. The University of California * + * * makes no representations about the suitability of this * + * * software for any purpose. It is provided "as is" without * + * * express or implied warranty. Export of this software outside * + * * of the United States of America may require an export license. * * ********************************************************************* */ @@ -33,7 +33,7 @@ static char rcsid[] __attribute__ ((unused)) = "$Header: /usr/cvsroot/magic-8.0/ #define HEDGE 0 /* Horizontal edge */ #define REDGE 1 /* Rising edge */ #define FEDGE -1 /* Falling edge */ - + /* * ---------------------------------------------------------------------------- * @@ -52,7 +52,7 @@ static char rcsid[] __attribute__ ((unused)) = "$Header: /usr/cvsroot/magic-8.0/ * ---------------------------------------------------------------------------- */ -int +int cifLowX(a, b) CIFPath **a, **b; { @@ -66,7 +66,7 @@ cifLowX(a, b) return (1); return (0); } - + /* * ---------------------------------------------------------------------------- * @@ -85,7 +85,7 @@ cifLowX(a, b) * ---------------------------------------------------------------------------- */ -int +int cifLowY(a, b) Point **a, **b; { @@ -95,7 +95,7 @@ cifLowY(a, b) return (1); return (0); } - + /* * ---------------------------------------------------------------------------- * @@ -157,7 +157,7 @@ cifOrient(edges, nedges, dir) } return (TRUE); } - + /* * ---------------------------------------------------------------------------- * @@ -200,7 +200,7 @@ cifCross(edge, dir, ybot, ytop) return (FALSE); } - + /* * ---------------------------------------------------------------------------- * diff --git a/cif/CIFrdpt.c b/cif/CIFrdpt.c index ec3846af..584679ad 100644 --- a/cif/CIFrdpt.c +++ b/cif/CIFrdpt.c @@ -4,16 +4,16 @@ * particular, it contains the routines to handle paint, * including rectangles, wires, flashes, and polygons. * - * ********************************************************************* - * * Copyright (C) 1985, 1990 Regents of the University of California. * - * * Permission to use, copy, modify, and distribute this * - * * software and its documentation for any purpose and without * - * * fee is hereby granted, provided that the above copyright * - * * notice appear in all copies. The University of California * - * * makes no representations about the suitability of this * - * * software for any purpose. It is provided "as is" without * - * * express or implied warranty. Export of this software outside * - * * of the United States of America may require an export license. * + * ********************************************************************* + * * Copyright (C) 1985, 1990 Regents of the University of California. * + * * Permission to use, copy, modify, and distribute this * + * * software and its documentation for any purpose and without * + * * fee is hereby granted, provided that the above copyright * + * * notice appear in all copies. The University of California * + * * makes no representations about the suitability of this * + * * software for any purpose. It is provided "as is" without * + * * express or implied warranty. Export of this software outside * + * * of the United States of America may require an export license. * * ********************************************************************* */ @@ -37,7 +37,7 @@ static char rcsid[] __attribute__ ((unused)) = "$Header: /usr/cvsroot/magic-8.0/ #include "cif/CIFint.h" #include "cif/CIFread.h" - + /* * ---------------------------------------------------------------------------- * @@ -69,7 +69,7 @@ CIFParseBox() Point direction; Rect rectangle, r2; int savescale; - + /* Take the 'B'. */ TAKE(); @@ -122,7 +122,7 @@ CIFParseBox() rectangle.r_xbot = -rectangle.r_xtop; rectangle.r_ybot = -rectangle.r_ytop; - + /* Optional direction vector: have to build transform to do rotate. */ if (CIFParseSInteger(&direction.p_x)) @@ -147,7 +147,7 @@ CIFParseBox() DBPaintPlane(cifReadPlane, &r2, CIFPaintTable, (PaintUndoInfo *) NULL); return TRUE; } - + /* * ---------------------------------------------------------------------------- * @@ -180,7 +180,7 @@ CIFParseFlash() int savescale; Point center; Rect rectangle; - + /* Take the 'R'. */ TAKE(); @@ -570,7 +570,7 @@ PaintPolygon(pointlist, number, plane, ptable, ui, keep) LinkedRect *rectp, *rectlist; CIFPath *newpath, *cifpath = (CIFPath *)NULL; int i; - + for (i = 0; i < number; i++) { newpath = (CIFPath *) mallocMagic((unsigned) sizeof (CIFPath)); @@ -625,7 +625,7 @@ PaintWireList(pointlist, number, width, endcap, plane, ptable, ui) { CIFPath *newpath, *cifpath = (CIFPath *)NULL; int i; - + for (i = 0; i < number; i++) { newpath = (CIFPath *) mallocMagic((unsigned) sizeof (CIFPath)); @@ -637,7 +637,7 @@ PaintWireList(pointlist, number, width, endcap, plane, ptable, ui) CIFPaintWirePath(cifpath, width, endcap, plane, ptable, ui); } - + /* * ---------------------------------------------------------------------------- * @@ -698,7 +698,7 @@ CIFParseWire() return TRUE; } - + /* * ---------------------------------------------------------------------------- * @@ -745,7 +745,7 @@ CIFParseLayer() /* Set current plane for use by the routines that parse geometric * elements. */ - + type = CIFReadNameToType(name, FALSE); if (type < 0) { @@ -761,7 +761,7 @@ CIFParseLayer() CIFSkipToSemi(); return TRUE; } - + /* * ---------------------------------------------------------------------------- * @@ -794,7 +794,7 @@ CIFParsePoly() CIFSkipToSemi(); return FALSE; } - if (!CIFParsePath(&pathheadp, 1)) + if (!CIFParsePath(&pathheadp, 1)) { CIFReadError("polygon, but improper path; ignored.\n"); CIFSkipToSemi(); diff --git a/cif/CIFrdtech.c b/cif/CIFrdtech.c index 3777df9a..d6404d24 100644 --- a/cif/CIFrdtech.c +++ b/cif/CIFrdtech.c @@ -4,16 +4,16 @@ * pertain to reading CIF files, and builds the tables used by * the CIF-reading code. * - * ********************************************************************* - * * Copyright (C) 1985, 1990 Regents of the University of California. * - * * Permission to use, copy, modify, and distribute this * - * * software and its documentation for any purpose and without * - * * fee is hereby granted, provided that the above copyright * - * * notice appear in all copies. The University of California * - * * makes no representations about the suitability of this * - * * software for any purpose. It is provided "as is" without * - * * express or implied warranty. Export of this software outside * - * * of the United States of America may require an export license. * + * ********************************************************************* + * * Copyright (C) 1985, 1990 Regents of the University of California. * + * * Permission to use, copy, modify, and distribute this * + * * software and its documentation for any purpose and without * + * * fee is hereby granted, provided that the above copyright * + * * notice appear in all copies. The University of California * + * * makes no representations about the suitability of this * + * * software for any purpose. It is provided "as is" without * + * * express or implied warranty. Export of this software outside * + * * of the United States of America may require an export license. * * ********************************************************************* */ @@ -142,7 +142,7 @@ CIFReadNameToType(name, newOK) /* Only accept this layer if it's in the current CIF style or * it's OK to add new layers to the current style. */ - + if (!TTMaskHasType(&cifCurReadStyle->crs_cifLayers, i) && !newOK) continue; if (strcmp(cifReadLayers[i], name) == 0) @@ -173,7 +173,7 @@ CIFReadNameToType(name, newOK) cifNReadLayers += 1; return cifNReadLayers-1; } - + /* * ---------------------------------------------------------------------------- * @@ -226,7 +226,7 @@ CIFCalmaLayerToCifLayer(layer, datatype, calmaStyle) /* No luck */ return (-1); } - + /* * ---------------------------------------------------------------------------- * @@ -264,7 +264,7 @@ CIFParseReadLayers(string, mask) p = strchr(string, ','); if (p != NULL) *p = 0; - + i = CIFReadNameToType(string, TRUE); if (i >= 0) TTMaskSetType(mask, i); @@ -286,7 +286,7 @@ CIFParseReadLayers(string, mask) for (string = p; *string == ','; string += 1) /* do nothing */; } } - + /* * ---------------------------------------------------------------------------- * @@ -369,7 +369,7 @@ cifReadStyleInit() cifCurReadStyle->crs_layers[i] = NULL; } } - + /* * * ---------------------------------------------------------------------------- @@ -392,17 +392,17 @@ void CIFReadTechInit() { CIFReadKeep *style; - + /* Cleanup any old info. */ - + cifNewReadStyle(); freeMagic(cifCurReadStyle); cifCurReadStyle = NULL; - + /* forget the list of styles */ - + for (style = cifReadStyleList; style != NULL; style = style->crs_next) - { + { freeMagic(style->crs_name); freeMagic(style); } @@ -434,7 +434,7 @@ CIFReadTechStyleInit() cifCurReadOp = NULL; } - + /* * ---------------------------------------------------------------------------- * @@ -474,7 +474,7 @@ CIFReadTechLine(sectionName, argc, argv) * make sure there's already a style around, and create one if * there isn't. */ - + if (strcmp(argv[0], "style") == 0) { if (argc != 2) @@ -490,7 +490,7 @@ CIFReadTechLine(sectionName, argc, argv) return TRUE; } } - for (newStyle = cifReadStyleList; newStyle != NULL; + for (newStyle = cifReadStyleList; newStyle != NULL; newStyle = newStyle->crs_next) { if (!strncmp(newStyle->crs_name, argv[1], l)) @@ -544,7 +544,7 @@ CIFReadTechLine(sectionName, argc, argv) for (p = cifReadStyleList; p->crs_next; p = p->crs_next); p->crs_next = newStyle; } - + if (cptr == NULL) break; else @@ -553,7 +553,7 @@ CIFReadTechLine(sectionName, argc, argv) newStyle = saveStyle; } } - + if (cifCurReadStyle == NULL) { cifNewReadStyle(); @@ -605,7 +605,7 @@ CIFReadTechLine(sectionName, argc, argv) if (cifCurReadStyle == NULL) return FALSE; if ((cifCurReadStyle->crs_status != TECH_PENDING) && (cifCurReadStyle->crs_status != TECH_SUSPENDED)) return TRUE; - + /* Process scalefactor lines next. */ if (strcmp(argv[0], "scalefactor") == 0) @@ -637,7 +637,7 @@ CIFReadTechLine(sectionName, argc, argv) } /* Process "gridlimit" lines. */ - + if (strncmp(argv[0], "grid", 4) == 0) { if (StrIsInt(argv[1])) @@ -695,7 +695,7 @@ CIFReadTechLine(sectionName, argc, argv) return TRUE; } } - + if (cptr == NULL) break; else @@ -737,7 +737,7 @@ CIFReadTechLine(sectionName, argc, argv) /* Handle a special case of a list of layer names on the * layer line. Turn them into an OR operation. */ - + if (argc == 3) { cifCurReadOp = (CIFOp *) mallocMagic(sizeof(CIFOp)); @@ -787,7 +787,7 @@ CIFReadTechLine(sectionName, argc, argv) /* Handle a special case of a list of layer names on the * layer line. Turn them into an OR operation. */ - + if (argc == 3) { cifCurReadOp = (CIFOp *) mallocMagic(sizeof(CIFOp)); @@ -836,7 +836,7 @@ CIFReadTechLine(sectionName, argc, argv) /* Figure out which Magic layer should get labels from which * CIF layers. */ - + if (strcmp(argv[0], "labels") == 0) { TileTypeBitMask mask; @@ -884,7 +884,7 @@ CIFReadTechLine(sectionName, argc, argv) * will cause the layers to be ignored when encountered in * cells. */ - + if (strcmp(argv[0], "ignore") == 0) { TileTypeBitMask mask; @@ -921,11 +921,11 @@ CIFReadTechLine(sectionName, argc, argv) } return TRUE; } - + /* Anything below here is a geometric operation, so we can * do some set-up that is common to all the operations. */ - + if (cifCurReadLayer == NULL) { TechError("Must define layer before specifying operations.\n"); @@ -1001,7 +1001,7 @@ CIFReadTechLine(sectionName, argc, argv) return TRUE; } - + /* * ---------------------------------------------------------------------------- * @@ -1081,7 +1081,7 @@ CIFReadLoadStyle(stylename) /* CIFReadTechFinal(); */ /* Taken care of by TechLoad() */ CIFTechInputScale(DBLambda[0], DBLambda[1], TRUE); } - + /* * ---------------------------------------------------------------------------- * @@ -1246,7 +1246,7 @@ CIFPrintReadStyle(dolist, doforall, docurrent) } } - + /* * ---------------------------------------------------------------------------- * @@ -1304,7 +1304,7 @@ CIFSetReadStyle(name) TxError("\"%s\" is not one of the CIF input styles Magic knows.\n", name); CIFPrintReadStyle(FALSE, TRUE, TRUE); } - + /* * ---------------------------------------------------------------------------- * diff --git a/cif/CIFrdutils.c b/cif/CIFrdutils.c index 1e3a8fdd..1e5ab408 100644 --- a/cif/CIFrdutils.c +++ b/cif/CIFrdutils.c @@ -5,16 +5,16 @@ * reading CIF files, plus a bunch of utility routines * for skipping white space, parsing numbers and points, etc. * - * ********************************************************************* - * * Copyright (C) 1985, 1990 Regents of the University of California. * - * * Permission to use, copy, modify, and distribute this * - * * software and its documentation for any purpose and without * - * * fee is hereby granted, provided that the above copyright * - * * notice appear in all copies. The University of California * - * * makes no representations about the suitability of this * - * * software for any purpose. It is provided "as is" without * - * * express or implied warranty. Export of this software outside * - * * of the United States of America may require an export license. * + * ********************************************************************* + * * Copyright (C) 1985, 1990 Regents of the University of California. * + * * Permission to use, copy, modify, and distribute this * + * * software and its documentation for any purpose and without * + * * fee is hereby granted, provided that the above copyright * + * * notice appear in all copies. The University of California * + * * makes no representations about the suitability of this * + * * software for any purpose. It is provided "as is" without * + * * express or implied warranty. Export of this software outside * + * * of the United States of America may require an export license. * * ********************************************************************* */ @@ -92,7 +92,7 @@ Plane *cifReadPlane; /* Plane into which to paint material * NULL means no layer command has * been seen for the current cell. */ - + /* * ---------------------------------------------------------------------------- * @@ -133,7 +133,7 @@ CIFReadError(char *format, ...) TxError("Error limit set: Remaining errors will not be reported.\n"); } } - + void CIFReadWarning(char *format, ...) @@ -300,7 +300,7 @@ CIFScaleCoord(cifCoord, snap_type) return result; } - + /* * ---------------------------------------------------------------------------- * @@ -333,7 +333,7 @@ cifIsBlank(ch) } else return TRUE; } - + /* * ---------------------------------------------------------------------------- * @@ -355,7 +355,7 @@ cifIsBlank(ch) void CIFSkipBlanks() { - + while (cifIsBlank(PEEK())) { if (TAKE() == '\n') { @@ -363,7 +363,7 @@ CIFSkipBlanks() } } } - + /* * ---------------------------------------------------------------------------- * @@ -393,7 +393,7 @@ CIFSkipSep() } } } - + /* * ---------------------------------------------------------------------------- * @@ -415,7 +415,7 @@ void CIFSkipToSemi() { int ch; - + for (ch = PEEK() ; ((ch != ';') && (ch != EOF)) ; ch = PEEK()) { if (TAKE() == '\n') { @@ -423,7 +423,7 @@ CIFSkipToSemi() } } } - + /* * ---------------------------------------------------------------------------- * @@ -443,7 +443,7 @@ CIFSkipToSemi() void CIFSkipSemi() { - + CIFSkipBlanks(); if (PEEK() != ';') { CIFReadError("`;\' expected.\n"); @@ -452,7 +452,7 @@ CIFSkipSemi() TAKE(); CIFSkipBlanks(); } - + /* * ---------------------------------------------------------------------------- * @@ -498,7 +498,7 @@ CIFParseSInteger(valuep) *valuep = -(*valuep); return TRUE; } - + /* * ---------------------------------------------------------------------------- * @@ -616,7 +616,7 @@ CIFParsePoint(pointp, iscale) return TRUE; } - + /* * ---------------------------------------------------------------------------- * @@ -713,7 +713,7 @@ CIFParsePath(pathheadpp, iscale) * first three points in the given CIF path. * * Results: - * TRUE if point is inside, FALSE if outside or on the border + * TRUE if point is inside, FALSE if outside or on the border * * Side effects: * None. @@ -754,7 +754,7 @@ test_insideness(start, tpoint) * Side effects: * value of respt contains point to which segment will be * truncated. - * + * * ---------------------------------------------------------------------------- */ @@ -856,7 +856,7 @@ path_intersect(pathHead, start, respt) /* with the smaller absolute distance takes precedence.) */ if (test_insideness(start, &path->cifp_point)) { - int tmpdist = abs(newdist); /* save this value */ + int tmpdist = abs(newdist); /* save this value */ if (path->cifp_x == path->cifp_next->cifp_x || path->cifp_y == path->cifp_next->cifp_y) { @@ -1072,7 +1072,7 @@ CIFMakeManhattanPath(pathHead, plane, resultTbl, ui) edir = CIFEdgeDirection(first, last); if (edir == CIF_DIAG_DL || edir == CIF_DIAG_UR) { - new->cifp_x = first->cifp_x; + new->cifp_x = first->cifp_x; new->cifp_y = last->cifp_y; } else /* edir == CIF_DIAG_DR || edir == CIF_DIAG_UL */ @@ -1135,7 +1135,7 @@ CIFMakeManhattanPath(pathHead, plane, resultTbl, ui) } } - + /* * ---------------------------------------------------------------------------- * @@ -1184,7 +1184,7 @@ CIFEdgeDirection(first, last) return CIF_DOWN; return CIF_ZERO; } - + /* * ---------------------------------------------------------------------------- * @@ -1225,7 +1225,7 @@ CIFCleanPath(pathHead) path = next; if (!path) return; } - + while (next = path->cifp_next) { if ((dir2 = CIFEdgeDirection(path, next)) == CIF_ZERO) @@ -1259,7 +1259,7 @@ path_inc: if (!pathHead->cifp_next) { /* Ensure that the resulting path is closed. */ - if ((pathHead->cifp_x != path->cifp_x) || + if ((pathHead->cifp_x != path->cifp_x) || (pathHead->cifp_y != path->cifp_y)) { next = (CIFPath *) mallocMagic((unsigned) (sizeof (CIFPath))); @@ -1287,7 +1287,7 @@ path_inc: } } } - + /* * ---------------------------------------------------------------------------- * @@ -1314,7 +1314,7 @@ CIFFreePath(path) path = path->cifp_next; } } - + /* * ---------------------------------------------------------------------------- * @@ -1340,7 +1340,7 @@ cifCommandError() CIFSkipToSemi(); } - + /* * ---------------------------------------------------------------------------- * @@ -1370,7 +1370,7 @@ cifParseEnd() } return TRUE; } - + /* * ---------------------------------------------------------------------------- * @@ -1392,7 +1392,7 @@ cifParseComment() { int opens; int ch; - + /* * take the '(' */ @@ -1417,7 +1417,7 @@ cifParseComment() } while (opens > 0); return TRUE; } - + /* * ---------------------------------------------------------------------------- * @@ -1459,7 +1459,7 @@ CIFDirectionToTrans(point) point->p_x, point->p_y); return &GeoIdentityTransform; } - + /* * ---------------------------------------------------------------------------- * @@ -1554,7 +1554,7 @@ CIFParseTransform(transformp) return TRUE; } - + /* * ---------------------------------------------------------------------------- * diff --git a/cif/CIFread.h b/cif/CIFread.h index 5656600f..1da6541c 100644 --- a/cif/CIFread.h +++ b/cif/CIFread.h @@ -5,16 +5,16 @@ * by the CIF writing code. The definitions are only used internally * to this module. * - * ********************************************************************* - * * Copyright (C) 1985, 1990 Regents of the University of California. * - * * Permission to use, copy, modify, and distribute this * - * * software and its documentation for any purpose and without * - * * fee is hereby granted, provided that the above copyright * - * * notice appear in all copies. The University of California * - * * makes no representations about the suitability of this * - * * software for any purpose. It is provided "as is" without * - * * express or implied warranty. Export of this software outside * - * * of the United States of America may require an export license. * + * ********************************************************************* + * * Copyright (C) 1985, 1990 Regents of the University of California. * + * * Permission to use, copy, modify, and distribute this * + * * software and its documentation for any purpose and without * + * * fee is hereby granted, provided that the above copyright * + * * notice appear in all copies. The University of California * + * * makes no representations about the suitability of this * + * * software for any purpose. It is provided "as is" without * + * * express or implied warranty. Export of this software outside * + * * of the United States of America may require an export license. * * ********************************************************************* * * diff --git a/cif/CIFsee.c b/cif/CIFsee.c index 7e742fae..64b4762e 100644 --- a/cif/CIFsee.c +++ b/cif/CIFsee.c @@ -3,16 +3,16 @@ * This file provides procedures for displaying CIF layers on * the screen using the highlight facilities. * - * ********************************************************************* - * * Copyright (C) 1985, 1990 Regents of the University of California. * - * * Permission to use, copy, modify, and distribute this * - * * software and its documentation for any purpose and without * - * * fee is hereby granted, provided that the above copyright * - * * notice appear in all copies. The University of California * - * * makes no representations about the suitability of this * - * * software for any purpose. It is provided "as is" without * - * * express or implied warranty. Export of this software outside * - * * of the United States of America may require an export license. * + * ********************************************************************* + * * Copyright (C) 1985, 1990 Regents of the University of California. * + * * Permission to use, copy, modify, and distribute this * + * * software and its documentation for any purpose and without * + * * fee is hereby granted, provided that the above copyright * + * * notice appear in all copies. The University of California * + * * makes no representations about the suitability of this * + * * software for any purpose. It is provided "as is" without * + * * express or implied warranty. Export of this software outside * + * * of the United States of America may require an export license. * * ********************************************************************* */ @@ -311,7 +311,7 @@ CIFSeeLayer(rootDef, area, layer) } UndoEnable(); } - + /* * ---------------------------------------------------------------------------- * @@ -358,7 +358,7 @@ CIFSeeHierLayer(rootDef, area, layer, arrays, subcells) CIFGenSubcells(rootDef, area, CIFPlanes); if (arrays) CIFGenArrays(rootDef, area, CIFPlanes); - + /* Report any errors that occurred. */ if (DBWFeedbackCount != oldCount) @@ -366,7 +366,7 @@ CIFSeeHierLayer(rootDef, area, layer, arrays, subcells) TxPrintf("%d problems occurred. See feedback entries.\n", DBWFeedbackCount - oldCount); } - + (void) sprintf(msg, "CIF layer \"%s\"", layer); cifSeeDef = rootDef; sld.text = msg; @@ -442,7 +442,7 @@ CIFCoverageLayer(rootDef, area, layer) cifHierCopyFunc, (ClientData) CIFComponentDef); CIFGen(CIFComponentDef, area, CIFPlanes, &depend, TRUE, TRUE); DBCellClearDef(CIFComponentDef); - + cstats.coverage = 0; cstats.bounds.r_xbot = cstats.bounds.r_xtop = 0; cstats.bounds.r_ybot = cstats.bounds.r_ytop = 0; diff --git a/cif/CIFtech.c b/cif/CIFtech.c index 441b3c32..a2d46b3b 100644 --- a/cif/CIFtech.c +++ b/cif/CIFtech.c @@ -4,16 +4,16 @@ * files pertaining to CIF, and builds the tables * used by the CIF generator. * - * ********************************************************************* - * * Copyright (C) 1985, 1990 Regents of the University of California. * - * * Permission to use, copy, modify, and distribute this * - * * software and its documentation for any purpose and without * - * * fee is hereby granted, provided that the above copyright * - * * notice appear in all copies. The University of California * - * * makes no representations about the suitability of this * - * * software for any purpose. It is provided "as is" without * - * * express or implied warranty. Export of this software outside * - * * of the United States of America may require an export license. * + * ********************************************************************* + * * Copyright (C) 1985, 1990 Regents of the University of California. * + * * Permission to use, copy, modify, and distribute this * + * * software and its documentation for any purpose and without * + * * fee is hereby granted, provided that the above copyright * + * * notice appear in all copies. The University of California * + * * makes no representations about the suitability of this * + * * software for any purpose. It is provided "as is" without * + * * express or implied warranty. Export of this software outside * + * * of the United States of America may require an export license. * * ********************************************************************* */ @@ -188,7 +188,7 @@ cifTechStyleInit() CIFCurStyle->cs_layers[i] = NULL; } - + /* * ---------------------------------------------------------------------------- * @@ -284,7 +284,7 @@ okpaint: /* Make sure that there's exactly one match among cif and * paint layers together. */ - + if ((paintType == -1) || ((paintType >= 0) && !TTMaskEqual(&curCifMask, &DBZeroTypeBits))) { @@ -310,7 +310,7 @@ okpaint: if (TTMaskHasType(rMask, paintType)) TTMaskSetType(paintMask, rtype); } - } + } } else if (!TTMaskEqual(&curCifMask, &DBZeroTypeBits)) { @@ -332,7 +332,7 @@ okpaint: } } } - + /* * ---------------------------------------------------------------------------- @@ -498,7 +498,7 @@ CIFParseScale(true_scale, expander) } } - + /* * ---------------------------------------------------------------------------- * @@ -541,7 +541,7 @@ CIFTechLine(sectionName, argc, argv) * sure that the current (maybe default?) CIF style has * a name. */ - + if (strcmp(argv[0], "style") == 0) { if (argc != 2) @@ -557,7 +557,7 @@ CIFTechLine(sectionName, argc, argv) return TRUE; } } - for (newStyle = CIFStyleList; newStyle != NULL; + for (newStyle = CIFStyleList; newStyle != NULL; newStyle = newStyle->cs_next) { /* Here we're only establishing existence; */ @@ -614,7 +614,7 @@ CIFTechLine(sectionName, argc, argv) for (p = CIFStyleList; p->cs_next; p = p->cs_next); p->cs_next = newStyle; } - + if (cptr == NULL) break; else @@ -769,7 +769,7 @@ CIFTechLine(sectionName, argc, argv) while (*tptr != '\0') { cptr = strchr(tptr, ','); - if (cptr != NULL) + if (cptr != NULL) { *cptr = '\0'; for (j = 1; isspace(*(cptr - j)); j++) @@ -790,7 +790,7 @@ CIFTechLine(sectionName, argc, argv) return TRUE; } } - + if (cptr == NULL) break; else @@ -843,9 +843,9 @@ CIFTechLine(sectionName, argc, argv) cifGotLabels = FALSE; /* Handle a special case of a list of layer names on the layer - * line. Turn them into an OR operation. + * line. Turn them into an OR operation. */ - + if (argc == 3) { cifCurOp = (CIFOp *) mallocMagic(sizeof(CIFOp)); @@ -976,7 +976,7 @@ CIFTechLine(sectionName, argc, argv) return TRUE; } - /* + /* * miscellaneous cif/calma-writing boolean options */ @@ -1003,7 +1003,7 @@ CIFTechLine(sectionName, argc, argv) /* Anything below here is a geometric operation, so we can * do some set-up that is common to all the operations. */ - + if (cifCurLayer == NULL) { TechError("Must define layer before specifying operation.\n"); @@ -1070,7 +1070,7 @@ CIFTechLine(sectionName, argc, argv) cifParseLayers(argv[1], CIFCurStyle, &newOp->co_paintMask, &newOp->co_cifMask,FALSE); break; - + case CIFOP_GROW: case CIFOP_GROWMIN: case CIFOP_GROW_G: @@ -1084,7 +1084,7 @@ CIFTechLine(sectionName, argc, argv) goto errorReturn; } break; - + case CIFOP_BLOATALL: if (argc != 3) goto wrongNumArgs; cifParseLayers(argv[1], CIFCurStyle, &newOp->co_paintMask, @@ -1108,7 +1108,7 @@ CIFTechLine(sectionName, argc, argv) if (TTMaskHasType(&mask, i)) bloats->bl_distance[i] = 1; goto bloatCheck; - + case CIFOP_BLOAT: case CIFOP_BLOATMIN: case CIFOP_BLOATMAX: @@ -1138,7 +1138,7 @@ CIFTechLine(sectionName, argc, argv) } if (!TTMaskEqual(&tempMask, &DBZeroTypeBits)) TechError("Can't use templayers in bloat statement.\n"); - + distance = atoi(bloatArg[1]); if ((distance < 0) && (newOp->co_opcode == CIFOP_BLOAT)) { @@ -1165,7 +1165,7 @@ bloatCheck: /* Make sure that all the layers specified in the statement * fall in a single plane. */ - + for (i = 0; i < PL_MAXTYPES; i++) { tempMask = bloatLayers; @@ -1218,7 +1218,7 @@ bloatCheck: case CIFOP_SQUARES_G: case CIFOP_SQUARES: - + squares = (SquaresData *)mallocMagic(sizeof(SquaresData)); newOp->co_client = (ClientData)squares; @@ -1303,7 +1303,7 @@ bloatCheck: break; case CIFOP_SLOTS: - + slots = (SlotsData *)mallocMagic(sizeof(SlotsData)); newOp->co_client = (ClientData)slots; @@ -1434,13 +1434,13 @@ cifCheckCalmaNum(str) while (*str) { char ch = *str++; - if (ch < '0' || ch > '9') + if (ch < '0' || ch > '9') return (FALSE); } return (TRUE); } - + /* * ---------------------------------------------------------------------------- * @@ -1478,7 +1478,7 @@ cifComputeRadii(layer, des) /* If CIF layers are used, switch to the max of current * distances and those of the layers used. */ - + if (!TTMaskEqual(&op->co_cifMask, &DBZeroTypeBits)) { for (i=0; i < des->cs_nLayers; i++) @@ -1508,11 +1508,11 @@ cifComputeRadii(layer, des) case CIFOP_GROW_G: grow += op->co_distance; break; - + case CIFOP_SHRINK: shrink += op->co_distance; break; - + /* For bloats use the largest distances (negative values are * for shrinks). */ @@ -1530,7 +1530,7 @@ cifComputeRadii(layer, des) grow += curGrow; shrink += curShrink; break; - + case CIFOP_SQUARES: break; case CIFOP_SQUARES_G: break; } @@ -1582,8 +1582,8 @@ cifComputeHalo(style) * style->cs_name, style->cs_radius); */ } - - + + /* * ---------------------------------------------------------------------------- * @@ -1637,7 +1637,7 @@ CIFTechFinal() /* Allow the case where there's no CIF at all. This is indicated * by a NULL CIFCurStyle. */ - + if (!style) return; if ((cifCurLayer != NULL) && (cifCurOp == NULL) && !cifGotLabels) @@ -2088,7 +2088,7 @@ CIFGetContactSize(type, edge, spacing, border) * represented by integers. * * Note that because contacts may be placed at 1/2 grid spacing to - * center them, the size and spacing of contacts as given in the + * center them, the size and spacing of contacts as given in the * "squares" function must *always* be an even number. To ensure this, * we check for odd numbers in these positions. If there are any, and * "d" is also an odd number, then we multiply both "n" and "d" by 2. diff --git a/cif/CIFwrite.c b/cif/CIFwrite.c index a46a6ca1..d1759bf7 100644 --- a/cif/CIFwrite.c +++ b/cif/CIFwrite.c @@ -3,16 +3,16 @@ * * Output of CIF. * - * ********************************************************************* - * * Copyright (C) 1985, 1990 Regents of the University of California. * - * * Permission to use, copy, modify, and distribute this * - * * software and its documentation for any purpose and without * - * * fee is hereby granted, provided that the above copyright * - * * notice appear in all copies. The University of California * - * * makes no representations about the suitability of this * - * * software for any purpose. It is provided "as is" without * - * * express or implied warranty. Export of this software outside * - * * of the United States of America may require an export license. * + * ********************************************************************* + * * Copyright (C) 1985, 1990 Regents of the University of California. * + * * Permission to use, copy, modify, and distribute this * + * * software and its documentation for any purpose and without * + * * fee is hereby granted, provided that the above copyright * + * * notice appear in all copies. The University of California * + * * makes no representations about the suitability of this * + * * software for any purpose. It is provided "as is" without * + * * express or implied warranty. Export of this software outside * + * * of the United States of America may require an export license. * * ********************************************************************* */ @@ -86,7 +86,7 @@ char *CIFPathPrefix = NULL; bool CIFHierWriteDisable = FALSE; bool CIFArrayWriteDisable = FALSE; - + /* * ---------------------------------------------------------------------------- * @@ -178,7 +178,7 @@ CIFWrite(rootDef, f) good = !ferror(f); return (good); } - + /* * ---------------------------------------------------------------------------- * @@ -203,7 +203,7 @@ cifWriteInitFunc(def) def->cd_client = (ClientData) 0; return (0); } - + /* * ---------------------------------------------------------------------------- * @@ -230,7 +230,7 @@ cifWriteMarkFunc(use) StackPush((ClientData) use->cu_def, cifStack); return (0); } - + /* * ---------------------------------------------------------------------------- * @@ -277,7 +277,7 @@ cifOutPreamble(outf, cell) fprintf(outf,"( @@style : %s );\n", CIFCurStyle->cs_name); fprintf(outf,"( @@date : %s );\n", now); } - + /* * ---------------------------------------------------------------------------- * @@ -328,7 +328,7 @@ cifOut(outf) cifOutFunc(def, outf); } } - + /* * ---------------------------------------------------------------------------- * @@ -375,7 +375,7 @@ cifOutFunc(def, f) * Output all the tiles associated with this cell. Skip temporary * layers. */ - + GEO_EXPAND(&def->cd_bbox, CIFCurStyle->cs_radius, &bigArea); CIFErrorDef = def; CIFGen(def, &bigArea, CIFPlanes, &DBAllTypeBits, TRUE, TRUE); @@ -450,7 +450,7 @@ cifOutFunc(def, f) (void) DBCellEnum(def, cifWriteUseFunc, (ClientData) f); fprintf(f, "DF;\n"); } - + /* * ---------------------------------------------------------------------------- * @@ -495,7 +495,7 @@ cifWriteUseFunc(use, f) * use identifier, which should include array subscripting * information. */ - + /* * Insert a 91 user command to label the next cell */ @@ -547,7 +547,7 @@ cifWriteUseFunc(use, f) } return 0; } - + /* * ---------------------------------------------------------------------------- * @@ -615,15 +615,15 @@ cifWritePaintFunc(tile, f) CIFRects += 1; return 0; } - + /* * ---------------------------------------------------------------------------- * * CIFWriteFlat -- * * Write out the entire tree rooted at the supplied CellDef in CIF format, - * to the specified file, but write non-hierarchical CIF. - * + * to the specified file, but write non-hierarchical CIF. + * * Results: * TRUE if the cell could be written successfully, FALSE otherwise. * @@ -635,9 +635,9 @@ cifWritePaintFunc(tile, f) * * Algorithm: * We operate on the cell in chunks chosen to keep the memory utilization - * reasonable. Foreach chunk, we use DBTreeSrTiles and cifHierCopyFunc to - * flatten the - * chunk into a yank buffer ("eliminating" the subcell problem), then use + * reasonable. Foreach chunk, we use DBTreeSrTiles and cifHierCopyFunc to + * flatten the + * chunk into a yank buffer ("eliminating" the subcell problem), then use * cifOut to generate the CIF. * No hierarchical design rule checking or bounding box computation * occur during this operation -- both are explicitly avoided. @@ -665,11 +665,11 @@ CIFWriteFlat(rootDef, f) cifOutPreamble(f, rootDef); /* - * Now process each chunk. We cheat and use cifOut(), so we need to have + * Now process each chunk. We cheat and use cifOut(), so we need to have * a stack for the single flattened "component" to be on. */ - { + { scx.scx_use = CIFDummyUse; scx.scx_trans = GeoIdentityTransform; GEO_EXPAND(&rootDef->cd_bbox, CIFCurStyle->cs_radius, &scx.scx_area); @@ -700,7 +700,7 @@ CIFWriteFlat(rootDef, f) fprintf(f, "C %d;\nEnd\n", (int) CIFComponentDef->cd_client); DBCellClearDef(CIFComponentDef); good = !ferror(f); - + /* Report any errors that occurred. */ if (DBWFeedbackCount != oldCount) diff --git a/cif/cif.h b/cif/cif.h index 4f08a748..b2407bf8 100644 --- a/cif/cif.h +++ b/cif/cif.h @@ -4,16 +4,16 @@ * This procedure defines things that are exported by the * cif module to the rest of the world. * - * ********************************************************************* - * * Copyright (C) 1985, 1990 Regents of the University of California. * - * * Permission to use, copy, modify, and distribute this * - * * software and its documentation for any purpose and without * - * * fee is hereby granted, provided that the above copyright * - * * notice appear in all copies. The University of California * - * * makes no representations about the suitability of this * - * * software for any purpose. It is provided "as is" without * - * * express or implied warranty. Export of this software outside * - * * of the United States of America may require an export license. * + * ********************************************************************* + * * Copyright (C) 1985, 1990 Regents of the University of California. * + * * Permission to use, copy, modify, and distribute this * + * * software and its documentation for any purpose and without * + * * fee is hereby granted, provided that the above copyright * + * * notice appear in all copies. The University of California * + * * makes no representations about the suitability of this * + * * software for any purpose. It is provided "as is" without * + * * express or implied warranty. Export of this software outside * + * * of the United States of America may require an export license. * * ********************************************************************* * * diff --git a/cmwind/CMWcmmnds.c b/cmwind/CMWcmmnds.c index 3036137f..3cf3404e 100644 --- a/cmwind/CMWcmmnds.c +++ b/cmwind/CMWcmmnds.c @@ -3,16 +3,16 @@ * * Commands for the color map editor. * - * ********************************************************************* - * * Copyright (C) 1985, 1990 Regents of the University of California. * - * * Permission to use, copy, modify, and distribute this * - * * software and its documentation for any purpose and without * - * * fee is hereby granted, provided that the above copyright * - * * notice appear in all copies. The University of California * - * * makes no representations about the suitability of this * - * * software for any purpose. It is provided "as is" without * - * * express or implied warranty. Export of this software outside * - * * of the United States of America may require an export license. * + * ********************************************************************* + * * Copyright (C) 1985, 1990 Regents of the University of California. * + * * Permission to use, copy, modify, and distribute this * + * * software and its documentation for any purpose and without * + * * fee is hereby granted, provided that the above copyright * + * * notice appear in all copies. The University of California * + * * makes no representations about the suitability of this * + * * software for any purpose. It is provided "as is" without * + * * express or implied warranty. Export of this software outside * + * * of the United States of America may require an export license. * * ********************************************************************* */ @@ -64,7 +64,7 @@ bool cmwWatchButtonUp; bool cmwModified = FALSE; - + /* * ---------------------------------------------------------------------------- * @@ -194,7 +194,7 @@ cmwButtonDown(w, p, button) /* See if the cursor is over the current color area. If so, remember * the fact and wait for the button to be released. */ - + if (GEO_ENCLOSE(&surfacePoint, &cmwCurrentColorArea)) { cmwWindow = w; @@ -237,7 +237,7 @@ cmwButtonUp(w, p, button) * (the one displaying the current color), then we ignore the * button release. */ - + if (!cmwWatchButtonUp) return; cmwWatchButtonUp = FALSE; @@ -246,7 +246,7 @@ cmwButtonUp(w, p, button) * color values from the pixel underneath the cursor to the current * color. */ - + /* Read the pixel from the window that was underneath the cursor when * the button was released. */ @@ -426,10 +426,10 @@ cmwColor(w, cmd) } CMWloadWindow(w, color); } - else + else TxError("Usage: color [#|next|last|get|rgb]\n"); } - + /* * ---------------------------------------------------------------------------- * @@ -473,7 +473,7 @@ cmwSave(w, cmd) } if (ok) cmwModified = FALSE; } - + /* * ---------------------------------------------------------------------------- * @@ -514,7 +514,7 @@ cmwLoad(w, cmd) else (void) GrReadCMap(DBWStyleType, (char *) NULL, MainMonType, ".", SysLibPath); } - + /* * ---------------------------------------------------------------------------- * diff --git a/cmwind/CMWmain.c b/cmwind/CMWmain.c index 91b54609..38a3040c 100644 --- a/cmwind/CMWmain.c +++ b/cmwind/CMWmain.c @@ -4,16 +4,16 @@ * Procedures to interface the colormap editor with the window package * for the purposes of window creation, deletion, and modification. * - * ********************************************************************* - * * Copyright (C) 1985, 1990 Regents of the University of California. * - * * Permission to use, copy, modify, and distribute this * - * * software and its documentation for any purpose and without * - * * fee is hereby granted, provided that the above copyright * - * * notice appear in all copies. The University of California * - * * makes no representations about the suitability of this * - * * software for any purpose. It is provided "as is" without * - * * express or implied warranty. Export of this software outside * - * * of the United States of America may require an export license. * + * ********************************************************************* + * * Copyright (C) 1985, 1990 Regents of the University of California. * + * * Permission to use, copy, modify, and distribute this * + * * software and its documentation for any purpose and without * + * * fee is hereby granted, provided that the above copyright * + * * notice appear in all copies. The University of California * + * * makes no representations about the suitability of this * + * * software for any purpose. It is provided "as is" without * + * * express or implied warranty. Export of this software outside * + * * of the United States of America may require an export license. * * ********************************************************************* */ @@ -71,7 +71,7 @@ extern void CMWundoInit(); * | | - | | | | + | | - | | | | + | | * | +---+ +----------------+ +---+ +---+ +----------------+ +---+ | * | | - * | Blue Value + * | Blue Value * | +---+ +----------------+ +---+ +---+ +----------------+ +---+ | * | | - | | | | + | | - | | | | + | | * | +---+ +----------------+ +---+ +---+ +----------------+ +---+ | @@ -130,13 +130,13 @@ char *cmwCurrentColorText = "Color Being Edited"; /* Bounding rectangle for entire window */ Rect colorWindowRect = {{0, 1500}, {24000, 17000}}; - + /* * ---------------------------------------------------------------------------- * * CMWcreate -- * - * A new window has been created. Create and initialize the needed + * A new window has been created. Create and initialize the needed * structures. * * Results: @@ -171,7 +171,7 @@ CMWcreate(window, argc, argv) CMWloadWindow(window, color); return (TRUE); } - + /* * ---------------------------------------------------------------------------- * @@ -200,7 +200,7 @@ CMWdelete(window) freeMagic((char *) cr); return (TRUE); } - + /* * ---------------------------------------------------------------------------- * @@ -227,7 +227,7 @@ CMWreposition(window, newScreenArea, final) WindMove(window, &colorWindowRect); } - + /* * ---------------------------------------------------------------------------- * @@ -332,7 +332,7 @@ CMWredisplay(w, rootArea, clipArea) * to that color. Instead, change the color in a particular style * reserved for our own use. */ - + if (GEO_TOUCH(&cmwCurrentColorArea, rootArea)) { GrStyleTable[STYLE_CMEDIT].color = cr->cmw_color; @@ -353,7 +353,7 @@ CMWredisplay(w, rootArea, clipArea) GrUnlock(w); } - + /* * ---------------------------------------------------------------------------- * @@ -389,7 +389,7 @@ CMWloadWindow(w, color) /* move the contents of the window so the color bars show */ WindMove(w, &colorWindowRect); } - + /* * ---------------------------------------------------------------------------- * diff --git a/cmwind/CMWrgbhsv.c b/cmwind/CMWrgbhsv.c index 35854237..4eb63c0d 100644 --- a/cmwind/CMWrgbhsv.c +++ b/cmwind/CMWrgbhsv.c @@ -4,16 +4,16 @@ * Procedures to translate between RGB color space and HSV color space. * Courtesy of Ken Fishkin. * - * ********************************************************************* - * * Copyright (C) 1985, 1990 Regents of the University of California. * - * * Permission to use, copy, modify, and distribute this * - * * software and its documentation for any purpose and without * - * * fee is hereby granted, provided that the above copyright * - * * notice appear in all copies. The University of California * - * * makes no representations about the suitability of this * - * * software for any purpose. It is provided "as is" without * - * * express or implied warranty. Export of this software outside * - * * of the United States of America may require an export license. * + * ********************************************************************* + * * Copyright (C) 1985, 1990 Regents of the University of California. * + * * Permission to use, copy, modify, and distribute this * + * * software and its documentation for any purpose and without * + * * fee is hereby granted, provided that the above copyright * + * * notice appear in all copies. The University of California * + * * makes no representations about the suitability of this * + * * software for any purpose. It is provided "as is" without * + * * express or implied warranty. Export of this software outside * + * * of the United States of America may require an export license. * * ********************************************************************* */ @@ -194,7 +194,7 @@ HSLxRGB( h, s, l, r, g, b ) int i; double vsf; - if ( l <= 0.5) + if ( l <= 0.5) v = l * (1.0 + s); else v = l + s - l*s; diff --git a/cmwind/CMWundo.c b/cmwind/CMWundo.c index 93608ccd..09007d6e 100644 --- a/cmwind/CMWundo.c +++ b/cmwind/CMWundo.c @@ -3,16 +3,16 @@ * * Interface to the undo package for the color map editor. * - * ********************************************************************* - * * Copyright (C) 1985, 1990 Regents of the University of California. * - * * Permission to use, copy, modify, and distribute this * - * * software and its documentation for any purpose and without * - * * fee is hereby granted, provided that the above copyright * - * * notice appear in all copies. The University of California * - * * makes no representations about the suitability of this * - * * software for any purpose. It is provided "as is" without * - * * express or implied warranty. Export of this software outside * - * * of the United States of America may require an export license. * + * ********************************************************************* + * * Copyright (C) 1985, 1990 Regents of the University of California. * + * * Permission to use, copy, modify, and distribute this * + * * software and its documentation for any purpose and without * + * * fee is hereby granted, provided that the above copyright * + * * notice appear in all copies. The University of California * + * * makes no representations about the suitability of this * + * * software for any purpose. It is provided "as is" without * + * * express or implied warranty. Export of this software outside * + * * of the United States of America may require an export license. * * ********************************************************************* */ @@ -57,7 +57,7 @@ void cmwUndoStart(), cmwUndoDone(); * of an undo/redo command. */ bool cmwColorsChanged[256]; - + /* * ---------------------------------------------------------------------------- * @@ -83,7 +83,7 @@ CMWundoInit() cmwUndoForw, cmwUndoBack, "color map"); } - + /* * ---------------------------------------------------------------------------- * @@ -116,7 +116,7 @@ cmwUndoBack(up) (void) GrPutColor(up->cue_color, up->old_r, up->old_g, up->old_b); cmwColorsChanged[up->cue_color] = TRUE; } - + /* * ---------------------------------------------------------------------------- * @@ -153,7 +153,7 @@ cmwUndoColor(color, oldr, oldg, oldb, newr, newg, newb) up->new_g = newg; up->new_b = newb; } - + /* * ---------------------------------------------------------------------------- * @@ -178,7 +178,7 @@ cmwUndoStart() for (i = 0; i < 256; i++) cmwColorsChanged[i] = FALSE; } - + /* * ---------------------------------------------------------------------------- * diff --git a/cmwind/cmwind.h b/cmwind/cmwind.h index 500b3984..155b0da5 100644 --- a/cmwind/cmwind.h +++ b/cmwind/cmwind.h @@ -4,16 +4,16 @@ * Interface definitions for the 'glue' between the window * manager and the color map editor. * - * ********************************************************************* - * * Copyright (C) 1985, 1990 Regents of the University of California. * - * * Permission to use, copy, modify, and distribute this * - * * software and its documentation for any purpose and without * - * * fee is hereby granted, provided that the above copyright * - * * notice appear in all copies. The University of California * - * * makes no representations about the suitability of this * - * * software for any purpose. It is provided "as is" without * - * * express or implied warranty. Export of this software outside * - * * of the United States of America may require an export license. * + * ********************************************************************* + * * Copyright (C) 1985, 1990 Regents of the University of California. * + * * Permission to use, copy, modify, and distribute this * + * * software and its documentation for any purpose and without * + * * fee is hereby granted, provided that the above copyright * + * * notice appear in all copies. The University of California * + * * makes no representations about the suitability of this * + * * software for any purpose. It is provided "as is" without * + * * express or implied warranty. Export of this software outside * + * * of the United States of America may require an export license. * * ********************************************************************* * * rcsid $Header: /usr/cvsroot/magic-8.0/cmwind/cmwind.h,v 1.2 2009/09/10 20:32:51 tim Exp $ diff --git a/commands/CmdAB.c b/commands/CmdAB.c index 412955bc..fa919ceb 100644 --- a/commands/CmdAB.c +++ b/commands/CmdAB.c @@ -3,16 +3,16 @@ * * Commands with names beginning with the letters A through B. * - * ********************************************************************* - * * Copyright (C) 1985, 1990 Regents of the University of California. * - * * Permission to use, copy, modify, and distribute this * - * * software and its documentation for any purpose and without * - * * fee is hereby granted, provided that the above copyright * - * * notice appear in all copies. The University of California * - * * makes no representations about the suitability of this * - * * software for any purpose. It is provided "as is" without * - * * express or implied warranty. Export of this software outside * - * * of the United States of America may require an export license. * + * ********************************************************************* + * * Copyright (C) 1985, 1990 Regents of the University of California. * + * * Permission to use, copy, modify, and distribute this * + * * software and its documentation for any purpose and without * + * * fee is hereby granted, provided that the above copyright * + * * notice appear in all copies. The University of California * + * * makes no representations about the suitability of this * + * * software for any purpose. It is provided "as is" without * + * * express or implied warranty. Export of this software outside * + * * of the United States of America may require an export license. * * ********************************************************************* */ @@ -44,7 +44,7 @@ static char rcsid[] __attribute__ ((unused)) = "$Header: /usr/cvsroot/magic-8.0/ #include "utils/netlist.h" #include "select/select.h" - + /* --------------------------------------------------------------------------- * * CmdAddPath -- @@ -80,7 +80,7 @@ CmdAddPath( w, cmd ) } PaAppend(&Path, cmd->tx_argv[1]); } - + /* Linked-list structure for returning information about arrayed cells */ @@ -173,7 +173,7 @@ CmdArray(w, cmd) } if (locargc <= 1) goto badusage; /* Prohibits "array -list" alone */ - + option = Lookup(cmd->tx_argv[argstart], cmdArrayOption); if (option < 0) { if (locargc == 3 || locargc == 5) @@ -186,7 +186,7 @@ CmdArray(w, cmd) /* Get all information about cell uses in the current selection */ - (void) SelEnumCells(FALSE, (bool *) NULL, (SearchContext *) NULL, + (void) SelEnumCells(FALSE, (bool *) NULL, (SearchContext *) NULL, selGetArrayFunc, (ClientData) &lahead); /* Note: All "unimplemented functions" below will require a routine @@ -240,7 +240,7 @@ CmdArray(w, cmd) goto badusage; if (!StrIsInt(cmd->tx_argv[argstart + 1]) - || !StrIsInt(cmd->tx_argv[argstart + 2])) + || !StrIsInt(cmd->tx_argv[argstart + 2])) goto badusage; if (locargc == 4) @@ -253,7 +253,7 @@ CmdArray(w, cmd) } else if (locargc == 6) { - if (!StrIsInt(cmd->tx_argv[argstart + 3]) || + if (!StrIsInt(cmd->tx_argv[argstart + 3]) || !StrIsInt(cmd->tx_argv[argstart + 4])) goto badusage; a.ar_xlo = atoi(cmd->tx_argv[argstart + 1]); a.ar_xhi = atoi(cmd->tx_argv[argstart + 2]); @@ -426,7 +426,7 @@ CmdArray(w, cmd) case ARRAY_DEFAULT: if (!StrIsInt(cmd->tx_argv[argstart]) - || !StrIsInt(cmd->tx_argv[argstart + 1])) + || !StrIsInt(cmd->tx_argv[argstart + 1])) goto badusage; if (locargc == 3) { @@ -438,7 +438,7 @@ CmdArray(w, cmd) } else { - if (!StrIsInt(cmd->tx_argv[argstart + 2]) || + if (!StrIsInt(cmd->tx_argv[argstart + 2]) || !StrIsInt(cmd->tx_argv[argstart + 3])) goto badusage; a.ar_xlo = atoi(cmd->tx_argv[argstart]); a.ar_xhi = atoi(cmd->tx_argv[argstart + 1]); @@ -487,7 +487,7 @@ selGetArrayFunc(selUse, use, trans, arg) LinkedArray **arg; { /* Check "use" for array information and pass this to arrayInfo */ - + LinkedArray *la; int xlo, xhi, ylo, yhi, xsep, ysep, t; @@ -510,17 +510,17 @@ selGetArrayFunc(selUse, use, trans, arg) la->arrayInfo.ar_xhi = xhi; la->arrayInfo.ar_ylo = ylo; la->arrayInfo.ar_yhi = yhi; - + /* Reverse the transformation in DBMakeArray */ ysep = (trans->t_d * use->cu_xsep - trans->t_a * use->cu_ysep); ysep /= (trans->t_d * trans->t_b - trans->t_a * trans->t_e); - + if (trans->t_a == 0) xsep = (use->cu_ysep - trans->t_e * ysep) / trans->t_d; else xsep = (use->cu_xsep - trans->t_b * ysep) / trans->t_a; - + la->arrayInfo.ar_xsep = xsep; la->arrayInfo.ar_ysep = ysep; @@ -531,7 +531,7 @@ selGetArrayFunc(selUse, use, trans, arg) return 0; } - + /* * ---------------------------------------------------------------------------- * @@ -690,7 +690,7 @@ CmdBox(w, cmd) #endif return; } - + if (needBox) { if (refEdit) diff --git a/commands/CmdAuto.c b/commands/CmdAuto.c index 1ab53458..b1a2994b 100644 --- a/commands/CmdAuto.c +++ b/commands/CmdAuto.c @@ -5,16 +5,16 @@ * functions which have been compiled as Tcl modules, using the Tcl * interface. * - * ********************************************************************* - * * Copyright (C) 1985, 1990 Regents of the University of California. * - * * Permission to use, copy, modify, and distribute this * - * * software and its documentation for any purpose and without * - * * fee is hereby granted, provided that the above copyright * - * * notice appear in all copies. The University of California * - * * makes no representations about the suitability of this * - * * software for any purpose. It is provided "as is" without * - * * express or implied warranty. Export of this software outside * - * * of the United States of America may require an export license. * + * ********************************************************************* + * * Copyright (C) 1985, 1990 Regents of the University of California. * + * * Permission to use, copy, modify, and distribute this * + * * software and its documentation for any purpose and without * + * * fee is hereby granted, provided that the above copyright * + * * notice appear in all copies. The University of California * + * * makes no representations about the suitability of this * + * * software for any purpose. It is provided "as is" without * + * * express or implied warranty. Export of this software outside * + * * of the United States of America may require an export license. * * ********************************************************************* */ diff --git a/commands/CmdCD.c b/commands/CmdCD.c index fc7b3bac..b21cff3b 100644 --- a/commands/CmdCD.c +++ b/commands/CmdCD.c @@ -3,16 +3,16 @@ * * Commands with names beginning with the letters C through D. * - * ********************************************************************* - * * Copyright (C) 1985, 1990 Regents of the University of California. * - * * Permission to use, copy, modify, and distribute this * - * * software and its documentation for any purpose and without * - * * fee is hereby granted, provided that the above copyright * - * * notice appear in all copies. The University of California * - * * makes no representations about the suitability of this * - * * software for any purpose. It is provided "as is" without * - * * express or implied warranty. Export of this software outside * - * * of the United States of America may require an export license. * + * ********************************************************************* + * * Copyright (C) 1985, 1990 Regents of the University of California. * + * * Permission to use, copy, modify, and distribute this * + * * software and its documentation for any purpose and without * + * * fee is hereby granted, provided that the above copyright * + * * notice appear in all copies. The University of California * + * * makes no representations about the suitability of this * + * * software for any purpose. It is provided "as is" without * + * * express or implied warranty. Export of this software outside * + * * of the United States of America may require an export license. * * ********************************************************************* */ @@ -65,7 +65,7 @@ struct cmdCornerArea int cmdDumpFunc(); bool cmdDumpParseArgs(); #ifdef CALMA_MODULE - + /* * ---------------------------------------------------------------------------- * @@ -124,7 +124,7 @@ CmdCalma(w, cmd) static char *cmdCalmaWarnOptions[] = { "default", "none", "align", "limit", "redirect", "help", 0 }; static char *cmdCalmaOption[] = - { + { "help print this help information", "arrays [yes|no] output arrays as individual subuses (like in CIF)", "contacts [yes|no] optimize output by arraying contacts as subcells", @@ -605,7 +605,7 @@ CmdCellname(w, cmd) CellDef *newDef, *cellDef; static char *cmdCellOption[] = - { + { "children list children of selected or named cell", "parents list parents of selected or named cell", "exists true if loaded, false if not, or name of selected", @@ -672,7 +672,7 @@ CmdCellname(w, cmd) } } - if (func != DBUsePrint) + if (func != DBUsePrint) { /* These functions only work with cell uses (instances) */ switch (option) { @@ -683,7 +683,7 @@ CmdCellname(w, cmd) return; } } - else + else { /* These functions only work with cell definitions */ switch (option) { @@ -765,7 +765,7 @@ CmdCellname(w, cmd) SelectClear(); DBCellDelete(cellname, FALSE); } - else + else TxError("Delete cell command missing cellname\n"); break; @@ -913,7 +913,7 @@ CmdCellname(w, cmd) if (cellDef->cd_file != NULL) freeMagic(cellDef->cd_file); - cellDef->cd_file = fullpath; + cellDef->cd_file = fullpath; } } break; @@ -1052,7 +1052,7 @@ CmdCif(w, cmd) static char *cmdCifYesNo[] = { "no", "yes", 0 }; static char *cmdCifInOut[] = { "input", "output", 0 }; static char *cmdCifOption[] = - { + { "*array layer display CIF layer under box (array only)", "*hier layer display CIF layer under box (hier only)", "arealabels yes|no enable/disable us of area label extension", @@ -1087,7 +1087,7 @@ CmdCif(w, cmd) option = CIF_WRITE; else { - if (!strncmp(argv[1], "list", 4)) + if (!strncmp(argv[1], "list", 4)) { dolist = TRUE; if (!strncmp(argv[1], "listall", 7)) @@ -1166,7 +1166,7 @@ CmdCif(w, cmd) } CIFSeeHierLayer(rootDef, &box, argv[2], TRUE, FALSE); return; - + case HIER: if (argc == 4) { if (!strncmp(argv[2], "write", 5)) @@ -1303,7 +1303,7 @@ CmdCif(w, cmd) TxPrintf ("Output of CIF cell ID labels is now %s\n", CIFDoCellIdLabels ? "enabled" : "disabled"); return; - + case ISTYLE: if (argc == 3) CIFSetReadStyle(argv[2]); @@ -1363,7 +1363,7 @@ CmdCif(w, cmd) StrDup (&CIFPathPrefix, argv[2]); else goto wrongNumArgs; return; - + case OSTYLE: if (argc == 3) CIFSetStyle(argv[2]); @@ -1384,7 +1384,7 @@ CmdCif(w, cmd) CIFReadFile(f); (void) fclose(f); return; - + case RESCALE: if (argc == 2) { @@ -1406,7 +1406,7 @@ CmdCif(w, cmd) if (!CIFRescaleAllow) CIFWarningLevel = CIF_WARN_LIMIT; return; - + case CIF_DRC_CHECK: if (argc == 2) { @@ -1426,7 +1426,7 @@ CmdCif(w, cmd) goto wrongNumArgs; CIFNoDRCCheck = !yesno; return; - + case SEE: if (argc != 3) goto wrongNumArgs; if (!ToolGetBox(&rootDef, &box)) @@ -1469,7 +1469,7 @@ CmdCif(w, cmd) DRCCheckThis(paintDef, TT_CHECKPAINT, &box); } return; - + case STATS: CIFPrintStats(); return; @@ -1532,7 +1532,7 @@ CmdCif(w, cmd) { TxError("I/O error in writing file %s.\n", namep); TxError("File may be incompletely written.\n"); - + } } else @@ -1541,13 +1541,13 @@ CmdCif(w, cmd) { TxError("I/O error in writing file %s.\n", namep); TxError("File may be incompletely written.\n"); - + } } (void) fclose(f); } #endif - + /* * ---------------------------------------------------------------------------- * @@ -1630,7 +1630,7 @@ CmdClockwise(w, cmd) * then move it so its lower-left corner is at the same place * that it used to be. */ - + if (noAdjust) { GeoTransRect(&t2, &SelectDef->cd_bbox, &bbox); @@ -1648,7 +1648,7 @@ CmdClockwise(w, cmd) /* Rotate the box, if it exists and is in the same window as the * selection. */ - + if (ToolGetBox(&rootDef, &rootBox) && (rootDef == SelectRootDef)) { Rect newBox; @@ -1954,7 +1954,7 @@ CmdCopy(w, cmd) /* Use the displacement between the box lower-left corner and * the point as the transform. */ - + MagWindow *window; window = ToolGetPoint(&rootPoint, (Rect *) NULL); @@ -2158,7 +2158,7 @@ CmdCorner(w, cmd) PaintResultType *resultTbl = DBStdPaintTbl(cmdPathList.pathlist->pathtype, pNum); Plane *plane = EditRootDef->cd_planes[pNum]; - + ui.pu_def = EditRootDef; ui.pu_pNum = pNum; @@ -2204,7 +2204,7 @@ CmdCorner(w, cmd) DBWAreaChanged(EditCellUse->cu_def, &editBox, DBW_ALLWINDOWS, &maskBits); DBReComputeBbox(EditCellUse->cu_def); } - + /* * ---------------------------------------------------------------------------- * @@ -2983,7 +2983,7 @@ CmdCrosshair(w, cmd) DBWSetCrosshair(w, &pos); } - + /* * ---------------------------------------------------------------------------- * @@ -3017,7 +3017,7 @@ CmdDelete(w, cmd) badusage: TxError("Usage: %s\n", cmd->tx_argv[0]); } - + /* * ---------------------------------------------------------------------------- * @@ -3066,16 +3066,16 @@ CmdDown(w, cmd) * only in windows where the edit cell is displayed differently from * other cells. */ - + GeoTransRect(&EditToRootTransform, &(EditCellUse->cu_def->cd_bbox), &area); (void) WindSearch(DBWclientID, (ClientData) NULL, (Rect *) NULL, cmdEditRedisplayFunc, (ClientData) &area); - + /* Use the position of the point to select one of the currently-selected * cells (if there are more than one). If worst comes to worst, just * select any selected cell. */ - + (void) ToolGetPoint((Point *) NULL, &pointArea); cmdFoundNewDown = FALSE; (void) SelEnumCells(FALSE, (bool *) NULL, (SearchContext *) NULL, @@ -3131,7 +3131,7 @@ cmdDownEnumFunc(selUse, use, transform, area) if (!GEO_OVERLAP(&useArea, &use->cu_bbox)) return 0; return 1; } - + /* * ---------------------------------------------------------------------------- * @@ -3199,7 +3199,7 @@ CmdDrc(w, cmd) #endif static char *cmdDrcOption[] = - { + { "*flatcheck check box area by flattening", "*halo [d] limit error checking to areas of d units", "*showint radius show interaction area under box", @@ -3273,7 +3273,7 @@ CmdDrc(w, cmd) rootUse = (CellUse *) window->w_surfaceID; DRCFlatCheck(rootUse, &rootArea); break; - + case SHOWINT: if (argc != 3) goto badusage; radius = cmdParseCoord(w, argv[2], TRUE, FALSE); @@ -3301,7 +3301,7 @@ CmdDrc(w, cmd) else DRCSetStyle(argv[2]); break; - + case CATCHUP: DRCCatchUp(); break; @@ -3312,7 +3312,7 @@ CmdDrc(w, cmd) rootUse = (CellUse *) window->w_surfaceID; DRCCheck(rootUse, &rootArea); break; - + case COUNT: count_total = -1; if (argc == 3) @@ -3403,7 +3403,7 @@ CmdDrc(w, cmd) DRCEuclidean = FALSE; } break; - + case FIND: if ((window = w) == NULL) { @@ -3464,7 +3464,7 @@ CmdDrc(w, cmd) TxPrintf("There are no errors in %s.\n", rootDef->cd_name); } break; - + case DRC_HALO: if (argc == 3) { @@ -3517,7 +3517,7 @@ CmdDrc(w, cmd) TxPrintf(" %s\n", *msg); } break; - + case DRC_OFF: DRCBackGround = DRC_SET_OFF; #ifdef MAGIC_WRAPPER @@ -3526,7 +3526,7 @@ CmdDrc(w, cmd) #endif TxSetPrompt('%'); /* Return prompt to "normal" */ break; - + case DRC_ON: /* Don't allow overriding of DRC_NOT_SET */ if (DRCBackGround == DRC_SET_OFF) DRCBackGround = DRC_SET_ON; @@ -3542,7 +3542,7 @@ CmdDrc(w, cmd) "off" : "on"); #endif break; - + case PRINTRULES: if (argc > 3) goto badusage; if (argc < 3) @@ -3556,11 +3556,11 @@ CmdDrc(w, cmd) if (fp != stdout) (void) fclose(fp); break; - + case RULESTATS: DRCTechRuleStats(); break; - + case STATISTICS: DRCPrintStats(); break; @@ -3605,7 +3605,7 @@ CmdDrc(w, cmd) } return; } - + /* * ---------------------------------------------------------------------------- * @@ -3643,7 +3643,7 @@ CmdDump(w, cmd) if (cmdDumpParseArgs("dump", w, cmd, &dummy, &scx)) SelectDump(&scx); } - + /* * ---------------------------------------------------------------------------- * diff --git a/commands/CmdE.c b/commands/CmdE.c index 7cabc1ae..683deb3b 100644 --- a/commands/CmdE.c +++ b/commands/CmdE.c @@ -3,16 +3,16 @@ * * Commands with names beginning with the letter E. * - * ********************************************************************* - * * Copyright (C) 1985, 1990 Regents of the University of California. * - * * Permission to use, copy, modify, and distribute this * - * * software and its documentation for any purpose and without * - * * fee is hereby granted, provided that the above copyright * - * * notice appear in all copies. The University of California * - * * makes no representations about the suitability of this * - * * software for any purpose. It is provided "as is" without * - * * express or implied warranty. Export of this software outside * - * * of the United States of America may require an export license. * + * ********************************************************************* + * * Copyright (C) 1985, 1990 Regents of the University of California. * + * * Permission to use, copy, modify, and distribute this * + * * software and its documentation for any purpose and without * + * * fee is hereby granted, provided that the above copyright * + * * notice appear in all copies. The University of California * + * * makes no representations about the suitability of this * + * * software for any purpose. It is provided "as is" without * + * * express or implied warranty. Export of this software outside * + * * of the United States of America may require an export license. * * ********************************************************************* */ @@ -44,7 +44,7 @@ static char rcsid[] __attribute__ ((unused)) = "$Header: /usr/cvsroot/magic-8.0/ #include "extract/extract.h" #include "select/select.h" - + /* * ---------------------------------------------------------------------------- * @@ -98,7 +98,7 @@ CmdEdit(w, cmd) * only in windows where the edit cell is displayed differently from * other cells. */ - + GeoTransRect(&EditToRootTransform, &(usave->cu_def->cd_bbox), &area); (void) WindSearch(DBWclientID, (ClientData) NULL, (Rect *) NULL, cmdEditRedisplayFunc, (ClientData) &area); @@ -106,12 +106,12 @@ CmdEdit(w, cmd) DBWUndoOldEdit(EditCellUse, EditRootDef, &EditToRootTransform, &RootToEditTransform); } - + /* Use the position of the point to select one of the currently-selected * cells (if there are more than one). If worst comes to worst, just * select any selected cell. */ - + (void) ToolGetPoint((Point *) NULL, &pointArea); cmdFoundNewEdit = FALSE; @@ -231,7 +231,7 @@ cmdEditEnumFunc(selUse, use, transform, area) /* It overlaps. Now find out which array element it points to, * and adjust the transforms accordingly. */ - + DBArrayOverlap(use, &useArea, &xlo, &xhi, &ylo, &yhi); GeoTransTrans(DBGetArrayTransform(use, xlo, ylo), transform, &EditToRootTransform); @@ -574,7 +574,7 @@ badusage: } - + /* * ---------------------------------------------------------------------------- * @@ -678,7 +678,7 @@ CmdErase(w, cmd) * area of interest, then erase all those cells. Continue * this until all cells have been erased. */ - + scx.scx_use = EditCellUse; scx.scx_x = scx.scx_y = 0; scx.scx_area = editRect; @@ -721,13 +721,13 @@ ClientData cdarg; /* Not used. */ /* All this procedure does is to remember cells that are * found, up to MAXCELLS of them. */ - + if (cmdEraseCount >= MAXCELLS) return 1; cmdEraseCells[cmdEraseCount] = scx->scx_use; cmdEraseCount += 1; return 2; } - + /* * ---------------------------------------------------------------------------- * @@ -762,7 +762,7 @@ CmdExpand(w, cmd) CellDef *rootBoxDef; int cmdExpandFunc(); /* Forward reference. */ - if (cmd->tx_argc > 2 || (cmd->tx_argc == 2 + if (cmd->tx_argc > 2 || (cmd->tx_argc == 2 && (strncmp(cmd->tx_argv[1], "toggle", strlen(cmd->tx_argv[1])) != 0))) { TxError("Usage: %s or %s toggle\n", cmd->tx_argv[0], cmd->tx_argv[0]); @@ -784,7 +784,7 @@ CmdExpand(w, cmd) /* the cursor box and window to restore the original view. */ d = DBLambda[1]; - do + do { if (d != DBLambda[1]) { @@ -833,7 +833,7 @@ cmdExpandFunc(use, windowMask) &DBAllButSpaceBits); return 0; } - + /* * ---------------------------------------------------------------------------- * @@ -939,7 +939,7 @@ CmdExtract(w, cmd) NULL }; static char *cmdExtCmd[] = - { + { "all extract root cell and all its children", "cell name extract selected cell into file \"name\"", "do [option] enable extractor option", diff --git a/commands/CmdFI.c b/commands/CmdFI.c index 58b6dc89..f923b5f9 100644 --- a/commands/CmdFI.c +++ b/commands/CmdFI.c @@ -3,16 +3,16 @@ * * Commands with names beginning with the letters F through I. * - * ********************************************************************* - * * Copyright (C) 1985, 1990 Regents of the University of California. * - * * Permission to use, copy, modify, and distribute this * - * * software and its documentation for any purpose and without * - * * fee is hereby granted, provided that the above copyright * - * * notice appear in all copies. The University of California * - * * makes no representations about the suitability of this * - * * software for any purpose. It is provided "as is" without * - * * express or implied warranty. Export of this software outside * - * * of the United States of America may require an export license. * + * ********************************************************************* + * * Copyright (C) 1985, 1990 Regents of the University of California. * + * * Permission to use, copy, modify, and distribute this * + * * software and its documentation for any purpose and without * + * * fee is hereby granted, provided that the above copyright * + * * notice appear in all copies. The University of California * + * * makes no representations about the suitability of this * + * * software for any purpose. It is provided "as is" without * + * * express or implied warranty. Export of this software outside * + * * of the United States of America may require an export license. * * ********************************************************************* */ @@ -301,7 +301,7 @@ CmdFeedback(w, cmd) fpargs.style = style; fpargs.text = cmd->tx_argv[2]; - for (i = 0, j = pstart; i < points; i++) + for (i = 0, j = pstart; i < points; i++) { plist[i].p_x = cmdScaleCoord(w, cmd->tx_argv[j++], FALSE, TRUE, FEEDMAGNIFY); @@ -347,7 +347,7 @@ CmdFeedback(w, cmd) } } freeMagic(plist); - } + } } else { @@ -357,7 +357,7 @@ CmdFeedback(w, cmd) DBWFeedbackAdd(&box, cmd->tx_argv[2], rootDef, 1, style); } break; - + case CLEAR: if (cmd->tx_argc == 3) DBWFeedbackClear(cmd->tx_argv[2]); @@ -367,12 +367,12 @@ CmdFeedback(w, cmd) goto badusage; nth = 0; break; - + case COUNT: if (cmd->tx_argc != 2) goto badusage; TxPrintf("There are %d feedback areas.\n", DBWFeedbackCount); break; - + case FIND: if (cmd->tx_argc > 3) goto badusage; if (DBWFeedbackCount == 0) @@ -400,7 +400,7 @@ CmdFeedback(w, cmd) ToolMoveCorner(TOOL_TR, &box.r_ur, FALSE, rootDef); TxPrintf("Feedback #%d: %s\n", nth, text); break; - + case FEED_HELP: if (cmd->tx_argc > 2) goto badusage; TxPrintf("Feedback commands have the form \"feedback option\",\n"); @@ -408,7 +408,7 @@ CmdFeedback(w, cmd) for (msg = cmdFeedbackOptions; *msg != NULL; msg++) TxPrintf("%s\n", *msg); break; - + case SAVE: if (cmd->tx_argc != 3) goto badusage; f = PaOpen(cmd->tx_argv[2], "w", (char *) NULL, ".", @@ -446,7 +446,7 @@ CmdFeedback(w, cmd) } (void) fclose(f); break; - + case WHY: if (cmd->tx_argc > 2) goto badusage; w = ToolGetBoxWindow(&box, (int *) NULL); @@ -469,7 +469,7 @@ CmdFeedback(w, cmd) break; } } - + /* * ---------------------------------------------------------------------------- * @@ -479,7 +479,7 @@ CmdFeedback(w, cmd) * of the box, and paint it across to the other side of the box. Can * operate in any of four directions. * - * Usage: + * Usage: * fill direction [layers] * * Results: @@ -629,7 +629,7 @@ cmdFillFunc(tile, cxp) cmdFillList = cfa; return 0; } - + /* * ---------------------------------------------------------------------------- * @@ -672,12 +672,12 @@ CmdFindBox(w, cmd) if (boxDef != (((CellUse *) w->w_surfaceID)->cu_def)) { - TxError("The box is not in the same coordinate %s", + TxError("The box is not in the same coordinate %s", "system as the window.\n"); return; }; - if (cmd->tx_argc == 1) + if (cmd->tx_argc == 1) { /* center view on box */ Point rootPoint; @@ -721,7 +721,7 @@ CmdFindBox(w, cmd) usage: TxError("Usage: findbox [zoom]\n"); } - + /* * ---------------------------------------------------------------------------- * @@ -743,7 +743,7 @@ usage: * ---------------------------------------------------------------------------- */ -int cmdFindLabelFunc(rect, name, label, cdarg) +int cmdFindLabelFunc(rect, name, label, cdarg) Rect *rect; char *name; Label *label; @@ -785,7 +785,7 @@ CmdFindLabel(w, cmd) if (boxDef != (((CellUse *) w->w_surfaceID)->cu_def)) { - TxError("The box is not in the same coordinate %s", + TxError("The box is not in the same coordinate %s", "system as the window.\n"); return; }; @@ -814,9 +814,9 @@ CmdFindLabel(w, cmd) found = DBSrLabelLoc(labUse, labname, cmdFindLabelFunc, (ClientData) &cmdFindLabelRect); if (found) { - if (cmdFindLabelRect.r_xbot == cmdFindLabelRect.r_xtop) + if (cmdFindLabelRect.r_xbot == cmdFindLabelRect.r_xtop) cmdFindLabelRect.r_xtop++; - if (cmdFindLabelRect.r_ybot == cmdFindLabelRect.r_ytop) + if (cmdFindLabelRect.r_ybot == cmdFindLabelRect.r_ytop) cmdFindLabelRect.r_ytop++; ToolMoveBox(TOOL_BL,&cmdFindLabelRect.r_ll,FALSE,labUse->cu_def); ToolMoveCorner(TOOL_TR,&cmdFindLabelRect.r_ur,FALSE,labUse->cu_def); @@ -856,7 +856,7 @@ dbListLabels(scx, label, tpath, cdarg) return 0; } - + /* * ---------------------------------------------------------------------------- * @@ -927,7 +927,7 @@ CmdFlush(w, cmd) TxPrintf("[Flushed]\n"); } - + /* * ---------------------------------------------------------------------------- * @@ -1015,7 +1015,7 @@ CmdGetcell(w, cmd) } #ifndef NO_SIM_MODULE - + /* * ---------------------------------------------------------------------------- * @@ -1052,10 +1052,10 @@ CmdGetnode(w, cmd) /* check arguments to command */ switch (cmd->tx_argc) { - case 1 : + case 1 : break; - case 2 : + case 2 : if (strcmp("abort", cmd->tx_argv[1]) == 0) { if (!SimInitGetnode) { HashKill(&SimGetnodeTbl); @@ -1082,7 +1082,7 @@ CmdGetnode(w, cmd) } break; - case 3 : + case 3 : if (strcmp("alias", cmd->tx_argv[1]) == 0) { if (strcmp("on", cmd->tx_argv[2]) == 0) { if (!SimGetnodeAlias) { @@ -1159,7 +1159,7 @@ badusage: TxError(" or: getnode fast\n"); } #endif - + /* * ---------------------------------------------------------------------------- * @@ -1242,9 +1242,9 @@ CmdGrid(w, cmd) crec->dbw_gridRect.r_xbot, crec->dbw_gridRect.r_ybot, crec->dbw_gridRect.r_xtop, crec->dbw_gridRect.r_ytop); Tcl_SetResult(magicinterp, boxvalues, TCL_DYNAMIC); - + #else - TxPrintf("Grid unit box is (%d, %d) to (%d, %d)\n", + TxPrintf("Grid unit box is (%d, %d) to (%d, %d)\n", crec->dbw_gridRect.r_xbot, crec->dbw_gridRect.r_ybot, crec->dbw_gridRect.r_xtop, crec->dbw_gridRect.r_ytop); #endif @@ -1256,7 +1256,7 @@ CmdGrid(w, cmd) Tcl_SetObjResult(magicinterp, Tcl_NewBooleanObj(crec->dbw_flags & DBW_GRID)); #else - TxPrintf("Grid is %s\n", + TxPrintf("Grid is %s\n", (crec->dbw_flags & DBW_GRID) ? "on" : "off"); #endif return; @@ -1417,7 +1417,7 @@ CmdHistory(w, cmd) } #endif - + /* * ---------------------------------------------------------------------------- * @@ -1545,7 +1545,7 @@ CmdFindNetProc(nodename, use, rect, warn_not_found) { if (warn_not_found) TxError("Couldn't find use %s\n", s); - return TT_SPACE; + return TT_SPACE; } GeoTransTrans(DBGetArrayTransform(use, scx2.scx_x, scx2.scx_y), &use->cu_transform, &tmp); @@ -1570,7 +1570,7 @@ CmdFindNetProc(nodename, use, rect, warn_not_found) bool isNeg = FALSE; /* The characters up to the leading '_' should match one of the */ - /* "short names" for a plane in this technology. */ + /* "short names" for a plane in this technology. */ *xstr = '\0'; for (pnum = PL_TECHDEPBASE; pnum < DBNumPlanes; pnum++) @@ -1604,7 +1604,7 @@ CmdFindNetProc(nodename, use, rect, warn_not_found) localrect.r_ybot = ypos; localrect.r_xtop = xpos + 1; localrect.r_ytop = ypos + 1; - /* TxPrintf("Node is on the plane \"%s\"\n", + /* TxPrintf("Node is on the plane \"%s\"\n", DBPlaneLongNameTbl[pnum]); */ locvalid = TRUE; } @@ -1635,7 +1635,7 @@ CmdFindNetProc(nodename, use, rect, warn_not_found) Plane *plane = targetdef->cd_planes[pnum]; ttype = TT_SPACE; /* revert to space in case of failure */ - + /* Find the tile type of the tile at the specified point which */ /* exists on the plane pnum. */ @@ -1708,7 +1708,7 @@ CmdGoto(w, cmd) int locargc; bool nocomplain = FALSE; TileType ttype; - + windCheckOnlyWindow(&w, DBWclientID); if ((w == (MagWindow *) NULL) || (w->w_client != DBWclientID)) { @@ -1740,7 +1740,7 @@ CmdGoto(w, cmd) ToolMoveCorner(TOOL_TR, &rect.r_ur, FALSE, use->cu_def); /* Return the tile type so we know what we're looking at if there */ - /* are multiple layers drawn at the indicated point. */ + /* are multiple layers drawn at the indicated point. */ #ifdef MAGIC_WRAPPER Tcl_SetResult(magicinterp, DBTypeLongName(ttype), NULL); @@ -1762,8 +1762,8 @@ findTile(tile, rtype) { TileType ttype; - if (IsSplit(tile)) - { + if (IsSplit(tile)) + { if (SplitSide(tile)) ttype = SplitRightType(tile); else @@ -1776,7 +1776,7 @@ findTile(tile, rtype) } /* - * The following are from DBcellcopy.c; slightly modified for present + * The following are from DBcellcopy.c; slightly modified for present * purposes. */ @@ -1786,13 +1786,13 @@ void FlatCopyAllLabels(scx, mask, xMask, targetUse) SearchContext *scx; TileTypeBitMask *mask; - int xMask; + int xMask; CellUse *targetUse; { int flatCopyAllLabels(); char pathstring[FLATTERMSIZE]; TerminalPath tpath; - + pathstring[0] = '\0'; tpath.tp_first = tpath.tp_next = pathstring; tpath.tp_last = pathstring + FLATTERMSIZE; @@ -1880,7 +1880,7 @@ CmdFlatten(w, cmd) CellUse *newuse; SearchContext scx; CellUse *flatDestUse; - + destname = cmd->tx_argv[cmd->tx_argc - 1]; xMask = CU_DESCEND_ALL; dolabels = TRUE; @@ -1953,7 +1953,7 @@ CmdFlatten(w, cmd) newuse->cu_expandMask = CU_DESCEND_SPECIAL; UndoDisable(); flatDestUse = newuse; - + if (EditCellUse) scx.scx_use = EditCellUse; else @@ -1975,7 +1975,7 @@ CmdFlatten(w, cmd) if (xMask != CU_DESCEND_ALL) DBCellCopyAllCells(&scx, xMask, flatDestUse, (Rect *)NULL); - + UndoEnable(); } diff --git a/commands/CmdLQ.c b/commands/CmdLQ.c index 53f7b928..d7646be2 100644 --- a/commands/CmdLQ.c +++ b/commands/CmdLQ.c @@ -3,16 +3,16 @@ * * Commands with names beginning with the letters L through Q. * - * ********************************************************************* - * * Copyright (C) 1985, 1990 Regents of the University of California. * - * * Permission to use, copy, modify, and distribute this * - * * software and its documentation for any purpose and without * - * * fee is hereby granted, provided that the above copyright * - * * notice appear in all copies. The University of California * - * * makes no representations about the suitability of this * - * * software for any purpose. It is provided "as is" without * - * * express or implied warranty. Export of this software outside * - * * of the United States of America may require an export license. * + * ********************************************************************* + * * Copyright (C) 1985, 1990 Regents of the University of California. * + * * Permission to use, copy, modify, and distribute this * + * * software and its documentation for any purpose and without * + * * fee is hereby granted, provided that the above copyright * + * * notice appear in all copies. The University of California * + * * makes no representations about the suitability of this * + * * software for any purpose. It is provided "as is" without * + * * express or implied warranty. Export of this software outside * + * * of the United States of America may require an export license. * * ********************************************************************* */ @@ -50,7 +50,7 @@ static char rcsid[] __attribute__ ((unused)) = "$Header: /usr/cvsroot/magic-8.0/ void CmdPaintEraseButton(); - + /* * ---------------------------------------------------------------------------- * @@ -125,7 +125,7 @@ CmdLabelProc(text, font, size, rotate, offx, offy, pos, sticky, type) DBWLabelChanged(EditCellUse->cu_def, lab, DBW_ALLWINDOWS); lab->lab_rect = tmpArea; } - + /* * ---------------------------------------------------------------------------- @@ -281,7 +281,7 @@ CmdLabel(w, cmd) pos = GeoTransPos(&RootToEditTransform, pos); } } - + /* * Find and check validity of type parameter. Accept prefix "-" on * layer as an indication of a "sticky" label (label is fixed to @@ -309,7 +309,7 @@ CmdLabel(w, cmd) CmdLabelProc(p, font, size, rotate, offx, offy, pos, sticky, type); } - + /* * ---------------------------------------------------------------------------- * @@ -627,7 +627,7 @@ CmdMove(w, cmd) /* Use the displacement between the box lower-left corner and * the point as the transform. */ - + MagWindow *window; window = ToolGetPoint(&rootPoint, (Rect *) NULL); @@ -656,7 +656,7 @@ moveToPoint: DBWSetBox(rootDef, &newBox); } } - + if (doOrigin) { DBMoveCell(rootDef, t.t_c, t.t_f); @@ -686,7 +686,7 @@ moveToPoint: else SelectTransform(&t); } - + /* * ---------------------------------------------------------------------------- * @@ -758,7 +758,7 @@ CmdPaint(w, cmd) if (DRCBackGround) DRCCheckThis (EditCellUse->cu_def, TT_CHECKPAINT, &editRect); } - + /* * ---------------------------------------------------------------------------- * @@ -796,7 +796,7 @@ CmdPaintEraseButton(w, butPoint, isPaint) WindPointToSurface(w, butPoint, (Point *) NULL, &rootRect); - DBSeeTypesAll(((CellUse *)w->w_surfaceID), &rootRect, + DBSeeTypesAll(((CellUse *)w->w_surfaceID), &rootRect, crec->dbw_bitmask, &mask); TTMaskAndMask(&mask, &DBActiveLayerBits); TTMaskAndMask(&mask, &crec->dbw_visibleLayers); @@ -967,7 +967,7 @@ CmdPath(w, cmd) (void) StrDup(pathptr, srcptr); } return; - + usage: TxError("Usage: %s [search|cell|sys] [[+]path]\n", cmd->tx_argv[0]); } @@ -1116,7 +1116,7 @@ cmdPortLabelFunc2(scx, label, tpath, cdata) /* */ /* If "port" is true, then search only for labels that are ports. */ /* If "unique" is true, then return a label only if exactly one label */ -/* is found in the edit box. */ +/* is found in the edit box. */ /*----------------------------------------------------------------------*/ Label * @@ -1190,7 +1190,7 @@ portFindLabel(editDef, port, unique, nonEdit) if (lab != NULL) if (nonEdit) *nonEdit = TRUE; } - + return lab; } /* @@ -1244,7 +1244,7 @@ portFindLabel(editDef, port, unique, nonEdit) #define PORT_MAKEALL 8 #define PORT_NAME 9 #define PORT_REMOVE 10 -#define PORT_HELP 11 +#define PORT_HELP 11 void CmdPort(w, cmd) @@ -1656,7 +1656,7 @@ portWrongNumArgs: } return; } - + parseindex: if ((option != PORT_MAKEALL) && (lab->lab_flags & PORT_DIR_MASK)) @@ -1717,7 +1717,7 @@ parseindex: break; } else if ((sl->lab_flags & PORT_NUM_MASK) > idx) - idx = (sl->lab_flags & PORT_NUM_MASK); + idx = (sl->lab_flags & PORT_NUM_MASK); } } idx++; @@ -1837,7 +1837,7 @@ CmdDoProperty(def, cmd, argstart) char *value; bool propfound; int locargc = cmd->tx_argc - argstart + 1; - + if (locargc == 1) { /* print all properties and their values */ @@ -1872,7 +1872,7 @@ CmdDoProperty(def, cmd, argstart) DBPropPut(def, cmd->tx_argv[argstart], value); } def->cd_flags |= (CDMODIFIED | CDGETNEWSTAMP); - } + } else { TxError("Usage: property [name] [value]\n"); @@ -1951,7 +1951,7 @@ printPropertiesFunc(name, value) } Tcl_AppendElement(magicinterp, keyvalue); freeMagic(keyvalue); - + #else TxPrintf("%s = %s\n", name, value); #endif @@ -1992,7 +1992,7 @@ CmdNetlist(w, cmd) char **msg, *lastargv; Point cursor; static char *cmdNetlistOption[] = - { + { "help print this help information", "select select the net nearest the cursor", "join join current net and net containing terminal nearest the cursor", diff --git a/commands/CmdRS.c b/commands/CmdRS.c index e4e877ed..5535b7be 100644 --- a/commands/CmdRS.c +++ b/commands/CmdRS.c @@ -3,16 +3,16 @@ * * Commands with names beginning with the letters R through S. * - * ********************************************************************* - * * Copyright (C) 1985, 1990 Regents of the University of California. * - * * Permission to use, copy, modify, and distribute this * - * * software and its documentation for any purpose and without * - * * fee is hereby granted, provided that the above copyright * - * * notice appear in all copies. The University of California * - * * makes no representations about the suitability of this * - * * software for any purpose. It is provided "as is" without * - * * express or implied warranty. Export of this software outside * - * * of the United States of America may require an export license. * + * ********************************************************************* + * * Copyright (C) 1985, 1990 Regents of the University of California. * + * * Permission to use, copy, modify, and distribute this * + * * software and its documentation for any purpose and without * + * * fee is hereby granted, provided that the above copyright * + * * notice appear in all copies. The University of California * + * * makes no representations about the suitability of this * + * * software for any purpose. It is provided "as is" without * + * * express or implied warranty. Export of this software outside * + * * of the United States of America may require an export license. * * ********************************************************************* */ @@ -53,7 +53,7 @@ static char rcsid[] __attribute__ ((unused)) = "$Header: /usr/cvsroot/magic-8.0/ extern void DisplayWindow(); - + #if !defined(NO_SIM_MODULE) && defined(RSIM_MODULE) /* * ---------------------------------------------------------------------------- @@ -70,7 +70,7 @@ extern void DisplayWindow(); * * ---------------------------------------------------------------------------- */ - + void CmdRsim(w, cmd) MagWindow *w; @@ -99,7 +99,7 @@ CmdRsim(w, cmd) } #endif - + /* * ---------------------------------------------------------------------------- * @@ -162,7 +162,7 @@ CmdSave(w, cmd) } else cmdSaveCell(locDef, (char *) NULL, FALSE, TRUE); } - + /* * ---------------------------------------------------------------------------- @@ -223,7 +223,7 @@ CmdScaleGrid(w, cmd) else goto scalegridusage; } - else + else { if (!StrIsInt(cmd->tx_argv[2])) goto scalegridusage; @@ -469,7 +469,7 @@ CmdSee(w, cmd) return; } - + /* * ---------------------------------------------------------------------------- * @@ -514,7 +514,7 @@ cmdSelectArea(layers, less) * no problem. If it's in more than window, the cursor must * disambiguate the windows. */ - + xMask = ((DBWclientRec *) window->w_clientData)->dbw_bitmask; if ((windowMask & ~xMask) != 0) { @@ -534,7 +534,7 @@ cmdSelectArea(layers, less) TTMaskClearType(&mask, TT_SPACE); } else return; - + if (less) { (void) SelRemoveArea(&scx.scx_area, &mask); @@ -546,7 +546,7 @@ cmdSelectArea(layers, less) crec = (DBWclientRec *) window->w_clientData; SelectArea(&scx, &mask, crec->dbw_bitmask); } - + /* * ---------------------------------------------------------------------------- * @@ -591,7 +591,7 @@ cmdSelectVisible(layers, less) * no problem. If it's in more than window, the cursor must * disambiguate the windows. */ - + xMask = ((DBWclientRec *) window->w_clientData)->dbw_bitmask; if ((windowMask & ~xMask) != 0) { @@ -611,7 +611,7 @@ cmdSelectVisible(layers, less) TTMaskClearType(&mask, TT_SPACE); } else return; - + if (less) { (void) SelRemoveArea(&scx.scx_area, &mask); @@ -631,7 +631,7 @@ cmdSelectVisible(layers, less) } SelectArea(&scx, &mask, crec->dbw_bitmask); } - + /* * ---------------------------------------------------------------------------- * @@ -776,7 +776,7 @@ CmdSelect(w, cmd) #ifdef MAGIC_WRAPPER char *tclstr; #endif - + /* How close two clicks must be to be considered the same point: */ #define MARGIN 2 @@ -793,7 +793,7 @@ CmdSelect(w, cmd) * the argument list and set the "more" flag. Similarly for options * "less", "nocycle", "top", and "cell". */ - + if (cmd->tx_argc >= 2) { int arg1len = strlen(cmd->tx_argv[1]); @@ -831,7 +831,7 @@ CmdSelect(w, cmd) cmd->tx_argc--; } - else if (!strncmp(cmd->tx_argv[1], "top", arg1len)) + else if (!strncmp(cmd->tx_argv[1], "top", arg1len)) { if ((cmd->tx_argc >= 3) && !strncmp(cmd->tx_argv[2], "cell", strlen(cmd->tx_argv[2]))) @@ -897,7 +897,7 @@ CmdSelect(w, cmd) cmdSelectArea(optionArgs[1], less); else cmdSelectArea("*,label,subcell", less); return; - + /*-------------------------------------------------------------------- * Select everything under the box, perhaps looking only at * particular layers, but only if its visible. @@ -911,7 +911,7 @@ CmdSelect(w, cmd) cmdSelectVisible(optionArgs[1], less); else cmdSelectVisible("*,label,subcell", less); return; - + /*-------------------------------------------------------------------- * Clear out all of the material in the selection. *-------------------------------------------------------------------- @@ -921,7 +921,7 @@ CmdSelect(w, cmd) if ((more) || (less) || (cmd->tx_argc > 2)) goto usageError; SelectClear(); return; - + /*-------------------------------------------------------------------- * Print out help information. *-------------------------------------------------------------------- @@ -1080,7 +1080,7 @@ CmdSelect(w, cmd) GeoTransRect(&SelectUse->cu_transform, &SelectDef->cd_bbox, &selarea); DBWHLRedraw(SelectRootDef, &selarea, FALSE); break; - + case SEL_BOX: case SEL_CHUNK: case SEL_REGION: case SEL_NET: if (cmd->tx_argc > 3) goto usageError; if (cmd->tx_argc == 3) @@ -1156,7 +1156,7 @@ Okay: * instance followed by selecting an instance that was occupying the * same space WILL cause a crash). */ - + if (!GEO_ENCLOSE(&cmd->tx_p, &lastArea) || ((lastCommand + 1) != TxCommandNumber)) { @@ -1185,7 +1185,7 @@ Okay: * box/cursor to begin the selection */ TileTypeBitMask uMask; - + if (CmdParseLayers (optionArgs[1], &uMask)) { if (TTMaskEqual (&uMask, &DBSpaceBits)) @@ -1353,7 +1353,7 @@ Okay: * and select it. In this case, defeat all of the "multiple * click" code. */ - + if ((cmd->tx_argc == 3) && (optionArgs == &cmd->tx_argv[2]) && (more == FALSE) && (less == FALSE)) { @@ -1399,7 +1399,7 @@ Okay: lessCellCycle = less; use = DBSelectCell(scx.scx_use, lastUse, &lastIndices, &scx.scx_area, crec->dbw_bitmask, &trans, &p, &tpath); - + /* Use the window's root cell if nothing else is found. */ if (use == NULL) @@ -1855,7 +1855,7 @@ CmdSetLabel(w, cmd) TxPrintf("\n"); #endif break; - + case SETLABEL_TEXT: if (EditCellUse) { @@ -1899,7 +1899,7 @@ CmdSetLabel(w, cmd) if (font < -1) break; } } - + if (EditCellUse) { SelEnumLabels(&DBAllTypeBits, TRUE, (bool *)NULL, @@ -1957,7 +1957,7 @@ CmdSetLabel(w, cmd) { offset.p_x = cmdScaleCoord(w, cmd->tx_argv[2], TRUE, TRUE, 8); offset.p_y = cmdScaleCoord(w, cmd->tx_argv[3], TRUE, FALSE, 8); - } + } if (EditCellUse) { SelEnumLabels(&DBAllTypeBits, TRUE, (bool *)NULL, @@ -2072,7 +2072,7 @@ CmdSideways(w, cmd) * y-axis, then move it back so its lower-left corner is in * the same place that it used to be. */ - + GeoTransRect(&GeoSidewaysTransform, &SelectDef->cd_bbox, &bbox); GeoTranslateTrans(&GeoSidewaysTransform, SelectDef->cd_bbox.r_xbot - bbox.r_xbot, @@ -2083,7 +2083,7 @@ CmdSideways(w, cmd) /* Flip the box, if it exists and is in the same window as the * selection. */ - + if (ToolGetBox(&rootDef, &rootBox) && (rootDef == SelectRootDef)) { Rect newBox; @@ -2094,7 +2094,7 @@ CmdSideways(w, cmd) return; } - + /* * ---------------------------------------------------------------------------- * @@ -2137,7 +2137,7 @@ CmdShell(w, cmd) freeMagic(command); } } - + /* * ---------------------------------------------------------------------------- * @@ -2190,7 +2190,7 @@ CmdSgraph(w, cmd) * * Results: * Rsim is forked from Magic. - * + * * Side effects: * None. * @@ -2227,7 +2227,7 @@ CmdStartRsim(w, cmd) } SimConnectRsim(TRUE); } - + /* * ---------------------------------------------------------------------------- * @@ -2241,7 +2241,7 @@ CmdStartRsim(w, cmd) * Side effects: * None. * - * ---------------------------------------------------------------------------- + * ---------------------------------------------------------------------------- */ void @@ -2304,7 +2304,7 @@ CmdSimCmd(w, cmd) } #endif - + /* * ---------------------------------------------------------------------------- * @@ -2365,7 +2365,7 @@ CmdSnap(w, cmd) printit: if (n == SNAP_LIST) /* list */ #ifdef MAGIC_WRAPPER - Tcl_SetResult(magicinterp, + Tcl_SetResult(magicinterp, (DBWSnapToGrid == DBW_SNAP_INTERNAL) ? "internal" : ((DBWSnapToGrid == DBW_SNAP_LAMBDA) ? "lambda" : "user"), TCL_VOLATILE); @@ -2379,7 +2379,7 @@ printit: ((DBWSnapToGrid == DBW_SNAP_LAMBDA) ? "lambda" : "user")); } - + /* * ---------------------------------------------------------------------------- @@ -2563,7 +2563,7 @@ CmdSplitErase(w, cmd) DRCCheckThis (EditCellUse->cu_def, TT_CHECKPAINT, &editRect); } - + /* * ---------------------------------------------------------------------------- * @@ -2672,7 +2672,7 @@ CmdStretch(w, cmd) /* Use the displacement between the box lower-left corner and * the point as the transform. Round off to a Manhattan distance. */ - + Point rootPoint; MagWindow *window; int absX, absY; @@ -2705,6 +2705,6 @@ CmdStretch(w, cmd) GeoTransRect(&t, &rootBox, &newBox); DBWSetBox(rootDef, &newBox); } - + SelectStretch(xdelta, ydelta); } diff --git a/commands/CmdSubrs.c b/commands/CmdSubrs.c index 4b659f5f..842b026a 100644 --- a/commands/CmdSubrs.c +++ b/commands/CmdSubrs.c @@ -4,16 +4,16 @@ * The functions in this file are local to the commands module * and not intended to be used by its clients. * - * ********************************************************************* - * * Copyright (C) 1985, 1990 Regents of the University of California. * - * * Permission to use, copy, modify, and distribute this * - * * software and its documentation for any purpose and without * - * * fee is hereby granted, provided that the above copyright * - * * notice appear in all copies. The University of California * - * * makes no representations about the suitability of this * - * * software for any purpose. It is provided "as is" without * - * * express or implied warranty. Export of this software outside * - * * of the United States of America may require an export license. * + * ********************************************************************* + * * Copyright (C) 1985, 1990 Regents of the University of California. * + * * Permission to use, copy, modify, and distribute this * + * * software and its documentation for any purpose and without * + * * fee is hereby granted, provided that the above copyright * + * * notice appear in all copies. The University of California * + * * makes no representations about the suitability of this * + * * software for any purpose. It is provided "as is" without * + * * express or implied warranty. Export of this software outside * + * * of the United States of America may require an export license. * * ********************************************************************* */ @@ -262,7 +262,7 @@ CmdInit() CmdYMAllButSpace = DBAllButSpaceBits; TTMaskClearType(&CmdYMAllButSpace, L_CELL); } - + /* * ---------------------------------------------------------------------------- * @@ -326,7 +326,7 @@ cmdFlushCell(def) &parentUse->cu_bbox); } } - + /* * ---------------------------------------------------------------------------- * @@ -443,7 +443,7 @@ CmdParseLayers(s, mask) || (window->w_client != DBWclientID)) return (FALSE); crec = (DBWclientRec *) window->w_clientData; - DBSeeTypesAll(((CellUse *)window->w_surfaceID), + DBSeeTypesAll(((CellUse *)window->w_surfaceID), &rootRect, crec->dbw_bitmask, &newmask); TTMaskAndMask(&newmask, &crec->dbw_visibleLayers); tempmask = DBAllButSpaceAndDRCBits; @@ -512,7 +512,7 @@ printTypes: return (TRUE); } - + /* * ---------------------------------------------------------------------------- * @@ -551,7 +551,7 @@ cmdMaskToType(mask) return (TT_SPACE); return (type); } - + /* * ---------------------------------------------------------------------------- * @@ -583,7 +583,7 @@ cmdSaveCell(cellDef, newName, noninteractive, tryRename) * saved. May be NULL, in which case the name from * the CellDef is taken. */ - bool noninteractive;/* If true, try hard but don't ask the user + bool noninteractive;/* If true, try hard but don't ask the user * questions. */ bool tryRename; /* We should rename the cell to the name of the @@ -602,7 +602,7 @@ cmdSaveCell(cellDef, newName, noninteractive, tryRename) * cell changes to the name of the file in which it was * saved. */ - + if (strcmp(cellDef->cd_name, UNNAMED) == 0) { if (newName == NULL) @@ -660,7 +660,7 @@ cmdSaveCell(cellDef, newName, noninteractive, tryRename) * We want to find all windows for which this is * the root cell and update their captions. */ - (void) WindSearch(DBWclientID, (ClientData) NULL, (Rect *) NULL, + (void) WindSearch(DBWclientID, (ClientData) NULL, (Rect *) NULL, cmdSaveWindSet, (ClientData) cellDef); } @@ -669,7 +669,7 @@ cleanup: freeMagic(fileName); return; } - + /* * ---------------------------------------------------------------------------- * @@ -773,7 +773,7 @@ again: } return (returnname); } - + /* * ---------------------------------------------------------------------------- * @@ -814,7 +814,7 @@ cmdSaveWindSet(window, def) WindCaption(window, caption); return 0; } - + /* * ---------------------------------------------------------------------------- * @@ -860,10 +860,10 @@ CmdSetWindCaption(newEditUse, rootDef) newEditDef = (newEditUse) ? newEditUse->cu_def : NULL; newRootDef = rootDef; - (void) WindSearch(DBWclientID, (ClientData) NULL, (Rect *) NULL, + (void) WindSearch(DBWclientID, (ClientData) NULL, (Rect *) NULL, cmdWindSet, (ClientData) 0); } - + /* * ---------------------------------------------------------------------------- * @@ -901,7 +901,7 @@ cmdWindSet(window) if (wDef != newRootDef) (void) sprintf(caption, "%s [NOT BEING EDITED]", wDef->cd_name); else { - (void) sprintf(caption, "%s EDITING %s", wDef->cd_name, + (void) sprintf(caption, "%s EDITING %s", wDef->cd_name, newEditDef->cd_name); #ifdef SCHEME_INTERPRETER /* Add a binding to scheme variable "edit-cell" */ @@ -914,7 +914,7 @@ cmdWindSet(window) return 0; } - + /* * ---------------------------------------------------------------------------- * @@ -951,7 +951,7 @@ CmdGetRootPoint(point, rect) return (window); } - + /* * ---------------------------------------------------------------------------- * @@ -991,7 +991,7 @@ CmdGetEditPoint(point, rect) return (window); } - + /* * ---------------------------------------------------------------------------- * @@ -1027,7 +1027,7 @@ CmdWarnWrite() prompt = TxPrintString("%d Magic cell%s been modified.\n Do you" " want to exit magic and lose %s? ", count, count == 1 ? " has" : "s have", - count == 1 ? "it" : "them"); + count == 1 ? "it" : "them"); code = TxDialog(prompt, yesno, 0); return (code) ? TRUE : FALSE; } @@ -1041,12 +1041,12 @@ cmdWarnWriteFunc(cellDef, pcount) (*pcount)++; return 0; } - + /* * ---------------------------------------------------------------------------- * cmdExpandOneLevel -- * - * Expand (unexpand) a cell, and unexpand all of its children. This is + * Expand (unexpand) a cell, and unexpand all of its children. This is * called by commands such as getcell, expand current cell, and load. * Don't bother to unexpand children if we are unexpanding this cell. * @@ -1082,7 +1082,7 @@ cmdExpand1func(cu, bitmask) DBExpand(cu, (int) bitmask, FALSE); return 0; } - + /* * ---------------------------------------------------------------------------- * @@ -1134,7 +1134,7 @@ cmdGetSelFunc(selUse, realUse, transform, pResult) *cmdSelTrans = *transform; return 1; /* Skip any other selected cells. */ } - + /* * ---------------------------------------------------------------------------- * diff --git a/commands/CmdTZ.c b/commands/CmdTZ.c index d21e3cbb..c9b1954a 100644 --- a/commands/CmdTZ.c +++ b/commands/CmdTZ.c @@ -3,16 +3,16 @@ * * Commands with names beginning with the letters T through Z. * - * ********************************************************************* - * * Copyright (C) 1985, 1990 Regents of the University of California. * - * * Permission to use, copy, modify, and distribute this * - * * software and its documentation for any purpose and without * - * * fee is hereby granted, provided that the above copyright * - * * notice appear in all copies. The University of California * - * * makes no representations about the suitability of this * - * * software for any purpose. It is provided "as is" without * - * * express or implied warranty. Export of this software outside * - * * of the United States of America may require an export license. * + * ********************************************************************* + * * Copyright (C) 1985, 1990 Regents of the University of California. * + * * Permission to use, copy, modify, and distribute this * + * * software and its documentation for any purpose and without * + * * fee is hereby granted, provided that the above copyright * + * * notice appear in all copies. The University of California * + * * makes no representations about the suitability of this * + * * software for any purpose. It is provided "as is" without * + * * express or implied warranty. Export of this software outside * + * * of the United States of America may require an export license. * * ********************************************************************* */ @@ -85,7 +85,7 @@ checkForPaintFunc(cellDef, arg) { int numPlanes = *((int *)arg); int pNum, result; - + if (cellDef->cd_flags & CDINTERNAL) return 0; for (pNum = PL_SELECTBASE; pNum < numPlanes; pNum++) @@ -158,7 +158,7 @@ CmdCheckForPaintFunc() #define TECH_LAYERS 7 #define TECH_DRC 8 #define TECH_LOCK 9 -#define TECH_UNLOCK 10 +#define TECH_UNLOCK 10 #define TECH_REVERT 11 void @@ -177,14 +177,14 @@ CmdTech(w, cmd) { "no", "yes", 0 }; static char *cmdTechOption[] = - { + { "load filename [-noprompt][-[no]override]\n\ Load a new technology", "help Display techinfo command options", "name Show current technology name", "filename Show current technology filename", "version Show current technology version", - "lambda Show internal units per lambda", + "lambda Show internal units per lambda", "planes Show defined planes", "layers [] Show defined layers", "drc Query DRC ruleset", @@ -451,7 +451,7 @@ CmdTech(w, cmd) if (!strncmp(cmd->tx_argv[2], "width", 5)) { tresult = DRCGetDefaultLayerWidth(t1); -#ifdef MAGIC_WRAPPER +#ifdef MAGIC_WRAPPER Tcl_SetObjResult(magicinterp, Tcl_NewIntObj(tresult)); #else TxPrintf("Minimum width is %d\n", tresult); @@ -470,7 +470,7 @@ CmdTech(w, cmd) else t2 = t1; tresult = DRCGetDefaultLayerSpacing(t1, t2); -#ifdef MAGIC_WRAPPER +#ifdef MAGIC_WRAPPER Tcl_SetObjResult(magicinterp, Tcl_NewIntObj(tresult)); #else TxPrintf("Minimum spacing is %d\n", tresult); @@ -493,7 +493,7 @@ CmdTech(w, cmd) } tresult = DRCGetDefaultLayerSurround(t1, t2); -#ifdef MAGIC_WRAPPER +#ifdef MAGIC_WRAPPER Tcl_SetObjResult(magicinterp, Tcl_NewIntObj(tresult)); #else TxPrintf("Minimum surround is %d\n", tresult); @@ -572,7 +572,7 @@ CmdTech(w, cmd) #endif break; } - + if (!TechLoad(cmd->tx_argv[2], 0)) { #ifdef MAGIC_WRAPPER @@ -647,7 +647,7 @@ CmdTool(w, cmd) DBWPrintButtonDoc(); else (void) DBWChangeButtonHandler(cmd->tx_argv[1]); } - + /* * ---------------------------------------------------------------------------- * @@ -682,7 +682,7 @@ CmdUnexpand(w, cmd) TxError("Usage: %s\n", cmd->tx_argv[0]); return; } - + windCheckOnlyWindow(&w, DBWclientID); if (w == (MagWindow *) NULL) { @@ -716,7 +716,7 @@ cmdUnexpandFunc(use, windowMask) (TileTypeBitMask *) NULL); return 0; } - + /* * ---------------------------------------------------------------------------- * @@ -736,7 +736,7 @@ cmdUnexpandFunc(use, windowMask) * * ---------------------------------------------------------------------------- */ - + void CmdUpsidedown(w, cmd) MagWindow *w; @@ -752,12 +752,12 @@ CmdUpsidedown(w, cmd) return; } if (!ToolGetEditBox((Rect *)NULL)) return; - + /* To flip the selection upside down, first flip it around the * x-axis, then move it back so its lower-left corner is in * the same place that it used to be. */ - + GeoTransRect(&GeoUpsideDownTransform, &SelectDef->cd_bbox, &bbox); GeoTranslateTrans(&GeoUpsideDownTransform, SelectDef->cd_bbox.r_xbot - bbox.r_xbot, @@ -768,7 +768,7 @@ CmdUpsidedown(w, cmd) /* Flip the box, if it exists and is in the same window as the * selection. */ - + if (ToolGetBox(&rootDef, &rootBox) && (rootDef == SelectRootDef)) { Rect newBox; @@ -888,7 +888,7 @@ CmdWhat(w, cmd) extern int cmdWhatLabelPreFunc(), orderLabelFunc(); locargc = cmd->tx_argc; - + #ifdef MAGIC_WRAPPER if ((locargc == 2) && !strncmp(cmd->tx_argv[locargc - 1], "-list", 5)) { @@ -898,7 +898,7 @@ CmdWhat(w, cmd) paintobj = Tcl_NewListObj(0, NULL); labelobj = Tcl_NewListObj(0, NULL); cellobj = Tcl_NewListObj(0, NULL); - } + } if (locargc > 1) { TxError("Usage: what [-list]\n"); @@ -999,7 +999,7 @@ CmdWhat(w, cmd) moreLabelEntries = 0; labelEntryCount = 0; - labelBlockTop = NULL; + labelBlockTop = NULL; (void) SelEnumLabels(&DBAllTypeBits, FALSE, (bool *) NULL, cmdWhatLabelPreFunc, (ClientData) &foundAny); foundAny = FALSE; @@ -1121,7 +1121,7 @@ cmdWhatLabelPreFunc(label, cellUse, transform, foundAny) labelEntry = &labelBlockTop[labelEntryCount]; moreLabelEntries = 100; } - /* store the pointers for sorting later */ + /* store the pointers for sorting later */ labelEntry->lab_type = label->lab_type; labelEntry->lab_text = label->lab_text; if (!cellUse->cu_id) @@ -1136,7 +1136,7 @@ cmdWhatLabelPreFunc(label, cellUse, transform, foundAny) labelEntryCount++; return 0; } - + int cmdWhatLabelFunc(entry, foundAny) @@ -1176,13 +1176,13 @@ cmdWhatLabelFunc(entry, foundAny) if (counts > 1) TxPrintf(" (%i instances)", counts); TxPrintf("\n \"%s\" is attached to %s in cell %s %s", entry->lab_text, - DBTypeLongName(entry->lab_type), + DBTypeLongName(entry->lab_type), (isDef) ? "def" : "use", entry->cell_name); last_type = entry->lab_type; last_cell = entry->cell_name; last_name = entry->lab_text; counts = 1; - } else + } else counts++; return counts; } @@ -1308,7 +1308,7 @@ CmdWire(w, cmd) #endif static char *cmdWireOption[] = - { + { "decrement layer|width decrement the wire layer or width", "help print this help information", "horizontal add a new horizontal wire leg", @@ -1434,11 +1434,11 @@ CmdWire(w, cmd) TxPrintf(" %s\n", *msg); } return; - + case HORIZONTAL: WireAddLeg((Rect *) NULL, (Point *) NULL, WIRE_HORIZONTAL); return; - + case LEG: WireAddLeg((Rect *) NULL, (Point *) NULL, WIRE_CHOOSE); return; @@ -1639,7 +1639,7 @@ CmdWire(w, cmd) if (*xptr == '\0' || *yptr == '\0') { TxError("Bad coordinate pair at %s line %d\n", - cmd->tx_argv[4], i + 1); + cmd->tx_argv[4], i + 1); freeMagic(plist); return; } @@ -1701,7 +1701,7 @@ CmdWire(w, cmd) break; } } - + /* * ---------------------------------------------------------------------------- * @@ -1832,7 +1832,7 @@ cmdWriteallFunc(def, cmd) } return 0; } - + /* * ---------------------------------------------------------------------------- * @@ -1929,7 +1929,7 @@ CmdXor(w, cmd) void (*curPlaneSave)(); int p, t, h; - + destname = cmd->tx_argv[cmd->tx_argc - 1]; xMask = CU_DESCEND_ALL; dolabels = TRUE; @@ -1986,7 +1986,7 @@ CmdXor(w, cmd) DBSetTrans(newuse, &GeoIdentityTransform); newuse->cu_expandMask = CU_DESCEND_SPECIAL; flatDestUse = newuse; - + if (EditCellUse) scx.scx_use = EditCellUse; else @@ -2028,7 +2028,7 @@ CmdXor(w, cmd) if (xMask != CU_DESCEND_ALL) DBCellCopyAllCells(&scx, xMask, flatDestUse, (Rect *)NULL); - + DBNewPaintTable(curPaintSave); DBNewPaintPlane(curPlaneSave); diff --git a/commands/CmdWizard.c b/commands/CmdWizard.c index 9cc4b0d5..b2b7cf4e 100644 --- a/commands/CmdWizard.c +++ b/commands/CmdWizard.c @@ -6,16 +6,16 @@ * These commands are not intended to be used by the ordinary magic * user, but are provided for the benefit of system maintainers/implementors. * - * ********************************************************************* - * * Copyright (C) 1985, 1990 Regents of the University of California. * - * * Permission to use, copy, modify, and distribute this * - * * software and its documentation for any purpose and without * - * * fee is hereby granted, provided that the above copyright * - * * notice appear in all copies. The University of California * - * * makes no representations about the suitability of this * - * * software for any purpose. It is provided "as is" without * - * * express or implied warranty. Export of this software outside * - * * of the United States of America may require an export license. * + * ********************************************************************* + * * Copyright (C) 1985, 1990 Regents of the University of California. * + * * Permission to use, copy, modify, and distribute this * + * * software and its documentation for any purpose and without * + * * fee is hereby granted, provided that the above copyright * + * * notice appear in all copies. The University of California * + * * makes no representations about the suitability of this * + * * software for any purpose. It is provided "as is" without * + * * express or implied warranty. Export of this software outside * + * * of the United States of America may require an export license. * * ********************************************************************* */ @@ -52,7 +52,7 @@ extern void cmdPsearchStats(); void cmdStatsHier(CellDef *, int, CellDef *); - + /* * ---------------------------------------------------------------------------- * @@ -155,7 +155,7 @@ CmdCoord(w, cmd) editRect.r_xtop, editRect.r_ytop); TxPrintf("\n"); } - + /* * ---------------------------------------------------------------------------- * @@ -185,7 +185,7 @@ CmdExtractTest(w, cmd) } #endif - + /* * ---------------------------------------------------------------------------- * @@ -397,7 +397,7 @@ CmdShowtech(w, cmd) (void) fclose(outf); } - + /* * ---------------------------------------------------------------------------- * @@ -721,7 +721,7 @@ cmdStatsOutput(def, cc) freeMagic((char *) ci); return (0); } - + /* * ---------------------------------------------------------------------------- * @@ -826,7 +826,7 @@ cmdPsearchStats(str, tl, td, count) ups = us / count; TxPrintf("%s: %d searches, %d us/search [%s]\n", str, count, ups, rstatp); } - + /* * ---------------------------------------------------------------------------- * @@ -914,7 +914,7 @@ CmdTsearch(w, cmd) if (!TTMaskEqual(&mask, &DBZeroTypeBits)) numTilesFound = 0; - + for (i = 0; i < count; i++) { /***** @@ -977,7 +977,7 @@ cmdTsrFunc(tp) numTilesFound++; return 0; } - + /* * ---------------------------------------------------------------------------- * diff --git a/commands/commands.h b/commands/commands.h index 82dc6b72..dfdbdeca 100644 --- a/commands/commands.h +++ b/commands/commands.h @@ -3,16 +3,16 @@ * * Definitions for the commands module. * - * ********************************************************************* - * * Copyright (C) 1985, 1990 Regents of the University of California. * - * * Permission to use, copy, modify, and distribute this * - * * software and its documentation for any purpose and without * - * * fee is hereby granted, provided that the above copyright * - * * notice appear in all copies. The University of California * - * * makes no representations about the suitability of this * - * * software for any purpose. It is provided "as is" without * - * * express or implied warranty. Export of this software outside * - * * of the United States of America may require an export license. * + * ********************************************************************* + * * Copyright (C) 1985, 1990 Regents of the University of California. * + * * Permission to use, copy, modify, and distribute this * + * * software and its documentation for any purpose and without * + * * fee is hereby granted, provided that the above copyright * + * * notice appear in all copies. The University of California * + * * makes no representations about the suitability of this * + * * software for any purpose. It is provided "as is" without * + * * express or implied warranty. Export of this software outside * + * * of the United States of America may require an export license. * * ********************************************************************* * * Needs to include: tiles.h, database.h diff --git a/database/DBbound.c b/database/DBbound.c index 72ebc2b5..a667c428 100644 --- a/database/DBbound.c +++ b/database/DBbound.c @@ -3,16 +3,16 @@ * * Computation of boundaries of a database tile plane. * - * ********************************************************************* - * * Copyright (C) 1985, 1990 Regents of the University of California. * - * * Permission to use, copy, modify, and distribute this * - * * software and its documentation for any purpose and without * - * * fee is hereby granted, provided that the above copyright * - * * notice appear in all copies. The University of California * - * * makes no representations about the suitability of this * - * * software for any purpose. It is provided "as is" without * - * * express or implied warranty. Export of this software outside * - * * of the United States of America may require an export license. * + * ********************************************************************* + * * Copyright (C) 1985, 1990 Regents of the University of California. * + * * Permission to use, copy, modify, and distribute this * + * * software and its documentation for any purpose and without * + * * fee is hereby granted, provided that the above copyright * + * * notice appear in all copies. The University of California * + * * makes no representations about the suitability of this * + * * software for any purpose. It is provided "as is" without * + * * express or implied warranty. Export of this software outside * + * * of the United States of America may require an export license. * * ********************************************************************* */ @@ -25,7 +25,7 @@ static char rcsid[] __attribute__ ((unused)) = "$Header: /usr/cvsroot/magic-8.0/ #include "utils/geometry.h" #include "database/database.h" #include "tiles/tile.h" - + typedef struct dbcellboundstruct { @@ -49,7 +49,7 @@ DBBoundCellPlane(def, extended, rect) DBCellBoundStruct cbs; int dbCellBoundFunc(); Plane *plane; - + filter.tf_func = NULL; filter.tf_arg = (ClientData)&cbs; @@ -171,7 +171,7 @@ DBBoundPlane(plane, rect) return (TRUE); } - + /* * -------------------------------------------------------------------- * diff --git a/database/DBcell.c b/database/DBcell.c index 0bc26090..2ff4777c 100644 --- a/database/DBcell.c +++ b/database/DBcell.c @@ -3,16 +3,16 @@ * * Place and Delete subcells * - * ********************************************************************* - * * Copyright (C) 1985, 1990 Regents of the University of California. * - * * Permission to use, copy, modify, and distribute this * - * * software and its documentation for any purpose and without * - * * fee is hereby granted, provided that the above copyright * - * * notice appear in all copies. The University of California * - * * makes no representations about the suitability of this * - * * software for any purpose. It is provided "as is" without * - * * express or implied warranty. Export of this software outside * - * * of the United States of America may require an export license. * + * ********************************************************************* + * * Copyright (C) 1985, 1990 Regents of the University of California. * + * * Permission to use, copy, modify, and distribute this * + * * software and its documentation for any purpose and without * + * * fee is hereby granted, provided that the above copyright * + * * notice appear in all copies. The University of California * + * * makes no representations about the suitability of this * + * * software for any purpose. It is provided "as is" without * + * * express or implied warranty. Export of this software outside * + * * of the United States of America may require an export license. * * ********************************************************************* */ @@ -37,7 +37,7 @@ int placeCellFunc(); int deleteCellFunc(); Tile * clipCellTile(); void dupTileBody(); -void cellTileMerge(); +void cellTileMerge(); bool ctbListMatch(); void freeCTBList(); @@ -70,7 +70,7 @@ dbInstanceUnplace(CellUse *use) } - + /* * ---------------------------------------------------------------------------- * @@ -113,7 +113,7 @@ DBCellFindDup(use, parent) return dupUse; } - + /* * ---------------------------------------------------------------------------- * @@ -161,7 +161,7 @@ DBPlaceCell (use, def) DBUndoCellUse(use, UNDO_CELL_PLACE); SigEnableInterrupts(); } - + /* * ---------------------------------------------------------------------------- * DBDeleteCell -- diff --git a/database/DBcellbox.c b/database/DBcellbox.c index db702aa5..e3d17408 100644 --- a/database/DBcellbox.c +++ b/database/DBcellbox.c @@ -4,16 +4,16 @@ * Procedures for calculating and changing cell bounding boxes, * and for manipulating arrays of cells. * - * ********************************************************************* - * * Copyright (C) 1985, 1990 Regents of the University of California. * - * * Permission to use, copy, modify, and distribute this * - * * software and its documentation for any purpose and without * - * * fee is hereby granted, provided that the above copyright * - * * notice appear in all copies. The University of California * - * * makes no representations about the suitability of this * - * * software for any purpose. It is provided "as is" without * - * * express or implied warranty. Export of this software outside * - * * of the United States of America may require an export license. * + * ********************************************************************* + * * Copyright (C) 1985, 1990 Regents of the University of California. * + * * Permission to use, copy, modify, and distribute this * + * * software and its documentation for any purpose and without * + * * fee is hereby granted, provided that the above copyright * + * * notice appear in all copies. The University of California * + * * makes no representations about the suitability of this * + * * software for any purpose. It is provided "as is" without * + * * express or implied warranty. Export of this software outside * + * * of the United States of America may require an export license. * * ********************************************************************* */ @@ -34,7 +34,7 @@ static char rcsid[] __attribute__ ((unused)) = "$Header: /usr/cvsroot/magic-8.0/ #include "dbwind/dbwind.h" #include "utils/undo.h" - + /* *----------------------------------------------------------------------------- * @@ -105,7 +105,7 @@ DBPrintUseId(scx, name, size, display_only) return (sp); } - + /* * ---------------------------------------------------------------------------- * @@ -143,7 +143,7 @@ DBCellClearAvail(cellDef) { cellDef->cd_flags &= ~(CDNOTFOUND|CDAVAILABLE); } - + /* * ---------------------------------------------------------------------------- * @@ -185,7 +185,7 @@ DBCellSetModified(cellDef, ismod) if (ismod) cellDef->cd_flags |= CDMODIFIED|CDGETNEWSTAMP; } - + /* * ---------------------------------------------------------------------------- * @@ -253,7 +253,7 @@ DBComputeUseBbox(use) GeoTransRect(&use->cu_transform, &childRect, &use->cu_bbox); GeoTransRect(&use->cu_transform, &childExtend, &use->cu_extended); } - + /* * ---------------------------------------------------------------------------- * @@ -276,7 +276,7 @@ DBIsChild(cu1, cu2) { return (cu1->cu_parent == cu2->cu_def); } - + /* * ---------------------------------------------------------------------------- * @@ -305,7 +305,7 @@ DBSetArray(fromCellUse, toCellUse) toCellUse->cu_xsep = fromCellUse->cu_xsep; toCellUse->cu_ysep = fromCellUse->cu_ysep; } - + /* * ---------------------------------------------------------------------------- * @@ -330,7 +330,7 @@ DBSetTrans(cellUse, trans) cellUse->cu_transform = *trans; DBComputeUseBbox(cellUse); } - + /* * ---------------------------------------------------------------------------- * @@ -389,7 +389,7 @@ DBMakeArray(cellUse, rootToCell, xlo, ylo, xhi, yhi, xsep, ysep) DBComputeUseBbox(cellUse); } - + /* * ---------------------------------------------------------------------------- * @@ -483,7 +483,7 @@ DBArrayOverlap(cu, parentRect, pxlo, pxhi, pylo, pyhi) * The intent is that "outlo" will be the smaller of the two * coordinates, and "outhi" the larger. */ - + /* Even though it should never happen, handle zero spacings * gracefully. */ @@ -545,7 +545,7 @@ DBArrayOverlap(cu, parentRect, pxlo, pxhi, pylo, pyhi) *pyhi = outyhi; } } - + /* * ---------------------------------------------------------------------------- * @@ -765,7 +765,7 @@ dbReComputeBboxFunc(cellDef, boundProc, recurseProc) if ((last != NULL) && (parent != NULL)) (*recurseProc)(parent); UndoEnable(); } - + /* * ---------------------------------------------------------------------------- * @@ -812,7 +812,7 @@ DBComputeArrayArea(area, cellUse, x, y, prect) prect->r_ybot = area->r_ybot + ydelta; prect->r_ytop = area->r_ytop + ydelta; } - + /* * ---------------------------------------------------------------------------- * diff --git a/database/DBcellcopy.c b/database/DBcellcopy.c index dd8e5dfb..bf1a26e8 100644 --- a/database/DBcellcopy.c +++ b/database/DBcellcopy.c @@ -3,16 +3,16 @@ * * Cell copying (yank and stuff) * - * ********************************************************************* - * * Copyright (C) 1985, 1990 Regents of the University of California. * - * * Permission to use, copy, modify, and distribute this * - * * software and its documentation for any purpose and without * - * * fee is hereby granted, provided that the above copyright * - * * notice appear in all copies. The University of California * - * * makes no representations about the suitability of this * - * * software for any purpose. It is provided "as is" without * - * * express or implied warranty. Export of this software outside * - * * of the United States of America may require an export license. * + * ********************************************************************* + * * Copyright (C) 1985, 1990 Regents of the University of California. * + * * Permission to use, copy, modify, and distribute this * + * * software and its documentation for any purpose and without * + * * fee is hereby granted, provided that the above copyright * + * * notice appear in all copies. The University of California * + * * makes no representations about the suitability of this * + * * software for any purpose. It is provided "as is" without * + * * express or implied warranty. Export of this software outside * + * * of the United States of America may require an export license. * * ********************************************************************* */ @@ -169,7 +169,7 @@ DBPaintPlaneXor(def, pNum, type, area, undo) * * This function calls DBPaintPlane, but first checks if the type * being painted is an active layer. If the type is a contact, - * then the residues are checked to see if they are active layers. + * then the residues are checked to see if they are active layers. * Painting proceeds accordingly. * * ---------------------------------------------------------------------------- @@ -246,7 +246,7 @@ DBCellCopyManhattanPaint(scx, mask, xMask, targetUse) (void) DBTreeSrTiles(scx, mask, xMask, dbCopyManhattanPaint, (ClientData) &arg); } - + /* *----------------------------------------------------------------------------- * @@ -289,7 +289,7 @@ DBCellCopyAllPaint(scx, mask, xMask, targetUse) DBTreeSrTiles(scx, &locMask, xMask, dbCopyAllPaint, (ClientData) &arg); } - + /* *----------------------------------------------------------------------------- * @@ -332,7 +332,7 @@ DBCellCopyAllLabels(scx, mask, xMask, targetUse, pArea) /* DBTeeSrLabels finds all the labels that we want plus some more. * We'll filter out the ones that we don't need. */ - + arg.cla_targetUse = targetUse; arg.cla_bbox = pArea; if (pArea != NULL) @@ -387,7 +387,7 @@ dbCopyAllLabels(scx, lab, tpath, arg) } return 0; } - + /* *----------------------------------------------------------------------------- * @@ -447,7 +447,7 @@ DBCellCopyPaint(scx, mask, xMask, targetUse) mask, dbCopyAllPaint, (ClientData) &cxp); } } - + /* *----------------------------------------------------------------------------- * @@ -456,7 +456,7 @@ DBCellCopyPaint(scx, mask, xMask, targetUse) * Copy labels from scx->scx_use to targetUse, transforming according to * the transform in scx. Only labels attached to layers of the types * specified by mask are copied. If mask contains the L_LABEL bit, then - * all labels are copied regardless of their layer. The area copied is + * all labels are copied regardless of their layer. The area copied is * determined by GEO_LABEL_IN_AREA. * * Results: @@ -573,7 +573,7 @@ dbCopyManhattanPaint(tile, cxp) return (0); } - + /*** *** Filter function for paint ***/ @@ -601,7 +601,7 @@ dbCopyAllPaint(tile, cxp) bool splittile = FALSE; TileType dinfo = 0; - + if (IsSplit(tile)) { splittile = TRUE; @@ -667,7 +667,7 @@ dbCopyAllPaint(tile, cxp) int np, i, j; GrClipTriangle(&targetRect, &arg->caa_rect, TRUE, dinfo, points, &np); - + if (np == 0) return(0); @@ -756,7 +756,7 @@ splitdone: return (0); } - + /* *----------------------------------------------------------------------------- * @@ -816,7 +816,7 @@ DBCellCopyAllCells(scx, xMask, targetUse, pArea) (void) DBTreeSrCells(scx, xMask, dbCellCopyCellsFunc, (ClientData) &arg); } - + /* *----------------------------------------------------------------------------- * @@ -866,7 +866,7 @@ DBCellCopyCells(scx, targetUse, pArea) (void) DBCellSrArea(scx, dbCellCopyCellsFunc, (ClientData) &arg); } - + /* *----------------------------------------------------------------------------- * @@ -963,7 +963,7 @@ dbCellCopyCellsFunc(scx, arg) } return 2; } - + /* * ---------------------------------------------------------------------------- * @@ -993,7 +993,7 @@ DBNewPaintTable(newTable))[NT][NT] if (newTable) dbCurPaintTbl = newTable; return oldTable; } - + /* * ---------------------------------------------------------------------------- * diff --git a/database/DBcellname.c b/database/DBcellname.c index d42cbaed..2672d6ba 100644 --- a/database/DBcellname.c +++ b/database/DBcellname.c @@ -3,16 +3,16 @@ * * CellUse/CellDef creation, deletion, naming. * - * ********************************************************************* - * * Copyright (C) 1985, 1990 Regents of the University of California. * - * * Permission to use, copy, modify, and distribute this * - * * software and its documentation for any purpose and without * - * * fee is hereby granted, provided that the above copyright * - * * notice appear in all copies. The University of California * - * * makes no representations about the suitability of this * - * * software for any purpose. It is provided "as is" without * - * * express or implied warranty. Export of this software outside * - * * of the United States of America may require an export license. * + * ********************************************************************* + * * Copyright (C) 1985, 1990 Regents of the University of California. * + * * Permission to use, copy, modify, and distribute this * + * * software and its documentation for any purpose and without * + * * fee is hereby granted, provided that the above copyright * + * * notice appear in all copies. The University of California * + * * makes no representations about the suitability of this * + * * software for any purpose. It is provided "as is" without * + * * express or implied warranty. Export of this software outside * + * * of the United States of America may require an export license. * * ********************************************************************* */ @@ -158,7 +158,7 @@ DBEnumerateTypes(rMask) HashSearch hs; HashEntry *entry; CellDef *cellDef; - + TTMaskZero(rMask); HashStartSearch(&hs); while ((entry = HashNext(&dbCellDefTable, &hs)) != NULL) @@ -250,7 +250,7 @@ DBCellDelete(cellname, force) DBUndoReset(celldef); /* If we're destroying "UNNAMED", then we want to rename it first */ - /* so that WindUnload() will create a new one. */ + /* so that WindUnload() will create a new one. */ if (!strcmp(cellname, UNNAMED)) DBCellRename(cellname, "__UNNAMED__"); @@ -281,7 +281,7 @@ DBCellDelete(cellname, force) } - + /* * ---------------------------------------------------------------------------- * @@ -317,7 +317,7 @@ DBCellInit() * * ---------------------------------------------------------------------------- */ - + char * dbGetUseName(celluse) CellUse *celluse; @@ -355,7 +355,7 @@ dbGetUseName(celluse) newsize += strlen(ybuf); } } - + newID = (char *)mallocMagic(newsize); strcpy(newID, useID); if (isx || isy) @@ -369,7 +369,7 @@ dbGetUseName(celluse) return (newID); } - + /* * ---------------------------------------------------------------------------- * @@ -559,7 +559,7 @@ dbCellPrintInfo(StartDef, who, dolist) } /* endswitch */ } - + /* * ---------------------------------------------------------------------------- @@ -630,7 +630,7 @@ DBCellPrint(CellName, who, dolist) HashEntry *entry; CellDef *celldef; CellUse *celluse; - + if (!dolist) { switch (who) @@ -963,7 +963,7 @@ dbUsePrintInfo(StartUse, who, dolist) * if it is not a hierarchical name; otherwise, if it is a * hierarchical name, the instance before the last '/' is mapped * to its cellDef, and that cellDef is searched for the indicated - * instance. + * instance. * * ---------------------------------------------------------------------------- */ @@ -982,14 +982,14 @@ DBUsePrint(CellName, who, dolist) char *lasthier; int dbCellUsePrintFunc(); - + if ((CellName != NULL) && ((lasthier = strrchr(CellName, '/')) != NULL)) { char *prevhier; *lasthier = '\0'; prevhier = strrchr(CellName, '/'); if (prevhier == NULL) - prevhier = CellName; + prevhier = CellName; else prevhier++; @@ -1155,7 +1155,7 @@ DBLockUse(UseName, bval) CellUse *celluse; int dbUseLockFunc(); - + /* * * Check to see if a cell name was specified. If not, @@ -1225,7 +1225,7 @@ DBCellLookDef(cellName) return ((CellDef *) HashGetValue(entry)); } - + /* * ---------------------------------------------------------------------------- * @@ -1273,14 +1273,14 @@ DBCellNewDef(cellName) HashSetValue(entry, (ClientData) cellDef); cellDef->cd_name = StrDup((char **) NULL, cellName); - /* Strip any .mag extension off of the cell name */ + /* Strip any .mag extension off of the cell name */ dotptr = strrchr(cellDef->cd_name, '.'); if (dotptr && !strcmp(dotptr, ".mag")) *dotptr = '\0'; cellDef->cd_file = NULL; return (cellDef); } - + /* * ---------------------------------------------------------------------------- * @@ -1339,7 +1339,7 @@ DBCellDefAlloc() return (cellDef); } - + /* * ---------------------------------------------------------------------------- * @@ -1387,7 +1387,7 @@ DBCellNewUse(cellDef, useName) /* Initial client field */ /* (commands can use this field for whatever - * they like, but should restore its value to CLIENTDEFAULT before exiting.) + * they like, but should restore its value to CLIENTDEFAULT before exiting.) */ cellUse->cu_client = (ClientData) CLIENTDEFAULT; @@ -1395,7 +1395,7 @@ DBCellNewUse(cellDef, useName) DBComputeUseBbox(cellUse); return (cellUse); } - + /* * ---------------------------------------------------------------------------- * @@ -1440,7 +1440,7 @@ DBCellRenameDef(cellDef, newName) return (TRUE); } - + /* * ---------------------------------------------------------------------------- * @@ -1483,7 +1483,7 @@ DBCellDeleteDef(cellDef) DBCellDefFree(cellDef); return TRUE; } - + /* * ---------------------------------------------------------------------------- * @@ -1541,7 +1541,7 @@ DBCellDefFree(cellDef) freeMagic((char *) cellDef); } - + /* * ---------------------------------------------------------------------------- * @@ -1598,7 +1598,7 @@ DBCellDeleteUse(cellUse) freeMagic((char *) cellUse); return (TRUE); } - + /* * ---------------------------------------------------------------------------- * @@ -1632,7 +1632,7 @@ DBCellSrDefs(pattern, func, cdata) int pattern; /* Used for selecting cell definitions. If any * of the bits in the pattern are in a def->cd_flags, * or if pattern is 0, the user-supplied function - * is invoked. + * is invoked. */ int (*func)(); /* Function to be applied to each matching CellDef */ ClientData cdata; /* Client data also passed to function */ @@ -1653,7 +1653,7 @@ DBCellSrDefs(pattern, func, cdata) } return 0; } - + /* * ---------------------------------------------------------------------------- * @@ -1710,7 +1710,7 @@ DBLinkCell(use, parentDef) lastName = strrchr(use->cu_def->cd_name, '/'); if (lastName == NULL) lastName = use->cu_def->cd_name; else lastName++; - + /* This search must not be interrupted */ SigDisableInterrupts(); (void) DBCellEnum(parentDef, dbLinkFunc, (ClientData) lastName); @@ -1773,7 +1773,7 @@ dbLinkFunc(cellUse, defname) return 0; } - + /* * ---------------------------------------------------------------------------- * @@ -1818,7 +1818,7 @@ DBReLinkCell(cellUse, newName) if (UndoIsEnabled()) DBUndoCellUse(cellUse, UNDO_CELL_SETID); return (TRUE); } - + /* * ---------------------------------------------------------------------------- * @@ -1843,7 +1843,7 @@ DBFindUse(id, parentDef) { HashEntry *he; char *delimit; - + /* Sanity checks */ if (id == NULL) return NULL; if (parentDef == NULL) return NULL; @@ -1858,7 +1858,7 @@ DBFindUse(id, parentDef) return (CellUse *) HashGetValue(he); } - + /* * ---------------------------------------------------------------------------- * @@ -1902,7 +1902,7 @@ DBGenerateUniqueIds(def, warn) HashKill(&dbUniqueDefTable); HashKill(&dbUniqueNameTable); } - + /* * ---------------------------------------------------------------------------- * @@ -1944,7 +1944,7 @@ dbFindNamesFunc(use, parentDef) } return (0); } - + /* * ---------------------------------------------------------------------------- * @@ -2007,7 +2007,7 @@ setHash: DBSetUseIdHash(use, parentDef); return (0); } - + /* * ---------------------------------------------------------------------------- * @@ -2035,7 +2035,7 @@ DBSetUseIdHash(use, parentDef) he = HashFind(&parentDef->cd_idHash, use->cu_id); HashSetValue(he, (ClientData) use); } - + /* * ---------------------------------------------------------------------------- * @@ -2064,7 +2064,7 @@ DBUnLinkCell(use, parentDef) HashSetValue(he, (ClientData) NULL); } - + /* * ---------------------------------------------------------------------------- * diff --git a/database/DBcellsel.c b/database/DBcellsel.c index 3ad517e6..0d465750 100644 --- a/database/DBcellsel.c +++ b/database/DBcellsel.c @@ -3,16 +3,16 @@ * * Cell selection. * - * ********************************************************************* - * * Copyright (C) 1985, 1990 Regents of the University of California. * - * * Permission to use, copy, modify, and distribute this * - * * software and its documentation for any purpose and without * - * * fee is hereby granted, provided that the above copyright * - * * notice appear in all copies. The University of California * - * * makes no representations about the suitability of this * - * * software for any purpose. It is provided "as is" without * - * * express or implied warranty. Export of this software outside * - * * of the United States of America may require an export license. * + * ********************************************************************* + * * Copyright (C) 1985, 1990 Regents of the University of California. * + * * Permission to use, copy, modify, and distribute this * + * * software and its documentation for any purpose and without * + * * fee is hereby granted, provided that the above copyright * + * * notice appear in all copies. The University of California * + * * makes no representations about the suitability of this * + * * software for any purpose. It is provided "as is" without * + * * express or implied warranty. Export of this software outside * + * * of the United States of America may require an export license. * * ********************************************************************* */ @@ -55,7 +55,7 @@ struct selectArg /* Forward declarations */ int dbSelectCellSr(); - + /* * ---------------------------------------------------------------------------- * @@ -251,7 +251,7 @@ dbSelectCellSr(scx, arg) /* compute lastArea (using long long to avoid overflow). */ { int xDiff, yDiff; - + xDiff = pbx->r_xtop - pbx->r_xbot; yDiff = pbx->r_ytop - pbx->r_ybot; /* BY NP */ @@ -281,7 +281,7 @@ dbSelectCellSr(scx, arg) n = arg->csa_bestpath->tp_last - arg->csa_bestpath->tp_next; strncpy(arg->csa_bestpath->tp_next, cpath->tp_first, n); arg->csa_bestpath->tp_next[n] = '\0'; - + /* Pop last component of current path */ cpath->tp_next = savenext; *savenext = '\0'; @@ -308,7 +308,7 @@ dbSelectCellSr(scx, arg) /* compute bestArea (using long long to avoid overflow). */ { int xDiff, yDiff; - + xDiff = pbx->r_xtop - pbx->r_xbot; yDiff = pbx->r_ytop - pbx->r_ybot; bestArea = (dlong)xDiff * (dlong)yDiff; diff --git a/database/DBcellsrch.c b/database/DBcellsrch.c index a62523ae..8740bf09 100644 --- a/database/DBcellsrch.c +++ b/database/DBcellsrch.c @@ -3,16 +3,16 @@ * * Area searching which spans cell boundaries. * - * ********************************************************************* - * * Copyright (C) 1985, 1990 Regents of the University of California. * - * * Permission to use, copy, modify, and distribute this * - * * software and its documentation for any purpose and without * - * * fee is hereby granted, provided that the above copyright * - * * notice appear in all copies. The University of California * - * * makes no representations about the suitability of this * - * * software for any purpose. It is provided "as is" without * - * * express or implied warranty. Export of this software outside * - * * of the United States of America may require an export license. * + * ********************************************************************* + * * Copyright (C) 1985, 1990 Regents of the University of California. * + * * Permission to use, copy, modify, and distribute this * + * * software and its documentation for any purpose and without * + * * fee is hereby granted, provided that the above copyright * + * * notice appear in all copies. The University of California * + * * makes no representations about the suitability of this * + * * software for any purpose. It is provided "as is" without * + * * express or implied warranty. Export of this software outside * + * * of the United States of America may require an export license. * * ********************************************************************* */ @@ -276,7 +276,7 @@ dbCellPlaneSrFunc(scx, fp) return 1; else return 0; } - + /* *----------------------------------------------------------------------------- @@ -395,7 +395,7 @@ dbCellUniqueTileSrFunc(scx, fp) else return 0; } - + /* *----------------------------------------------------------------------------- * @@ -500,7 +500,7 @@ DBNoTreeSrTiles(scx, mask, xMask, func, cdarg) return 0; } - + /* *----------------------------------------------------------------------------- * @@ -595,7 +595,7 @@ DBTreeSrLabels(scx, mask, xMask, tpath, flags, func, cdarg) /* For non-manhattan searches, label must be in or */ /* touch the triangle. (to-do: needs a proper */ /* insideness test) */ - + if (flags & TF_LABEL_ATTACH_CORNER) { Rect r1 = *r; @@ -652,7 +652,7 @@ DBTreeSrLabels(scx, mask, xMask, tpath, flags, func, cdarg) * instead of just TOUCH. Be careful when expanding: can't expand * any coordinate past infinity. */ - + scx2 = *scx; if (scx2.scx_area.r_xbot > TiPlaneRect.r_xbot) scx2.scx_area.r_xbot -= 1; if (scx2.scx_area.r_ybot > TiPlaneRect.r_ybot) scx2.scx_area.r_ybot -= 1; @@ -691,7 +691,7 @@ dbCellLabelSrFunc(scx, fp) bool dereference = (def->cd_flags & CDDEREFERENCE) ? TRUE : FALSE; if (!DBCellRead(def, (char *) NULL, TRUE, dereference, NULL)) return 0; } - + if (fp->tf_tpath != (TerminalPath *) NULL) { TerminalPath *tp = fp->tf_tpath; @@ -741,7 +741,7 @@ cleanup: return (result); } - + /* *----------------------------------------------------------------------------- * @@ -862,7 +862,7 @@ dbTreeCellSrFunc(scx, fp) } return result; } - + /* *----------------------------------------------------------------------------- * @@ -1006,7 +1006,7 @@ DBSrRoots(baseDef, transform, func, cdarg) } return 0; } - + /* *----------------------------------------------------------------------------- * @@ -1045,7 +1045,7 @@ DBIsAncestor(cellDef1, cellDef2) } return (FALSE); } - + /* *----------------------------------------------------------------------------- * @@ -1113,13 +1113,13 @@ DBCellSrArea(scx, func, cdarg) if (!DBCellRead(scx->scx_use->cu_def, (char *) NULL, TRUE, dereference, NULL)) return 0; } - + if (DBSrCellPlaneArea(scx->scx_use->cu_def->cd_cellPlane, &scx->scx_area, dbCellSrFunc, (ClientData) &context)) return 1; return 0; } - + /* *----------------------------------------------------------------------------- * @@ -1191,7 +1191,7 @@ dbCellSrFunc(use, cxp) return 0; } - + /* *----------------------------------------------------------------------------- * @@ -1243,7 +1243,7 @@ DBCellEnum(cellDef, func, cdarg) return 1; else return 0; } - + /* *----------------------------------------------------------------------------- * @@ -1506,7 +1506,7 @@ DBScaleEverything(scalen, scaled) SigDisableInterrupts(); lhead = NULL; - (void) DBCellSrDefs(0, dbCellDefEnumFunc, (ClientData) &lhead); + (void) DBCellSrDefs(0, dbCellDefEnumFunc, (ClientData) &lhead); /* Apply scaling function to each CellDef */ @@ -1895,7 +1895,7 @@ dbScaleCell(cellDef, scalen, scaled) DBScalePoint(&lab->lab_bbox.r_ll, scalen, scaled); DBScalePoint(&lab->lab_bbox.r_ur, scalen, scaled); - + for (i = 0; i < 4; i++) DBScalePoint(&lab->lab_corners[i], scalen, scaled); } @@ -1962,7 +1962,7 @@ dbCellDefEnumFunc(cellDef, arg) lcd->cellDef = cellDef; lcd->cd_next = (*arg); (*arg) = lcd; - + return 0; } @@ -1989,7 +1989,7 @@ dbCellUseEnumFunc(cellUse, arg) lcu->cellUse = cellUse; lcu->cu_next = (*arg); (*arg) = lcu; - + return 0; } @@ -2024,11 +2024,11 @@ DBMoveCell(cellDef, origx, origy) Plane *newplane; BPlane *cellPlane, *cellPlaneOrig; - /* Unlike dbScaleCell(), this routine is only run on valid edit defs */ + /* Unlike dbScaleCell(), this routine is only run on valid edit defs */ cellDef->cd_flags |= CDBOXESCHANGED; - /* Enumerate all unique cell uses, and move their position in the */ + /* Enumerate all unique cell uses, and move their position in the */ /* bounding box and transform. */ luhead = NULL; diff --git a/database/DBcellsubr.c b/database/DBcellsubr.c index 1ade3ea5..94d02efb 100644 --- a/database/DBcellsubr.c +++ b/database/DBcellsubr.c @@ -3,16 +3,16 @@ * * Low-level support for cell operations. * - * ********************************************************************* - * * Copyright (C) 1985, 1990 Regents of the University of California. * - * * Permission to use, copy, modify, and distribute this * - * * software and its documentation for any purpose and without * - * * fee is hereby granted, provided that the above copyright * - * * notice appear in all copies. The University of California * - * * makes no representations about the suitability of this * - * * software for any purpose. It is provided "as is" without * - * * express or implied warranty. Export of this software outside * - * * of the United States of America may require an export license. * + * ********************************************************************* + * * Copyright (C) 1985, 1990 Regents of the University of California. * + * * Permission to use, copy, modify, and distribute this * + * * software and its documentation for any purpose and without * + * * fee is hereby granted, provided that the above copyright * + * * notice appear in all copies. The University of California * + * * makes no representations about the suitability of this * + * * software for any purpose. It is provided "as is" without * + * * express or implied warranty. Export of this software outside * + * * of the United States of America may require an export license. * * ********************************************************************* */ @@ -130,11 +130,11 @@ DBCellCopyDefBody(sourceDef, destDef) destDef->cd_idHash = sourceDef->cd_idHash; for (i = 0; i < MAXPLANES; i++) destDef->cd_planes[i] = sourceDef->cd_planes[i]; - + /* Be careful to update parent pointers in the children of dest. * Don't allow interrupts to wreck this. */ - + SigDisableInterrupts(); (void) DBSrCellPlaneArea(destDef->cd_cellPlane, &TiPlaneRect, dbCopyDefFunc, (ClientData) destDef); @@ -150,7 +150,7 @@ dbCopyDefFunc(use, def) return 0; } - + /* * ---------------------------------------------------------------------------- * @@ -220,7 +220,7 @@ DBCellClearDef(cellDef) SigEnableInterrupts(); } - + /* * ---------------------------------------------------------------------------- @@ -255,7 +255,7 @@ DBClearPaintPlane(plane) TiSetBody(newCenterTile, TT_SPACE); dbSetPlaneTile(plane, newCenterTile); } - + /* * ---------------------------------------------------------------------------- * @@ -300,7 +300,7 @@ dbSetPlaneTile(plane, newCenterTile) LEFT(newCenterTile) = TiPlaneRect.r_xbot; BOTTOM(newCenterTile) = TiPlaneRect.r_ybot; } - + /* * ---------------------------------------------------------------------------- * diff --git a/database/DBconnect.c b/database/DBconnect.c index a7772c0e..7f84e243 100644 --- a/database/DBconnect.c +++ b/database/DBconnect.c @@ -6,16 +6,16 @@ * and one that operates hierarchically, across cell boundaries * (DBTreeCopyConnect). * - * ********************************************************************* - * * Copyright (C) 1985, 1990 Regents of the University of California. * - * * Permission to use, copy, modify, and distribute this * - * * software and its documentation for any purpose and without * - * * fee is hereby granted, provided that the above copyright * - * * notice appear in all copies. The University of California * - * * makes no representations about the suitability of this * - * * software for any purpose. It is provided "as is" without * - * * express or implied warranty. Export of this software outside * - * * of the United States of America may require an export license. * + * ********************************************************************* + * * Copyright (C) 1985, 1990 Regents of the University of California. * + * * Permission to use, copy, modify, and distribute this * + * * software and its documentation for any purpose and without * + * * fee is hereby granted, provided that the above copyright * + * * notice appear in all copies. The University of California * + * * makes no representations about the suitability of this * + * * software for any purpose. It is provided "as is" without * + * * express or implied warranty. Export of this software outside * + * * of the United States of America may require an export license. * * ********************************************************************* */ @@ -47,7 +47,7 @@ static char rcsid[] __attribute__ ((unused)) = "$Header: /usr/cvsroot/magic-8.0/ * of information that must be passed through multiple * levels of search function (used by dbSrConnectFunc). */ - + struct conSrArg { CellDef *csa_def; /* Definition being searched. */ @@ -67,7 +67,7 @@ struct conSrArg * of information that must be passed through multiple * levels of search function (used by dbcConnectFunc). */ - + typedef struct { Rect area; /* Area to process */ @@ -117,7 +117,7 @@ DBTransformDiagonal(oldtype, trans) { TileType dinfo; int o1, o2, o3, dir, side; - + o1 = ((trans->t_e > 0) || (trans->t_d > 0)) ? 1 : 0; o2 = ((trans->t_a > 0) || (trans->t_b > 0)) ? 1 : 0; o3 = (trans->t_a != 0) ? 1 : 0; @@ -169,7 +169,7 @@ DBInvTransformDiagonal(oldtype, trans) return dinfo; } - + /* * ---------------------------------------------------------------------------- * @@ -201,7 +201,7 @@ DBInvTransformDiagonal(oldtype, trans) * 1 then the search is aborted. * * *** WARNING *** - * + * * Func should not modify any paint during the search, since this * will mess up pointers kept by these procedures and likely cause * a core-dump. @@ -262,7 +262,7 @@ DBSrConnect(def, startArea, mask, connect, bounds, func, clientData) if (startTile == NULL) return 0; /* The following lets us call DBSrConnect recursively */ else if (startTile->ti_client == (ClientData)1) return 0; - + /* Pass 1. During this pass the client function gets called. */ @@ -353,7 +353,7 @@ DBSrConnectOnePass(def, startArea, mask, connect, bounds, func, clientData) if (startTile == NULL) return 0; /* The following lets us call DBSrConnect recursively */ else if (startTile->ti_client == (ClientData)1) return 0; - + /* Pass 1. During this pass the client function gets called. */ @@ -367,7 +367,7 @@ DBSrConnectOnePass(def, startArea, mask, connect, bounds, func, clientData) return result; } - + /* * ---------------------------------------------------------------------------- * @@ -442,7 +442,7 @@ dbSrConnectFunc(tile, csa) * connected tiles. For each one found, call ourselves * recursively. */ - + if (IsSplit(tile)) { if (SplitSide(tile)) @@ -575,7 +575,7 @@ donesides: /* Lastly, check to see if this tile connects to anything on * other planes. If so, search those planes. */ - + planes = DBConnPlanes[loctype]; planes &= ~(PlaneNumToMaskBit(csa->csa_plane)); if (planes != 0) @@ -606,7 +606,7 @@ donesides: return 0; } - + /* * ---------------------------------------------------------------------------- * @@ -632,11 +632,11 @@ int dbcUnconnectFunc(tile, clientData) Tile *tile; /* Current tile */ ClientData clientData; /* Unused. */ - + { return 1; } - + /* * ---------------------------------------------------------------------------- @@ -786,7 +786,7 @@ dbcConnectLabelFunc(scx, lab, tpath, csa2) } return 0; } - + /* * ---------------------------------------------------------------------------- * @@ -852,7 +852,7 @@ dbcConnectFunc(tile, cx) /* Clip the current area down to something that overlaps the * area of interest. */ - + csa2 = (struct conSrArg2 *)cx->tc_filter->tf_arg; GeoClip(&newarea, csa2->csa2_bounds); if (GEO_RECTNULL(&newarea)) return 0; @@ -868,7 +868,7 @@ dbcConnectFunc(tile, cx) * If so, then there's no need to process the current area, * since any processing that is needed was already done before. */ - + connectMask = &csa2->csa2_connect[loctype]; /* In the case of contact bits, the types underneath @@ -920,7 +920,7 @@ dbcConnectFunc(tile, cx) */ /* Only extend those sides bordering the diagonal tile */ - + if (dinfo & TT_DIAGONAL) { if (dinfo & TT_SIDE) /* right */ @@ -967,7 +967,7 @@ dbcConnectFunc(tile, cx) return 0; } - + /* * ---------------------------------------------------------------------------- * @@ -1106,6 +1106,6 @@ DBTreeCopyConnect(scx, mask, xMask, connect, area, doLabels, destUse) /* Recompute the bounding box of the destination and record its area * for redisplay. */ - + DBReComputeBbox(destUse->cu_def); } diff --git a/database/DBcount.c b/database/DBcount.c index ec3b56e5..e8793b2f 100644 --- a/database/DBcount.c +++ b/database/DBcount.c @@ -4,16 +4,16 @@ * Functions to compute statistics on the paint of * a tree of cells. * - * ********************************************************************* - * * Copyright (C) 1985, 1990 Regents of the University of California. * - * * Permission to use, copy, modify, and distribute this * - * * software and its documentation for any purpose and without * - * * fee is hereby granted, provided that the above copyright * - * * notice appear in all copies. The University of California * - * * makes no representations about the suitability of this * - * * software for any purpose. It is provided "as is" without * - * * express or implied warranty. Export of this software outside * - * * of the United States of America may require an export license. * + * ********************************************************************* + * * Copyright (C) 1985, 1990 Regents of the University of California. * + * * Permission to use, copy, modify, and distribute this * + * * software and its documentation for any purpose and without * + * * fee is hereby granted, provided that the above copyright * + * * notice appear in all copies. The University of California * + * * makes no representations about the suitability of this * + * * software for any purpose. It is provided "as is" without * + * * express or implied warranty. Export of this software outside * + * * of the United States of America may require an export license. * * ********************************************************************* */ @@ -29,7 +29,7 @@ static char rcsid[] __attribute__ ((unused)) = "$Header: /usr/cvsroot/magic-8.0/ #include "database/database.h" #include "database/databaseInt.h" - + /* * ---------------------------------------------------------------------------- * @@ -50,7 +50,7 @@ static char rcsid[] __attribute__ ((unused)) = "$Header: /usr/cvsroot/magic-8.0/ * cell graph; if it returns 0 then the subcells of 'def' are visited; * if it returns 1 then the subcells are not visited. * - * int + * int * hiercount(parent, uses, child, cdata) * CellDef *parent, *child; * int uses; /# Scale factor: number of times child diff --git a/database/DBexpand.c b/database/DBexpand.c index 11793447..63d0f7d1 100644 --- a/database/DBexpand.c +++ b/database/DBexpand.c @@ -3,16 +3,16 @@ * * Expansion and unexpansion of cells * - * ********************************************************************* - * * Copyright (C) 1985, 1990 Regents of the University of California. * - * * Permission to use, copy, modify, and distribute this * - * * software and its documentation for any purpose and without * - * * fee is hereby granted, provided that the above copyright * - * * notice appear in all copies. The University of California * - * * makes no representations about the suitability of this * - * * software for any purpose. It is provided "as is" without * - * * express or implied warranty. Export of this software outside * - * * of the United States of America may require an export license. * + * ********************************************************************* + * * Copyright (C) 1985, 1990 Regents of the University of California. * + * * Permission to use, copy, modify, and distribute this * + * * software and its documentation for any purpose and without * + * * fee is hereby granted, provided that the above copyright * + * * notice appear in all copies. The University of California * + * * makes no representations about the suitability of this * + * * software for any purpose. It is provided "as is" without * + * * express or implied warranty. Export of this software outside * + * * of the United States of America may require an export license. * * ********************************************************************* */ @@ -44,7 +44,7 @@ struct expandArg */ ClientData ea_arg; /* Argument to pass to func. */ }; - + /* * ---------------------------------------------------------------------------- * @@ -96,7 +96,7 @@ DBExpand(cellUse, expandMask, expandFlag) else cellUse->cu_expandMask &= ~expandMask; } - + /* * ---------------------------------------------------------------------------- * @@ -265,7 +265,7 @@ dbUnexpandFunc(scx, arg) return 1; return 2; } - + /* * ---------------------------------------------------------------------------- * diff --git a/database/DBio.c b/database/DBio.c index a1782244..a28aeaa3 100644 --- a/database/DBio.c +++ b/database/DBio.c @@ -3,16 +3,16 @@ * * Reading and writing of cells * - * ********************************************************************* - * * Copyright (C) 1985, 1990 Regents of the University of California. * - * * Permission to use, copy, modify, and distribute this * - * * software and its documentation for any purpose and without * - * * fee is hereby granted, provided that the above copyright * - * * notice appear in all copies. The University of California * - * * makes no representations about the suitability of this * - * * software for any purpose. It is provided "as is" without * - * * express or implied warranty. Export of this software outside * - * * of the United States of America may require an export license. * + * ********************************************************************* + * * Copyright (C) 1985, 1990 Regents of the University of California. * + * * Permission to use, copy, modify, and distribute this * + * * software and its documentation for any purpose and without * + * * fee is hereby granted, provided that the above copyright * + * * notice appear in all copies. The University of California * + * * makes no representations about the suitability of this * + * * software for any purpose. It is provided "as is" without * + * * express or implied warranty. Export of this software outside * + * * of the United States of America may require an export license. * * ********************************************************************* */ @@ -92,7 +92,7 @@ bool dbReadUse(); /* * ---------------------------------------------------------------------------- * - * file_is_not_writeable -- + * file_is_not_writeable -- * * Check to see if file is not writeable. (wen-king@cs.caltech.edu) * Modified to deal with changed semantics of access() (rajit@cs.caltech.edu) @@ -205,7 +205,7 @@ file_is_not_writeable(name) * the direction of the corner made by the right triangle. * If the split tile contains more than one type, separate entries * are output for each. - * + * * 6. Zero or more groups of lines describing cell uses. Each group * is of the form * use [] @@ -345,7 +345,7 @@ dbCellReadDef(f, cellDef, name, ignoreTech, dereference) } if (dbFgets(line, sizeof line, f) == NULL) goto badfile; - + if (line[0] == 'm') { if (!strncmp(line, "magscale", 8)) @@ -356,13 +356,13 @@ dbCellReadDef(f, cellDef, name, ignoreTech, dereference) n = d = 1; } } - + /* For backward compatibility, accept (and throw away) lines * whose first word is "maxlabscale". */ else if (!strncmp(line, "maxlabscale", 11)) TxError("Deprecated keyword \"maxlabscale\" in input file.\n"); - else + else TxError("Expected magscale but got: %s", line); if (dbFgets(line, sizeof line, f) == NULL) goto badfile; @@ -409,9 +409,9 @@ dbCellReadDef(f, cellDef, name, ignoreTech, dereference) } if (n > 1) { - TxPrintf("Scaled magic input cell %s geometry by factor of %d", + TxPrintf("Scaled magic input cell %s geometry by factor of %d", cellDef->cd_name, n); - if (d > 1) + if (d > 1) { TxPrintf("/ %d\n", d); TxError("Warning: Geometry may be lost because internal grid" @@ -481,7 +481,7 @@ dbCellReadDef(f, cellDef, name, ignoreTech, dereference) /* * Record presence of material in cell. */ - + if (DBPlane(type) > 0) { if (type < DBNumUserLayers) @@ -520,7 +520,7 @@ nextrect: ((((dir & 0x2) >> 1) ^ (dir & 0x1)) ? TT_DIRECTION : 0); } - else + else { dinfo = 0; if (!GetRect(f, 4, rp, n, d)) goto badfile; @@ -659,7 +659,7 @@ badfile: * If DBbackupFile is non-NULL, then memory is freed, and the backup * file is removed from the filesystem temp directory. Otherwise, * nothing happens. - * + * * ---------------------------------------------------------------------------- */ @@ -755,8 +755,8 @@ DBFileRecovery(filename) recent = sbuf.st_ctime; DBbackupFile = StrDup(&DBbackupFile, tempname); } - } - } + } + } } closedir(cwd); } @@ -1178,7 +1178,7 @@ DBTestOpen(name, fullPath) return FALSE; } - + /* * ---------------------------------------------------------------------------- * @@ -1490,7 +1490,7 @@ badTransform: StrDup(&subCellDef->cd_file, path); } } - + subCellUse = DBCellNewUse(subCellDef, (useid[0]) ? ((locked) ? useid + 1 : useid) : (char *) NULL); @@ -1539,7 +1539,7 @@ nextLine: return (dbFgets(line, len, f) != NULL); } - + /* * ---------------------------------------------------------------------------- * @@ -2147,7 +2147,7 @@ nextlabel: return (TRUE); } - + /* * ---------------------------------------------------------------------------- * @@ -2259,7 +2259,7 @@ DBCellFindScale(cellDef) } /* Finally, cell uses */ - + if (DBCellEnum(cellDef, dbFindCellGCFFunc, (ClientData) &ggcf)) return 1; @@ -2283,7 +2283,7 @@ dbFindGCFFunc(tile, ggcf) *ggcf = FindGCF(r.r_ytop, *ggcf); if (r.r_ybot % (*ggcf) != 0) *ggcf = FindGCF(r.r_ybot, *ggcf); - + return (*ggcf == 1) ? 1 : 0; } @@ -2326,7 +2326,7 @@ dbFindCellGCFFunc(cellUse, ggcf) return (*ggcf == 1) ? 1 : 0; } - + /* * ---------------------------------------------------------------------------- * @@ -2552,7 +2552,7 @@ DBCellWriteFile(cellDef, f) } } strcat(lstring, "\n"); - FPRINTF(f, lstring); + FPRINTF(f, lstring); } } } @@ -2658,7 +2658,7 @@ dbWritePropFunc(key, value, cdata) return 0; } - + /* * ---------------------------------------------------------------------------- * @@ -2668,7 +2668,7 @@ dbWritePropFunc(key, value, cdata) * Mark the cell as having been written out. Before calling this * procedure, the caller should make sure that timestamps have been * updated where appropriate. - * + * * This code is fairly tricky to ensure that we never destroy the * original contents of a cell in the event of an I/O error. We * try the following approaches in order. @@ -2845,7 +2845,7 @@ DBCellWrite(cellDef, fileName) close(cellDef->cd_fd); cellDef->cd_fd = -1; } -#endif +#endif /* * The temp file is in good shape -- rename it to the real name, @@ -2871,7 +2871,7 @@ DBCellWrite(cellDef, fileName) /* Re-aquire the lock on the new file by opening it. */ DBCellRead(cellDef, NULL, TRUE, dereference, NULL); } -#endif +#endif } else if (exists) @@ -2974,7 +2974,7 @@ cleanup: freeMagic(tmpname); return result; } - + /* * ---------------------------------------------------------------------------- * @@ -3007,8 +3007,8 @@ dbWritePaintFunc(tile, cdarg) int dir; - if (IsSplit(tile)) - { + if (IsSplit(tile)) + { lMask = DBResidueMask(SplitLeftType(tile)); rMask = DBResidueMask(SplitRightType(tile)); @@ -3062,7 +3062,7 @@ dbWritePaintFunc(tile, cdarg) FPRINTR(arg->wa_file,pstring); return 0; } - + /* * ---------------------------------------------------------------------------- * @@ -3205,7 +3205,7 @@ dbWriteCellFunc(cellUse, cdarg) FPRINTR(arg->wa_file,cstring) return 0; } - + /* * ---------------------------------------------------------------------------- * @@ -3382,7 +3382,7 @@ dbWriteBackupFunc(def, f) if (name == NULL) name = def->cd_name; fprintf(f, "file %s\n", name); - + /* Save/restore flags such that the crash recovery file write does */ /* *not* clear the CDMODIFIED, et al., bits */ diff --git a/database/DBlabel.c b/database/DBlabel.c index 9e95d2d5..24225f7d 100644 --- a/database/DBlabel.c +++ b/database/DBlabel.c @@ -3,16 +3,16 @@ * * Label manipulation primitives. * - * ********************************************************************* - * * Copyright (C) 1985, 1990 Regents of the University of California. * - * * Permission to use, copy, modify, and distribute this * - * * software and its documentation for any purpose and without * - * * fee is hereby granted, provided that the above copyright * - * * notice appear in all copies. The University of California * - * * makes no representations about the suitability of this * - * * software for any purpose. It is provided "as is" without * - * * express or implied warranty. Export of this software outside * - * * of the United States of America may require an export license. * + * ********************************************************************* + * * Copyright (C) 1985, 1990 Regents of the University of California. * + * * Permission to use, copy, modify, and distribute this * + * * software and its documentation for any purpose and without * + * * fee is hereby granted, provided that the above copyright * + * * notice appear in all copies. The University of California * + * * makes no representations about the suitability of this * + * * software for any purpose. It is provided "as is" without * + * * express or implied warranty. Export of this software outside * + * * of the United States of America may require an export license. * * ********************************************************************* */ @@ -73,11 +73,11 @@ DBIsSubcircuit(cellDef) for (lab = cellDef->cd_labels; lab != NULL; lab = lab->lab_next) if (lab->lab_flags & PORT_DIR_MASK) return TRUE; - + return FALSE; } - + /* * ---------------------------------------------------------------------------- * @@ -156,7 +156,7 @@ DBPutFontLabel(cellDef, rect, font, size, rot, offset, align, text, type, flags) * from the boundary, so it won't stick out past the edge of * the cell boundary. */ - + #define BORDER 5 if (align < 0) { @@ -224,15 +224,15 @@ DBPutFontLabel(cellDef, rect, font, size, rot, offset, align, text, type, flags) cellDef->cd_flags |= CDMODIFIED|CDGETNEWSTAMP; return lab; } - + /* * ---------------------------------------------------------------------------- * * DBEraseLabel -- * * Delete labels attached to tiles of the indicated types that - * are in the given area (as determined by the macro GEO_LABEL_IN_AREA). - * If this procedure is called as part of a command that also modifies paint, + * are in the given area (as determined by the macro GEO_LABEL_IN_AREA). + * If this procedure is called as part of a command that also modifies paint, * then the paint modifications should be done BEFORE calling here. * * Results: @@ -422,7 +422,7 @@ DBEraseLabelsByContent(def, rect, type, text) else goto nextCheck; } } - + /* * ---------------------------------------------------------------------------- * @@ -483,7 +483,7 @@ DBEraseLabelsByFunction(def, func) else goto nextCheck; } } - + /* * ---------------------------------------------------------------------------- * @@ -525,7 +525,7 @@ DBReOrientLabel(cellDef, area, newPos) } } } - + /* * ---------------------------------------------------------------------------- * @@ -560,7 +560,7 @@ DBAdjustLabels(def, area) /* First, find each label that crosses the area we're * interested in. */ - + for (lab = def->cd_labels; lab != NULL; lab = lab->lab_next) { if (!GEO_TOUCH(&lab->lab_rect, area)) continue; @@ -583,7 +583,7 @@ DBAdjustLabels(def, area) /* - * Extended version of DBAdjustLabels. If noreconnect==0, + * Extended version of DBAdjustLabels. If noreconnect==0, * this is supposed to be the same as DBAdjustlabels() above. */ void @@ -601,7 +601,7 @@ DBAdjustLabelsNew(def, area, noreconnect) /* First, find each label that crosses the area we're * interested in. */ - + labPrev = NULL; lab = def->cd_labels; while (lab != NULL) @@ -614,15 +614,15 @@ DBAdjustLabelsNew(def, area, noreconnect) newType = DBPickLabelLayer(def, lab, locnoreconnect); if (newType == lab->lab_type) { goto nextLab; - } + } if(newType < 0 && !(lab->lab_flags & LABEL_STICKY)) { TxPrintf("Deleting ambiguous-layer label \"%s\" from %s in cell %s.\n", lab->lab_text, DBTypeLongName(lab->lab_type), def->cd_name); - + if (labPrev == NULL) def->cd_labels = lab->lab_next; - else + else labPrev->lab_next = lab->lab_next; if (def->cd_lastLabel == lab) def->cd_lastLabel = labPrev; @@ -643,7 +643,7 @@ DBAdjustLabelsNew(def, area, noreconnect) DBUndoPutLabel(def, lab); modified = TRUE; } - nextLab: + nextLab: labPrev = lab; lab = lab->lab_next; } @@ -651,7 +651,7 @@ DBAdjustLabelsNew(def, area, noreconnect) if (modified) DBCellSetModified(def, TRUE); } - + /* * ---------------------------------------------------------------------------- * @@ -726,7 +726,7 @@ DBPickLabelLayer(def, lab, noreconnect) * left and one on the right. For each side, compute * the type arrays separately. Then merge them together. */ - + check1 = lab->lab_rect; check2 = lab->lab_rect; check1.r_xbot -= 1; @@ -759,7 +759,7 @@ DBPickLabelLayer(def, lab, noreconnect) * top and one on the bottom. Use the code from above * to handle. */ - + check1 = lab->lab_rect; check2 = lab->lab_rect; check1.r_ybot -= 1; @@ -771,7 +771,7 @@ DBPickLabelLayer(def, lab, noreconnect) /* This is a rectangular label. Same thing as for line labels, * except there's only one area to search. */ - + types[0] = DBAllButSpaceAndDRCBits; types[1] = DBAllButSpaceAndDRCBits; TTMaskZero(&types[2]); @@ -804,11 +804,11 @@ DBPickLabelLayer(def, lab, noreconnect) * the criteria above. This avoids weirdnesses caused by declaring * types out of order in the techfile. */ - + if (TTMaskHasType(&types[0], lab->lab_type)) return lab->lab_type; plane = DBPlane(lab->lab_type); choice1 = choice2 = choice3 = choice4 = choice5 = choice6 = TT_SPACE; - + for (j = PL_SELECTBASE; j < DBNumPlanes; j++) { for (i = TT_SELECTBASE; i < DBNumUserLayers; i += 1) @@ -874,7 +874,7 @@ DBPickLabelLayer(def, lab, noreconnect) else if (noreconnect) { #ifdef notdef TxPrintf("DBPickLabelLayer \"%s\" (on %s at %d,%d) choice4=%s choice5=%s choice6=%s.\n", - lab->lab_text, + lab->lab_text, DBTypeLongName(lab->lab_type), lab->lab_rect.r_xbot, lab->lab_rect.r_ytop, @@ -905,7 +905,7 @@ dbPickFunc1(tile, mask) { TileType type; - if (IsSplit(tile)) + if (IsSplit(tile)) type = (SplitSide(tile)) ? SplitRightType(tile) : SplitLeftType(tile); else type = TiGetType(tile); @@ -932,7 +932,7 @@ dbPickFunc2(tile, mask) TileType type; TileTypeBitMask tmp, *rMask; - if (IsSplit(tile)) + if (IsSplit(tile)) type = (SplitSide(tile)) ? SplitRightType(tile) : SplitLeftType(tile); else type = TiGetType(tile); @@ -1005,7 +1005,7 @@ DBFontInitCurves() * * Note: This routine does not take into account the curvature, and therefore * does not optimize for the minimum number of line segments needed to - * represent the curve within a fixed margin of error. + * represent the curve within a fixed margin of error. * * ---------------------------------------------------------------------------- */ @@ -1046,7 +1046,7 @@ CalcBezierPoints(fp, bp) newPath->fp_point.p_x = tmpx; newPath->fp_point.p_y = tmpy; curPath->fp_next = newPath; - curPath = newPath; + curPath = newPath; } } @@ -1115,7 +1115,7 @@ dbGetToken(ff) * units of (database / 8) for a finer resolution, and measured * relative to the label rectangle's origin so we don't run out of * bits in computing the corner positions. - * + * * This routine needs to be run whenever a font label changes * properties (including when the font label is created). * @@ -1550,7 +1550,7 @@ DBLoadFont(fontfile, scale) /* If the first and last points are the same, remove the last one */ if (!GEO_SAMEPOINT(curPath->fp_point, pathStart->fp_point)) newChar->fc_numpoints++; - + newChar->fc_points = (Point *)mallocMagic(i * sizeof(Point)); newChar->fc_next = NULL; for (i = 0, curPath = pathStart; i < newChar->fc_numpoints; diff --git a/database/DBlabel2.c b/database/DBlabel2.c index 47bcacbe..6a54de91 100644 --- a/database/DBlabel2.c +++ b/database/DBlabel2.c @@ -3,16 +3,16 @@ * * Label searching primitives. * - * ********************************************************************* - * * Copyright (C) 1985, 1990 Regents of the University of California. * - * * Permission to use, copy, modify, and distribute this * - * * software and its documentation for any purpose and without * - * * fee is hereby granted, provided that the above copyright * - * * notice appear in all copies. The University of California * - * * makes no representations about the suitability of this * - * * software for any purpose. It is provided "as is" without * - * * express or implied warranty. Export of this software outside * - * * of the United States of America may require an export license. * + * ********************************************************************* + * * Copyright (C) 1985, 1990 Regents of the University of California. * + * * Permission to use, copy, modify, and distribute this * + * * software and its documentation for any purpose and without * + * * fee is hereby granted, provided that the above copyright * + * * notice appear in all copies. The University of California * + * * makes no representations about the suitability of this * + * * software for any purpose. It is provided "as is" without * + * * express or implied warranty. Export of this software outside * + * * of the United States of America may require an export license. * * ********************************************************************* */ @@ -64,7 +64,7 @@ typedef struct { extern void DBTreeFindUse(); bool dbParseArray(); - + /* * ---------------------------------------------------------------------------- * @@ -140,7 +140,7 @@ DBSearchLabel(scx, mask, xMask, pattern, func, cdarg) return 1; else return 0; } - + /* * ---------------------------------------------------------------------------- * @@ -174,7 +174,7 @@ dbSrLabelFunc(scx, label, tpath, labsr) return 1; return 0; } - + /* * ---------------------------------------------------------------------------- * @@ -253,7 +253,7 @@ DBSrLabelLoc(rootUse, name, func, cdarg) return 0; } - + /* * ---------------------------------------------------------------------------- * @@ -353,7 +353,7 @@ DBTreeFindUse(name, use, scx) scx->scx_use = use; } - + /* * ---------------------------------------------------------------------------- * @@ -473,7 +473,7 @@ dbParseArray(cp, use, scx) scx->scx_trans = trans2; return TRUE; } - + /* * ---------------------------------------------------------------------------- * @@ -549,11 +549,11 @@ DBNearestLabel(cellUse, area, point, xMask, labelArea, labelName, length) dbNearestLabelFunc, (ClientData) &funcData); if (name) freeMagic(name); - + if (!funcData.nld_gotLabel) return FALSE; else return TRUE; } - + /* * ---------------------------------------------------------------------------- * @@ -610,6 +610,6 @@ dbNearestLabelFunc(scx, label, tpath, funcData) } *dst = 0; } - + return 0; } diff --git a/database/DBpaint.c b/database/DBpaint.c index 0e1139ff..de4333f9 100644 --- a/database/DBpaint.c +++ b/database/DBpaint.c @@ -6,16 +6,16 @@ * The basic outer loop is a non-recursive area enumeration, and * the inner loop attempts to avoid merging as much as possible. * - * ********************************************************************* - * * Copyright (C) 1985, 1990 Regents of the University of California. * - * * Permission to use, copy, modify, and distribute this * - * * software and its documentation for any purpose and without * - * * fee is hereby granted, provided that the above copyright * - * * notice appear in all copies. The University of California * - * * makes no representations about the suitability of this * - * * software for any purpose. It is provided "as is" without * - * * express or implied warranty. Export of this software outside * - * * of the United States of America may require an export license. * + * ********************************************************************* + * * Copyright (C) 1985, 1990 Regents of the University of California. * + * * Permission to use, copy, modify, and distribute this * + * * software and its documentation for any purpose and without * + * * fee is hereby granted, provided that the above copyright * + * * notice appear in all copies. The University of California * + * * makes no representations about the suitability of this * + * * software for any purpose. It is provided "as is" without * + * * express or implied warranty. Export of this software outside * + * * of the United States of America may require an export license. * * ********************************************************************* */ @@ -144,7 +144,7 @@ int dbPaintDebug = 0; } \ } - + /* * ---------------------------------------------------------------------------- @@ -640,7 +640,7 @@ done: /* Now unmark the processed tiles with the same search algorithm */ /* Expand the area by one to catch tiles that were clipped at */ /* the area boundary. */ - + area->r_xbot -= 1; area->r_ybot -= 1; area->r_xtop += 1; @@ -1063,7 +1063,7 @@ nmenum: while (BOTTOM(tile) > TOP(tp)) tp = RT(tp); if ((RIGHT(tp) != LEFT(tile)) || (BOTTOM(tile) != TOP(tp))) - break; + break; } else { @@ -1200,7 +1200,7 @@ nmenum: /* Announce merge to undo system */ if (undo && UndoIsEnabled()) - dbJoinUndo(tile, RIGHT(tile), undo); + dbJoinUndo(tile, RIGHT(tile), undo); /* All's clear to merge. Again, walk down from tile */ tp2 = LB(tile); @@ -1263,7 +1263,7 @@ nmenum: tp = tp2; tp2 = RT(tp2); } - /* Merge tp and tile */ + /* Merge tp and tile */ TiJoinX(tile, tp, plane); TiSetBody(tile, ttype); } @@ -1321,7 +1321,7 @@ nmdone: * return -1. * * This routine is called only from DBNMPaintPlane(). - * + * * Results: * Returns the new type to be painted, or -1 if the result can * only be generated by quartering the original tile. @@ -1397,7 +1397,7 @@ DBDiagonalProc(oldtype, cdata) newtype = new_n; /* Turned back into a rectangle */ return newtype; } - else + else { newtype = new_w | (new_e << 14); newtype |= (TT_DIAGONAL | TT_DIRECTION); @@ -1416,8 +1416,8 @@ DBDiagonalProc(oldtype, cdata) newtype |= TT_SIDE; return newtype; -} - +} + typedef struct { Rect *area; /* An area to be painted with a triangle */ @@ -1835,11 +1835,11 @@ dbMarkClient(tile, clip) tile->ti_client = (ClientData)CLIENTDEFAULT; } - + /* * ---------------------------------------------------------------------------- * - * dbPaintMerge -- + * dbPaintMerge -- * * The tile 'tp' is to be changed to type 'newtype'. To maintain * maximal horizontal strips, it may be necessary to merge the new @@ -2030,7 +2030,7 @@ dbPaintMerge(tile, newType, area, plane, mergeFlags, undo, mark) return (tile); } - + /* * ---------------------------------------------------------------------------- * @@ -2331,11 +2331,11 @@ paintdone: done: plane->pl_hint = tile; } - + /* * ---------------------------------------------------------------------------- * - * dbMergeType -- + * dbMergeType -- * * The tile 'tp' is to be changed to type 'newtype'. To maintain * maximal horizontal strips, it may be necessary to merge the new @@ -2520,7 +2520,7 @@ dbMergeType(tile, newType, plane, mergeFlags, undo, client) return (tile); } - + /* * ---------------------------------------------------------------------------- * @@ -2794,11 +2794,11 @@ paintdone: done: plane->pl_hint = tile; } - + /* * ---------------------------------------------------------------------------- * - * dbPaintMergeVert -- + * dbPaintMergeVert -- * * The tile 'tp' is to be changed to type 'newtype'. To maintain * maximal vertical strips, it may be necessary to merge the new @@ -2979,12 +2979,12 @@ dbPaintMergeVert(tile, newType, plane, mergeFlags, undo) return (tile); } - + #ifdef PAINTDEBUG /* * ---------------------------------------------------------------------------- * - * dbPaintShowTile -- + * dbPaintShowTile -- * * Show the tile 'tp' in the cell undo->pu_def in a highlighted style, * then print a message, wait for more, and erase the highlights. @@ -3064,7 +3064,7 @@ TiNMSplitY(oldtile, newtile, y, dir, undo) Tile *newxtop, *newxbot; Rect r; - height = TOP(*oldtile) - BOTTOM(*oldtile); + height = TOP(*oldtile) - BOTTOM(*oldtile); tmpdx = (long)(y - BOTTOM(*oldtile)) * (long)(RIGHT(*oldtile) - LEFT(*oldtile)); haschanged = (x = (tmpdx % (long)height) << 1) ? ((undo) ? TRUE : FALSE) : FALSE; x = (x >= height) ? 1 : 0; diff --git a/database/DBpaint2.c b/database/DBpaint2.c index 1254c022..de3a1cbe 100644 --- a/database/DBpaint2.c +++ b/database/DBpaint2.c @@ -3,16 +3,16 @@ * * More paint and erase primitives * - * ********************************************************************* - * * Copyright (C) 1985, 1990 Regents of the University of California. * - * * Permission to use, copy, modify, and distribute this * - * * software and its documentation for any purpose and without * - * * fee is hereby granted, provided that the above copyright * - * * notice appear in all copies. The University of California * - * * makes no representations about the suitability of this * - * * software for any purpose. It is provided "as is" without * - * * express or implied warranty. Export of this software outside * - * * of the United States of America may require an export license. * + * ********************************************************************* + * * Copyright (C) 1985, 1990 Regents of the University of California. * + * * Permission to use, copy, modify, and distribute this * + * * software and its documentation for any purpose and without * + * * fee is hereby granted, provided that the above copyright * + * * notice appear in all copies. The University of California * + * * makes no representations about the suitability of this * + * * software for any purpose. It is provided "as is" without * + * * express or implied warranty. Export of this software outside * + * * of the United States of America may require an export license. * * ********************************************************************* */ @@ -29,7 +29,7 @@ static char rcsid[] __attribute__ ((unused)) = "$Header: /usr/cvsroot/magic-8.0/ #include "utils/hash.h" #include "database/database.h" #include "database/databaseInt.h" - + /* * ---------------------------------------------------------------------------- * DBPaint -- @@ -134,7 +134,7 @@ dbResolveImages(tile, cellDef) return 0; } - + /* * ---------------------------------------------------------------------------- * DBErase -- @@ -166,7 +166,7 @@ DBErase (cellDef, rect, type) if (GEO_SAMERECT(*rect, TiPlaneRect)) allPlane = TRUE; - else + else GEO_EXPAND(rect, 1, &brect); if (type & TT_DIAGONAL) @@ -207,7 +207,7 @@ DBErase (cellDef, rect, type) } } } - + /* * ---------------------------------------------------------------------------- * DBPaintMask -- @@ -280,7 +280,7 @@ DBPaintValid(cellDef, rect, mask, dinfo) /* If any residue of a contact is not in the active layers */ /* list, then paint only the valid residue layers. */ - + for (t = TT_SELECTBASE; t < DBNumUserLayers; t++) if (TTMaskHasType(&mmask, t)) if (DBIsContact(t)) @@ -379,7 +379,7 @@ DBEraseValid(cellDef, rect, mask, dinfo) /* If any residue of a contact is not in the active layers */ /* list, then erase the contact in multiple passes. */ - + for (t = TT_SELECTBASE; t < DBNumUserLayers; t++) if (TTMaskHasType(&mmask, t)) if (DBIsContact(t)) diff --git a/database/DBprop.c b/database/DBprop.c index 0936ec3d..7a72d3e7 100644 --- a/database/DBprop.c +++ b/database/DBprop.c @@ -6,16 +6,16 @@ * CellDef. Maybe in the future properties will be added to other database * objects. * - * ********************************************************************* - * * Copyright (C) 1985, 1990 Regents of the University of California. * - * * Permission to use, copy, modify, and distribute this * - * * software and its documentation for any purpose and without * - * * fee is hereby granted, provided that the above copyright * - * * notice appear in all copies. The University of California * - * * makes no representations about the suitability of this * - * * software for any purpose. It is provided "as is" without * - * * express or implied warranty. Export of this software outside * - * * of the United States of America may require an export license. * + * ********************************************************************* + * * Copyright (C) 1985, 1990 Regents of the University of California. * + * * Permission to use, copy, modify, and distribute this * + * * software and its documentation for any purpose and without * + * * fee is hereby granted, provided that the above copyright * + * * notice appear in all copies. The University of California * + * * makes no representations about the suitability of this * + * * software for any purpose. It is provided "as is" without * + * * express or implied warranty. Export of this software outside * + * * of the United States of America may require an export license. * * ********************************************************************* */ @@ -31,7 +31,7 @@ static char rcsid[] __attribute__ ((unused)) = "$Header: /usr/cvsroot/magic-8.0/ #include "database/database.h" #include "utils/malloc.h" - + /* ---------------------------------------------------------------------------- * *DBPropPut -- @@ -48,8 +48,8 @@ void DBPropPut(cellDef, name, value) CellDef *cellDef; /* Pointer to definition of cell. */ char *name; /* The name of the property desired. */ - ClientData value; /* MUST point to a malloc'ed structure, or NULL. - * This will be freed when the CellDef is freed. + ClientData value; /* MUST point to a malloc'ed structure, or NULL. + * This will be freed when the CellDef is freed. */ { @@ -60,7 +60,7 @@ DBPropPut(cellDef, name, value) /* Honor the NOEDIT flag */ if (cellDef->cd_flags & CDNOEDIT) return; - if (cellDef->cd_props == (ClientData) NULL) + if (cellDef->cd_props == (ClientData) NULL) { cellDef->cd_props = (ClientData) mallocMagic(sizeof(HashTable)); HashInit( (HashTable *) cellDef->cd_props, 8, 0); @@ -75,7 +75,7 @@ DBPropPut(cellDef, name, value) else cellDef->cd_flags |= CDFIXEDBBOX; } - + entry = HashFind(htab, name); oldvalue = (char *)HashGetValue(entry); if (oldvalue != NULL) freeMagic(oldvalue); @@ -84,7 +84,7 @@ DBPropPut(cellDef, name, value) else HashSetValue(entry, value); } - + /* ---------------------------------------------------------------------------- * * DBPropGet -- @@ -127,7 +127,7 @@ done: if (found != (bool *) NULL) *found = haveit; return result; } - + /* ---------------------------------------------------------------------------- * * DBPropEnum -- @@ -153,7 +153,7 @@ DBPropEnum(cellDef, func, cdata) * ClientData value; * ClientData cdata; * { - * -- return 0 to continue, + * -- return 0 to continue, * -- nonzero to abort. * return result; * } @@ -178,7 +178,7 @@ DBPropEnum(cellDef, func, cdata) return 0; } - + /* ---------------------------------------------------------------------------- * * DBPropClearAll -- diff --git a/database/DBtcontact.c b/database/DBtcontact.c index 193be338..478dfd7d 100644 --- a/database/DBtcontact.c +++ b/database/DBtcontact.c @@ -9,16 +9,16 @@ * case when it is a contact. * Type -- TileType stored in a tile * - * ********************************************************************* - * * Copyright (C) 1985, 1990 Regents of the University of California. * - * * Permission to use, copy, modify, and distribute this * - * * software and its documentation for any purpose and without * - * * fee is hereby granted, provided that the above copyright * - * * notice appear in all copies. The University of California * - * * makes no representations about the suitability of this * - * * software for any purpose. It is provided "as is" without * - * * express or implied warranty. Export of this software outside * - * * of the United States of America may require an export license. * + * ********************************************************************* + * * Copyright (C) 1985, 1990 Regents of the University of California. * + * * Permission to use, copy, modify, and distribute this * + * * software and its documentation for any purpose and without * + * * fee is hereby granted, provided that the above copyright * + * * notice appear in all copies. The University of California * + * * makes no representations about the suitability of this * + * * software for any purpose. It is provided "as is" without * + * * express or implied warranty. Export of this software outside * + * * of the United States of America may require an export license. * * ********************************************************************* */ @@ -63,7 +63,7 @@ void dbTechMatchResidues(); void dbTechAddStackedContacts(); int dbTechAddOneStackedContact(); - + /* * ---------------------------------------------------------------------------- * @@ -98,7 +98,7 @@ DBTechInitContact() dbNumContacts = 0; } - + /* * ---------------------------------------------------------------------------- * @@ -155,7 +155,7 @@ DBTechInitContact() * syntax as the "contact" statement but describe a composite * image such as a transistor or capacitor formed by layers on * different planes. - * + * * Results: * FALSE on error, TRUE if successful. * @@ -404,7 +404,7 @@ dbTechAddOneStackedContact(type1, type2) /* The home plane of the contact is the plane of the */ /* first shared residue found. */ - + for (sres = TT_TECHDEPBASE; sres < DBNumUserLayers; sres++) if (TTMaskHasType(&ttshared, sres)) { @@ -489,7 +489,7 @@ DBMaskAddStacking(mask) } } - + /* * ---------------------------------------------------------------------------- * @@ -540,7 +540,7 @@ dbTechContactResidues(argc, argv, contactType) DBTypeLongName(residueType)); return -1; } - + /* * Make sure the residue is on the same or an adjacent plane * to the contact's home type. @@ -596,9 +596,9 @@ dbTechContactResidues(argc, argv, contactType) /* Ignore self */ TTMaskClearType(&mmask, contactType); - + if (!TTMaskEqual(&mmask, &DBZeroTypeBits)) - { + { TxPrintf("Contact residues for %s identical to those for ", DBTypeLongName(contactType)); @@ -607,7 +607,7 @@ dbTechContactResidues(argc, argv, contactType) TxPrintf("%s ", DBTypeLongName(imageType)); TxPrintf("\n"); - } + } /* All clear to set the residue bitmask for this contact type */ diff --git a/database/DBtech.c b/database/DBtech.c index be2a8077..430ccf93 100644 --- a/database/DBtech.c +++ b/database/DBtech.c @@ -6,16 +6,16 @@ * of the general-purpose exported TileTypeBitMasks, and * the "connect" section. * - * ********************************************************************* - * * Copyright (C) 1985, 1990 Regents of the University of California. * - * * Permission to use, copy, modify, and distribute this * - * * software and its documentation for any purpose and without * - * * fee is hereby granted, provided that the above copyright * - * * notice appear in all copies. The University of California * - * * makes no representations about the suitability of this * - * * software for any purpose. It is provided "as is" without * - * * express or implied warranty. Export of this software outside * - * * of the United States of America may require an export license. * + * ********************************************************************* + * * Copyright (C) 1985, 1990 Regents of the University of California. * + * * Permission to use, copy, modify, and distribute this * + * * software and its documentation for any purpose and without * + * * fee is hereby granted, provided that the above copyright * + * * notice appear in all copies. The University of California * + * * makes no representations about the suitability of this * + * * software for any purpose. It is provided "as is" without * + * * express or implied warranty. Export of this software outside * + * * of the United States of America may require an export license. * * ********************************************************************* */ @@ -80,7 +80,7 @@ DBTechInit() /* Initialization of bezier coefficients for font vectors */ DBFontInitCurves(); } - + /* * ---------------------------------------------------------------------------- @@ -115,7 +115,7 @@ DBTechSetTech(sectionName, argc, argv) { if (StrIsInt(argv[1])) { - TechFormatVersion = atoi(argv[1]); + TechFormatVersion = atoi(argv[1]); return TRUE; } else @@ -139,7 +139,7 @@ DBTechSetTech(sectionName, argc, argv) * DBTechInitVersion -- * * Clean up memory allocated by the "version" section - * + * * ---------------------------------------------------------------------------- */ @@ -209,7 +209,7 @@ usage: TechError("Badly formed version line\nUsage: {version text}|{description text}\n"); return FALSE; } - + /* * ---------------------------------------------------------------------------- * @@ -238,7 +238,7 @@ DBTechInitConnect() DBAllConnPlanes[i] = 0; } } - + /* * ---------------------------------------------------------------------------- * @@ -287,7 +287,7 @@ DBTechAddConnect(sectionName, argc, argv) return TRUE; } - + /* * ---------------------------------------------------------------------------- * diff --git a/database/DBtechname.c b/database/DBtechname.c index 152415b4..df052581 100644 --- a/database/DBtechname.c +++ b/database/DBtechname.c @@ -6,16 +6,16 @@ * DB*ShortName(), * the procedures in this file MUST be called * after DBTechFinalType() has been called. * - * ********************************************************************* - * * Copyright (C) 1985, 1990 Regents of the University of California. * - * * Permission to use, copy, modify, and distribute this * - * * software and its documentation for any purpose and without * - * * fee is hereby granted, provided that the above copyright * - * * notice appear in all copies. The University of California * - * * makes no representations about the suitability of this * - * * software for any purpose. It is provided "as is" without * - * * express or implied warranty. Export of this software outside * - * * of the United States of America may require an export license. * + * ********************************************************************* + * * Copyright (C) 1985, 1990 Regents of the University of California. * + * * Permission to use, copy, modify, and distribute this * + * * software and its documentation for any purpose and without * + * * fee is hereby granted, provided that the above copyright * + * * notice appear in all copies. The University of California * + * * makes no representations about the suitability of this * + * * software for any purpose. It is provided "as is" without * + * * express or implied warranty. Export of this software outside * + * * of the United States of America may require an export license. * * ********************************************************************* */ @@ -39,7 +39,7 @@ static char rcsid[] __attribute__ ((unused)) = "$Header: /usr/cvsroot/magic-8.0/ #include "textio/textio.h" #include "utils/malloc.h" - + /* * ---------------------------------------------------------------------------- * @@ -203,7 +203,7 @@ DBTechNameTypes(typename, bitmask) return (type < DBNumUserLayers) ? type : -2; } - + /* * ---------------------------------------------------------------------------- * @@ -267,7 +267,7 @@ DBTechNamePlane(planename) { return ((spointertype) dbTechNameLookup(planename, &dbPlaneNameLists)); } - + /* * ---------------------------------------------------------------------------- * @@ -304,7 +304,7 @@ DBTechNoisyNamePlane(planename) return (pNum); } - + /* * ---------------------------------------------------------------------------- * @@ -365,7 +365,7 @@ DBPlaneShortName(pNum) return (DBPlaneLongNameTbl[pNum]); return ("???"); } - + /* * ---------------------------------------------------------------------------- * @@ -409,7 +409,7 @@ DBTechTypesToPlanes(mask) retMask = planeMask & noCellMask; return retMask; } - + /* * ---------------------------------------------------------------------------- @@ -453,7 +453,7 @@ DBTechPrintTypes(mask, dolist) { if (((TileType)(spointertype) p->sn_value) == i) { - if (dolist) + if (dolist) { if (firstname) keepname = p->sn_name; else if (strlen(p->sn_name) > strlen(keepname)) @@ -505,7 +505,7 @@ DBTechPrintTypes(mask, dolist) { if (((TileType)(spointertype) p->sn_value) == dtp->dt_type) { - if (dolist) + if (dolist) { if (firstname) keepname = p->sn_name; else if (strlen(p->sn_name) > strlen(keepname)) @@ -547,7 +547,7 @@ DBTechPrintTypes(mask, dolist) } } - + /* * ---------------------------------------------------------------------------- * @@ -761,7 +761,7 @@ DBTechNameMask0(layers, mask, noisy) } else { - TileType t; + TileType t; for (t = TT_TECHDEPBASE; t < DBNumUserLayers; t++) if (TTMaskHasType(&m2, t)) diff --git a/database/DBtechtype.c b/database/DBtechtype.c index b1d05b7c..5eeb9d1f 100644 --- a/database/DBtechtype.c +++ b/database/DBtechtype.c @@ -4,16 +4,16 @@ * Creation of tile and plane types and their names. * Lookup procedures are in DBtechname.c * - * ********************************************************************* - * * Copyright (C) 1985, 1990 Regents of the University of California. * - * * Permission to use, copy, modify, and distribute this * - * * software and its documentation for any purpose and without * - * * fee is hereby granted, provided that the above copyright * - * * notice appear in all copies. The University of California * - * * makes no representations about the suitability of this * - * * software for any purpose. It is provided "as is" without * - * * express or implied warranty. Export of this software outside * - * * of the United States of America may require an export license. * + * ********************************************************************* + * * Copyright (C) 1985, 1990 Regents of the University of California. * + * * Permission to use, copy, modify, and distribute this * + * * software and its documentation for any purpose and without * + * * fee is hereby granted, provided that the above copyright * + * * notice appear in all copies. The University of California * + * * makes no representations about the suitability of this * + * * software for any purpose. It is provided "as is" without * + * * express or implied warranty. Export of this software outside * + * * of the United States of America may require an export license. * * ********************************************************************* */ @@ -66,7 +66,7 @@ TileTypeBitMask DBUserLayerBits; TileTypeBitMask DBActiveLayerBits; /* Layers that are locked */ TileTypeBitMask DBTechActiveLayerBits; /* Layers marked locked in the techfile */ - + /* Table of default, builtin planes */ DefaultPlane dbTechDefaultPlanes[] = { @@ -97,7 +97,7 @@ DefaultType dbTechDefaultTypes[] = /* Forward declarations */ char *dbTechNameAdd(); NameList *dbTechNameAddOne(); - + /* * ---------------------------------------------------------------------------- * @@ -152,7 +152,7 @@ DBTechInitPlane() DBNumPlanes = PL_TECHDEPBASE; } - + /* * ---------------------------------------------------------------------------- @@ -394,7 +394,7 @@ DBTechAddAlias(sectionName, argc, argv) return TRUE; } - + /* * ---------------------------------------------------------------------------- * @@ -479,7 +479,7 @@ DBTechAddType(sectionName, argc, argv) return TRUE; } - + /* * ---------------------------------------------------------------------------- @@ -625,7 +625,7 @@ dbTechNameLookupExact(str, table) return ((ClientData) -2); } - + /* * ---------------------------------------------------------------------------- * @@ -708,7 +708,7 @@ dbTechNameLookup(str, table) /*NOTREACHED*/ } - + /* * ---------------------------------------------------------------------------- * @@ -774,7 +774,7 @@ dbTechNameAdd(name, cdata, ptable, alias) primary->sn_primary = TRUE; return (first); } - + /* * ---------------------------------------------------------------------------- * diff --git a/database/DBtiles.c b/database/DBtiles.c index 347ba461..1996b6bd 100644 --- a/database/DBtiles.c +++ b/database/DBtiles.c @@ -5,16 +5,16 @@ * This includes area searching and all other primitives that * need to know what lives in a tile body. * - * ********************************************************************* - * * Copyright (C) 1985, 1990 Regents of the University of California. * - * * Permission to use, copy, modify, and distribute this * - * * software and its documentation for any purpose and without * - * * fee is hereby granted, provided that the above copyright * - * * notice appear in all copies. The University of California * - * * makes no representations about the suitability of this * - * * software for any purpose. It is provided "as is" without * - * * express or implied warranty. Export of this software outside * - * * of the United States of America may require an export license. * + * ********************************************************************* + * * Copyright (C) 1985, 1990 Regents of the University of California. * + * * Permission to use, copy, modify, and distribute this * + * * software and its documentation for any purpose and without * + * * fee is hereby granted, provided that the above copyright * + * * notice appear in all copies. The University of California * + * * makes no representations about the suitability of this * + * * software for any purpose. It is provided "as is" without * + * * express or implied warranty. Export of this software outside * + * * of the United States of America may require an export license. * * ********************************************************************* */ @@ -133,7 +133,7 @@ nm_enum: if (SigInterruptPending) return (1); - /* Check if the tile is in the (nonmanhattan) area, and continue */ + /* Check if the tile is in the (nonmanhattan) area, and continue */ /* the tile enumeration if it is not. */ /* Watch for calculations involving (M)INFINITY in tile (tp)! */ @@ -200,7 +200,7 @@ nm_enum: /* Ignore sub-integer slivers */ if (f4 != DLONG_MAX) f4 -= rmax; if (f3 != DLONG_MAX) f3 += rmax; - + if (ttype & TT_DIRECTION) { if ((f2 < f3) && (f1 > f4)) @@ -219,7 +219,7 @@ nm_enum: /* Ignore sub-integer slivers */ if (f4 != DLONG_MAX) f4 += rmax; if (f3 != DLONG_MAX) f3 -= rmax; - + if (ttype & TT_DIRECTION) { if ((f2 > f3) && (f1 < f4)) @@ -289,12 +289,12 @@ enum_next: tp = tpnew; goto nm_enum; } - } + } /* Each iteration returns one tile further to the left */ while (LEFT(tp) > rect->r_xbot) { - if (BOTTOM(tp) <= rect->r_ybot) + if (BOTTOM(tp) <= rect->r_ybot) return (0); tpnew = LB(tp); tp = BL(tp); @@ -312,7 +312,7 @@ enum_next: return (0); } - + /* * -------------------------------------------------------------------- * @@ -448,12 +448,12 @@ enumerate: tp = tpnew; goto enumerate; } - } + } /* Each iteration returns one tile further to the left */ while (LEFT(tp) > rect->r_xbot) { - if (BOTTOM(tp) <= rect->r_ybot) + if (BOTTOM(tp) <= rect->r_ybot) return (0); tpnew = LB(tp); tp = BL(tp); @@ -471,7 +471,7 @@ enumerate: return (0); } - + /* * -------------------------------------------------------------------- * @@ -633,7 +633,7 @@ enumerate: } return (0); } - + /* * -------------------------------------------------------------------- * @@ -700,7 +700,7 @@ enumerate: /* Nothing */; } } - + /* * -------------------------------------------------------------------- * @@ -717,14 +717,14 @@ enumerate: * None. * * Side effects: - * Deallocates a lot of memory. + * Deallocates a lot of memory. * * *** WARNING *** * - * This procedure uses a carfully constructed non-recursive area + * This procedure uses a carfully constructed non-recursive area * enumeration algorithm. Care is taken to not access a tile that has * been deallocated. The only exception is for a tile that has just been - * passed to free(), but no more calls to free() or malloc() have been made. + * passed to free(), but no more calls to free() or malloc() have been made. * Magic's malloc allows this. * * -------------------------------------------------------------------- @@ -762,7 +762,7 @@ enumerate: /* Each iteration returns one tile further to the right */ while (RIGHT(tp) < rect->r_xtop) { - TiFree(tp); + TiFree(tp); tpnew = RT(tp); tp = TR(tp); if (CLIP_TOP(tpnew) <= CLIP_TOP(tp) && BOTTOM(tpnew) < rect->r_ytop) @@ -772,7 +772,7 @@ enumerate: } } - TiFree(tp); + TiFree(tp); /* At right edge -- walk up to next tile along the right edge */ tp = RT(tp); if (BOTTOM(tp) < rect->r_ytop) { @@ -780,7 +780,7 @@ enumerate: } } } - + /* * -------------------------------------------------------------------- * @@ -793,7 +793,7 @@ enumerate: * None. * * Side effects: - * Deallocates a lot of memory. + * Deallocates a lot of memory. * * -------------------------------------------------------------------- */ @@ -844,7 +844,7 @@ int dbDeleteCellUse(CellUse *use, ClientData arg) if (defuses == use) { if (lastuse) - lastuse->cu_nextuse = defuses->cu_nextuse; + lastuse->cu_nextuse = defuses->cu_nextuse; else use->cu_def->cd_parents = defuses->cu_nextuse; defuses->cu_nextuse = (CellUse *)NULL; @@ -858,7 +858,7 @@ int dbDeleteCellUse(CellUse *use, ClientData arg) return 0; } - + /* * -------------------------------------------------------------------- * @@ -966,7 +966,7 @@ dbCheckMaxHFunc(tile, dbc) return (0); } - + /* * -------------------------------------------------------------------- * diff --git a/database/DBtimestmp.c b/database/DBtimestmp.c index 21683065..aaf442be 100644 --- a/database/DBtimestmp.c +++ b/database/DBtimestmp.c @@ -3,16 +3,16 @@ * Provides routines to help manage the timestamps stored in * cell definitions. * - * ********************************************************************* - * * Copyright (C) 1985, 1990 Regents of the University of California. * - * * Permission to use, copy, modify, and distribute this * - * * software and its documentation for any purpose and without * - * * fee is hereby granted, provided that the above copyright * - * * notice appear in all copies. The University of California * - * * makes no representations about the suitability of this * - * * software for any purpose. It is provided "as is" without * - * * express or implied warranty. Export of this software outside * - * * of the United States of America may require an export license. * + * ********************************************************************* + * * Copyright (C) 1985, 1990 Regents of the University of California. * + * * Permission to use, copy, modify, and distribute this * + * * software and its documentation for any purpose and without * + * * fee is hereby granted, provided that the above copyright * + * * notice appear in all copies. The University of California * + * * makes no representations about the suitability of this * + * * software for any purpose. It is provided "as is" without * + * * express or implied warranty. Export of this software outside * + * * of the United States of America may require an export license. * * ********************************************************************* */ @@ -84,7 +84,7 @@ static char rcsid[] __attribute__ ((unused)) = "$Header: /usr/cvsroot/magic-8.0/ int timestamp; - + /* * ---------------------------------------------------------------------------- * DBFixMismatch -- @@ -188,7 +188,7 @@ DBFixMismatch() if (redisplay) WindAreaChanged((MagWindow *) NULL, (Rect *) NULL); } - + /* * ---------------------------------------------------------------------------- * DBUpdateStamps -- @@ -252,11 +252,11 @@ dbStampFunc(cellDef) return 0; } - + /* * ---------------------------------------------------------------------------- * DBStampMismatch -- - * + * * This routine is invoked when a mismatch is discovered for a * cell. The parameter wrongArea tells what the cell's bounding * box used to be (but the timestamp mismatch means this was diff --git a/database/DBtpaint.c b/database/DBtpaint.c index 6e584088..9e8ed254 100644 --- a/database/DBtpaint.c +++ b/database/DBtpaint.c @@ -3,16 +3,16 @@ * * Management of composition rules and the paint/erase tables. * - * ********************************************************************* - * * Copyright (C) 1985, 1990 Regents of the University of California. * - * * Permission to use, copy, modify, and distribute this * - * * software and its documentation for any purpose and without * - * * fee is hereby granted, provided that the above copyright * - * * notice appear in all copies. The University of California * - * * makes no representations about the suitability of this * - * * software for any purpose. It is provided "as is" without * - * * express or implied warranty. Export of this software outside * - * * of the United States of America may require an export license. * + * ********************************************************************* + * * Copyright (C) 1985, 1990 Regents of the University of California. * + * * Permission to use, copy, modify, and distribute this * + * * software and its documentation for any purpose and without * + * * fee is hereby granted, provided that the above copyright * + * * notice appear in all copies. The University of California * + * * makes no representations about the suitability of this * + * * software for any purpose. It is provided "as is" without * + * * express or implied warranty. Export of this software outside * + * * of the United States of America may require an export license. * * ********************************************************************* */ @@ -64,7 +64,7 @@ extern void dbTechBitTypeInit(); bool dbTechAddPaintErase(); bool dbTechSaveCompose(); - + /* * ---------------------------------------------------------------------------- * @@ -108,7 +108,7 @@ DBTechInitCompose() stype = dtype = &(DBEraseResultTbl[0][0][0]); for (ps = 0; ps < TT_MAXTYPES; ps++) - *dtype++ = (PaintResultType)ps; + *dtype++ = (PaintResultType)ps; for (ps = 1; ps < PL_MAXTYPES * TT_MAXTYPES; ps++) { memcpy((void *)dtype, (void *)stype, (size_t)TT_MAXTYPES @@ -245,7 +245,7 @@ DBTechInitCompose() for (s = 0; s < DBNumTypes; s++) DBSpecialResultTbl[s] = TT_CHECKSUBCELL; } - + /* * ---------------------------------------------------------------------------- * @@ -258,7 +258,7 @@ DBTechInitCompose() * * bitToType[i] and bitToType[j] combine to yield bitToType[i | j] * - * Also (unless composeFlag is set) erasing bitToType[j] from bitToType[i] + * Also (unless composeFlag is set) erasing bitToType[j] from bitToType[i] * gives bitToType[i & (~j)], * i.e., it clears all of the j-type material out of the i-type material. * The bitToType[k] for which k's binary representation has only a single @@ -302,7 +302,7 @@ dbTechBitTypeInit(bitToType, n, pNum, composeFlag) } } -/* Returns nonzero if exactly one bit set */ +/* Returns nonzero if exactly one bit set */ int dbIsPrimary(n) @@ -320,8 +320,8 @@ dbIsPrimary(n) return (bitCount==1); } - - + + /* * ---------------------------------------------------------------------------- * @@ -440,7 +440,7 @@ DBTechAddCompose(sectionName, argc, argv) return TRUE; } - + /* * ---------------------------------------------------------------------------- * @@ -520,7 +520,7 @@ dbTechSaveCompose(ruleType, t, argc, argv) return TRUE; } - + #if 0 /* deprecated function (5/11/04) */ /* @@ -571,7 +571,7 @@ dbTechCheckImages(t, r, s) } #endif /* 0 */ - + /* * ---------------------------------------------------------------------------- * @@ -682,7 +682,7 @@ dbTechAddPaintErase(type, sectionName, argc, argv) return TRUE; } - + /* * ---------------------------------------------------------------------------- * @@ -733,7 +733,7 @@ dbTechCheckPaint(where) } } } - + /* * ---------------------------------------------------------------------------- * diff --git a/database/DBtpaint2.c b/database/DBtpaint2.c index 4f42de66..846850e0 100644 --- a/database/DBtpaint2.c +++ b/database/DBtpaint2.c @@ -4,16 +4,16 @@ * Default composition rules. * Pretty complicated, unfortunately, so it's in a separate file. * - * ********************************************************************* - * * Copyright (C) 1985, 1990 Regents of the University of California. * - * * Permission to use, copy, modify, and distribute this * - * * software and its documentation for any purpose and without * - * * fee is hereby granted, provided that the above copyright * - * * notice appear in all copies. The University of California * - * * makes no representations about the suitability of this * - * * software for any purpose. It is provided "as is" without * - * * express or implied warranty. Export of this software outside * - * * of the United States of America may require an export license. * + * ********************************************************************* + * * Copyright (C) 1985, 1990 Regents of the University of California. * + * * Permission to use, copy, modify, and distribute this * + * * software and its documentation for any purpose and without * + * * fee is hereby granted, provided that the above copyright * + * * notice appear in all copies. The University of California * + * * makes no representations about the suitability of this * + * * software for any purpose. It is provided "as is" without * + * * express or implied warranty. Export of this software outside * + * * of the United States of America may require an export license. * * ********************************************************************* */ @@ -57,7 +57,7 @@ extern void dbComposeSavedRules(); extern void dbComposeCompose(); extern void dbComposeDecompose(); - + /* * ---------------------------------------------------------------------------- * @@ -123,7 +123,7 @@ DBTechFinalCompose() /* dbTechPrintPaint("DBTechFinalCompose", TRUE, FALSE); */ /* dbTechPrintPaint("DBTechFinalCompose", FALSE, FALSE); */ } - + /* * ---------------------------------------------------------------------------- * @@ -222,7 +222,7 @@ dbComposePaintAllImages() } } - + /* * ---------------------------------------------------------------------------- * @@ -340,7 +340,7 @@ dbComposeContacts() } } - + /* * ---------------------------------------------------------------------------- * dbComposePaintContact -- @@ -550,7 +550,7 @@ dbComposePaintContact(lpImage, lpPaint) * ---------------------------------------------------------------------------- */ -bool +bool dbComposeSubsetResidues(lpImage, lpErase, outMask) LayerInfo *lpImage, *lpErase; TileTypeBitMask *outMask; @@ -613,7 +613,7 @@ dbComposeSubsetResidues(lpImage, lpErase, outMask) return rval; } - + /* * ---------------------------------------------------------------------------- * dbComposeEraseContact -- @@ -645,7 +645,7 @@ dbComposeEraseContact(lpImage, lpErase) for (pNum = PL_TECHDEPBASE; pNum < DBNumPlanes; pNum++) if (PlaneMaskHasPlane(lpErase->l_pmask, pNum)) if ((lpImage->l_type < DBNumUserLayers) - || (pNum == DBPlane(lpImage->l_type))) + || (pNum == DBPlane(lpImage->l_type))) SETERASE(lpImage->l_type, lpErase->l_type, pNum, TT_SPACE); /* Erasing self should always leave space; otherwise */ @@ -700,7 +700,7 @@ dbComposeEraseContact(lpImage, lpErase) itype = DBPlaneToResidue(lpImage->l_type, pNum); SETERASE(lpImage->l_type, lpErase->l_type, pNum, itype); } - + } /* Diagnostic (to be removed or commented out) */ @@ -828,7 +828,7 @@ dbComposeSavedRules() rule = &dbSavedRules[n]; lpContact = &dbLayerInfo[rule->r_result]; imageType = lpContact->l_type; - + for (pair = rule->r_pairs; pair < &rule->r_pairs[rule->r_npairs]; pair++) { @@ -842,7 +842,7 @@ dbComposeSavedRules() } } } - + /* * ---------------------------------------------------------------------------- * dbComposeDecompose -- @@ -886,7 +886,7 @@ dbComposeDecompose(imageType, componentType, remainingType) dbSetEraseEntry(imageType, componentType, pNum, resultType); TTMaskSetType(&dbNotDefaultEraseTbl[imageType], componentType); } - + /* * ---------------------------------------------------------------------------- * dbComposeCompose -- diff --git a/database/DBundo.c b/database/DBundo.c index 0b3bc9a8..4845d9e8 100644 --- a/database/DBundo.c +++ b/database/DBundo.c @@ -3,16 +3,16 @@ * * Interface to the undo package for the database. * - * ********************************************************************* - * * Copyright (C) 1985, 1990 Regents of the University of California. * - * * Permission to use, copy, modify, and distribute this * - * * software and its documentation for any purpose and without * - * * fee is hereby granted, provided that the above copyright * - * * notice appear in all copies. The University of California * - * * makes no representations about the suitability of this * - * * software for any purpose. It is provided "as is" without * - * * express or implied warranty. Export of this software outside * - * * of the United States of America may require an export license. * + * ********************************************************************* + * * Copyright (C) 1985, 1990 Regents of the University of California. * + * * Permission to use, copy, modify, and distribute this * + * * software and its documentation for any purpose and without * + * * fee is hereby granted, provided that the above copyright * + * * notice appear in all copies. The University of California * + * * makes no representations about the suitability of this * + * * software for any purpose. It is provided "as is" without * + * * express or implied warranty. Export of this software outside * + * * of the United States of America may require an export license. * * ********************************************************************* */ @@ -107,7 +107,7 @@ bool dbUndoUndid; extern void dbUndoEdit(); - + /* * ---------------------------------------------------------------------------- * @@ -204,7 +204,7 @@ DBUndoReset(celldef) } } - + /* * ---------------------------------------------------------------------------- * @@ -229,7 +229,7 @@ dbUndoInit() dbUndoAreaChanged.r_xbot = dbUndoAreaChanged.r_xtop = 0; dbUndoAreaChanged.r_ybot = dbUndoAreaChanged.r_ytop = 0; } - + /* * ============================================================================ * @@ -413,7 +413,7 @@ endPaintBack: (void) GeoInclude(&up->pue_rect, &dbUndoAreaChanged); (void) DRCCheckThis(dbUndoLastCell, TT_CHECKPAINT, &up->pue_rect); } - + /* * ============================================================================ * @@ -485,7 +485,7 @@ DBUndoPutLabel(cellDef, lab) lup->lue_offset = lab->lab_offset; strcpy(lup->lue_text, lab->lab_text); } - + /* * ---------------------------------------------------------------------------- * @@ -528,7 +528,7 @@ DBUndoEraseLabel(cellDef, lab) lup->lue_offset = lab->lab_offset; strcpy(lup->lue_text, lab->lab_text); } - + /* * ---------------------------------------------------------------------------- * @@ -585,7 +585,7 @@ dbUndoLabelBack(up) if (up->lue_type == TT_SPACE) dbUndoUndid = TRUE; } - + /* * ============================================================================ * @@ -670,7 +670,7 @@ DBUndoCellUse(use, action) up->cue_flags = use->cu_flags; strcpy(up->cue_id, use->cu_id); } - + /* * ---------------------------------------------------------------------------- * @@ -703,7 +703,7 @@ dbUndoCellForw(up) use->cu_expandMask = up->cue_expandMask; use->cu_bbox = up->cue_bbox; use->cu_extended = up->cue_extended; - use->cu_flags = up->cue_flags; + use->cu_flags = up->cue_flags; use->cu_id = StrDup((char **) NULL, up->cue_id); (void) DBLinkCell(use, up->cue_parent); DBPlaceCell(use, up->cue_parent); @@ -747,7 +747,7 @@ dbUndoCellForw(up) freeMagic(use->cu_id); use->cu_id = (char *) NULL; break; - + case UNDO_CELL_LOCKDOWN: use = findUse(up, TRUE); use->cu_flags = up->cue_flags; @@ -772,7 +772,7 @@ dbUndoCellBack(up) use->cu_expandMask = up->cue_expandMask; use->cu_bbox = up->cue_bbox; use->cu_extended = up->cue_extended; - use->cu_flags = up->cue_flags; + use->cu_flags = up->cue_flags; use->cu_id = StrDup((char **) NULL, up->cue_id); SigDisableInterrupts (); (void) DBLinkCell(use, up->cue_parent); @@ -827,7 +827,7 @@ dbUndoCellBack(up) break; } } - + /* * ---------------------------------------------------------------------------- * @@ -848,7 +848,7 @@ dbUndoCellBack(up) * * ---------------------------------------------------------------------------- */ - + CellUse * findUse(up, matchName) cellUE *up; @@ -874,7 +874,7 @@ findUse(up, matchName) ASSERT(FALSE, "findUse: use == NULL"); return (CellUse *) NULL; } - + /* * ============================================================================ * @@ -941,7 +941,7 @@ dbUndoEdit(new) strcpy(up->eue_name, new->cd_name); dbUndoLastCell = new; } - + /* * ---------------------------------------------------------------------------- * @@ -968,7 +968,7 @@ dbUndoOpenCell(eup) ASSERT(newDef != (CellDef *) NULL, "dbUndoOpenCell"); dbUndoLastCell = newDef; } - + /* * ---------------------------------------------------------------------------- * diff --git a/database/databaseInt.h b/database/databaseInt.h index 5756c458..5f631cfb 100644 --- a/database/databaseInt.h +++ b/database/databaseInt.h @@ -3,16 +3,16 @@ * * Definitions internal to the database module. * - * ********************************************************************* - * * Copyright (C) 1985, 1990 Regents of the University of California. * - * * Permission to use, copy, modify, and distribute this * - * * software and its documentation for any purpose and without * - * * fee is hereby granted, provided that the above copyright * - * * notice appear in all copies. The University of California * - * * makes no representations about the suitability of this * - * * software for any purpose. It is provided "as is" without * - * * express or implied warranty. Export of this software outside * - * * of the United States of America may require an export license. * + * ********************************************************************* + * * Copyright (C) 1985, 1990 Regents of the University of California. * + * * Permission to use, copy, modify, and distribute this * + * * software and its documentation for any purpose and without * + * * fee is hereby granted, provided that the above copyright * + * * notice appear in all copies. The University of California * + * * makes no representations about the suitability of this * + * * software for any purpose. It is provided "as is" without * + * * express or implied warranty. Export of this software outside * + * * of the United States of America may require an export license. * * ********************************************************************* * * Needs to include: magic.h, tile.h, database.h @@ -139,7 +139,7 @@ extern DefaultType dbTechDefaultTypes[]; /* Builtin types */ * be painted with the type when that contact is painted over empty * space. * - * The LayerInfo structure is used primarily to store information about + * The LayerInfo structure is used primarily to store information about * the various types of contacts, although it contains degenerate information * about non-contact types as well. */ @@ -149,7 +149,7 @@ typedef struct TileType l_type; /* Back-index into dbLayerInfo[] */ bool l_isContact; /* TRUE if this layer has images */ - /* Residues of this contact on its contacted planes. */ + /* Residues of this contact on its contacted planes. */ TileTypeBitMask l_residues; /* Mask of connected planes, including this one */ diff --git a/database/fonts.h b/database/fonts.h index fc778e1c..bee3e5ec 100644 --- a/database/fonts.h +++ b/database/fonts.h @@ -26,7 +26,7 @@ typedef struct fontchar Point *fc_points; FontCharPtr fc_next; } FontChar; - + typedef struct { char *mf_name; diff --git a/dbwind/DBWbuttons.c b/dbwind/DBWbuttons.c index f4319b5e..4c57ae73 100644 --- a/dbwind/DBWbuttons.c +++ b/dbwind/DBWbuttons.c @@ -7,16 +7,16 @@ * between them. This file also provides the default button handler, * which is used to move the box. * - * ********************************************************************* - * * Copyright (C) 1985, 1990 Regents of the University of California. * - * * Permission to use, copy, modify, and distribute this * - * * software and its documentation for any purpose and without * - * * fee is hereby granted, provided that the above copyright * - * * notice appear in all copies. The University of California * - * * makes no representations about the suitability of this * - * * software for any purpose. It is provided "as is" without * - * * express or implied warranty. Export of this software outside * - * * of the United States of America may require an export license. * + * ********************************************************************* + * * Copyright (C) 1985, 1990 Regents of the University of California. * + * * Permission to use, copy, modify, and distribute this * + * * software and its documentation for any purpose and without * + * * fee is hereby granted, provided that the above copyright * + * * notice appear in all copies. The University of California * + * * makes no representations about the suitability of this * + * * software for any purpose. It is provided "as is" without * + * * express or implied warranty. Export of this software outside * + * * of the United States of America may require an export license. * * ********************************************************************* */ @@ -71,7 +71,7 @@ void (*DBWButtonCurrentProc)(); static int buttonCorner = TOOL_ILG; /* Nearest corner when button went * down. */ - + /* * ---------------------------------------------------------------------------- * @@ -91,7 +91,7 @@ static int buttonCorner = TOOL_ILG; /* Nearest corner when button went * a call to DBWChangeButtonHandler) each button press or release * in a layout window causes proc to be invoked as follows: * - * int + * int * proc(w, cmd) * MagWindow *w; * TxCommand *cmd; @@ -138,7 +138,7 @@ DBWAddButtonHandler(name, proc, cursor, doc) TxError(" table. Get your Magic wizard to increase the size of\n"); TxError(" MAXBUTTONHANDLERS in DBWbuttons.c\n"); } - + /* * ---------------------------------------------------------------------------- * @@ -235,7 +235,7 @@ DBWChangeButtonHandler(name) DBWButtonCurrentProc = dbwButtonProcs[dbwButtonCurrentIndex]; return oldName; } - + /* * ---------------------------------------------------------------------------- * @@ -260,7 +260,7 @@ DBWPrintButtonDoc() TxPrintf("%s", dbwButtonDoc[dbwButtonCurrentIndex]); } - + /* * ---------------------------------------------------------------------------- * dbwButtonSetCursor -- @@ -312,7 +312,7 @@ dbwButtonSetCursor(button, corner) } } - + /* * ---------------------------------------------------------------------------- * diff --git a/dbwind/DBWcommands.c b/dbwind/DBWcommands.c index 7559b1f6..6a5150e4 100644 --- a/dbwind/DBWcommands.c +++ b/dbwind/DBWcommands.c @@ -3,16 +3,16 @@ * * This file contains the dispatch tables for layout commands. * - * ********************************************************************* - * * Copyright (C) 1985, 1990 Regents of the University of California. * - * * Permission to use, copy, modify, and distribute this * - * * software and its documentation for any purpose and without * - * * fee is hereby granted, provided that the above copyright * - * * notice appear in all copies. The University of California * - * * makes no representations about the suitability of this * - * * software for any purpose. It is provided "as is" without * - * * express or implied warranty. Export of this software outside * - * * of the United States of America may require an export license. * + * ********************************************************************* + * * Copyright (C) 1985, 1990 Regents of the University of California. * + * * Permission to use, copy, modify, and distribute this * + * * software and its documentation for any purpose and without * + * * fee is hereby granted, provided that the above copyright * + * * notice appear in all copies. The University of California * + * * makes no representations about the suitability of this * + * * software for any purpose. It is provided "as is" without * + * * express or implied warranty. Export of this software outside * + * * of the United States of America may require an export license. * * ********************************************************************* */ @@ -134,7 +134,7 @@ extern void CmdAutoLef(); /* * Wrapper commands for ext2spice and ext2sim - */ + */ #ifdef MAGIC_WRAPPER #ifdef EXT2SIM_AUTO @@ -158,7 +158,7 @@ extern void CmdHistory(); #endif /* - * Commands only in the Lawrence Livermore Version + * Commands only in the Lawrence Livermore Version */ #ifdef LLNL @@ -264,10 +264,10 @@ DBWInitCommands() "crash save|recover [file]\n" " recover the crash file \"file\", or the first\n" " crash file discovered.", - CmdCrash, FALSE); + CmdCrash, FALSE); WindAddCommand(DBWclientID, "crosshair x y | off enable and move or disable the screen crosshair", - CmdCrosshair, FALSE); + CmdCrosshair, FALSE); WindAddCommand(DBWclientID, "delete delete everything in selection", CmdDelete, FALSE); @@ -500,7 +500,7 @@ DBWInitCommands() WindAddCommand(DBWclientID, "spliterase dir [layer] erase layers from diagonal corner dir of the\n\ edit box", - CmdSplitErase, FALSE); + CmdSplitErase, FALSE); #ifdef MAGIC_WRAPPER /* Add the Tcl commands for exttospice, exttosim, and aliases ext2spice, ext2sim */ @@ -586,7 +586,7 @@ DBWInitCommands() WindAddCommand(DBWclientID, "plot type [args] hardcopy plotting; type \"plot help\"\n\ for information on types and args", - CmdPlot, FALSE); + CmdPlot, FALSE); #endif #ifdef PLOT_AUTO diff --git a/dbwind/DBWdisplay.c b/dbwind/DBWdisplay.c index ca1ea0a6..6739f35f 100644 --- a/dbwind/DBWdisplay.c +++ b/dbwind/DBWdisplay.c @@ -5,16 +5,16 @@ * It saves up information about what is to be redisplayed, then * does all of the redisplay at a convenient time. * - * ********************************************************************* - * * Copyright (C) 1985, 1990 Regents of the University of California. * - * * Permission to use, copy, modify, and distribute this * - * * software and its documentation for any purpose and without * - * * fee is hereby granted, provided that the above copyright * - * * notice appear in all copies. The University of California * - * * makes no representations about the suitability of this * - * * software for any purpose. It is provided "as is" without * - * * express or implied warranty. Export of this software outside * - * * of the United States of America may require an export license. * + * ********************************************************************* + * * Copyright (C) 1985, 1990 Regents of the University of California. * + * * Permission to use, copy, modify, and distribute this * + * * software and its documentation for any purpose and without * + * * fee is hereby granted, provided that the above copyright * + * * notice appear in all copies. The University of California * + * * makes no representations about the suitability of this * + * * software for any purpose. It is provided "as is" without * + * * express or implied warranty. Export of this software outside * + * * of the United States of America may require an export license. * * ********************************************************************* */ @@ -77,7 +77,7 @@ static Transform dbwWatchTrans; /* Transform to root coords for watch tiles. */ static int dbwWatchDemo; /* TRUE means use "demo" style for watch * tile display. */ -static int dbwSeeTypes; /* TRUE means use tile type instead of +static int dbwSeeTypes; /* TRUE means use tile type instead of pointer value for watch display. */ static Rect dbwMinBBox; /* If bounding boxes aren't at least this @@ -129,7 +129,7 @@ extern int dbwTileFunc(), dbwWatchFunc(), dbwLabelFunc(); extern int dbwPaintFunc(), dbwBBoxFunc(); extern int dbwWindowFunc(), dbwChangedFunc(); - + /* * ---------------------------------------------------------------------------- * DBWredisplay -- @@ -157,7 +157,7 @@ DBWredisplay(w, rootArea, clipArea) Rect *rootArea; /* The area that must be redisplayed, in * root cell coordinates. */ - Rect *clipArea; /* The screen area that we should clip to + Rect *clipArea; /* The screen area that we should clip to */ { int i; @@ -170,7 +170,7 @@ DBWredisplay(w, rootArea, clipArea) TileTypeBitMask layers, rmask; /* - TxPrintf("Root area (%d, %d) (%d, %d) redisplay.\n", + TxPrintf("Root area (%d, %d) (%d, %d) redisplay.\n", rootArea->r_xbot, rootArea->r_ybot, rootArea->r_xtop, rootArea->r_ytop); */ @@ -187,7 +187,7 @@ DBWredisplay(w, rootArea, clipArea) * the area without overlapping it. Without the round-up, there * will be occasional (in fact, frequent), one-pixel wide slivers. */ - + largerArea = *rootArea; largerArea.r_xbot -= 1; largerArea.r_ybot -= 1; @@ -198,7 +198,7 @@ DBWredisplay(w, rootArea, clipArea) cellDef = ((CellUse *)w->w_surfaceID)->cu_def; pixelsPerLambda = w->w_scale / SUBPIXEL; - lambdasPerPixel = (SUBPIXEL / w->w_scale) + 1; + lambdasPerPixel = (SUBPIXEL / w->w_scale) + 1; if ((crec->dbw_origin.p_x != w->w_origin.p_x) || (crec->dbw_origin.p_y != w->w_origin.p_y) @@ -212,7 +212,7 @@ DBWredisplay(w, rootArea, clipArea) * so update measurements on label size in this window. * Also, pick a size for labels based on the scale in * half the window: the idea is to make the labels about - * half the height of typical wires. + * half the height of typical wires. */ int halfWireWidth; Rect text; @@ -253,13 +253,13 @@ DBWredisplay(w, rootArea, clipArea) (void) GeoInclude(&GrCrossRect, &crec->dbw_expandAmounts); if (pixelsPerLambda > 0) { - labelArea.r_xtop -= + labelArea.r_xtop -= ceilDiv(crec->dbw_expandAmounts.r_xbot, pixelsPerLambda); - labelArea.r_ytop -= + labelArea.r_ytop -= ceilDiv(crec->dbw_expandAmounts.r_ybot, pixelsPerLambda); - labelArea.r_xbot -= + labelArea.r_xbot -= ceilDiv(crec->dbw_expandAmounts.r_xtop, pixelsPerLambda); - labelArea.r_ybot -= + labelArea.r_ybot -= ceilDiv(crec->dbw_expandAmounts.r_ytop, pixelsPerLambda); } else @@ -295,7 +295,7 @@ DBWredisplay(w, rootArea, clipArea) * information about the edit cell so we can identify it during * the action routines. */ - + if (cellDef == EditRootDef) { editDef = EditCellUse->cu_def; @@ -334,8 +334,8 @@ DBWredisplay(w, rootArea, clipArea) TileType t, s; TileTypeBitMask *rMask; - /* For each contact type, if the contact is not visible, */ - /* display any of its residue layers that are visible. */ + /* For each contact type, if the contact is not visible, */ + /* display any of its residue layers that are visible. */ for (t = TT_TECHDEPBASE; t < DBNumTypes; t++) if (DBIsContact(t)) @@ -378,7 +378,7 @@ DBWredisplay(w, rootArea, clipArea) if (GrFreeBackingStorePtr != NULL) (*GrFreeBackingStorePtr)(w); } - + if (dbwIsLocked) { GrUnlock(w); @@ -407,14 +407,14 @@ DBWredisplay(w, rootArea, clipArea) scontext.scx_area = labelArea; /* make sure that we are searching an area, not just a point */ - scontext.scx_area.r_xtop = MAX(scontext.scx_area.r_xtop, + scontext.scx_area.r_xtop = MAX(scontext.scx_area.r_xtop, scontext.scx_area.r_xbot + 1); - scontext.scx_area.r_ytop = MAX(scontext.scx_area.r_ytop, + scontext.scx_area.r_ytop = MAX(scontext.scx_area.r_ytop, scontext.scx_area.r_ybot + 1); dbwLabelSize = crec->dbw_labelSize; dbwExpandAmounts = &crec->dbw_expandAmounts; GrClipTo(&GrScreenRect); - + /* Set style information beforehand */ GrSetStuff(STYLE_LABEL); (void) DBTreeSrLabels(&scontext, &DBAllTypeBits, bitMask, @@ -422,7 +422,7 @@ DBWredisplay(w, rootArea, clipArea) dbwLabelFunc, (ClientData) NULL); GrClipTo(&rootClip); } - + /* Next, display the bounding boxes that are visible. Before doing * this, calculate the area occupied by the text "BBB". A cell won't * get its id or name displayed unless its bbox is at least this @@ -472,14 +472,14 @@ DBWredisplay(w, rootArea, clipArea) gridRect.r_xtop = gridRect.r_xbot + w->w_scale*width; gridRect.r_ytop = gridRect.r_ybot + w->w_scale*height; GrClipBox(&gridRect, STYLE_GRID); - + /* Redisplay a little square around the origin for the edit cell * (if the edit cell is in this window). Make the origin 4 pixels * across, but don't display it unless this is less than two lambda * units. That way, we always know how much to redisplay (in lambda * units), when the edit cell changes. */ - + if (editDef != NULL) { Rect r, r2; @@ -502,7 +502,7 @@ DBWredisplay(w, rootArea, clipArea) /* If there is a tile plane being "watched", redisplay * its structure. */ - + if (crec->dbw_watchPlane >= 0) { Transform toCell; @@ -549,7 +549,7 @@ DBWredisplay(w, rootArea, clipArea) if (GrPutBackingStorePtr != NULL) (*GrPutBackingStorePtr)(w, &rootClip); } - + /* * ---------------------------------------------------------------------------- * @@ -620,7 +620,7 @@ dbwPaintFunc(tile, cxp) /* If this isn't the edit cell, add 64 to the display style * to be used. */ - + if (!dbwAllSame && ((editDef != scx->scx_use->cu_def) || (scx->scx_trans.t_a != editTrans.t_a) || (scx->scx_trans.t_b != editTrans.t_b) @@ -652,7 +652,7 @@ dbwPaintFunc(tile, cxp) GrBox(dbwWindow, &scx->scx_trans, tile); return 0; } - + /* * ---------------------------------------------------------------------------- @@ -699,7 +699,7 @@ DBWDrawLabel(label, rect, pos, style, labelSize, sizeBox) { Point p; Rect location; - char *text = label->lab_text; + char *text = label->lab_text; int result; if (style >= 0) GrSetStuff(style); @@ -899,7 +899,7 @@ DBWDrawFontLabel(label, window, trans, style) } } - + /* * ---------------------------------------------------------------------------- * @@ -950,7 +950,7 @@ dbwLabelFunc(scx, label, tpath) disStyle = newStyle; GrSetStuff(newStyle); } - + if (label->lab_font < 0) { screenPos = GeoTransPos(&scx->scx_trans, label->lab_just); @@ -991,7 +991,7 @@ dbwLabelFunc(scx, label, tpath) } return 0; } - + /* * ---------------------------------------------------------------------------- * @@ -1043,7 +1043,7 @@ dbwBBoxFunc(scx) GR_TEXT_LARGE, TRUE, &r, (Rect *)NULL); return 0; } - + /* * ---------------------------------------------------------------------------- * @@ -1097,7 +1097,7 @@ dbwTileFunc(tile) GeoClipPoint(&pLL, &rootClip); GeoClipPoint(&pUR, &rootClip); - + if (dbwSeeTypes) { (void) sprintf(string, "%s",DBTypeShortName(TiGetType(tile))); @@ -1106,14 +1106,14 @@ dbwTileFunc(tile) { (void) sprintf(string, "%p", tile); } - + GeoClip(&r2, &rootClip); p.p_x = (r2.r_xbot + r2.r_xtop)/2; p.p_y = (r2.r_ybot + r2.r_ytop)/2; if (!dbwWatchDemo || dbwSeeTypes) GrPutText(string, STYLE_DRAWTILE, &p, GEO_CENTER, GR_TEXT_LARGE, FALSE, &r2, (Rect *) NULL); - + #define XYOFFSET 12 for (i=0; i<4; i++) @@ -1253,7 +1253,7 @@ dbwTileFunc(tile) return 0; } - + /* * ---------------------------------------------------------------------------- * DBWAreaChanged -- @@ -1309,7 +1309,7 @@ DBWAreaChanged(cellDef, defArea, expandMask, layers) || (defArea->r_ybot == defArea->r_ytop)) return; /** - TxPrintf("Cell %s, area (%d, %d) (%d, %d) changed, mask %d.\n", + TxPrintf("Cell %s, area (%d, %d) (%d, %d) changed, mask %d.\n", cellDef->cd_name, defArea->r_xbot, defArea->r_ybot, defArea->r_xtop, defArea->r_ytop, expandMask); **/ @@ -1321,7 +1321,7 @@ DBWAreaChanged(cellDef, defArea, expandMask, layers) /* First, translate the area back up through the hierarchy to * cells that are roots of windows. */ - + for (use = cellDef->cd_parents; use != NULL; use = use->cu_nextuse) { /* We're only interested in a use if it's expanded in one of @@ -1329,7 +1329,7 @@ DBWAreaChanged(cellDef, defArea, expandMask, layers) * AND of the old one and the windows in which this use is * expanded. */ - + newMask = expandMask & use->cu_expandMask; if (newMask == 0) continue; @@ -1349,7 +1349,7 @@ DBWAreaChanged(cellDef, defArea, expandMask, layers) * translate the area back into the coordinates of the parent * and invoke ourselves recursively. */ - + if ((use->cu_xlo == use->cu_xhi) && (use->cu_ylo == use->cu_yhi)) { GeoTransRect(&use->cu_transform, defArea, &newArea); @@ -1406,7 +1406,7 @@ DBWAreaChanged(cellDef, defArea, expandMask, layers) SigEnableInterrupts(); } - + /* * ---------------------------------------------------------------------------- * @@ -1439,7 +1439,7 @@ dbwChangedFunc(w, area) /* If none of the layers being redisplayed is visible in this * window, then there's no need to do anything. */ - + if (dbwLayersChanged != NULL) { TTMaskAndMask3(&tmp, dbwLayersChanged, &crec->dbw_visibleLayers); @@ -1455,7 +1455,7 @@ dbwChangedFunc(w, area) * to account for labels that are rooted in the given area but * stick out past it. */ - + if (dbwLayersChanged == NULL) { screenArea.r_xbot += crec->dbw_expandAmounts.r_xbot; @@ -1481,7 +1481,7 @@ dbwChangedFunc(w, area) else WindAreaChanged(w, &screenArea); return 0; } - + /* * ---------------------------------------------------------------------------- * @@ -1522,7 +1522,7 @@ DBWLabelChanged(cellDef, lab, mask) /* This procedure is basically the same as DBWAreaChanged, so * see that procedure for documentation on how this all works. */ - + saveArea = lab->lab_rect; savePos = lab->lab_just; @@ -1609,13 +1609,13 @@ dbwLabelChangedFunc(w, lab) WindAreaChanged(w, &screenArea); return 0; } - + /* * Technology initialization for the display module. */ global TileTypeBitMask *DBWStyleToTypesTbl = NULL; - + /* * ---------------------------------------------------------------------------- * DBWTechInitStyles -- @@ -1646,11 +1646,11 @@ DBWTechInitStyles() DBWStyleToTypesTbl = (TileTypeBitMask *)mallocMagic(DBWNumStyles * sizeof(TileTypeBitMask)); - + for (i = 0; i < DBWNumStyles; i++) TTMaskZero(DBWStyleToTypesTbl + i); } - + /* * ---------------------------------------------------------------------------- diff --git a/dbwind/DBWelement.c b/dbwind/DBWelement.c index d112d66d..9e4852e8 100644 --- a/dbwind/DBWelement.c +++ b/dbwind/DBWelement.c @@ -8,7 +8,7 @@ * and arcs). These operate very similarly to feedback regions, * in that they are persistant until destroyed, and do not * interact with the layout in any way. - * + * * Copyright (C) 2003 Open Circuit Design, Inc., for MultiGiG, Ltd. */ @@ -45,7 +45,7 @@ typedef struct _style int style; styleptr next; } stylestruct; - + /* Each element is stored in a record that looks like this: */ typedef struct _element @@ -183,7 +183,7 @@ DBWPrintElements(cellDef, flagmask, reducer) /* These must match the order of text sizes in graphics/graphics.h */ static char *textSizes[] = {"small", "medium", "large", "xlarge", - "default", NULL}; + "default", NULL}; /* These must match the order of element type definitions above! */ char *etypes[] = {"rectangle", "line", "text"}; @@ -194,7 +194,7 @@ DBWPrintElements(cellDef, flagmask, reducer) if (elem = (DBWElement *)HashGetValue(he)) { if ((elem->rootDef == cellDef) && (elem->flags & flagmask)) - { + { /* print element type */ AppendString(&rstr, etypes[elem->type], " "); /* print element name */ @@ -300,7 +300,7 @@ DBWScaleElements(n, d) } } - + /* * ---------------------------------------------------------------------------- * @@ -497,7 +497,7 @@ dbwElementUndraw(mw, elem) if (mw == NULL) return; /* No window; can't undraw */ windowRoot = ((CellUse *) (mw->w_surfaceID))->cu_def; - + GrLock(mw, TRUE); /* Deal with half-point-offset flags for the line element */ @@ -541,7 +541,7 @@ dbwElementUndraw(mw, elem) GrUnlock(mw, TRUE); } - + /* * ---------------------------------------------------------------------------- * @@ -693,7 +693,7 @@ DBWElementInbox(area) #endif } - + /* * ---------------------------------------------------------------------------- * @@ -735,7 +735,7 @@ DBWElementAdd(w, name, area, cellDef, style) * transform the area. If the root isn't an ancestor, just * return. */ - + if (!DBSrRoots(cellDef, &GeoIdentityTransform, dbwelemGetTransform, (ClientData) &transform)) if (w != NULL) @@ -744,7 +744,7 @@ DBWElementAdd(w, name, area, cellDef, style) /* SigInterruptPending screws up DBSrRoots */ if (SigInterruptPending) return NULL; - + /* If there is already an entry by this name, delete it */ DBWElementDelete(w, name); @@ -816,7 +816,7 @@ DBWElementAddText(w, name, x, y, text, cellDef, style) { DBWElement *elem; Rect area; - + area.r_xbot = x; area.r_xtop = x; area.r_ybot = y; @@ -888,11 +888,11 @@ DBWElementText(MagWindow *w, char *ename, char *text) HashEntry *entry; entry = HashFind(&elementTable, ename); - if (entry == NULL) + if (entry == NULL) { TxError("No such element %s\n", ename); return; - } + } elem = (DBWElement *)HashGetValue(entry); if (elem == NULL) return; @@ -947,15 +947,15 @@ DBWElementParseFlags(MagWindow *w, char *ename, char *flagstr) "arrowleft", "arrowbottom", "arrowright", "arrowtop", "plainleft", "plainbottom", "plainright", "plaintop", NULL}; static char *textSizes[] = {"small", "medium", "large", "xlarge", - "default", NULL}; - static char *genFlags[] = {"persistent", "temporary", NULL}; + "default", NULL}; + static char *genFlags[] = {"persistent", "temporary", NULL}; entry = HashFind(&elementTable, ename); if (entry == NULL) { TxError("No such element %s\n", ename); return; - } + } elem = (DBWElement *)HashGetValue(entry); if (elem == NULL) return; @@ -1096,7 +1096,7 @@ DBWElementStyle(MagWindow *w, char *ename, int style, bool add) { TxError("No such element %s\n", ename); return; - } + } elem = (DBWElement *)HashGetValue(entry); if (elem == NULL) return; @@ -1124,7 +1124,7 @@ DBWElementStyle(MagWindow *w, char *ename, int style, bool add) /* add style */ for (sptr = elem->stylelist; sptr != NULL && sptr->next != NULL; sptr = sptr->next); - + newstyle = (styleptr)mallocMagic(sizeof(stylestruct)); newstyle->style = style; newstyle->next = NULL; @@ -1202,7 +1202,7 @@ DBWElementPos(MagWindow *w, char *ename, Rect *crect) { TxError("No such element %s\n", ename); return; - } + } elem = (DBWElement *)HashGetValue(entry); if (elem == NULL) return; diff --git a/dbwind/DBWfdback.c b/dbwind/DBWfdback.c index 52e9e498..eb1e70d2 100644 --- a/dbwind/DBWfdback.c +++ b/dbwind/DBWfdback.c @@ -7,16 +7,16 @@ * Feedback is used for things like displaying CIF, and for errors * in CIF-generation and routing. * - * ********************************************************************* - * * Copyright (C) 1985, 1990 Regents of the University of California. * - * * Permission to use, copy, modify, and distribute this * - * * software and its documentation for any purpose and without * - * * fee is hereby granted, provided that the above copyright * - * * notice appear in all copies. The University of California * - * * makes no representations about the suitability of this * - * * software for any purpose. It is provided "as is" without * - * * express or implied warranty. Export of this software outside * - * * of the United States of America may require an export license. * + * ********************************************************************* + * * Copyright (C) 1985, 1990 Regents of the University of California. * + * * Permission to use, copy, modify, and distribute this * + * * software and its documentation for any purpose and without * + * * fee is hereby granted, provided that the above copyright * + * * notice appear in all copies. The University of California * + * * makes no representations about the suitability of this * + * * software for any purpose. It is provided "as is" without * + * * express or implied warranty. Export of this software outside * + * * of the United States of America may require an export license. * * ********************************************************************* */ @@ -47,7 +47,7 @@ typedef struct rcstring int refcount; char *string; } RCString; - + /* Each feedback area is stored in a record that looks like this: */ @@ -91,7 +91,7 @@ static CellDef *dbwfbRootDef; /* To pass root cell definition from * DBWFeedbackAdd. */ - + /* * ---------------------------------------------------------------------------- * @@ -139,7 +139,7 @@ DBWFeedbackRedraw(window, plane) { /* We expect that most of the feedbacks will have the same * style and scale, so compute information with the current - * values, and recompute only when the values change. + * values, and recompute only when the values change. */ if (fb->fb_scale != curScale) { @@ -205,7 +205,7 @@ DBWFeedbackRedraw(window, plane) newStyle = fb->fb_style & (TT_LEFTMASK | TT_RIGHTMASK); - /* Another little trick: when the feedback area is very small ("very + /* Another little trick: when the feedback area is very small ("very * small" is a hand-tuned constant), change all stippled styles to * solid. * (The usefulness of this trick is questionable, as it generally @@ -250,7 +250,7 @@ dbwFeedbackAlways1() { return 1; } - + /* * ---------------------------------------------------------------------------- * @@ -410,7 +410,7 @@ DBWFeedbackAdd(area, text, cellDef, scaleFactor, style) * transform the area. If the root isn't an ancestor, just * return. */ - + if (!DBSrRoots(cellDef, &GeoIdentityTransform, dbwfbGetTransform, (ClientData) &transform)) return; @@ -422,7 +422,7 @@ DBWFeedbackAdd(area, text, cellDef, scaleFactor, style) * this transform are in Magic coordinates, not feedback * coordinates. Scale them into feedback coordinates. */ - + transform.t_c *= scaleFactor; transform.t_f *= scaleFactor; GeoTransRect(&transform, area, &tmp2); @@ -432,7 +432,7 @@ DBWFeedbackAdd(area, text, cellDef, scaleFactor, style) * not, make a new array, copy the old to the new, then delete * the old array. Use memcpy() to make sure this happens very fast. */ - + if (DBWFeedbackCount == dbwfbSize) { Feedback *new; @@ -545,7 +545,7 @@ dbwFeedbackInit() DBWHLAddClient(DBWFeedbackRedraw); } - + /* * ---------------------------------------------------------------------------- * @@ -594,7 +594,7 @@ DBWFeedbackShow() DBWHLRedraw(currentRoot, &area, FALSE); dbwfbNextToShow = DBWFeedbackCount; } - + /* * ---------------------------------------------------------------------------- * diff --git a/dbwind/DBWhlights.c b/dbwind/DBWhlights.c index 40971408..06054e4d 100644 --- a/dbwind/DBWhlights.c +++ b/dbwind/DBWhlights.c @@ -6,16 +6,16 @@ * to display so that when one of them updates its highlights * it doesn't trash the others' highlights. * - * ********************************************************************* - * * Copyright (C) 1985, 1990 Regents of the University of California. * - * * Permission to use, copy, modify, and distribute this * - * * software and its documentation for any purpose and without * - * * fee is hereby granted, provided that the above copyright * - * * notice appear in all copies. The University of California * - * * makes no representations about the suitability of this * - * * software for any purpose. It is provided "as is" without * - * * express or implied warranty. Export of this software outside * - * * of the United States of America may require an export license. * + * ********************************************************************* + * * Copyright (C) 1985, 1990 Regents of the University of California. * + * * Permission to use, copy, modify, and distribute this * + * * software and its documentation for any purpose and without * + * * fee is hereby granted, provided that the above copyright * + * * notice appear in all copies. The University of California * + * * makes no representations about the suitability of this * + * * software for any purpose. It is provided "as is" without * + * * express or implied warranty. Export of this software outside * + * * of the United States of America may require an export license. * * ********************************************************************* */ @@ -47,7 +47,7 @@ static char rcsid[] __attribute__ ((unused)) = "$Header: /usr/cvsroot/magic-8.0/ #define MAXCLIENTS 10 static int (*(dbwhlClients[MAXCLIENTS]))(); - + /* * ---------------------------------------------------------------------------- * @@ -57,7 +57,7 @@ static int (*(dbwhlClients[MAXCLIENTS]))(); * that are displaying highlights. The redisplay procedure * passed in by the client will be invoked in the following * way: - * int + * int * redisplayProc(window, plane) * MagWindow *window; * Plane *plane; @@ -98,7 +98,7 @@ DBWHLAddClient(redisplayProc) TxError("Magic error: ran out of space in highlight client table.\n"); TxError("Tell your system maintainer to enlarge the table.\n"); } - + /* * ---------------------------------------------------------------------------- * @@ -135,7 +135,7 @@ DBWHLRemoveClient(redisplayProc) } ASSERT(FALSE, "DBWHLRemoveClient"); } - + /* * ---------------------------------------------------------------------------- * @@ -194,7 +194,7 @@ DBWHLRedraw(rootDef, area, erase) * directions so that we're certain to have non-zero area. * Otherwise the various search procedures have big troubles. */ - + ourArea = *area; if (ourArea.r_xbot >= ourArea.r_xtop) { @@ -259,13 +259,13 @@ dbwhlRedrawFunc(window, area) * an attempt is made to redraw into an obscured or unmapped * window. */ - + if (((GrGetBackingStorePtr == NULL) && ((GrStyleTable[STYLE_ERASEHIGHLIGHTS].mask & GrStyleTable[STYLE_ERASEALLBUTTOOLS].mask) != 0)) || ((GrGetBackingStorePtr != NULL) && window->w_backingStore == (ClientData)NULL)) - + { DBWAreaChanged(dbwhlDef, area, crec->dbw_bitmask, (TileTypeBitMask *) NULL); @@ -277,7 +277,7 @@ dbwhlRedrawFunc(window, area) DBStdPaintTbl(TT_ERROR_P, PL_DRC_ERROR), (PaintUndoInfo *) NULL); } - + /* The area whose highlights must be redrawn is the area erased, but * it must be expanded again to include the fact that we may have * just erased a piece of a label that stuck out from some other point. @@ -286,7 +286,7 @@ dbwhlRedrawFunc(window, area) * eliminate edge effects: all impacted highlights are now guaranteed * to OVERLAP an area in dbwhlRedrawPlane, not just touch. */ - + erase.r_xbot -= expand.r_xtop; erase.r_ybot -= expand.r_ytop; erase.r_xtop -= expand.r_xbot; @@ -364,15 +364,15 @@ DBWHLRedrawWind(window) int i; DBWclientRec *crec; extern int dbwhlEraseFunc(); /* Forward reference. */ - + GrLock(window, TRUE); crec = (DBWclientRec *) window->w_clientData; /* First erase, then redraw: */ - + (void) DBSrPaintArea((Tile *) NULL, crec->dbw_hlErase, &TiPlaneRect, &DBAllButSpaceBits, dbwhlEraseFunc, (ClientData)window); - + /* Now call each client to redraw its own stuff. */ for (i = 0; i < MAXCLIENTS; i += 1) @@ -413,7 +413,7 @@ dbwhlEraseFunc(tile, window) if (needErase) GrClipBox(&area, STYLE_ERASEHIGHLIGHTS); return 0; } - + /* * ---------------------------------------------------------------------------- * DBWHLUpdate -- diff --git a/dbwind/DBWprocs.c b/dbwind/DBWprocs.c index b5dca997..8fd4056b 100644 --- a/dbwind/DBWprocs.c +++ b/dbwind/DBWprocs.c @@ -4,16 +4,16 @@ * Procedures to interface the database with the window package * for the purposes of window creation, deletion, and modification. * - * ********************************************************************* - * * Copyright (C) 1985, 1990 Regents of the University of California. * - * * Permission to use, copy, modify, and distribute this * - * * software and its documentation for any purpose and without * - * * fee is hereby granted, provided that the above copyright * - * * notice appear in all copies. The University of California * - * * makes no representations about the suitability of this * - * * software for any purpose. It is provided "as is" without * - * * express or implied warranty. Export of this software outside * - * * of the United States of America may require an export license. * + * ********************************************************************* + * * Copyright (C) 1985, 1990 Regents of the University of California. * + * * Permission to use, copy, modify, and distribute this * + * * software and its documentation for any purpose and without * + * * fee is hereby granted, provided that the above copyright * + * * notice appear in all copies. The University of California * + * * makes no representations about the suitability of this * + * * software for any purpose. It is provided "as is" without * + * * express or implied warranty. Export of this software outside * + * * of the United States of America may require an export license. * * ********************************************************************* */ @@ -58,13 +58,13 @@ extern void DBWredisplay(); /* Defined in DBWdisplay.c */ */ static int (*dbwButtonHandler)() = NULL; - + /* * ---------------------------------------------------------------------------- * * DBWcreate * - * A new window has been created, create and initialize the needed + * A new window has been created, create and initialize the needed * structures. * * Results: @@ -95,7 +95,7 @@ DBWcreate(window, argc, argv) */ newBitMask = (dbwBitMask + 1) | dbwBitMask; - if (newBitMask > MAX_BITMASK) + if (newBitMask > MAX_BITMASK) return FALSE; bitMask = newBitMask ^ dbwBitMask; dbwBitMask = newBitMask; @@ -135,7 +135,7 @@ DBWcreate(window, argc, argv) /* Zoom in on the box, leaving a 10% border or at least 2 units * on each side. */ - + expand = (box.r_xtop - box.r_xbot)/20; if (expand < 2) expand = 2; box.r_xtop += expand; @@ -153,7 +153,7 @@ DBWcreate(window, argc, argv) return TRUE; } - + /* * ---------------------------------------------------------------------------- * DBWdelete -- @@ -184,7 +184,7 @@ DBWdelete(window) return TRUE; } - + /* * ---------------------------------------------------------------------------- * @@ -215,14 +215,14 @@ dbwLoadFunc(w, clientData) return 0; } - + /* * ---------------------------------------------------------------------------- * * DBWreload -- * * Re-load all windows to contain the named cell as a root. - * This is intended to be called during startup or when restarting a saved + * This is intended to be called during startup or when restarting a saved * image of Magic. * * Results: @@ -252,7 +252,7 @@ dbwReloadFunc(w, name) DBWloadWindow(w, name, TRUE, FALSE, FALSE); return (0); } - + /* * ---------------------------------------------------------------------------- @@ -493,7 +493,7 @@ DBWloadWindow(window, name, ignoreTech, expand, dereference) } /* enforce a minimum size of 60 and a border of 10% around the sides */ - xadd = MAX(0, (60 - (loadBox.r_xtop - loadBox.r_xbot)) / 2) + + xadd = MAX(0, (60 - (loadBox.r_xtop - loadBox.r_xbot)) / 2) + (loadBox.r_xtop - loadBox.r_xbot + 1) / 10; yadd = MAX(0, (60 - (loadBox.r_ytop - loadBox.r_ybot)) / 2) + (loadBox.r_ytop - loadBox.r_ybot + 1) / 10; @@ -541,7 +541,7 @@ UnexpandFunc(use, windowMask) return 0; } - + /* * ---------------------------------------------------------------------------- * DBWexit -- @@ -562,7 +562,7 @@ DBWexit() { return (CmdWarnWrite() == 1); } - + /* * ---------------------------------------------------------------------------- * @@ -610,7 +610,7 @@ DBWcommands(w, cmd) DBFixMismatch(); } - + /* * ---------------------------------------------------------------------------- * @@ -630,7 +630,7 @@ DBWcommands(w, cmd) * From now on, all button pushes within database windows are * passed to buttonProc, in the following form: * - * int + * int * buttonProc(w, cmd) * MagWindow *w; * TxCommand *cmd; @@ -649,7 +649,7 @@ int (*(DBWNewButtonHandler(buttonProc)))() dbwButtonHandler = buttonProc; return result; } - + /* * ---------------------------------------------------------------------------- * DBWupdate-- @@ -672,7 +672,7 @@ DBWupdate() DBWFeedbackShow(); DBWHLUpdate(); } - + /* * ---------------------------------------------------------------------------- * DBWinit -- @@ -683,7 +683,7 @@ DBWupdate() * None. * * Side effects: - * A client is added, and an initial empty window is made + * A client is added, and an initial empty window is made * ---------------------------------------------------------------------------- */ @@ -703,7 +703,7 @@ DBWinit() " releasing the initial button.\n"; /* Initialize */ - DBWclientID = WindAddClient("layout", DBWcreate, DBWdelete, + DBWclientID = WindAddClient("layout", DBWcreate, DBWdelete, DBWredisplay, DBWcommands, DBWupdate, DBWexit, (void (*)()) NULL, (GrGlyph *) NULL); diff --git a/dbwind/DBWtools.c b/dbwind/DBWtools.c index 19361fd1..12c5270b 100644 --- a/dbwind/DBWtools.c +++ b/dbwind/DBWtools.c @@ -10,16 +10,16 @@ * to get information about the current tool location and relocate * the box. * - * ********************************************************************* - * * Copyright (C) 1985, 1990 Regents of the University of California. * - * * Permission to use, copy, modify, and distribute this * - * * software and its documentation for any purpose and without * - * * fee is hereby granted, provided that the above copyright * - * * notice appear in all copies. The University of California * - * * makes no representations about the suitability of this * - * * software for any purpose. It is provided "as is" without * - * * express or implied warranty. Export of this software outside * - * * of the United States of America may require an export license. * + * ********************************************************************* + * * Copyright (C) 1985, 1990 Regents of the University of California. * + * * Permission to use, copy, modify, and distribute this * + * * software and its documentation for any purpose and without * + * * fee is hereby granted, provided that the above copyright * + * * notice appear in all copies. The University of California * + * * makes no representations about the suitability of this * + * * software for any purpose. It is provided "as is" without * + * * express or implied warranty. Export of this software outside * + * * of the United States of America may require an export license. * * ********************************************************************* */ @@ -51,7 +51,7 @@ static char rcsid[] __attribute__ ((unused)) = "$Header: /usr/cvsroot/magic-8.0/ * root cell def. If the box is placed in one window, it will * be displayed in all compatible windows. The box may not have * one corner placed in one window and other corners in - * incompatible windows. + * incompatible windows. */ static CellDef *boxRootDef = NULL; /* CellDef for the box */ @@ -75,7 +75,7 @@ int DBWSnapToGrid = DBW_SNAP_LAMBDA; extern int DBWToolDraw(); - + /* * ---------------------------------------------------------------------------- * @@ -123,10 +123,10 @@ toolFindPoint(p, rootPoint, rootArea) if (DBWSnapToGrid != DBW_SNAP_INTERNAL) ToolSnapToGrid(WindCurrentWindow, rootPoint, rootArea); return WindCurrentWindow; - + } - + /* * ---------------------------------------------------------------------------- * ToolGetPoint -- @@ -159,13 +159,13 @@ ToolGetPoint(rootPoint, rootArea) { extern TxCommand *WindCurrentCmd; - if (WindCurrentCmd == NULL) + if (WindCurrentCmd == NULL) return NULL; else return toolFindPoint(&WindCurrentCmd->tx_p, rootPoint, rootArea); } - + /* * ---------------------------------------------------------------------------- * ToolGetBox -- @@ -209,7 +209,7 @@ ToolScaleBox(scalen, scaled) } - + /* * ---------------------------------------------------------------------------- * ToolGetBoxWindow -- @@ -257,7 +257,7 @@ ToolGetBoxWindow(rootArea, pMask) toolMask = 0; window = NULL; if (boxRootDef != NULL) - (void) WindSearch(DBWclientID, (ClientData) NULL, (Rect *) NULL, + (void) WindSearch(DBWclientID, (ClientData) NULL, (Rect *) NULL, toolWindowSave, (ClientData) &window); if ((window != NULL) && (rootArea != NULL)) *rootArea = boxRootArea; if (pMask != NULL) *pMask = toolMask; @@ -278,7 +278,7 @@ toolWindowSave(window, clientData) } return 0; } - + /* * ---------------------------------------------------------------------------- * @@ -304,12 +304,12 @@ bool ToolGetEditBox(rect) Rect *rect; { - if (boxRootDef == NULL) + if (boxRootDef == NULL) { TxError("Box must be present\n"); return FALSE; } - if (EditRootDef != boxRootDef) + if (EditRootDef != boxRootDef) { TxError("The box isn't in a window on the edit cell.\n"); return FALSE; @@ -319,7 +319,7 @@ ToolGetEditBox(rect) return TRUE; } - + /* * ---------------------------------------------------------------------------- * ToolGetCorner -- @@ -389,7 +389,7 @@ ToolGetCorner(screenPoint) * * Side effects: * Initializes static memory. - * + * * ---------------------------------------------------------------------------- */ @@ -617,7 +617,7 @@ dbwRecordBoxArea(erase) DBWHLRedraw(boxRootDef, &side, erase); } } - + /* * ---------------------------------------------------------------------------- * @@ -693,7 +693,7 @@ DBWDrawBox(window, plane) * blob, then don't do the widening. This is to make the box more * useable when features are very small. */ - + if (((screenArea.r_xtop != screenArea.r_xbot) && (screenArea.r_xtop < screenArea.r_xbot + 4)) || ((screenArea.r_ytop != screenArea.r_ybot) && @@ -749,7 +749,7 @@ dbwBoxAlways1() { return 1; } - + /* * ---------------------------------------------------------------------------- * DBWSetBox -- @@ -789,7 +789,7 @@ DBWSetBox(rootDef, rect) dbwRecordBoxArea(FALSE); } - + /* * ---------------------------------------------------------------------------- * ToolMoveBox -- @@ -799,7 +799,7 @@ DBWSetBox(rootDef, rect) * the box corner is snapped to the user's grid (set with the :grid * command) if DBWSnapToGrid is DBW_SNAP_USER. If DBWSnapToGrid is * DBW_SNAP_LAMBDA, the box corner is snapped to the nearest integer - * lambda value. + * lambda value. * * Results: * None. @@ -890,7 +890,7 @@ ToolMoveBox(corner, point, screenCoords, rootDef) DBWSetBox(newDef, &newArea); } - + /* * ---------------------------------------------------------------------------- * ToolMoveCorner -- @@ -963,7 +963,7 @@ ToolMoveCorner(corner, point, screenCoords, rootDef) * current box root def, then just move the whole durned box. * Also move the whole box if a weird corner is specified. */ - + if ((newDef != oldDef) || (corner < 0) || (corner > TOOL_TL)) { ToolMoveBox(corner, &p, FALSE, newDef); @@ -996,7 +996,7 @@ ToolMoveCorner(corner, point, screenCoords, rootDef) /* If the movement turned the box inside out, turn it right * side out again. */ - + if (newArea.r_xbot > newArea.r_xtop) { tmp = newArea.r_xtop; @@ -1012,7 +1012,7 @@ ToolMoveCorner(corner, point, screenCoords, rootDef) DBWSetBox(newDef, &newArea); } - + /* * ---------------------------------------------------------------------------- * diff --git a/dbwind/DBWundo.c b/dbwind/DBWundo.c index cb6dd040..3a2e148d 100644 --- a/dbwind/DBWundo.c +++ b/dbwind/DBWundo.c @@ -4,16 +4,16 @@ * Procedures for undoing/redoing operations associated * with the dbwind module. * - * ********************************************************************* - * * Copyright (C) 1985, 1990 Regents of the University of California. * - * * Permission to use, copy, modify, and distribute this * - * * software and its documentation for any purpose and without * - * * fee is hereby granted, provided that the above copyright * - * * notice appear in all copies. The University of California * - * * makes no representations about the suitability of this * - * * software for any purpose. It is provided "as is" without * - * * express or implied warranty. Export of this software outside * - * * of the United States of America may require an export license. * + * ********************************************************************* + * * Copyright (C) 1985, 1990 Regents of the University of California. * + * * Permission to use, copy, modify, and distribute this * + * * software and its documentation for any purpose and without * + * * fee is hereby granted, provided that the above copyright * + * * notice appear in all copies. The University of California * + * * makes no representations about the suitability of this * + * * software for any purpose. It is provided "as is" without * + * * express or implied warranty. Export of this software outside * + * * of the United States of America may require an export license. * * ********************************************************************* */ @@ -84,7 +84,7 @@ typedef struct Rect bue_newArea; } BoxUndoEvent; - + /* * ---------------------------------------------------------------------------- * @@ -113,12 +113,12 @@ dbwUndoInit() dbwUndoIDNewEdit = UndoAddClient(nullProc, nullProc, (UndoEvent *(*)()) NULL, (int (*)()) NULL, dbwUndoChangeEdit, nullProc, "change edit cell"); - + dbwUndoIDBox = UndoAddClient(nullProc, nullProc, (UndoEvent *(*)()) NULL, (int (*)()) NULL, dbwUndoBoxForw, dbwUndoBoxBack, "box change"); } - + /* * ---------------------------------------------------------------------------- * @@ -179,7 +179,7 @@ DBWUndoNewEdit(editUse, editRootDef, editToRootTrans, rootToEditTrans) ep->e_parentDef = editUse->cu_parent; (void) strcpy(ep->e_useId, useid); } - + /* * ---------------------------------------------------------------------------- * @@ -244,7 +244,7 @@ dbwUndoChangeEdit(ep) DBWAreaChanged(EditRootDef, &area, DBW_ALLWINDOWS, &DBAllButSpaceBits); CmdSetWindCaption(EditCellUse, EditRootDef); } - + /* * ---------------------------------------------------------------------------- * @@ -278,7 +278,7 @@ DBWUndoBox(oldDef, oldArea, newDef, newArea) bue->bue_newDef = newDef; bue->bue_newArea = *newArea; } - + /* * ---------------------------------------------------------------------------- * diff --git a/dbwind/dbwind.h b/dbwind/dbwind.h index d488cf16..28015b6a 100644 --- a/dbwind/dbwind.h +++ b/dbwind/dbwind.h @@ -4,16 +4,16 @@ * Interface definitions for the 'glue' between the window * manager and the database. * - * ********************************************************************* - * * Copyright (C) 1985, 1990 Regents of the University of California. * - * * Permission to use, copy, modify, and distribute this * - * * software and its documentation for any purpose and without * - * * fee is hereby granted, provided that the above copyright * - * * notice appear in all copies. The University of California * - * * makes no representations about the suitability of this * - * * software for any purpose. It is provided "as is" without * - * * express or implied warranty. Export of this software outside * - * * of the United States of America may require an export license. * + * ********************************************************************* + * * Copyright (C) 1985, 1990 Regents of the University of California. * + * * Permission to use, copy, modify, and distribute this * + * * software and its documentation for any purpose and without * + * * fee is hereby granted, provided that the above copyright * + * * notice appear in all copies. The University of California * + * * makes no representations about the suitability of this * + * * software for any purpose. It is provided "as is" without * + * * express or implied warranty. Export of this software outside * + * * of the United States of America may require an export license. * * ********************************************************************* * * @@ -136,7 +136,7 @@ extern void DBWTechInitStyles(); extern bool DBWTechAddStyle(); extern char *DBWStyleType; -/* +/* * exported button procedures and variables */ diff --git a/debug/debug.h b/debug/debug.h index e715bb30..29906083 100644 --- a/debug/debug.h +++ b/debug/debug.h @@ -6,16 +6,16 @@ * procedures for setting, examining, and testing debugging flags. * Also measurement code. * - * ********************************************************************* - * * Copyright (C) 1985, 1990 Regents of the University of California. * - * * Permission to use, copy, modify, and distribute this * - * * software and its documentation for any purpose and without * - * * fee is hereby granted, provided that the above copyright * - * * notice appear in all copies. The University of California * - * * makes no representations about the suitability of this * - * * software for any purpose. It is provided "as is" without * - * * express or implied warranty. Export of this software outside * - * * of the United States of America may require an export license. * + * ********************************************************************* + * * Copyright (C) 1985, 1990 Regents of the University of California. * + * * Permission to use, copy, modify, and distribute this * + * * software and its documentation for any purpose and without * + * * fee is hereby granted, provided that the above copyright * + * * notice appear in all copies. The University of California * + * * makes no representations about the suitability of this * + * * software for any purpose. It is provided "as is" without * + * * express or implied warranty. Export of this software outside * + * * of the United States of America may require an export license. * * ********************************************************************* * * rcsid $Header: /usr/cvsroot/magic-8.0/debug/debug.h,v 1.1.1.1 2008/02/03 20:43:50 tim Exp $ @@ -41,7 +41,7 @@ struct debugFlag }; /* A histogram counts of the number of data items in each of - * a number of ranges. It is defined by a low value, a bin size, and + * a number of ranges. It is defined by a low value, a bin size, and * the number of bins. Items falling in the range hi_lo..hi_lo+n*hi_step-1 * go into hi_data[n], for n=1 to the number of bins. Values outside the * range are stored in locations 0 and n+1. diff --git a/debug/debugFlags.c b/debug/debugFlags.c index f570aeca..7e759569 100644 --- a/debug/debugFlags.c +++ b/debug/debugFlags.c @@ -5,16 +5,16 @@ * The debugging module provides a standard collection of * procedures for setting, examining, and testing debugging flags. * - * ********************************************************************* - * * Copyright (C) 1985, 1990 Regents of the University of California. * - * * Permission to use, copy, modify, and distribute this * - * * software and its documentation for any purpose and without * - * * fee is hereby granted, provided that the above copyright * - * * notice appear in all copies. The University of California * - * * makes no representations about the suitability of this * - * * software for any purpose. It is provided "as is" without * - * * express or implied warranty. Export of this software outside * - * * of the United States of America may require an export license. * + * ********************************************************************* + * * Copyright (C) 1985, 1990 Regents of the University of California. * + * * Permission to use, copy, modify, and distribute this * + * * software and its documentation for any purpose and without * + * * fee is hereby granted, provided that the above copyright * + * * notice appear in all copies. The University of California * + * * makes no representations about the suitability of this * + * * software for any purpose. It is provided "as is" without * + * * express or implied warranty. Export of this software outside * + * * of the United States of America may require an export license. * * ********************************************************************* */ @@ -32,7 +32,7 @@ static char rcsid[] __attribute__ ((unused)) = "$Header: /usr/cvsroot/magic-8.0/ struct debugClient debugClients[MAXDEBUGCLIENTS]; int debugNumClients = 0; - + /* * ---------------------------------------------------------------------------- * @@ -84,7 +84,7 @@ DebugAddClient(name, maxflags) return ((ClientData) debugNumClients++); } - + /* * ---------------------------------------------------------------------------- * @@ -137,7 +137,7 @@ DebugAddFlag(clientID, name) dc->dc_flags[dc->dc_nflags].df_value = FALSE; return (dc->dc_nflags++); } - + /* * ---------------------------------------------------------------------------- * @@ -173,7 +173,7 @@ DebugShow(clientID) TxPrintf("%-5.5s %s\n", dc->dc_flags[n].df_value ? "TRUE" : "FALSE", dc->dc_flags[n].df_name); } - + /* * ---------------------------------------------------------------------------- * diff --git a/debug/hist.c b/debug/hist.c index 33c18473..d112bd2e 100644 --- a/debug/hist.c +++ b/debug/hist.c @@ -2,16 +2,16 @@ * * Module to collect and print histograms. * - * ********************************************************************* - * * Copyright (C) 1985, 1990 Regents of the University of California. * - * * Permission to use, copy, modify, and distribute this * - * * software and its documentation for any purpose and without * - * * fee is hereby granted, provided that the above copyright * - * * notice appear in all copies. The University of California * - * * makes no representations about the suitability of this * - * * software for any purpose. It is provided "as is" without * - * * express or implied warranty. Export of this software outside * - * * of the United States of America may require an export license. * + * ********************************************************************* + * * Copyright (C) 1985, 1990 Regents of the University of California. * + * * Permission to use, copy, modify, and distribute this * + * * software and its documentation for any purpose and without * + * * fee is hereby granted, provided that the above copyright * + * * notice appear in all copies. The University of California * + * * makes no representations about the suitability of this * + * * software for any purpose. It is provided "as is" without * + * * express or implied warranty. Export of this software outside * + * * of the United States of America may require an export license. * * ********************************************************************* */ @@ -32,7 +32,7 @@ static char rcsid[] __attribute__ ((unused)) = "$Header: /usr/cvsroot/magic-8.0/ #include "utils/malloc.h" Histogram * hist_list = (Histogram *) NULL; - + /* * ---------------------------------------------------------------------------- * @@ -63,7 +63,7 @@ histFind(name, ptrKeys) return(h); return((Histogram *) NULL); } - + /* * ---------------------------------------------------------------------------- * @@ -116,7 +116,7 @@ HistCreate(name, ptrKeys, low, step, bins) new->hi_next=hist_list; hist_list=new; } - + /* * ---------------------------------------------------------------------------- * @@ -157,7 +157,7 @@ HistAdd(name, ptrKeys, value) if(value > h->hi_max) h->hi_max=value; } - + /* * ---------------------------------------------------------------------------- * diff --git a/drc/DRCarray.c b/drc/DRCarray.c index 4e1aa133..f4f8486b 100644 --- a/drc/DRCarray.c +++ b/drc/DRCarray.c @@ -6,16 +6,16 @@ * elements. Note: the routines in this file are NOT generally * re-entrant. * - * ********************************************************************* - * * Copyright (C) 1985, 1990 Regents of the University of California. * - * * Permission to use, copy, modify, and distribute this * - * * software and its documentation for any purpose and without * - * * fee is hereby granted, provided that the above copyright * - * * notice appear in all copies. The University of California * - * * makes no representations about the suitability of this * - * * software for any purpose. It is provided "as is" without * - * * express or implied warranty. Export of this software outside * - * * of the United States of America may require an export license. * + * ********************************************************************* + * * Copyright (C) 1985, 1990 Regents of the University of California. * + * * Permission to use, copy, modify, and distribute this * + * * software and its documentation for any purpose and without * + * * fee is hereby granted, provided that the above copyright * + * * notice appear in all copies. The University of California * + * * makes no representations about the suitability of this * + * * software for any purpose. It is provided "as is" without * + * * express or implied warranty. Export of this software outside * + * * of the United States of America may require an export license. * * ********************************************************************* */ @@ -58,7 +58,7 @@ static int drcArrayCount; /* Count of number of errors found. */ static void (*drcArrayErrorFunc)(); /* Function to call on violations. */ static ClientData drcArrayClientData; /* Extra parameter to pass to func. */ - + /* * ---------------------------------------------------------------------------- * @@ -120,11 +120,11 @@ drcArrayFunc(scx, area) if ((use->cu_xlo == use->cu_xhi) && (use->cu_ylo == use->cu_yhi)) return 2; - + /* Set up the client data that will be passed down during * checks for exact overlaps. */ - + arg.dCD_celldef = DRCdef; arg.dCD_errors = &drcArrayCount; arg.dCD_clip = &errorArea; @@ -136,7 +136,7 @@ drcArrayFunc(scx, area) * of the parend. If the array is 1-dimensional, we set the * corresponding spacing to an impossibly large distance. */ - + tmp.r_xbot = 0; tmp.r_ybot = 0; if (use->cu_xlo == use->cu_xhi) @@ -159,7 +159,7 @@ drcArrayFunc(scx, area) * Skip some or all of the areas if the cell isn't arrayed in * that direction or if the instances are widely spaced. */ - + if (ysep < ysize + DRCTechHalo) { /* A */ @@ -237,10 +237,10 @@ drcArrayFunc(scx, area) (ClientData) &arg); } } - + return 2; } - + /* * ---------------------------------------------------------------------------- * DRCArrayCheck -- @@ -308,7 +308,7 @@ DRCArrayCheck(def, area, func, cdarg) return drcArrayCount; } - + /* * ---------------------------------------------------------------------------- * @@ -344,7 +344,7 @@ drcArrayYankFunc(use, transform, x, y, yankArea) (void) DBCellCopyAllPaint(&scx, &DBAllButSpaceBits, 0, DRCuse); return 0; } - + /* * ---------------------------------------------------------------------------- * diff --git a/drc/DRCbasic.c b/drc/DRCbasic.c index a25b51ec..cb1b31d8 100644 --- a/drc/DRCbasic.c +++ b/drc/DRCbasic.c @@ -6,16 +6,16 @@ * find all of the rule violations and call a client procedure for * each one. * - * ********************************************************************* - * * Copyright (C) 1985, 1990 Regents of the University of California. * - * * Permission to use, copy, modify, and distribute this * - * * software and its documentation for any purpose and without * - * * fee is hereby granted, provided that the above copyright * - * * notice appear in all copies. The University of California * - * * makes no representations about the suitability of this * - * * software for any purpose. It is provided "as is" without * - * * express or implied warranty. Export of this software outside * - * * of the United States of America may require an export license. * + * ********************************************************************* + * * Copyright (C) 1985, 1990 Regents of the University of California. * + * * Permission to use, copy, modify, and distribute this * + * * software and its documentation for any purpose and without * + * * fee is hereby granted, provided that the above copyright * + * * notice appear in all copies. The University of California * + * * makes no representations about the suitability of this * + * * software for any purpose. It is provided "as is" without * + * * express or implied warranty. Export of this software outside * + * * of the United States of America may require an export license. * * ********************************************************************* */ @@ -114,11 +114,11 @@ point_to_segment(px, py, s1x, s1y, s2x, s2y) #define RADIAL_SW 0x2000 #define RADIAL_SE 0x4000 - + /* * ---------------------------------------------------------------------------- * - * areaCheck -- + * areaCheck -- * * Call the function passed down from DRCBasicCheck() if the current tile * violates the rule in the given DRCCookie. If the rule's connectivity @@ -138,7 +138,7 @@ point_to_segment(px, py, s1x, s1y, s2x, s2y) */ int -areaCheck(tile, arg) +areaCheck(tile, arg) Tile *tile; struct drcClientData *arg; { @@ -157,7 +157,7 @@ areaCheck(tile, arg) if ((rect.r_xbot >= rect.r_xtop) || (rect.r_ybot >= rect.r_ytop)) return 0; - /* + /* * When Euclidean distance checks are enabled, check for error tiles * outside of the perimeter of the circle in the corner extension area * that extends "sdist" from the corner of the edge. @@ -173,7 +173,7 @@ areaCheck(tile, arg) int sqx, sqy; int sdist = arg->dCD_radial & 0xfff; long sstest, ssdist = sdist * sdist; - + if ((arg->dCD_radial & RADIAL_NW) != 0) { if (((sqx = arg->dCD_constraint->r_xbot + sdist @@ -267,7 +267,7 @@ areaCheck(tile, arg) } return 0; } - + /* * ---------------------------------------------------------------------------- * @@ -350,7 +350,7 @@ DRCBasicCheck (celldef, checkRect, clipRect, function, cdata) if (arg.dCD_rlist != NULL) freeMagic(arg.dCD_rlist); return (errors); } - + /* * ---------------------------------------------------------------------------- * @@ -400,7 +400,7 @@ drcTile (tile, arg) * overlap between things in adjacent cells. This means that * there's an automatic violation over the area of the tile. */ - + if (TiGetType(tile) == TT_ERROR_S) { TiToRect(tile, &errRect); @@ -592,7 +592,7 @@ drcTile (tile, arg) { lr = &mrd->rlist[i]; GeoClip(lr, arg->dCD_clip); - if (!GEO_RECTNULL(lr)) + if (!GEO_RECTNULL(lr)) { (*(arg->dCD_function)) (arg->dCD_celldef, lr, cptr, arg->dCD_clientData); @@ -622,7 +622,7 @@ drcTile (tile, arg) } result = 0; - arg->dCD_radial = 0; + arg->dCD_radial = 0; arg->dCD_entries = 0; do { if (triggered) @@ -973,12 +973,12 @@ checkbottom: { lr = &mrd->rlist[i]; GeoClip(lr, arg->dCD_clip); - if (!GEO_RECTNULL(lr)) + if (!GEO_RECTNULL(lr)) { (*(arg->dCD_function)) (arg->dCD_celldef, lr, cptr, arg->dCD_clientData); (*(arg->dCD_errors))++; - } + } } } continue; @@ -992,7 +992,7 @@ checkbottom: } result = 0; - arg->dCD_radial = 0; + arg->dCD_radial = 0; arg->dCD_entries = 0; do { if (triggered) diff --git a/drc/DRCcif.c b/drc/DRCcif.c index e3382fc5..80134220 100644 --- a/drc/DRCcif.c +++ b/drc/DRCcif.c @@ -2,23 +2,23 @@ * DRCcif.c -- * ****************************************************************************** - * Copyright (C) 1989 Digital Equipment Corporation - * Permission to use, copy, modify, and distribute this - * software and its documentation for any purpose and without - * fee is hereby granted, provided that the above copyright - * notice appear in all copies. Digital Equipment Corporation - * makes no representations about the suitability of this - * software for any purpose. It is provided "as is" without - * express or implied warranty. - * - * THE SOFTWARE IS PROVIDED "AS IS" AND DIGITAL EQUIPMENT CORP. DISCLAIMS ALL + * Copyright (C) 1989 Digital Equipment Corporation + * Permission to use, copy, modify, and distribute this + * software and its documentation for any purpose and without + * fee is hereby granted, provided that the above copyright + * notice appear in all copies. Digital Equipment Corporation + * makes no representations about the suitability of this + * software for any purpose. It is provided "as is" without + * express or implied warranty. + * + * THE SOFTWARE IS PROVIDED "AS IS" AND DIGITAL EQUIPMENT CORP. DISCLAIMS ALL * WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF - * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL DIGITAL EQUIPMENT - * CORPORATION BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL - * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR - * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS - * ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS - * SOFTWARE. + * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL DIGITAL EQUIPMENT + * CORPORATION BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL + * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR + * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS + * ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS + * SOFTWARE. **************************************************************************** * */ @@ -148,7 +148,7 @@ drcCifWarning() /* * ---------------------------------------------------------------------------- * - * drcCifWidth -- same this as drcCifWidth, except that it works on + * drcCifWidth -- same this as drcCifWidth, except that it works on * cif layers * * Results: @@ -180,8 +180,8 @@ drcCifWidth(argc, argv) for (i = 0; i < drcCifStyle->cs_nLayers;i++) { CIFLayer *layer = drcCifStyle->cs_layers[i]; - - if (strcmp(layer->cl_name,layername) == 0) + + if (strcmp(layer->cl_name,layername) == 0) { thislayer = i; break; @@ -209,7 +209,7 @@ drcCifWidth(argc, argv) /* * ---------------------------------------------------------------------------- * - * drcCifSpacing -- same this as drcSpacing, except that it works on cif + * drcCifSpacing -- same this as drcSpacing, except that it works on cif * layers. * * Results: @@ -240,7 +240,7 @@ drcCifSpacing(argc, argv) layers[0] = argv[1]; layers[1] = argv[2]; - + if (drcCifStyle == NULL) return drcCifWarning(); @@ -249,12 +249,12 @@ drcCifSpacing(argc, argv) for (i = 0; i < drcCifStyle->cs_nLayers;i++) { CIFLayer *l = drcCifStyle->cs_layers[i]; - + if (strcmp(l->cl_name,layers[k]) == 0) { layer[k]=i; break; - } + } } if (i == drcCifStyle->cs_nLayers || layer[k] == -1) { @@ -285,7 +285,7 @@ drcCifSpacing(argc, argv) TechError("Badly formed drc spacing line\n"); return (0); } - + scalefactor = drcCifStyle->cs_scaleFactor; centidistance *= drcCifStyle->cs_expander; // BSI dpnext = drcCifRules[layer[0]][DRC_CIF_SOLID]; @@ -301,7 +301,7 @@ drcCifSpacing(argc, argv) drcCifAssign(dpnew, centidistance, dpnext, &DBSpaceBits, &cmask, why, centidistance, DRC_REVERSE, layer[1], 0); drcCifRules[layer[0]][DRC_CIF_SPACE] = dpnew; - + if (needReverse) { // This is not so much "reverse" as it is just the @@ -320,7 +320,7 @@ drcCifSpacing(argc, argv) drcCifAssign(dpnew, centidistance, dpnext, &DBSpaceBits, &cmask, why, centidistance, DRC_REVERSE|DRC_BOTHCORNERS, layer[0], 0); drcCifRules[layer[1]][DRC_CIF_SPACE] = dpnew; - + if (layer[0] == layer[1]) { dpnext = drcCifRules[layer[1]][DRC_CIF_SPACE]; @@ -329,7 +329,7 @@ drcCifSpacing(argc, argv) &cmask, why, centidistance, DRC_REVERSE | DRC_BOTHCORNERS, layer[0], 0); drcCifRules[layer[1]][DRC_CIF_SPACE] = dpnew; - + dpnext = drcCifRules[layer[0]][DRC_CIF_SPACE]; dpnew = (DRCCookie *) mallocMagic((unsigned) (sizeof (DRCCookie))); drcCifAssign(dpnew, centidistance, dpnext, &DBSpaceBits, &cmask, @@ -353,7 +353,7 @@ drcCifSpacing(argc, argv) why, scalefactor, DRC_FORWARD, layer[1], 0); drcCifRules[layer[0]][DRC_CIF_SPACE] = dpnew; } - + return ((centidistance+scalefactor-1)/scalefactor); } @@ -459,7 +459,7 @@ drcCifFinal() for (i = 0; i != MAXCIFLAYERS; i++) { DRCCookie *dp; - + for (dp = drcCifRules[i][DRC_CIF_SPACE]; dp; dp = dp->drcc_next) { drcCifValid = TRUE; @@ -486,7 +486,7 @@ drcCifFinal() * * Side effects: * Error paint, CIF layer generation, lots of stuff going on. - * + * * ---------------------------------------------------------------------------- */ @@ -546,11 +546,11 @@ drcCifCheck(arg) { for (j = 0; j != 2; j++) { - for (drcCifCur = drcCifRules[i][j]; + for (drcCifCur = drcCifRules[i][j]; drcCifCur; drcCifCur = drcCifCur->drcc_next) { TileTypeBitMask *mask; - + arg->dCD_plane = i; DBSrPaintArea((Tile *) NULL, CIFPlanes[i], &cifrect, (j == DRC_CIF_SOLID) ? &DBSpaceBits : &CIFSolidBits, @@ -868,7 +868,7 @@ drcCifTile (tile, arg) /* Nothing */; if (TTMaskHasType(&cptr->drcc_corner, TiGetLeftType(tp))) { - errRect.r_xtop += cptr->drcc_cdist; + errRect.r_xtop += cptr->drcc_cdist; if (DRCEuclidean) arg->dCD_radial |= 0x4000; } @@ -883,7 +883,7 @@ drcCifTile (tile, arg) /* Nothing */; if (TTMaskHasType(&cptr->drcc_corner, TiGetRightType(tp))) { - errRect.r_xbot -= cptr->drcc_cdist; + errRect.r_xbot -= cptr->drcc_cdist; if (DRCEuclidean) arg->dCD_radial |= 0x1000; } @@ -972,7 +972,7 @@ drcCifTile (tile, arg) /* * ---------------------------------------------------------------------------- * - * areaCifCheck -- + * areaCifCheck -- * * Call the function passed down from DRCBasicCheck() if the current tile * violates the rule in the given DRCCookie. If the rule's connectivity @@ -992,7 +992,7 @@ drcCifTile (tile, arg) */ int -areaCifCheck(tile, arg) +areaCifCheck(tile, arg) Tile *tile; struct drcClientData *arg; { @@ -1078,8 +1078,8 @@ drcCifArea(argc, argv) for (i = 0; i < drcCifStyle->cs_nLayers;i++) { CIFLayer *layer = drcCifStyle->cs_layers[i]; - - if (strcmp(layer->cl_name,layers) == 0) + + if (strcmp(layer->cl_name,layers) == 0) { thislayer = i; break; @@ -1140,8 +1140,8 @@ drcCifMaxwidth(argc, argv) for (i = 0; i < drcCifStyle->cs_nLayers;i++) { CIFLayer *layer = drcCifStyle->cs_layers[i]; - - if (strcmp(layer->cl_name,layers) == 0) + + if (strcmp(layer->cl_name,layers) == 0) { thislayer = i; break; @@ -1160,7 +1160,7 @@ drcCifMaxwidth(argc, argv) TechError("unknown bend option %s\n",bends); return (0); } - + scalefactor = drcCifStyle->cs_scaleFactor; centidistance *= drcCifStyle->cs_expander; // BSI dpnext = drcCifRules[thislayer][DRC_CIF_SPACE]; @@ -1177,7 +1177,7 @@ drcCifMaxwidth(argc, argv) * * drcCifCheckArea-- * - * checks to see that a collection of cif tiles + * checks to see that a collection of cif tiles * have more than a minimum area. * * Results: @@ -1201,7 +1201,7 @@ drcCheckCifArea(starttile, arg, cptr) Tile *tile,*tp; Rect *cliprect = arg->dCD_rect; int scale = drcCifStyle->cs_scaleFactor; - + arg->dCD_cptr = (DRCCookie *)cptr; if (DRCstack == (Stack *) NULL) DRCstack = StackNew(64); @@ -1253,7 +1253,7 @@ drcCheckCifArea(starttile, arg, cptr) arg->dCD_cptr, arg->dCD_clientData); (*(arg->dCD_errors))++; } - + } forgetit: /* reset the tiles */ @@ -1327,7 +1327,7 @@ drcCheckCifMaxwidth(starttile,arg,cptr) TileTypeBitMask *oktypes = &cptr->drcc_mask; Tile *tile,*tp; int scale = drcCifStyle->cs_scaleFactor; - + arg->dCD_cptr = (DRCCookie *)cptr; if (DRCstack == (Stack *) NULL) DRCstack = StackNew(64); @@ -1363,7 +1363,7 @@ drcCheckCifMaxwidth(starttile,arg,cptr) { tile = (Tile *) STACKPOP(DRCstack); if (tile->ti_client != (ClientData)DRC_PENDING) continue; - + if (boundrect.r_xbot > LEFT(tile)) boundrect.r_xbot = LEFT(tile); if (boundrect.r_xtop < RIGHT(tile)) boundrect.r_xtop = RIGHT(tile); if (boundrect.r_ybot > BOTTOM(tile)) boundrect.r_ybot = BOTTOM(tile); @@ -1391,7 +1391,7 @@ drcCheckCifMaxwidth(starttile,arg,cptr) } if (boundrect.r_xtop - boundrect.r_xbot > edgelimit && - boundrect.r_ytop - boundrect.r_ybot > edgelimit) + boundrect.r_ytop - boundrect.r_ybot > edgelimit) { Rect rect; TiToRect(starttile,&rect); @@ -1407,7 +1407,7 @@ drcCheckCifMaxwidth(starttile,arg,cptr) (*(arg->dCD_errors))++; } } - + } /* reset the tiles */ starttile->ti_client = (ClientData)DRC_UNPROCESSED; diff --git a/drc/DRCcontin.c b/drc/DRCcontin.c index 3555a043..e7674c15 100644 --- a/drc/DRCcontin.c +++ b/drc/DRCcontin.c @@ -6,16 +6,16 @@ * records areas that need to be rechecked, and provides a * routine to perform those checks in background. * - * ********************************************************************* - * * Copyright (C) 1985, 1990 Regents of the University of California. * - * * Permission to use, copy, modify, and distribute this * - * * software and its documentation for any purpose and without * - * * fee is hereby granted, provided that the above copyright * - * * notice appear in all copies. The University of California * - * * makes no representations about the suitability of this * - * * software for any purpose. It is provided "as is" without * - * * express or implied warranty. Export of this software outside * - * * of the United States of America may require an export license. * + * ********************************************************************* + * * Copyright (C) 1985, 1990 Regents of the University of California. * + * * Permission to use, copy, modify, and distribute this * + * * software and its documentation for any purpose and without * + * * fee is hereby granted, provided that the above copyright * + * * notice appear in all copies. The University of California * + * * makes no representations about the suitability of this * + * * software for any purpose. It is provided "as is" without * + * * express or implied warranty. Export of this software outside * + * * of the United States of America may require an export license. * * ********************************************************************* */ @@ -46,7 +46,7 @@ static char rcsid[] __attribute__ ((unused)) = "$Header: /usr/cvsroot/magic-8.0/ #ifdef MAGIC_WRAPPER -/* Global variable which indicates that the background checker is +/* Global variable which indicates that the background checker is * still registered as an idle process. */ @@ -146,7 +146,7 @@ extern int drcCheckTile(); extern CellDef *DRCErrorDef; extern TileType DRCErrorType; - + /* * ---------------------------------------------------------------------------- * DRCCheckThis -- @@ -268,7 +268,7 @@ DRCCheckThis (celldef, operation, area) DRCCheckThis (cu->cu_parent, TT_CHECKSUBCELL, &transRect); } } - + /* * ---------------------------------------------------------------------------- @@ -410,7 +410,7 @@ DRCBreak() if (DRCHasWork && (DRCStatus == DRC_IN_PROGRESS)) { UndoEnable(); - + /* fprintf(stderr, "DRC breaking. . .\n"); fflush(stderr); */ /* As a convenience for debugging DRC stuff, we pretend the DRC @@ -441,7 +441,7 @@ DRCBreak() * None. * * Side effects: - * Modifies the DRC_CHECK and DRC_ERROR planes + * Modifies the DRC_CHECK and DRC_ERROR planes * of the CellDefs on the DRCPending list. * ---------------------------------------------------------------------------- */ @@ -550,7 +550,7 @@ checkDone: #endif } - + /* * ---------------------------------------------------------------------------- * drcCheckTile -- @@ -627,7 +627,7 @@ drcCheckTile(tile, arg) /* Find the checkerboard square containing the lower-left corner * of the check tile, then find all check tiles within that square. */ - + DRCstatSquares += 1; square.r_xbot = (LEFT(tile)/DRCStepSize) * DRCStepSize; if (square.r_xbot > LEFT(tile)) square.r_xbot -= DRCStepSize; @@ -658,7 +658,7 @@ drcCheckTile(tile, arg) DBClearPaintPlane(drcDisplayPlane); (void) DBSrPaintArea((Tile *) NULL, celldef->cd_planes[PL_DRC_ERROR], &square, &DBAllButSpaceBits, drcXorFunc, (ClientData) NULL); - + /* Check #1: recheck the paint of the cell, ignoring subcells. */ DRCErrorType = TT_ERROR_P; @@ -684,7 +684,7 @@ drcCheckTile(tile, arg) DRCErrorType = TT_ERROR_S; (void) DRCInteractionCheck(celldef, &square, &erasebox, drcPaintError, (ClientData) drcTempPlane); - + /* Check #3: check for array formation errors in the area. */ DRCErrorType = TT_ERROR_P; @@ -721,7 +721,7 @@ drcCheckTile(tile, arg) * clip to square and redisplay. If check tiles are being * displayed, then always redisplay the entire area. */ - + (void) DBSrPaintArea((Tile *) NULL, celldef->cd_planes[PL_DRC_ERROR], &square, &DBAllButSpaceBits, drcXorFunc, (ClientData) NULL); if (DBBoundPlane(drcDisplayPlane, &redisplayArea)) @@ -771,7 +771,7 @@ drcPutBackFunc(tile, cellDef) (PaintUndoInfo *) NULL); return 0; } - + /* * ---------------------------------------------------------------------------- * diff --git a/drc/DRCextend.c b/drc/DRCextend.c index 5cc87601..530bc47c 100644 --- a/drc/DRCextend.c +++ b/drc/DRCextend.c @@ -1,7 +1,7 @@ #ifndef lint static char rcsid[] __attribute__ ((unused)) = "$Header: /usr/cvsroot/magic-8.0/drc/DRCextend.c,v 1.6 2010/09/20 21:13:22 tim Exp $"; -#endif +#endif #include #include @@ -73,7 +73,7 @@ drcCheckAngles(tile, arg, cptr) /* *------------------------------------------------------------------------- * - * drcCheckArea- checks to see that a collection of tiles of a given + * drcCheckArea- checks to see that a collection of tiles of a given * type have more than a minimum area. * * Results: none @@ -97,7 +97,7 @@ drcCheckArea(starttile,arg,cptr) Rect *cliprect = arg->dCD_rect; arealimit = cptr->drcc_cdist; - + arg->dCD_cptr = cptr; if (DRCstack == (Stack *) NULL) DRCstack = StackNew(64); @@ -145,7 +145,7 @@ drcCheckArea(starttile,arg,cptr) (*(arg->dCD_function)) (arg->dCD_celldef, &rect, arg->dCD_cptr, arg->dCD_clientData); /*** - DBWAreaChanged(arg->dCD_celldef,&rect, DBW_ALLWINDOWS, + DBWAreaChanged(arg->dCD_celldef,&rect, DBW_ALLWINDOWS, &DBAllButSpaceBits); ***/ (*(arg->dCD_errors))++; @@ -197,7 +197,7 @@ forgetit: } } - + /* *------------------------------------------------------------------------- * @@ -244,7 +244,7 @@ drcCheckMaxwidth(starttile,arg,cptr) tile = (Tile *) STACKPOP(DRCstack); if (tile->ti_client != (ClientData)DRC_PENDING) continue; tile->ti_client = (ClientData)DRC_PROCESSED; - + if (boundrect.r_xbot > LEFT(tile)) boundrect.r_xbot = LEFT(tile); if (boundrect.r_xtop < RIGHT(tile)) boundrect.r_xtop = RIGHT(tile); if (boundrect.r_ybot > BOTTOM(tile)) boundrect.r_ybot = BOTTOM(tile); @@ -275,7 +275,7 @@ drcCheckMaxwidth(starttile,arg,cptr) } if (boundrect.r_xtop - boundrect.r_xbot > edgelimit && - boundrect.r_ytop - boundrect.r_ybot > edgelimit) + boundrect.r_ytop - boundrect.r_ybot > edgelimit) { Rect rect; TiToRect(starttile,&rect); @@ -286,7 +286,7 @@ drcCheckMaxwidth(starttile,arg,cptr) (*(arg->dCD_errors))++; retval = 1; } - + } /* reset the tiles */ @@ -332,13 +332,13 @@ drcCheckMaxwidth(starttile,arg,cptr) return retval; } - + /* *------------------------------------------------------------------------- * - * drcCheckRectSize- + * drcCheckRectSize- * - * Checks to see that a collection of tiles of given + * Checks to see that a collection of tiles of given * types have the proper size (max size and also even or odd size). * * Results: none @@ -372,10 +372,10 @@ drcCheckRectSize(starttile, arg, cptr) */ arg->dCD_cptr = cptr; ASSERT(TTMaskHasType(oktypes, TiGetType(starttile)), "drcCheckRectSize"); - for (t = starttile; TTMaskHasType(oktypes, TiGetType(t)); t = TR(t)) + for (t = starttile; TTMaskHasType(oktypes, TiGetType(t)); t = TR(t)) /* loop has empty body */ ; errwidth = width = LEFT(t) - LEFT(starttile); - for (t = starttile; TTMaskHasType(oktypes, TiGetType(t)); t = RT(t)) + for (t = starttile; TTMaskHasType(oktypes, TiGetType(t)); t = RT(t)) /* loop has empty body */ ; errheight = height = BOTTOM(t) - BOTTOM(starttile); ASSERT(width > 0 && height > 0, "drcCheckRectSize"); @@ -399,7 +399,7 @@ drcCheckRectSize(starttile, arg, cptr) arg->dCD_cptr, arg->dCD_clientData); (*(arg->dCD_errors))++; } - + } } @@ -462,7 +462,7 @@ drcCanonicalMaxwidth(starttile, dir, arg, cptr) boundrect = &(mrd->rlist[0]); mrd->match = CLIENTDEFAULT; - + edgelimit = cptr->drcc_dist; arg->dCD_cptr = cptr; diff --git a/drc/DRCmain.c b/drc/DRCmain.c index 6bb67818..1d9443a2 100644 --- a/drc/DRCmain.c +++ b/drc/DRCmain.c @@ -5,16 +5,16 @@ * command-level. They do things like give information about * errors and print statistics. * - * ********************************************************************* - * * Copyright (C) 1985, 1990 Regents of the University of California. * - * * Permission to use, copy, modify, and distribute this * - * * software and its documentation for any purpose and without * - * * fee is hereby granted, provided that the above copyright * - * * notice appear in all copies. The University of California * - * * makes no representations about the suitability of this * - * * software for any purpose. It is provided "as is" without * - * * express or implied warranty. Export of this software outside * - * * of the United States of America may require an export license. * + * ********************************************************************* + * * Copyright (C) 1985, 1990 Regents of the University of California. * + * * Permission to use, copy, modify, and distribute this * + * * software and its documentation for any purpose and without * + * * fee is hereby granted, provided that the above copyright * + * * notice appear in all copies. The University of California * + * * makes no representations about the suitability of this * + * * software for any purpose. It is provided "as is" without * + * * express or implied warranty. Export of this software outside * + * * of the United States of America may require an export license. * * ********************************************************************* */ @@ -125,7 +125,7 @@ static int drcTotalVRulesHisto[DRC_MAXRULESHISTO]; static int drcTotalHRulesHisto[DRC_MAXRULESHISTO]; #endif /* DRCRULESHISTO */ - + /* * ---------------------------------------------------------------------------- * drcPaintError -- @@ -199,7 +199,7 @@ drcSubstitute (cptr) whylen = strlen(whyptr) + 20 * subscnt; if (why_out != NULL) freeMagic(why_out); why_out = (char *)mallocMagic(whylen * sizeof(char)); - strcpy(why_out, whyptr); + strcpy(why_out, whyptr); oscale = CIFGetOutputScale(1000); /* 1000 for conversion to um */ wptr = why_out; @@ -243,7 +243,7 @@ drcSubstitute (cptr) return why_out; } - + /* * ---------------------------------------------------------------------------- * drcPrintError -- @@ -344,7 +344,7 @@ drcListallError (celldef, rect, cptr, scx) lobj = (Tcl_Obj *) HashGetValue(h); if (lobj == NULL) lobj = Tcl_NewListObj(0, NULL); - + pobj = Tcl_NewListObj(0, NULL); Tcl_ListObjAppendElement(magicinterp, pobj, Tcl_NewIntObj(r.r_xbot)); @@ -361,7 +361,7 @@ drcListallError (celldef, rect, cptr, scx) #define drcListError drcPrintError #endif - + /* * ---------------------------------------------------------------------------- * @@ -438,7 +438,7 @@ DRCPrintStats() } #endif /* DRCRULESHISTO */ } - + /* * ---------------------------------------------------------------------------- * @@ -497,11 +497,11 @@ DRCWhy(dolist, use, area) /* Delete the error list */ freeMagic(DRCErrorList); - + /* Redisplay the DRC yank definition in case anyone is looking * at it. */ - + DBReComputeBbox(DRCdef); (void) GeoInclude(&DRCdef->cd_bbox, &box); DBWAreaChanged(DRCdef, &box, DBW_ALLWINDOWS, &DBAllButSpaceBits); @@ -550,14 +550,14 @@ DRCWhyAll(use, area, fout) /* Generate results */ robj = Tcl_NewListObj(0, NULL); - + HashStartSearch(&hs); while ((he = HashNext(&DRCErrorTable, &hs)) != (HashEntry *)NULL) { lobj = (Tcl_Obj *)HashGetValue(he); if (lobj != NULL) { - Tcl_ListObjAppendElement(magicinterp, robj, + Tcl_ListObjAppendElement(magicinterp, robj, Tcl_NewStringObj((char *)he->h_key.h_name, -1)); Tcl_ListObjAppendElement(magicinterp, robj, lobj); } @@ -570,7 +570,7 @@ DRCWhyAll(use, area, fout) /* Redisplay the DRC yank definition in case anyone is looking * at it. */ - + DBReComputeBbox(DRCdef); (void) GeoInclude(&DRCdef->cd_bbox, &box); DBWAreaChanged(DRCdef, &box, DBW_ALLWINDOWS, &DBAllButSpaceBits); @@ -609,14 +609,14 @@ drcWhyFunc(scx, cdarg) bool dolist = (bool)((pointertype)cdarg); /* Check paint and interactions in this subcell. */ - + (void) DRCInteractionCheck(def, &scx->scx_area, &scx->scx_area, (dolist) ? drcListError : drcPrintError, (ClientData) scx); (void) DRCArrayCheck(def, &scx->scx_area, (dolist) ? drcListError : drcPrintError, (ClientData) scx); - + /* New behavior: Don't search children, instead propagate errors up. */ /* (void) DBCellSrArea(scx, drcWhyFunc, (ClientData)cdarg); */ @@ -633,12 +633,12 @@ drcWhyAllFunc(scx, cdarg) CellDef *def = scx->scx_use->cu_def; /* Check paint and interactions in this subcell. */ - + (void) DRCInteractionCheck(def, &scx->scx_area, &scx->scx_area, drcListallError, (ClientData)scx); (void) DRCArrayCheck(def, &scx->scx_area, drcListallError, (ClientData)scx); - + /* New behavior: Don't search children, instead propagate errors up. */ /* (void) DBCellSrArea(scx, drcWhyAllFunc, (ClientData)cdarg); */ @@ -718,12 +718,12 @@ drcCheckFunc(scx, cdarg) /* As a special performance hack, if the complete cell area is * handled here, don't bother to look at any more array elements. */ - + if (GEO_SURROUND(&cellArea, &def->cd_bbox)) return 2; else return 0; } - + /* * ---------------------------------------------------------------------------- * @@ -758,7 +758,7 @@ DRCCount(use, area, recurse) extern int drcCountFunc(); /* Shouldn't happen? */ - if (!(use->cu_def->cd_flags & CDAVAILABLE)) return NULL; + if (!(use->cu_def->cd_flags & CDAVAILABLE)) return NULL; /* Use a hash table to make sure that we don't output information * for any cell more than once. @@ -888,7 +888,7 @@ DRCCatchUp() DRCContinuous(); DRCBackGround = background; } - + /* * ---------------------------------------------------------------------------- * @@ -928,7 +928,7 @@ DRCFind(use, area, rect, indx) { SearchContext scx; Sindx finddata; - Rect trect; + Rect trect; int result; int drcFindFunc(); HashTable defTable; @@ -989,7 +989,7 @@ drcFindFunc(scx, finddata) finddata->trans = scx->scx_trans; return 1; } - + /* New behavior: Don't search children, instead propagate errors up. */ /* return DBCellSrArea(scx, drcFindFunc, (ClientData)finddata); */ return 0; diff --git a/drc/DRCprint.c b/drc/DRCprint.c index 855384ab..65b6915f 100644 --- a/drc/DRCprint.c +++ b/drc/DRCprint.c @@ -3,16 +3,16 @@ * * Edge-based design rule checker * - * ********************************************************************* - * * Copyright (C) 1985, 1990 Regents of the University of California. * - * * Permission to use, copy, modify, and distribute this * - * * software and its documentation for any purpose and without * - * * fee is hereby granted, provided that the above copyright * - * * notice appear in all copies. The University of California * - * * makes no representations about the suitability of this * - * * software for any purpose. It is provided "as is" without * - * * express or implied warranty. Export of this software outside * - * * of the United States of America may require an export license. * + * ********************************************************************* + * * Copyright (C) 1985, 1990 Regents of the University of California. * + * * Permission to use, copy, modify, and distribute this * + * * software and its documentation for any purpose and without * + * * fee is hereby granted, provided that the above copyright * + * * notice appear in all copies. The University of California * + * * makes no representations about the suitability of this * + * * software for any purpose. It is provided "as is" without * + * * express or implied warranty. Export of this software outside * + * * of the United States of America may require an export license. * * ********************************************************************* */ @@ -33,7 +33,7 @@ static char rcsid[] __attribute__ ((unused)) = "$Header: /usr/cvsroot/magic-8.0/ extern char *maskToPrint(); extern char *DBTypeShortName(); - + /* * ---------------------------------------------------------------------------- * @@ -63,7 +63,7 @@ drcGetName(layer, string) return string; } - + /* * ---------------------------------------------------------------------------- * DRCPrintRulesTable -- diff --git a/drc/DRCsubcell.c b/drc/DRCsubcell.c index 804643bb..eea576c0 100644 --- a/drc/DRCsubcell.c +++ b/drc/DRCsubcell.c @@ -5,16 +5,16 @@ * violations that occur as a result of interactions between * subcells and either paint or other subcells. * - * ********************************************************************* - * * Copyright (C) 1985, 1990 Regents of the University of California. * - * * Permission to use, copy, modify, and distribute this * - * * software and its documentation for any purpose and without * - * * fee is hereby granted, provided that the above copyright * - * * notice appear in all copies. The University of California * - * * makes no representations about the suitability of this * - * * software for any purpose. It is provided "as is" without * - * * express or implied warranty. Export of this software outside * - * * of the United States of America may require an export license. * + * ********************************************************************* + * * Copyright (C) 1985, 1990 Regents of the University of California. * + * * Permission to use, copy, modify, and distribute this * + * * software and its documentation for any purpose and without * + * * fee is hereby granted, provided that the above copyright * + * * notice appear in all copies. The University of California * + * * makes no representations about the suitability of this * + * * software for any purpose. It is provided "as is" without * + * * express or implied warranty. Export of this software outside * + * * of the United States of America may require an export license. * * ********************************************************************* */ @@ -94,7 +94,7 @@ drcFindOtherCells(use, area) return 0; } - + /* * ---------------------------------------------------------------------------- * @@ -164,7 +164,7 @@ drcSubcellFunc(subUse, propagate) (void) GeoInclude(&intArea, &drcSubIntArea); return 0; } - + /* * ---------------------------------------------------------------------------- * @@ -188,7 +188,7 @@ drcAlwaysOne() { return 1; } - + /* * ---------------------------------------------------------------------------- * @@ -238,7 +238,7 @@ drcSubCheckPaint(scx, curUse) } return 0; } - + /* * ---------------------------------------------------------------------------- * @@ -301,13 +301,13 @@ DRCFindInteractions(def, area, radius, interaction) propagate = FALSE; (void) DBSrCellPlaneArea(def->cd_cellPlane, &drcSubLookArea, drcSubcellFunc, (ClientData)(&propagate)); - + /* If there seems to be an interaction area, make a second pass * to make sure there's more than one cell with paint in the * area. This will save us a lot of work where two cells * have overlapping bounding boxes without overlapping paint. */ - + if (GEO_RECTNULL(&drcSubIntArea)) return FALSE; use = NULL; @@ -334,13 +334,13 @@ DRCFindInteractions(def, area, radius, interaction) } /* OK, no more excuses, there's really an interaction area here. */ - + *interaction = drcSubIntArea; GeoClip(interaction, area); if (GEO_RECTNULL(interaction)) return FALSE; return TRUE; } - + /* * ---------------------------------------------------------------------------- * @@ -377,7 +377,7 @@ drcExactOverlapCheck(tile, arg) (*(arg->dCD_errors))++; return 0; } - + /* * ---------------------------------------------------------------------------- * @@ -416,7 +416,7 @@ drcExactOverlapTile(tile, cxp) Tile *tp; Rect r1, r2, r3, rex; int i; - + arg = (struct drcClientData *) cxp->tc_filter->tf_arg; TiToRect(tile, &r1); GeoTransRect(&(cxp->tc_scx->scx_trans), &r1, &r2); @@ -505,7 +505,7 @@ drcExactOverlapTile(tile, cxp) } return 0; } - + /* * ---------------------------------------------------------------------------- * @@ -564,7 +564,7 @@ DRCInteractionCheck(def, area, erasebox, func, cdarg) /* Divide the area to be checked up into squares. Process each * square separately. */ - + x = (area->r_xbot/DRCStepSize) * DRCStepSize; if (x > area->r_xbot) x -= DRCStepSize; y = (area->r_ybot/DRCStepSize) * DRCStepSize; @@ -599,7 +599,7 @@ DRCInteractionCheck(def, area, erasebox, func, cdarg) errorSaveType = DRCErrorType; DRCErrorType = TT_ERROR_P; // Basic check is always ERROR_P - DRCBasicCheck(def, &intArea, &subArea, func, cdarg); + DRCBasicCheck(def, &intArea, &subArea, func, cdarg); DRCErrorType = errorSaveType; continue; } @@ -631,16 +631,16 @@ DRCInteractionCheck(def, area, erasebox, func, cdarg) { subArea.r_ybot = intArea.r_ytop; GEO_EXPAND(&subArea, DRCTechHalo, &eraseHalo); - DRCBasicCheck(def, &eraseHalo, &subArea, func, cdarg); - } + DRCBasicCheck(def, &eraseHalo, &subArea, func, cdarg); + } /* check below */ if (intArea.r_ybot > eraseClip.r_ybot) { subArea.r_ybot = eraseClip.r_ybot; subArea.r_ytop = intArea.r_ybot; GEO_EXPAND(&subArea, DRCTechHalo, &eraseHalo); - DRCBasicCheck(def, &eraseHalo, &subArea, func, cdarg); - } + DRCBasicCheck(def, &eraseHalo, &subArea, func, cdarg); + } subArea.r_ytop = intArea.r_ytop; subArea.r_ybot = intArea.r_ybot; @@ -649,7 +649,7 @@ DRCInteractionCheck(def, area, erasebox, func, cdarg) { subArea.r_xbot = intArea.r_xtop; GEO_EXPAND(&subArea, DRCTechHalo, &eraseHalo); - DRCBasicCheck(def, &eraseHalo, &subArea, func, cdarg); + DRCBasicCheck(def, &eraseHalo, &subArea, func, cdarg); } /* check left */ if (intArea.r_xbot > eraseClip.r_xbot) @@ -657,7 +657,7 @@ DRCInteractionCheck(def, area, erasebox, func, cdarg) subArea.r_xtop = intArea.r_xbot; subArea.r_xbot = eraseClip.r_xbot; GEO_EXPAND(&subArea, DRCTechHalo, &eraseHalo); - DRCBasicCheck(def, &eraseHalo, &subArea, func, cdarg); + DRCBasicCheck(def, &eraseHalo, &subArea, func, cdarg); } DRCErrorType = errorSaveType; } @@ -667,7 +667,7 @@ DRCInteractionCheck(def, area, erasebox, func, cdarg) subArea = *erasebox; GEO_EXPAND(&subArea, DRCTechHalo, &cliparea); GeoClip(&intArea, &cliparea); - + /* Flatten the interaction area. */ DRCstatInteractions += 1; @@ -708,7 +708,7 @@ DRCInteractionCheck(def, area, erasebox, func, cdarg) (void) DBTreeSrUniqueTiles(&scx, &DRCCurStyle->DRCExactOverlapTypes, 0, drcExactOverlapTile, (ClientData) &arg); } - + /* Update count of interaction tiles processed. */ DRCstatIntTiles += DRCstatTiles - oldTiles; diff --git a/drc/DRCtech.c b/drc/DRCtech.c index 65f397b1..f3d22699 100644 --- a/drc/DRCtech.c +++ b/drc/DRCtech.c @@ -3,16 +3,16 @@ * * Technology initialization for the DRC module. * - * ********************************************************************* - * * Copyright (C) 1985, 1990 Regents of the University of California. * - * * Permission to use, copy, modify, and distribute this * - * * software and its documentation for any purpose and without * - * * fee is hereby granted, provided that the above copyright * - * * notice appear in all copies. The University of California * - * * makes no representations about the suitability of this * - * * software for any purpose. It is provided "as is" without * - * * express or implied warranty. Export of this software outside * - * * of the United States of America may require an export license. * + * ********************************************************************* + * * Copyright (C) 1985, 1990 Regents of the University of California. * + * * Permission to use, copy, modify, and distribute this * + * * software and its documentation for any purpose and without * + * * fee is hereby granted, provided that the above copyright * + * * notice appear in all copies. The University of California * + * * makes no representations about the suitability of this * + * * software for any purpose. It is provided "as is" without * + * * express or implied warranty. Export of this software outside * + * * of the United States of America may require an export license. * * ********************************************************************* */ @@ -112,7 +112,7 @@ CoincidentPlanes(typeMask, pmask) return planes; } - + /* * ---------------------------------------------------------------------------- @@ -428,7 +428,7 @@ drcFindBucket(i, j, distance) * ---------------------------------------------------------------------------- * * drcLoadStyle -- - * + * * Re-read the technology file to load the specified technology DRC style * into structure DRCCurStyle. It incurs a complete reading of the tech * file on startup and every time the extraction style is changed, but we @@ -469,7 +469,7 @@ drcLoadStyle(stylename) * * Side Effects: * DRC rule database is deleted and regenerated. - * + * * ---------------------------------------------------------------------------- */ @@ -609,7 +609,7 @@ DRCTechStyleInit() * get one of the layers, and it doesn't matter which is painted * on top of which. */ - + for (plane = 0; plane < DBNumPlanes; plane++) for (i = 0; i < DBNumTypes; i++) for (j = 0; j < DBNumTypes; j++) @@ -629,7 +629,7 @@ DRCTechStyleInit() { DRCCurStyle->DRCPaintTable[plane][i][j] = result; } - + else if ((!TTMaskHasType(&DBLayerTypeMaskTbl[i], result) && !TTMaskHasType(&DBLayerTypeMaskTbl[j], result)) || ((result != DBPaintResultTbl[plane][j][i]) @@ -736,7 +736,7 @@ DRCTechLine(sectionName, argc, argv) /* Remember the 1st variant as the default */ if (saveStyle == NULL) saveStyle = newStyle; - + /* Append to end of style list */ if (DRCStyleList == NULL) DRCStyleList = newStyle; @@ -812,7 +812,7 @@ DRCTechLine(sectionName, argc, argv) if (DRCStyleList == NULL) { char *locargv[2][10] = {"style", "default"}; - + if (DRCTechLine(sectionName, 2, locargv) == FALSE) return FALSE; } @@ -840,7 +840,7 @@ DRCTechLine(sectionName, argc, argv) int scaleN, scaleD; if (argc != 2 && argc != 3) goto wrongNumArgs; - + scaleN = atof(argv[1]); if (argc == 3) @@ -1147,7 +1147,7 @@ drcExtend(argc, argv) ptest = DBTechNoisyNameMask(layers1, &set1); pMask1 = CoincidentPlanes(&set1, ptest); - + if (pMask1 == 0) { TechError("All layers in first set for \"extend\" must be on " @@ -1205,7 +1205,7 @@ drcExtend(argc, argv) dpnew = (DRCCookie *)mallocMagic(sizeof(DRCCookie)); drcAssign(dpnew, distance, dp->drcc_next, &setM, &setZ, why, 0, DRC_REVERSE, plane, plane); - + dp->drcc_next = dpnew; if (exact) @@ -1222,7 +1222,7 @@ drcExtend(argc, argv) dpnew = (DRCCookie *)mallocMagic(sizeof(DRCCookie)); drcAssign(dpnew, distance, dp->drcc_next, &setN, &setZ, why, 0, DRC_REVERSE | DRC_OUTSIDE, plane, plane); - + dp->drcc_next = dpnew; } } @@ -1420,7 +1420,7 @@ drcArea(argc, argv) dpnew = (DRCCookie *) mallocMagic(sizeof (DRCCookie)); drcAssign(dpnew, horizon, dp->drcc_next, &set, &set, why, distance, DRC_AREA|DRC_FORWARD, plane, plane); - + dp->drcc_next = dpnew; } } @@ -1450,7 +1450,7 @@ drcArea(argc, argv) * maxwidth pmc 4 bend_illegal "poly contact area must be no wider than 4" * maxwidth trench 4 bend_ok "trench width must be exactly 4" * - * bend_illegal - means that one_dimension must be distance for any + * bend_illegal - means that one_dimension must be distance for any * point in the region. This is used for emitters and contacts * that are rectangular (so we can't generate them with the * squares command) and some exact width in one direction. @@ -1462,8 +1462,8 @@ drcArea(argc, argv) * X X XXXXXX * X X X X * XXXXX XXXXXX - * - * OK BAD + * + * OK BAD * * Results: * Returns distance. @@ -1544,7 +1544,7 @@ drcMaxwidth(argc, argv) dpnew = (DRCCookie *) mallocMagic(sizeof (DRCCookie)); drcAssign(dpnew, distance, dp->drcc_next, &set, &set, why, distance, DRC_MAXWIDTH | bend, plane, plane); - + dp->drcc_next = dpnew; } } @@ -1717,7 +1717,7 @@ drcSpacing3(argc, argv) * * Side effects: * Adds rules to the DRC rule table. - * + * *------------------------------------------------------------------- */ @@ -1804,10 +1804,10 @@ drcMaskSpacing(set1, set2, pmask1, pmask2, wwidth, distance, adjacency, if (touchingok) { - /* In "touching_ok rules, spacing to set2 is be checked in FORWARD + /* In "touching_ok rules, spacing to set2 is be checked in FORWARD * direction at edges between set1 and (setR = ~set1 AND ~set2). * - * In addition, spacing to set1 is checked in FORWARD direction + * In addition, spacing to set1 is checked in FORWARD direction * at edges between set2 and (setRreverse = ~set1 AND ~set2). * * If set1 and set2 are different, above are checked in REVERSE as @@ -1818,7 +1818,7 @@ drcMaskSpacing(set1, set2, pmask1, pmask2, wwidth, distance, adjacency, */ tmp1 = *set1; - tmp2 = *set2; + tmp2 = *set2; /* Restrict planes to those that are coincident */ pmask1 &= pmask2; @@ -1836,7 +1836,7 @@ drcMaskSpacing(set1, set2, pmask1, pmask2, wwidth, distance, adjacency, else { /* In "touching_illegal" rules, spacing to set2 will be checked - * in FORWARD direction at edges between set1 and (setR=~set1). + * in FORWARD direction at edges between set1 and (setR=~set1). * * In addition, spacing to set1 will be checked in FORWARD direction * at edges between set2 and (setRreverse= ~set2). @@ -1897,7 +1897,7 @@ drcMaskSpacing(set1, set2, pmask1, pmask2, wwidth, distance, adjacency, else if (needtrigger) { DRCCookie *dptrig; - + /* Create two contiguous spacing rules */ drcAssign(dpnew, distance, dp->drcc_next, &tmp1, &tmp2, @@ -1923,12 +1923,12 @@ drcMaskSpacing(set1, set2, pmask1, pmask2, wwidth, distance, adjacency, if (needReverse) { - /* Add check in reverse direction, + /* Add check in reverse direction, * NOTE: am assuming single plane rule here (since reverse - * rules only used with touching_ok which must be + * rules only used with touching_ok which must be * single plane) */ - + /* find bucket preceding new one we wish to insert */ dp = drcFindBucket(j, i, distance); dpnew = (DRCCookie *)mallocMagic(sizeof (DRCCookie)); @@ -1951,7 +1951,7 @@ drcMaskSpacing(set1, set2, pmask1, pmask2, wwidth, distance, adjacency, else if (needtrigger) { DRCCookie *dptrig; - + /* Create two contiguous spacing rules */ drcAssign(dpnew, distance, dp->drcc_next, &tmp1, &tmp2, @@ -1968,7 +1968,7 @@ drcMaskSpacing(set1, set2, pmask1, pmask2, wwidth, distance, adjacency, else { drcAssign(dpnew,distance,dp->drcc_next, - &tmp1, &tmp2, why, wwidth, + &tmp1, &tmp2, why, wwidth, DRC_REVERSE | DRC_BOTHCORNERS, plane2, plane); dp->drcc_next = dpnew; } @@ -2003,7 +2003,7 @@ drcMaskSpacing(set1, set2, pmask1, pmask2, wwidth, distance, adjacency, if (needtrigger) { DRCCookie *dptrig; - + /* Create two contiguous spacing rules */ drcAssign(dpnew, distance, dp->drcc_next, &tmp1, &tmp2, @@ -2019,7 +2019,7 @@ drcMaskSpacing(set1, set2, pmask1, pmask2, wwidth, distance, adjacency, { drcAssign(dpnew, distance, dp->drcc_next, &tmp1, &tmp2, why, distance, DRC_FORWARD, plane2, plane); - dp->drcc_next = dpnew; + dp->drcc_next = dpnew; } if (needReverse) @@ -2027,19 +2027,19 @@ drcMaskSpacing(set1, set2, pmask1, pmask2, wwidth, distance, adjacency, if (needReverse) { - /* Add check in reverse direction, + /* Add check in reverse direction, * NOTE: am assuming single plane rule here (since reverse - * rules only used with touching_ok which must be + * rules only used with touching_ok which must be * single plane) */ /* find bucket preceding new one we wish to insert */ dp = drcFindBucket(j, i, distance); dpnew = (DRCCookie *) mallocMagic(sizeof (DRCCookie)); - + if (needtrigger) { DRCCookie *dptrig; - + /* Create two contiguous spacing rules */ drcAssign(dpnew, distance, dp->drcc_next, &tmp1, &tmp2, @@ -2054,7 +2054,7 @@ drcMaskSpacing(set1, set2, pmask1, pmask2, wwidth, distance, adjacency, else { drcAssign(dpnew, distance, dp->drcc_next, - &tmp1, &tmp2, why, distance, + &tmp1, &tmp2, why, distance, DRC_REVERSE | DRC_BOTHCORNERS, plane2, plane); dp->drcc_next = dpnew; } @@ -2066,11 +2066,11 @@ drcMaskSpacing(set1, set2, pmask1, pmask2, wwidth, distance, adjacency, * are not present just to right of edges with setR on LHS * and set1 on RHS. This check is necessary to make sure * that a set1 rectangle doesn't coincide exactly with a - * set2 rectangle. + * set2 rectangle. * (This check added by Michael Arnold on 4/10/86.) */ - if (needtrigger) continue; + if (needtrigger) continue; if (pset = (DBTypesOnSamePlane(i, j) & pmask1)) { @@ -2098,7 +2098,7 @@ drcMaskSpacing(set1, set2, pmask1, pmask2, wwidth, distance, adjacency, plane2 = LowestMaskBit(pmask2); /* filter out checks that are not cross plane */ - if (i == TT_SPACE) + if (i == TT_SPACE) { if (DBTypeOnPlane(j, plane2)) continue; @@ -2384,7 +2384,7 @@ drcEdge(argc, argv) ptest = DBTechNoisyNameMask(layers2, &set2); pMask1 &= CoincidentPlanes(&set2, ptest); - if (pMask1 == 0) + if (pMask1 == 0) { TechError("All edges in edge rule must lie in shared planes.\n"); return (0); @@ -2415,7 +2415,7 @@ drcEdge(argc, argv) ptest = DBTechNoisyNameMask(okTypes, &setM); pMaskM = CoincidentPlanes(&setM, ptest); - + if (pMaskM == 0 || pMaskM == DBTypePlaneMaskTbl[TT_SPACE]) { /* Technically it should be illegal to specify simply "space" @@ -3066,7 +3066,7 @@ drcNoOverlap(argc, argv) return (0); } - + /* * ---------------------------------------------------------------------------- * @@ -3119,9 +3119,9 @@ drcExactOverlap(argc, argv) * rectangle layers maxwidth [even|odd|any] why * * The rule checks to make sure that the region is rectangular and that the - * width and length are even or odd, as specified. These two criteria ensure - * that the squares rule of the cifout section can properly produce via - * holes without misaligning them between cells and without putting the via + * width and length are even or odd, as specified. These two criteria ensure + * that the squares rule of the cifout section can properly produce via + * holes without misaligning them between cells and without putting the via * holes off grid. The maxwidth is required to make the extent of this rule * a finite size, so that we can set the DRChalo to something finite. * @@ -3185,8 +3185,8 @@ drcRectangle(argc, argv) plane = LowestMaskBit(pset); - /* - * A rule that checks rectangle-ness. + /* + * A rule that checks rectangle-ness. * left: oktypes, right: other types * This rule needs to be checked in all 4 directions */ @@ -3195,21 +3195,21 @@ drcRectangle(argc, argv) /* Find bucket preceding the new one we wish to insert */ dp = drcFindBucket(i, j, distance); dpnew = (DRCCookie *) mallocMagic((unsigned) (sizeof (DRCCookie))); - drcAssign(dpnew, distance, dp->drcc_next, - ¬types, &DBAllTypeBits, why, distance, + drcAssign(dpnew, distance, dp->drcc_next, + ¬types, &DBAllTypeBits, why, distance, DRC_FORWARD, plane, plane); dp->drcc_next = dpnew; /* Find bucket preceding the new one we wish to insert */ dp = drcFindBucket(j, i, distance); /* note: j, i not i, j */ dpnew = (DRCCookie *) mallocMagic((unsigned) (sizeof (DRCCookie))); - drcAssign(dpnew, distance, dp->drcc_next, - ¬types, &DBAllTypeBits, why, distance, + drcAssign(dpnew, distance, dp->drcc_next, + ¬types, &DBAllTypeBits, why, distance, DRC_REVERSE, plane, plane); dp->drcc_next = dpnew; if (maxwidth > 0) { - /* + /* * A rule that checks size. * left: other types, right: oktypes */ @@ -3222,8 +3222,8 @@ drcRectangle(argc, argv) dp = dp->drcc_next); /* null body */ dpnew = (DRCCookie *)mallocMagic(sizeof (DRCCookie)); - drcAssign(dpnew, distance, dp->drcc_next, - &types, &DBZeroTypeBits, why, even, + drcAssign(dpnew, distance, dp->drcc_next, + &types, &DBZeroTypeBits, why, even, DRC_RECTSIZE, plane, plane); dp->drcc_next = dpnew; } @@ -3525,7 +3525,7 @@ drcTechFinalStyle(style) /* A reasonable chunk size for design-rule checking is about * 16 times the maximum design-rule interaction distance. This - * results in a halo overhead of about 27%. If there's no DRC + * results in a halo overhead of about 27%. If there's no DRC * information at all (TechHalo is zero), just pick any size. * (Update 1/13/09: "any size" needs a bit of modification, * because 64 will be way too small for a layout with a small @@ -3554,7 +3554,7 @@ drcTechFinalStyle(style) dpp = &(style->DRCRulesTbl [i][j]); dummy = *dpp; *dpp = dummy->drcc_next; - freeMagic((char *) dummy); + freeMagic((char *) dummy); } } drcCifFinal(); @@ -3564,13 +3564,13 @@ drcTechFinalStyle(style) /* Check for edges that are completely illegal. Where this is the * case, eliminate all of the edge's rules except one. */ - + for (i = 0; i < DBNumTypes; i++) { for (j = 0; j < DBNumTypes; j++) { DRCCookie *keep = NULL, *dptest, *dptemp, *dpnew; - + for (dp = style->DRCRulesTbl[i][j]; dp != NULL; dp = dp->drcc_next) { if (dp->drcc_flags & (DRC_NONSTANDARD || DRC_OUTSIDE)) continue; @@ -3609,7 +3609,7 @@ drcTechFinalStyle(style) /* This edge is illegal. Throw away all rules except the one * needed that is always violated. */ - + dptest = style->DRCRulesTbl[i][j]; while (dptest != NULL) { @@ -3669,7 +3669,7 @@ drcTechFinalStyle(style) } else dptrig = NULL; - + /* * Check following buckets to see if any is a superset. */ @@ -3754,7 +3754,7 @@ drcTechFinalStyle(style) } } - + /* * ---------------------------------------------------------------------------- * @@ -3784,7 +3784,7 @@ DRCTechRuleStats() /* Count up the total number of edge rules, and histogram them * by the number of rules per edge. */ - + edgeRules = 0; overflow = 0; for (i=0; i<=MAXBIN; i++) counts[i] = 0; @@ -3800,7 +3800,7 @@ DRCTechRuleStats() if (thisCount <= MAXBIN) counts[thisCount] += 1; else overflow += 1; } - + /* Print out the results. */ TxPrintf("Total number of rules specifed in tech file: %d\n", diff --git a/drc/drc.h b/drc/drc.h index 0f04f450..40984a0e 100644 --- a/drc/drc.h +++ b/drc/drc.h @@ -3,16 +3,16 @@ * * Definitions for the DRC module. * - * ********************************************************************* - * * Copyright (C) 1985, 1990 Regents of the University of California. * - * * Permission to use, copy, modify, and distribute this * - * * software and its documentation for any purpose and without * - * * fee is hereby granted, provided that the above copyright * - * * notice appear in all copies. The University of California * - * * makes no representations about the suitability of this * - * * software for any purpose. It is provided "as is" without * - * * express or implied warranty. Export of this software outside * - * * of the United States of America may require an export license. * + * ********************************************************************* + * * Copyright (C) 1985, 1990 Regents of the University of California. * + * * Permission to use, copy, modify, and distribute this * + * * software and its documentation for any purpose and without * + * * fee is hereby granted, provided that the above copyright * + * * notice appear in all copies. The University of California * + * * makes no representations about the suitability of this * + * * software for any purpose. It is provided "as is" without * + * * express or implied warranty. Export of this software outside * + * * of the United States of America may require an export license. * * ********************************************************************* * * Needs to include: magic.h database.h @@ -103,7 +103,7 @@ struct drcClientData int dCD_plane; Rect * dCD_rect; Tile * dCD_initial; /* Initial tile for search (left side - * for forward rules, right for reverse + * for forward rules, right for reverse * rules). */ Rect * dCD_clip; /* Clip error tiles against this. */ @@ -220,7 +220,7 @@ extern DRCStyle *DRCCurStyle; /* Current DRC style in effect */ extern CellDef *DRCdef; /* Current cell being checked for DRC */ extern CellUse *DRCuse, *DRCDummyUse; -/* +/* * Internal procedures */ diff --git a/ext2sim/ext2sim.c b/ext2sim/ext2sim.c index 4efe627e..ecd18775 100644 --- a/ext2sim/ext2sim.c +++ b/ext2sim/ext2sim.c @@ -97,12 +97,12 @@ struct { } fetInfo[MAXDEVTYPES]; typedef struct { - long visitMask:MAXDEVTYPES; + long visitMask:MAXDEVTYPES; } nodeClient; typedef struct { HierName *lastPrefix; - long visitMask:MAXDEVTYPES; + long visitMask:MAXDEVTYPES; } nodeClientHier; #define NO_RESCLASS -1 @@ -225,7 +225,7 @@ Exttosim_Init(interp) #endif /* EXT2SIM_AUTO */ - + /* * ---------------------------------------------------------------------------- * @@ -257,7 +257,7 @@ CmdExtToSim(w, cmd) int value; int option = EXTTOSIM_RUN; int argc = cmd->tx_argc; - char **argv = cmd->tx_argv; + char **argv = cmd->tx_argv; char **msg; bool err_result; @@ -371,7 +371,7 @@ CmdExtToSim(w, cmd) LocCapThreshold = INFINITE_THRESHOLD_F; else if (StrIsNumeric(cmd->tx_argv[2])) LocCapThreshold = atoCap(cmd->tx_argv[2]); - else + else TxError("exttosim: numeric value or \"infinite\" expected.\n"); break; case EXTTOSIM_RTHRESH: @@ -389,7 +389,7 @@ CmdExtToSim(w, cmd) LocResistThreshold = atoi(cmd->tx_argv[2]); else if (!strncmp(cmd->tx_argv[2], "inf", 3)) LocResistThreshold = INFINITE_THRESHOLD; - else + else TxError("exttosim: integer value or \"infinite\" expected.\n"); break; case EXTTOSIM_FORMAT: @@ -439,7 +439,7 @@ CmdExtToSim(w, cmd) break; } break; - + case EXTTOSIM_DEFAULT: LocCapThreshold = 2; LocResistThreshold = 10; @@ -492,7 +492,7 @@ runexttosim: if (inName == NULL) { /* Assume that we want to do exttospice on the currently loaded cell */ - + if (w == (MagWindow *) NULL) windCheckOnlyWindow(&w, DBWclientID); @@ -601,7 +601,7 @@ runexttosim: /* Write the output file */ fprintf(esSimF, "| units: %g tech: %s format: %s\n", EFScale, EFTech, - (esFormat == MIT) ? "MIT" : + (esFormat == MIT) ? "MIT" : ( (esFormat == LBL) ? "LBL" : "SU" ) ); /* Convert the hierarchical description to a flat one */ @@ -730,7 +730,7 @@ main(argc, argv) } fprintf(esSimF, "| units: %g tech: %s format: %s\n", EFScale, EFTech, - (esFormat == MIT) ? "MIT" : + (esFormat == MIT) ? "MIT" : ( (esFormat == LBL) ? "LBL" : "SU" ) ); /* Convert the hierarchical description to a flat one */ @@ -769,7 +769,7 @@ main(argc, argv) } #endif /* MAGIC_WRAPPER */ - + /* * ---------------------------------------------------------------------------- * @@ -891,8 +891,8 @@ simmainArgs(pargc, pargv) fetInfo[ndx].resClassSub = rClassSub; fetInfo[ndx].defSubs = (char *) mallocMagic((unsigned) (strlen(subsNode)+1)); strcpy(fetInfo[ndx].defSubs,subsNode); - TxError("Info: fet %s(%d) sdRclass=%d subRclass=%d dSub=%s\n", - cp, ndx, fetInfo[ndx].resClassSD, fetInfo[ndx].resClassSub, + TxError("Info: fet %s(%d) sdRclass=%d subRclass=%d dSub=%s\n", + cp, ndx, fetInfo[ndx].resClassSD, fetInfo[ndx].resClassSub, fetInfo[ndx].defSubs); break; } @@ -924,7 +924,7 @@ usage: exit (1); #endif } - + /* * ---------------------------------------------------------------------------- @@ -949,7 +949,7 @@ HierName *suffix; return(((EFNodeName *) HashGetValue(he))->efnn_node); } - + /* * ---------------------------------------------------------------------------- * @@ -1062,13 +1062,13 @@ simdevVisit(dev, hierName, scale, trans) if (dev->dev_class == DEV_BJT && subnode) { sprintf(name, "fet"); - simdevOutNode(hierName, subnode->efnode_name->efnn_hier, name, esSimF); + simdevOutNode(hierName, subnode->efnode_name->efnn_hier, name, esSimF); } else if ((dev->dev_class == DEV_DIODE || dev->dev_class == DEV_PDIODE || dev->dev_class == DEV_NDIODE) && dev->dev_nterm == 1 && subnode) { sprintf(name, "fet"); - simdevOutNode(hierName, subnode->efnode_name->efnn_hier, name, esSimF); + simdevOutNode(hierName, subnode->efnode_name->efnn_hier, name, esSimF); } else if (dev->dev_nterm > 2) simdevOutNode(hierName, drain->dterm_node->efnode_name->efnn_hier, name, esSimF); @@ -1091,7 +1091,7 @@ simdevVisit(dev, hierName, scale, trans) * comparator will deal with any problem arising from * swapping L and W. */ - + int n; double cl, cw; double chp = 0.0; @@ -1158,7 +1158,7 @@ simdevVisit(dev, hierName, scale, trans) if ( esFormat == SU ) { fprintf(esSimF, "%s", (source->dterm_attrs) ? "," : " s=" ); if (hierS) - simnAPHier(source, hierName, fetInfo[dev->dev_type].resClassSD, + simnAPHier(source, hierName, fetInfo[dev->dev_type].resClassSD, scale, esSimF); else { snode= SimGetNode(hierName, @@ -1175,13 +1175,13 @@ simdevVisit(dev, hierName, scale, trans) } if ( esFormat == SU ) { fprintf(esSimF, "%s", (drain->dterm_attrs) ? "," : " d=" ); - if (hierD) - simnAPHier(drain, hierName, fetInfo[dev->dev_type].resClassSD, + if (hierD) + simnAPHier(drain, hierName, fetInfo[dev->dev_type].resClassSD, scale, esSimF); else { dnode = SimGetNode(hierName, drain->dterm_node->efnode_name->efnn_hier); - simnAP(dnode, fetInfo[dev->dev_type].resClassSD, + simnAP(dnode, fetInfo[dev->dev_type].resClassSD, scale, esSimF); } } @@ -1251,7 +1251,7 @@ FILE *outf; * * simnAP, simnAPHier -- * - * Output the area perimeter of the node with type type if it has not + * Output the area perimeter of the node with type type if it has not * been visited. * The simnAPHier version outputs the area and perimeter only within the * local subcell with hierarchical name hierName. @@ -1262,7 +1262,7 @@ FILE *outf; * * ---------------------------------------------------------------------------- */ - + bool simnAP(node, resClass, scale, outf) EFNode *node; int resClass; @@ -1271,7 +1271,7 @@ FILE *outf; { int a, p; - if ( node->efnode_client == (ClientData) NULL ) + if ( node->efnode_client == (ClientData) NULL ) initNodeClient(node); if ( resClass == NO_RESCLASS || beenVisited((nodeClient *)node->efnode_client, resClass) ) { @@ -1298,7 +1298,7 @@ bool simnAPHier(dterm, hierName, resClass, scale, outf) nodeClientHier *nc ; int a, p; - if ( node->efnode_client == (ClientData) NULL ) + if ( node->efnode_client == (ClientData) NULL ) initNodeClientHier(node); nc = (nodeClientHier *)node->efnode_client; if ( nc->lastPrefix != hierName ) { @@ -1319,7 +1319,7 @@ bool simnAPHier(dterm, hierName, resClass, scale, outf) return TRUE; } - + /* * ---------------------------------------------------------------------------- * @@ -1365,7 +1365,7 @@ simdevOutNode(prefix, suffix, name, outf) initNodeClient(nn->efnn_node); return 0; } - + /* * ---------------------------------------------------------------------------- * @@ -1407,7 +1407,7 @@ int simcapVisit(hierName1, hierName2, cap) fprintf(esSimF, esCapFormat, cap); return 0; } - + /* * ---------------------------------------------------------------------------- * @@ -1447,7 +1447,7 @@ simresistVisit(hierName1, hierName2, res) fprintf(esSimF, " %g\n", res / 1000.); return 0; } - + /* * ---------------------------------------------------------------------------- * @@ -1626,7 +1626,7 @@ Dev *dev; } \ } - + /* * ---------------------------------------------------------------------------- * @@ -1673,11 +1673,11 @@ Transform *trans; /* Coordinate transform (not used) */ dnode = SimGetNode (hierName, drain->dterm_node->efnode_name->efnn_hier); EFGetLengthAndWidth(dev, &l, &w); - fp = simmkDevMerge((int)(l*scale), (int)(w*scale), gnode, snode, + fp = simmkDevMerge((int)(l*scale), (int)(w*scale), gnode, snode, dnode, subnode, hierName, dev); /* - * run the list of devs. compare the current one with + * run the list of devs. compare the current one with * each one in the list. if they fullfill the matching requirements * merge them. */ @@ -1689,14 +1689,14 @@ Transform *trans; /* Coordinate transform (not used) */ cg = &cfp->dev->dev_terms[0]; cs = cd = &cfp->dev->dev_terms[1]; if (cfp->dev->dev_nterm >= 3) { - if ( pmode == PARALLEL ) + if ( pmode == PARALLEL ) cd = &cfp->dev->dev_terms[2]; - else if ( pmode == PARALLEL_R ) + else if ( pmode == PARALLEL_R ) cs = &cfp->dev->dev_terms[2]; } - + m = esFMult[cfp->esFMIndex] + ((float)fp->w/(float)cfp->w); - setDevMult(fp->esFMIndex, DEV_KILLED); + setDevMult(fp->esFMIndex, DEV_KILLED); setDevMult(cfp->esFMIndex, m); esDevsMerged++; freeMagic(fp); diff --git a/ext2sim/sim2simp.c b/ext2sim/sim2simp.c index fd11f843..59a65739 100644 --- a/ext2sim/sim2simp.c +++ b/ext2sim/sim2simp.c @@ -60,7 +60,7 @@ char *typ, *g, *s, *d, *l, *w, *x, *y, *ga, *sa, *da; int as, ps, ad, pd; ln = (float) atof(l); wn = (float) atof(w); - if ( ga == NULL ) + if ( ga == NULL ) as = ps = ad = pd = 0 ; else { parseAttr(sa, &as, &ps); @@ -94,7 +94,7 @@ char *typ, *g, *s, *d, *l, *w, *x, *y, *ga, *sa, *da; iptr->g = strsave(g); iptr->s = strsave(s); iptr->d = strsave(d); iptr->l = ln ; iptr->w = wn; if ( x != NULL ) { - iptr->x = (int) atoi(x); + iptr->x = (int) atoi(x); iptr->y = (int) atoi(y); iptr->as = as ; iptr->ps = ps ; iptr->ad = ad ; iptr->pd = pd ; @@ -115,7 +115,7 @@ main () while (fgets (str, STRLEN - 1, stdin)) { - if ( *str == 'p' || *str == 'n' || + if ( *str == 'p' || *str == 'n' || *str == 'e' || *str == 'd' ) { typ = strtok(str, " "); g = strtok(NULL, " "); @@ -133,21 +133,21 @@ main () da = strtok(NULL, " "); } addMos(typ, g, s, d, l, w, x, y, ga, sa, da); - } + } else puts(str); } fprintf(stderr,"| %d parallel devices\n", par); - for ( i = 0 ; i < ndx ; i ++ ) + for ( i = 0 ; i < ndx ; i ++ ) /*if ( mosFets[i].ga )*/ if (1) - printf("%c %s %s %s %g %g %d %d %s s=A_%d,P_%d d=A_%d,P_%d\n", + printf("%c %s %s %s %g %g %d %d %s s=A_%d,P_%d d=A_%d,P_%d\n", mosFets[i].typ, mosFets[i].g, mosFets[i].s, mosFets[i].d, mosFets[i].l, mosFets[i].w, mosFets[i].x, mosFets[i].y,mosFets[i].ga, mosFets[i].as,mosFets[i].ps, mosFets[i].ad,mosFets[i].pd); else - printf("%c %s %s %s %g %g %d %d\n", + printf("%c %s %s %s %g %g %d %d\n", mosFets[i].typ, mosFets[i].g, mosFets[i].s, mosFets[i].d, mosFets[i].l, mosFets[i].w, mosFets[i].x, mosFets[i].y); diff --git a/ext2spice/ext2hier.c b/ext2spice/ext2hier.c index 64578469..cec86c72 100644 --- a/ext2spice/ext2hier.c +++ b/ext2spice/ext2hier.c @@ -85,7 +85,7 @@ ESGenerateHierarchy(inName, flags) EFHierSrDefs(&hc, NULL, NULL); /* Clear processed */ dfd.def = u.use_def; - dfd.flags = flags; + dfd.flags = flags; EFHierSrDefs(&hc, esHierVisit, (ClientData)(&dfd)); EFHierSrDefs(&hc, NULL, NULL); /* Clear processed */ @@ -187,7 +187,7 @@ spcHierWriteParams(hc, dev, scale, l, w, sdM) plist->parm_type[1]) { spcnAP(dnode, esFetInfo[dev->dev_type].resClassSD, - scale, plist->parm_name, + scale, plist->parm_name, plist->parm_next->parm_name, sdM, esSpiceF, w); plist = plist->parm_next; @@ -233,7 +233,7 @@ spcHierWriteParams(hc, dev, scale, l, w, sdM) plist->parm_type[1]) { spcnAP(dnode, esFetInfo[dev->dev_type].resClassSD, - scale, plist->parm_next->parm_name, + scale, plist->parm_next->parm_name, plist->parm_name, sdM, esSpiceF, w); plist = plist->parm_next; } @@ -342,7 +342,7 @@ esOutputHierResistor(hc, dev, scale, term1, term2, has_model, l, w, dscale) int dscale; /* Device scaling (for split resistors) */ { Rect r; - float sdM ; + float sdM ; char name[12], devchar; /* Resistor is "Rnnn term1 term2 value" */ @@ -372,7 +372,7 @@ esOutputHierResistor(hc, dev, scale, term1, term2, has_model, l, w, dscale) { fprintf(esSpiceF, " %s", EFDevTypes[dev->dev_type]); - if (esScale < 0) + if (esScale < 0) { fprintf(esSpiceF, " w=%d l=%d", (int)((float)w * scale), (int)(((float)l * scale) / (float)dscale)); @@ -411,7 +411,7 @@ subcktHierVisit(use, hierName, is_top) /* subcircuits have at least one port marked by the EF_PORT flag. */ /* Do not count the substrate port, as it exists even on cells */ /* with no other ports. */ - + for (snode = (EFNode *) def->def_firstn.efnode_next; snode != &def->def_firstn; snode = (EFNode *) snode->efnode_next) @@ -456,13 +456,13 @@ subcktHierVisit(use, hierName, is_top) * Format of a .spice dev line: * * M%d drain gate source substrate type w=w l=l * x y - * + ad= pd= as= ps= * asub= psub= - * **devattr g= s= d= + * + ad= pd= as= ps= * asub= psub= + * **devattr g= s= d= * * where * type is a name identifying this type of transistor * other types of transistors are extracted with - * an M card but it should be easy to turn them to whatever + * an M card but it should be easy to turn them to whatever * you want. * gate, source, and drain are the nodes to which these three * terminals connect @@ -486,12 +486,12 @@ spcdevHierVisit(hc, dev, scale) int l, w, i, parmval; Rect r; bool subAP= FALSE, hierS, hierD, extHierSDAttr() ; - float sdM; + float sdM; char devchar; bool has_model = TRUE; /* If no terminals, or only a gate, can't do much of anything */ - if (dev->dev_nterm <= 1 ) + if (dev->dev_nterm <= 1 ) return 0; if ( (esMergeDevsA || esMergeDevsC) && devIsKilled(esFMIndex++) ) @@ -645,7 +645,7 @@ spcdevHierVisit(hc, dev, scale) /* extraction sets collector=subnode, emitter=gate, base=drain */ spcdevOutNode(hc->hc_hierName, subnode->efnode_name->efnn_hier, - "collector", esSpiceF); + "collector", esSpiceF); spcdevOutNode(hc->hc_hierName, gate->dterm_node->efnode_name->efnn_hier, "emitter", esSpiceF); @@ -950,11 +950,11 @@ spcdevHierVisit(hc, dev, scale) fprintf(esSpiceF, " M=%g", sdM); /* - * Check controlling attributes and output area and perimeter. + * Check controlling attributes and output area and perimeter. */ hierS = extHierSDAttr(source); hierD = extHierSDAttr(drain); - if ( gate->dterm_attrs ) + if ( gate->dterm_attrs ) subAP = Match(ATTR_SUBSAP, gate->dterm_attrs ) ; fprintf(esSpiceF, "\n+ "); @@ -973,8 +973,8 @@ spcdevHierVisit(hc, dev, scale) dev->dev_type); fprintf(esSpiceF, "asub=0 psub=0"); } - else if (subnodeFlat) - spcnAP(subnodeFlat, esFetInfo[dev->dev_type].resClassSub, scale, + else if (subnodeFlat) + spcnAP(subnodeFlat, esFetInfo[dev->dev_type].resClassSub, scale, "asub", "psub", sdM, esSpiceF, -1); else fprintf(esSpiceF, "asub=0 psub=0"); @@ -987,9 +987,9 @@ spcdevHierVisit(hc, dev, scale) fprintf(esSpiceF,"\n**devattr"); if (gate->dterm_attrs) fprintf(esSpiceF, " g=%s", gate->dterm_attrs); - if (source->dterm_attrs) + if (source->dterm_attrs) fprintf(esSpiceF, " s=%s", source->dterm_attrs); - if (drain->dterm_attrs) + if (drain->dterm_attrs) fprintf(esSpiceF, " d=%s", drain->dterm_attrs); } break; @@ -1038,7 +1038,7 @@ spcdevHierMergeVisit(hc, dev, scale) fp = mkDevMerge((float)((float)l * scale), (float)((float)w * scale), gnode, snode, dnode, subnode, hc->hc_hierName, dev); - + for (cfp = devMergeList; cfp != NULL; cfp = cfp->next) { if ((pmode = parallelDevs(fp, cfp)) != NOT_PARALLEL) @@ -1086,7 +1086,7 @@ spcdevHierMergeVisit(hc, dev, scale) return 0; } - + /* * ---------------------------------------------------------------------------- * @@ -1128,7 +1128,7 @@ spccapHierVisit(hc, hierName1, hierName2, cap) nodeSpiceHierName(hc, hierName2), cap); return 0; } - + /* * ---------------------------------------------------------------------------- * @@ -1209,7 +1209,7 @@ spcsubHierVisit(hc, node, res, cap, resstrptr) * * spcnodeHierVisit -- * - * Procedure to output a single node to the .spice file along with its + * Procedure to output a single node to the .spice file along with its * attributes and its dictionary (if present). Called by EFHierVisitNodes(). * * Results: @@ -1225,7 +1225,7 @@ int spcnodeHierVisit(hc, node, res, cap) HierContext *hc; EFNode *node; - int res; + int res; double cap; { EFNodeName *nn; @@ -1241,7 +1241,7 @@ spcnodeHierVisit(hc, node, res, cap) ((((nodeClient *)node->efnode_client)->m_w.visitMask & DEV_CONNECT_MASK) != 0); } - if (!isConnected && esDevNodesOnly) + if (!isConnected && esDevNodesOnly) return 0; /* Don't mark known ports as "FLOATING" nodes */ @@ -1326,14 +1326,14 @@ char *nodeSpiceHierName(hc, hname) else goto retName; makeName: - if (esFormat == SPICE2) + if (esFormat == SPICE2) sprintf(esTempName, "%d", esNodeNum++); else { EFHNSprintf(esTempName, node->efnode_name->efnn_hier); if (esFormat == HSPICE) /* more processing */ nodeHspiceName(esTempName); } - ((nodeClient *) (node->efnode_client))->spiceNodeName = + ((nodeClient *) (node->efnode_client))->spiceNodeName = StrDup(NULL, esTempName); retName: @@ -1391,7 +1391,7 @@ devMergeHierVisit(hc, dev, scale) dnode = GetHierNode(hc, drain->dterm_node->efnode_name->efnn_hier); if (dev->dev_subsnode) subnode = spcdevSubstrate(hc->hc_hierName, - dev->dev_subsnode->efnode_name->efnn_hier, + dev->dev_subsnode->efnode_name->efnn_hier, dev->dev_type, NULL); else subnode = NULL; @@ -1405,12 +1405,12 @@ devMergeHierVisit(hc, dev, scale) hD = extHierSDAttr(drain); /* - * run the list of devs. compare the current one with + * run the list of devs. compare the current one with * each one in the list. if they fullfill the matching requirements * merge them only if: * 1) they have both apf S, D attributes - * or - * 2) one of them has aph S, D attributes and they have the same + * or + * 2) one of them has aph S, D attributes and they have the same * hierarchical prefix * If one of them has apf and the other aph print a warning. */ @@ -1424,9 +1424,9 @@ devMergeHierVisit(hc, dev, scale) cs = cd = &cfp->dev->dev_terms[1]; if (cfp->dev->dev_nterm >= 3) { - if (pmode == PARALLEL) + if (pmode == PARALLEL) cd = &cfp->dev->dev_terms[2]; - else if (pmode == ANTIPARALLEL) + else if (pmode == ANTIPARALLEL) cs = &cfp->dev->dev_terms[2]; } @@ -1470,7 +1470,7 @@ mergeThem: ((fp->l * fp->w) / (cfp->l * cfp->w)); break; } - setDevMult(fp->esFMIndex, DEV_KILLED); + setDevMult(fp->esFMIndex, DEV_KILLED); setDevMult(cfp->esFMIndex, m); esSpiceDevsMerged++; /* Need to do attribute stuff here */ @@ -1500,7 +1500,7 @@ mergeThem: * ---------------------------------------------------------------------------- */ -int +int devDistJunctHierVisit(hc, dev, scale) HierContext *hc; Dev *dev; /* Dev to examine */ @@ -1573,7 +1573,7 @@ esMakePorts(hc, cdata) int idum[6]; bool is_array; - /* Ignore array information for the purpose of tracing */ + /* Ignore array information for the purpose of tracing */ /* the cell definition hierarchy. If a cell use name */ /* contains a bracket, check first if the complete name */ /* matches a use. If not, then check if the part */ @@ -1665,12 +1665,12 @@ esMakePorts(hc, cdata) int idum[6]; bool is_array; - /* Ignore array information for the purpose of tracing */ + /* Ignore array information for the purpose of tracing */ /* the cell definition hierarchy. */ aptr = strchr(portname, '['); if (aptr && (aptr < tptr) && - (sscanf(aptr, "[%d:%d:%d][%d:%d:%d]", + (sscanf(aptr, "[%d:%d:%d][%d:%d:%d]", &idum[0], &idum[1], &idum[2], &idum[3], &idum[4], &idum[5]) == 6)) { @@ -1796,7 +1796,7 @@ esHierVisit(hc, cdata) if (def != topdef) return 0; } } - } + } /* Flatten this definition only */ hcf = EFFlatBuildOneLevel(hc->hc_use->use_def, flags); diff --git a/ext2spice/ext2spice.c b/ext2spice/ext2spice.c index 221483a6..ab57d129 100644 --- a/ext2spice/ext2spice.c +++ b/ext2spice/ext2spice.c @@ -71,9 +71,9 @@ int esSbckNum; /* used in hspice node name shortening */ int esNoModelType; /* index for device type "None" (model-less device) */ /* - * The following hash table and associated functions are used only if - * the format is hspice, to keep the translation between the hierarchical - * prefix of a node and the x num that we use to output valid hspice + * The following hash table and associated functions are used only if + * the format is hspice, to keep the translation between the hierarchical + * prefix of a node and the x num that we use to output valid hspice * which also are meaningful. */ HashTable subcktNameTable ; /* the hash table itself */ @@ -87,7 +87,7 @@ typedef struct GLL *globalListPtr; typedef struct GLL { globalListPtr gll_next; - char *gll_name; + char *gll_name; } globalList; unsigned long initMask = 0; @@ -97,11 +97,11 @@ bool esMergeDevsC = FALSE; /* conservative merging of devs L1=L2 and W1=W2 */ /* used with the hspice multiplier */ bool esDistrJunct = FALSE; -/* +/* *--------------------------------------------------------- - * Variables & macros used for merging parallel devs - * The merging of devs is based on the fact that spcdevVisit - * visits the devs in the same order all the time so the + * Variables & macros used for merging parallel devs + * The merging of devs is based on the fact that spcdevVisit + * visits the devs in the same order all the time so the * value of esFMult[i] keeps the multiplier for the ith dev *--------------------------------------------------------- */ @@ -247,7 +247,7 @@ CmdExtToSpice(w, cmd) globalList *glist = NULL; static EFCapValue LocCapThreshold = 2; - static int LocResistThreshold = INFINITE_THRESHOLD; + static int LocResistThreshold = INFINITE_THRESHOLD; static char *spiceFormats[] = { "SPICE2", "SPICE3", "HSPICE", "NGSPICE", NULL @@ -317,7 +317,7 @@ CmdExtToSpice(w, cmd) typedef enum { IDX_YES, IDX_TRUE, IDX_ON, IDX_NO, IDX_FALSE, IDX_OFF, IDX_AUTO, IDX_TOP, IDX_DESCEND - } yesnoType; + } yesnoType; esNoModelType = -1; @@ -544,7 +544,7 @@ CmdExtToSpice(w, cmd) return; } else if (cmd->tx_argc < 3) goto usage; - + /* Note that strtod() (called by StrIsNumeric()) accepts */ /* "infinite" as a valid numerical value; however, the */ /* conversion to C type INF is *not* INFINITE_THRESHOLD, so */ @@ -554,7 +554,7 @@ CmdExtToSpice(w, cmd) LocCapThreshold = (EFCapValue)INFINITE_THRESHOLD_F; else if (StrIsNumeric(cmd->tx_argv[2])) LocCapThreshold = atoCap(cmd->tx_argv[2]); - else + else TxError("exttospice: numeric value or \"infinite\" expected.\n"); break; @@ -573,7 +573,7 @@ CmdExtToSpice(w, cmd) LocResistThreshold = atoi(cmd->tx_argv[2]); else if (!strncmp(cmd->tx_argv[2], "inf", 3)) LocResistThreshold = INFINITE_THRESHOLD; - else + else TxError("exttospice: integer value or \"infinite\" expected.\n"); break; @@ -611,7 +611,7 @@ CmdExtToSpice(w, cmd) break; } break; - + case EXTTOSPC_DEFAULT: LocCapThreshold = 2; LocResistThreshold = INFINITE_THRESHOLD; @@ -662,7 +662,7 @@ runexttospice: EFCapThreshold = LocCapThreshold; /* Process command line arguments */ - + inName = EFArgs(argc, argv, &err_result, spcmainArgs, (ClientData) NULL); if (err_result == TRUE) { @@ -673,7 +673,7 @@ runexttospice: if (inName == NULL) { /* Assume that we want to do exttospice on the currently loaded cell */ - + if (w == (MagWindow *) NULL) { windCheckOnlyWindow(&w, DBWclientID); @@ -693,7 +693,7 @@ runexttospice: /* * Initializations specific to this program. - * Make output name inName.spice if they weren't + * Make output name inName.spice if they weren't * explicitly specified */ @@ -817,7 +817,7 @@ runexttospice: fprintf(esSpiceF, "* %s file created from %s.ext - technology: %s\n\n", spiceFormats[esFormat], inName, EFTech); - if (esScale < 0) + if (esScale < 0) fprintf(esSpiceF, ".option scale=%gu\n\n", EFScale / 100.0); else esScale = EFScale / 100.0; @@ -945,10 +945,10 @@ runexttospice: if ((esDoSubckt == TRUE) || (locDoSubckt == TRUE)) fprintf(esSpiceF, ".ends\n"); - if (esFormat == HSPICE) + if (esFormat == HSPICE) printSubcktDict(); - EFFlatDone(); + EFFlatDone(); } EFDone(); @@ -1020,7 +1020,7 @@ main(argc, argv) /* * Initializations specific to this program. - * Make output name inName.spice if they weren't + * Make output name inName.spice if they weren't * explicitly specified */ @@ -1041,7 +1041,7 @@ main(argc, argv) fprintf(esSpiceF, "* %s file created from %s.ext - technology: %s\n\n", spiceFormats[esFormat], inName, EFTech); - if (esScale < 0) + if (esScale < 0) fprintf(esSpiceF,".option scale=%gu\n\n", EFScale / 100.0); else esScale = EFScale / 100.0; @@ -1101,10 +1101,10 @@ main(argc, argv) if ((esDoSubckt == TRUE) || (locDoSubckt == TRUE)) fprintf(esSpiceF, ".ends\n"); - if (esFormat == HSPICE) + if (esFormat == HSPICE) printSubcktDict(); - EFFlatDone(); + EFFlatDone(); EFDone(); if (esSpiceF) fclose(esSpiceF); @@ -1115,7 +1115,7 @@ main(argc, argv) #endif /* MAGIC_WRAPPER */ - + /* * ---------------------------------------------------------------------------- * @@ -1189,12 +1189,12 @@ spcmainArgs(pargc, pargv) esFormat = SPICE2; else if (strcasecmp(ftmp, "SPICE3") == 0) esFormat = SPICE3; - else if (strcasecmp(ftmp, "HSPICE") == 0) + else if (strcasecmp(ftmp, "HSPICE") == 0) { esFormat = HSPICE; esScale = -1.0; } - else if (strcasecmp(ftmp, "NGSPICE") == 0) + else if (strcasecmp(ftmp, "NGSPICE") == 0) esFormat = NGSPICE; else goto usage; break; @@ -1249,8 +1249,8 @@ spcmainArgs(pargc, pargv) } esFetInfo[ndx].defSubs = (char *)mallocMagic((unsigned)(strlen(subsNode)+1)); strcpy(esFetInfo[ndx].defSubs,subsNode); - TxError("info: dev %s(%d) sdRclass=%d subRclass=%d dSub=%s\n", - cp, ndx, esFetInfo[ndx].resClassSD, esFetInfo[ndx].resClassSub, + TxError("info: dev %s(%d) sdRclass=%d subRclass=%d dSub=%s\n", + cp, ndx, esFetInfo[ndx].resClassSD, esFetInfo[ndx].resClassSub, esFetInfo[ndx].defSubs); break; } @@ -1303,14 +1303,14 @@ HierName *suffix; if (nn == NULL) return NULL; return(nn->efnn_node); } - + /* * ---------------------------------------------------------------------------- * * extHierSDAttr -- * Check if the attribute of the argument dev_terminal or the global * settings are such that we want a hierarchical extraction of its S/D - * + * * * Results: * TRUE or FALSE @@ -1328,7 +1328,7 @@ bool extHierSDAttr(term) if (term->dterm_attrs) { - if (Match(ATTR_HIERAP, term->dterm_attrs) != FALSE) + if (Match(ATTR_HIERAP, term->dterm_attrs) != FALSE) r = TRUE; else if (Match(ATTR_FLATAP, term->dterm_attrs) != FALSE) r = FALSE; @@ -1434,7 +1434,7 @@ subcktVisit(use, hierName, is_top) tchars = 1; } tchars += spcdevOutNode(hierName, nodeName->efnn_hier, - "subcircuit", esSpiceF); + "subcircuit", esSpiceF); } } @@ -1509,7 +1509,7 @@ subcktVisit(use, hierName, is_top) tchars = 1; } tchars += spcdevOutNode(hierName, nodeName->efnn_hier, - "subcircuit", esSpiceF); + "subcircuit", esSpiceF); } else { @@ -1573,7 +1573,7 @@ subcktVisit(use, hierName, is_top) } fprintf(esSpiceF, " %s", pptr->parm_name); tchars += (1 + strlen(pptr->parm_name)); - } + } freeMagic(instname); fprintf(esSpiceF, "\n"); return 0; @@ -1633,7 +1633,7 @@ subcktUndef(use, hierName, is_top) * * ---------------------------------------------------------------------------- */ - + void topVisit(def, doStub) Def *def; @@ -1767,7 +1767,7 @@ topVisit(def, doStub) // Node has not been assigned a port number. // Give it one unless this is a black-box circuit // and "ext2spice blackbox on" is in effect. - + if (esDoBlackBox == FALSE || !(def->def_flags & DEF_ABSTRACT)) unnumbered->efnn_port = ++portmax; } @@ -1825,7 +1825,7 @@ topVisit(def, doStub) pname = pptr->parm_name; fprintf(esSpiceF, " %s", pname); tchars += strlen(pname) + 1; - } + } freeMagic(instname); fprintf(esSpiceF, "\n"); @@ -1880,7 +1880,7 @@ spcWriteParams(dev, hierName, scale, l, w, sdM) fprintf(esSpiceF, "%gp", parmval * scale * scale * esScale * esScale); } - else + else { int pn; @@ -1946,7 +1946,7 @@ spcWriteParams(dev, hierName, scale, l, w, sdM) else fprintf(esSpiceF, "%gu", parmval * scale * esScale); } - else + else { int pn; @@ -2091,7 +2091,7 @@ esOutputResistor(dev, hierName, scale, term1, term2, has_model, l, w, dscale) int l, w; /* Device length and width */ int dscale; /* Device scaling (for split resistors) */ { - float sdM ; + float sdM ; char name[12], devchar; /* Resistor is "Rnnn term1 term2 value" */ @@ -2121,7 +2121,7 @@ esOutputResistor(dev, hierName, scale, term1, term2, has_model, l, w, dscale) { fprintf(esSpiceF, " %s", EFDevTypes[dev->dev_type]); - if (esScale < 0) + if (esScale < 0) fprintf(esSpiceF, " w=%g l=%g", w * scale, (l * scale) / dscale); else fprintf(esSpiceF, " w=%gu l=%gu", @@ -2201,13 +2201,13 @@ getCurDevMult() * Format of a .spice dev line: * * M%d drain gate source substrate type w=w l=l * x y - * + ad= pd= as= ps= * asub= psub= - * **devattr g= s= d= + * + ad= pd= as= ps= * asub= psub= + * **devattr g= s= d= * * where * type is a name identifying this type of transistor * other types of transistors are extracted with - * an M card but it should be easy to turn them to whatever + * an M card but it should be easy to turn them to whatever * you want. * gate, source, and drain are the nodes to which these three * terminals connect @@ -2231,14 +2231,14 @@ spcdevVisit(dev, hierName, scale, trans) EFNode *subnode, *snode, *dnode, *subnodeFlat = NULL; int l, w, i, parmval; bool subAP= FALSE, hierS, hierD, extHierSDAttr() ; - float sdM; + float sdM; char name[12], devchar; bool has_model = TRUE; sprintf(name, "output"); /* If no terminals, can't do much of anything */ - if (dev->dev_nterm < 1 ) + if (dev->dev_nterm < 1 ) return 0; if ( (esMergeDevsA || esMergeDevsC) && devIsKilled(esFMIndex++) ) @@ -2312,7 +2312,7 @@ spcdevVisit(dev, hierName, scale, trans) case DEV_RES: case DEV_CAP: case DEV_CAPREV: - if (dev->dev_nterm < 1) + if (dev->dev_nterm < 1) return 0; if (dev->dev_type == esNoModelType) has_model = FALSE; @@ -2422,7 +2422,7 @@ spcdevVisit(dev, hierName, scale, trans) /* extraction sets collector=subnode, emitter=gate, base=drain */ sprintf(name, "fet"); - spcdevOutNode(hierName, subnode->efnode_name->efnn_hier, name, esSpiceF); + spcdevOutNode(hierName, subnode->efnode_name->efnn_hier, name, esSpiceF); spcdevOutNode(hierName, gate->dterm_node->efnode_name->efnn_hier, name, esSpiceF); @@ -2555,7 +2555,7 @@ spcdevVisit(dev, hierName, scale, trans) name, esSpiceF); else if (subnode) spcdevOutNode(hierName, subnode->efnode_name->efnn_hier, - name, esSpiceF); + name, esSpiceF); fprintf(esSpiceF, " %s", EFDevTypes[dev->dev_type]); sdM = getCurDevMult(); @@ -2571,7 +2571,7 @@ spcdevVisit(dev, hierName, scale, trans) name, esSpiceF); else if (subnode) spcdevOutNode(hierName, subnode->efnode_name->efnn_hier, - name, esSpiceF); + name, esSpiceF); spcdevOutNode(hierName, gate->dterm_node->efnode_name->efnn_hier, name, esSpiceF); @@ -2706,15 +2706,15 @@ spcdevVisit(dev, hierName, scale, trans) fprintf(esSpiceF, " M=%g", sdM); /* - * Check controlling attributes and output area and perimeter. + * Check controlling attributes and output area and perimeter. */ hierS = extHierSDAttr(source); hierD = extHierSDAttr(drain); - if ( gate->dterm_attrs ) + if ( gate->dterm_attrs ) subAP = Match(ATTR_SUBSAP, gate->dterm_attrs ) ; fprintf(esSpiceF, "\n+ "); - if (hierD) + if (hierD) spcnAPHier(drain, hierName, esFetInfo[dev->dev_type].resClassSD, scale, "ad", "pd", sdM, esSpiceF); else @@ -2740,8 +2740,8 @@ spcdevVisit(dev, hierName, scale, trans) dev->dev_type); fprintf(esSpiceF, "asub=0 psub=0"); } - else if (subnodeFlat) - spcnAP(subnodeFlat, esFetInfo[dev->dev_type].resClassSub, scale, + else if (subnodeFlat) + spcnAP(subnodeFlat, esFetInfo[dev->dev_type].resClassSub, scale, "asub", "psub", sdM, esSpiceF, -1); else fprintf(esSpiceF, "asub=0 psub=0"); @@ -2754,9 +2754,9 @@ spcdevVisit(dev, hierName, scale, trans) fprintf(esSpiceF,"\n**devattr"); if (gate->dterm_attrs) fprintf(esSpiceF, " g=%s", gate->dterm_attrs); - if (source->dterm_attrs) + if (source->dterm_attrs) fprintf(esSpiceF, " s=%s", source->dterm_attrs); - if (drain->dterm_attrs) + if (drain->dterm_attrs) fprintf(esSpiceF, " d=%s", drain->dterm_attrs); } break; @@ -2770,7 +2770,7 @@ spcdevVisit(dev, hierName, scale, trans) * * spcdevSubstrate - * - * Output the node name of the substrate of a dev. If the suffix is the + * Output the node name of the substrate of a dev. If the suffix is the * same as the default dont go looking for it just output the default * (trimmed appropriately). Otherwise look it up .. * @@ -2802,13 +2802,13 @@ FILE *outf; he = EFHNConcatLook(prefix, suffix, "substrate"); if (he == NULL) { - if (outf) + if (outf) fprintf(outf, "errGnd!"); return NULL; } /* Canonical name */ nn = (EFNodeName *) HashGetValue(he); - if (outf) + if (outf) fprintf(outf, "%s", nodeSpiceName(nn->efnn_node->efnode_name->efnn_hier, NULL)); @@ -2829,7 +2829,7 @@ FILE *outf; * * spcnAP, spcnAPHier -- * - * Output the area perimeter of the node with type type if it has not + * Output the area perimeter of the node with type type if it has not * been visited. * The spcnAPHier version outputs the area and perimeter only within the * local subcell with hierarchical name hierName. @@ -2890,7 +2890,7 @@ int spcnAP(node, resClass, scale, asterm, psterm, m, outf, w) fprintf(outf, pfmt, node->efnode_pa[resClass].pa_perim * scale * dsc); } - else + else { if (asterm) fprintf(outf, afmt, @@ -2906,7 +2906,7 @@ int spcnAP(node, resClass, scale, asterm, psterm, m, outf, w) oldFmt: if (resClass == NO_RESCLASS || - beenVisited((nodeClient *)node->efnode_client, resClass)) + beenVisited((nodeClient *)node->efnode_client, resClass)) scale = 0; else markVisited((nodeClient *)node->efnode_client, resClass); @@ -2920,7 +2920,7 @@ oldFmt: fprintf(outf, pfmt, node->efnode_pa[resClass].pa_perim * scale / m); } - else + else { if (asterm) fprintf(outf, afmt, @@ -2956,7 +2956,7 @@ int spcnAPHier(dterm, hierName, resClass, scale, asterm, psterm, m, outf) sprintf(afmt," %s=%%gp", asterm); sprintf(pfmt," %s=%%gu", psterm); } - if (node->efnode_client == (ClientData) NULL) + if (node->efnode_client == (ClientData) NULL) initNodeClientHier(node); nc = (nodeClientHier *)node->efnode_client; @@ -2966,7 +2966,7 @@ int spcnAPHier(dterm, hierName, resClass, scale, asterm, psterm, m, outf) nc->lastPrefix = hierName; } if (resClass == NO_RESCLASS || - beenVisited((nodeClientHier *)node->efnode_client, resClass) ) + beenVisited((nodeClientHier *)node->efnode_client, resClass) ) scale = 0.0; else markVisited((nodeClientHier *)node->efnode_client, resClass); @@ -3038,7 +3038,7 @@ spcdevOutNode(prefix, suffix, name, outf) return (1 + strlen(nname)); } - + /* * ---------------------------------------------------------------------------- * @@ -3078,7 +3078,7 @@ spccapVisit(hierName1, hierName2, cap) nodeSpiceName(hierName2, NULL), cap); return 0; } - + /* * ---------------------------------------------------------------------------- * @@ -3115,7 +3115,7 @@ spcresistVisit(hierName1, hierName2, res) return 0; } - + /* * ---------------------------------------------------------------------------- @@ -3158,7 +3158,7 @@ spcsubVisit(node, res, cap, resstr) * * spcnodeVisit -- * - * Procedure to output a single node to the .spice file along with its + * Procedure to output a single node to the .spice file along with its * attributes and its dictionary (if present). Called by EFVisitNodes(). * * Results: @@ -3173,7 +3173,7 @@ spcsubVisit(node, res, cap, resstr) int spcnodeVisit(node, res, cap) EFNode *node; - int res; + int res; double cap; { EFNodeName *nn; @@ -3189,7 +3189,7 @@ spcnodeVisit(node, res, cap) ((((nodeClient *)node->efnode_client)->m_w.visitMask & DEV_CONNECT_MASK) != 0); } - if (!isConnected && esDevNodesOnly) + if (!isConnected && esDevNodesOnly) return 0; /* Don't mark known ports as "FLOATING" nodes */ @@ -3209,7 +3209,7 @@ spcnodeVisit(node, res, cap) if (cap > EFCapThreshold) { fprintf(esSpiceF, esSpiceCapFormat, esCapNum++, nsn, cap, - (isConnected) ? "\n" : + (isConnected) ? "\n" : (esFormat == NGSPICE) ? " ; **FLOATING\n" : " **FLOATING\n"); } @@ -3232,14 +3232,14 @@ spcnodeVisit(node, res, cap) int nodeVisitDebug(node, res, cap) EFNode *node; - int res; + int res; double cap; { EFNodeName *nn; HierName *hierName; char *fmt, *nsn; EFAttr *ap; - + hierName = (HierName *) node->efnode_name->efnn_hier; nsn = nodeSpiceName(hierName, NULL); TxError("** %s (%x)\n", nsn, node); @@ -3249,7 +3249,7 @@ nodeVisitDebug(node, res, cap) ((nodeClient *)node->efnode_client)->m_w.widths); return 0; } - + /* * ---------------------------------------------------------------------------- * @@ -3295,14 +3295,14 @@ char *nodeSpiceName(hname, rnode) makeName: - if ( esFormat == SPICE2 ) + if ( esFormat == SPICE2 ) sprintf(esTempName, "%d", esNodeNum++); else { EFHNSprintf(esTempName, node->efnode_name->efnn_hier); if ( esFormat == HSPICE ) /* more processing */ nodeHspiceName(esTempName); } - ((nodeClient *) (node->efnode_client))->spiceNodeName = + ((nodeClient *) (node->efnode_client))->spiceNodeName = StrDup(NULL, esTempName); retName: @@ -3316,7 +3316,7 @@ retName: * * Create a hierarchical node name. * The flags in EFTrimFlags control whether global (!) or local (#) - * suffixes are to be trimmed. Also substitutes \. with \@ if the + * suffixes are to be trimmed. Also substitutes \. with \@ if the * format is hspice. * * Results: @@ -3328,7 +3328,7 @@ retName: * ---------------------------------------------------------------------------- */ -int +int EFHNSprintf(str, hierName) char *str; HierName *hierName; @@ -3341,7 +3341,7 @@ EFHNSprintf(str, hierName) if (hierName->hn_parent) str = efHNSprintfPrefix(hierName->hn_parent, str); if (EFTrimFlags) { - cp = hierName->hn_name; + cp = hierName->hn_name; trimGlob = (EFTrimFlags & EF_TRIMGLOB); trimLocal = (EFTrimFlags & EF_TRIMLOCAL); convertComma = (EFTrimFlags & EF_CONVERTCOMMA); @@ -3405,7 +3405,7 @@ char *efHNSprintfPrefix(hierName, str) * * nodeHspiceName -- * - * Convert the hierarchical node name used in Berkeley spice + * Convert the hierarchical node name used in Berkeley spice * to a name understood by hspice and hopefully by the user. * * Results: @@ -3426,25 +3426,25 @@ int nodeHspiceName(s) static char map[MAX_STR_SIZE]; /* - * find the suffix + * find the suffix */ l = strlen(s); - for (p = s + l; (p > s) && *p != '/'; p--); + for (p = s + l; (p > s) && *p != '/'; p--); if (p == s) { strcpy(map, s); goto topLevel; } - /* - * break it into prefix '/0' suffix + /* + * break it into prefix '/0' suffix */ - if (*p == '/') - *p = 0; + if (*p == '/') + *p = 0; sf = p + 1; - /* - * look up prefix in the hash table and create it if doesn't exist + /* + * look up prefix in the hash table and create it if doesn't exist */ if ((he = HashLookOnly(&subcktNameTable, s)) == NULL) { @@ -3455,7 +3455,7 @@ int nodeHspiceName(s) DQPushRear(&subcktNameQueue, he); #endif } - else + else snum = (spointertype) HashGetValue(he); sprintf(map, "x%d/%s", snum, sf); @@ -3511,7 +3511,7 @@ int printSubcktDict() while ((he = (HashEntry *)DQPopFront(&subcktNameQueue)) != NULL) #else HashStartSearch(&hs); - while ((he = HashNext(&subcktNameTable, &hs)) != NULL) + while ((he = HashNext(&subcktNameTable, &hs)) != NULL) #endif fprintf(esSpiceF,"* x%"DLONG_PREFIX"d\t%s\n", (dlong) HashGetValue(he), he->h_key.h_name); return 0; @@ -3750,7 +3750,7 @@ devMergeVisit(dev, hierName, scale, trans) } if (dev->dev_subsnode) subnode = spcdevSubstrate(hierName, - dev->dev_subsnode->efnode_name->efnn_hier, + dev->dev_subsnode->efnode_name->efnn_hier, dev->dev_type, NULL); else subnode = NULL; @@ -3764,12 +3764,12 @@ devMergeVisit(dev, hierName, scale, trans) hD = extHierSDAttr(drain); /* - * run the list of devs. compare the current one with + * run the list of devs. compare the current one with * each one in the list. if they fullfill the matching requirements * merge them only if: * 1) they have both apf S, D attributes - * or - * 2) one of them has aph S, D attributes and they have the same + * or + * 2) one of them has aph S, D attributes and they have the same * hierarchical prefix * If one of them has apf and the other aph print a warning. */ @@ -3783,19 +3783,19 @@ devMergeVisit(dev, hierName, scale, trans) cs = cd = &cfp->dev->dev_terms[1]; if (cfp->dev->dev_nterm >= 3) { - if (pmode == PARALLEL) + if (pmode == PARALLEL) cd = &cfp->dev->dev_terms[2]; - else if (pmode == ANTIPARALLEL) + else if (pmode == ANTIPARALLEL) cs = &cfp->dev->dev_terms[2]; } chS = extHierSDAttr(cs); chD = extHierSDAttr(cd); if (!(chS || chD || hS || hD)) /* all flat S, D */ goto mergeThem; - if (cfp->hierName != hierName && + if (cfp->hierName != hierName && ((chS && !hS) || (chD && !hD) || (!chS && hS) || (!chD && hD))) - { + { efHNSprintfPrefix((cfp->hierName)?cfp->hierName:hierName, esTempName); @@ -3844,7 +3844,7 @@ mergeThem: ((fp->l * fp->w) / (cfp->l * cfp->w)); break; } - setDevMult(fp->esFMIndex, DEV_KILLED); + setDevMult(fp->esFMIndex, DEV_KILLED); setDevMult(cfp->esFMIndex, m); esSpiceDevsMerged++; /* Need to do attribute stuff here */ @@ -3874,7 +3874,7 @@ mergeThem: * ---------------------------------------------------------------------------- */ -int +int update_w(resClass, w, n) short resClass; int w; @@ -3883,7 +3883,7 @@ update_w(resClass, w, n) nodeClient *nc; int i; - if (n->efnode_client == (ClientData)NULL) + if (n->efnode_client == (ClientData)NULL) initNodeClient(n); nc = (nodeClient *) n->efnode_client; if (nc->m_w.widths == NULL) @@ -3912,7 +3912,7 @@ update_w(resClass, w, n) * ---------------------------------------------------------------------------- */ -int +int devDistJunctVisit(dev, hierName, scale, trans) Dev *dev; /* Dev to examine */ HierName *hierName; /* Hierarchical path down to this dev */ diff --git a/ext2spice/ext2spice.h b/ext2spice/ext2spice.h index 065650d1..1aa38067 100644 --- a/ext2spice/ext2spice.h +++ b/ext2spice/ext2spice.h @@ -79,9 +79,9 @@ extern int esSpiceDevsMerged; extern devMerge *devMergeList; /* - * The following hash table and associated functions are used only if - * the format is hspice, to keep the translation between the hierarchical - * prefix of a node and the x num that we use to output valid hspice + * The following hash table and associated functions are used only if + * the format is hspice, to keep the translation between the hierarchical + * prefix of a node and the x num that we use to output valid hspice * which also are meaningful. */ extern HashTable subcktNameTable ; /* the hash table itself */ @@ -100,9 +100,9 @@ extern fetInfoList esFetInfo[MAXDEVTYPES]; names even of the most complicated design */ /* Node clients for figuring out areas and perimeters of sources and drains */ -typedef struct { - long _duml:MAXDEVTYPES; -} _dum; /* if you get an error here you should change +typedef struct { + long _duml:MAXDEVTYPES; +} _dum; /* if you get an error here you should change the data structures and visitMask */ typedef union { @@ -133,7 +133,7 @@ typedef struct { /* * Used to mark the nodes which are connected to devs. initMask is set to - * DEV_CONNECT_MASK only when we are in visitDevs + * DEV_CONNECT_MASK only when we are in visitDevs */ #define DEV_CONNECT_MASK ((unsigned long)1<<(sizeof(long)*BITSPERCHAR-1)) @@ -152,7 +152,7 @@ typedef struct { } - + /* attributes controlling the Area/Perimeter extraction of dev terminals */ #define ATTR_FLATAP "*[Ee][Xx][Tt]:[Aa][Pp][Ff]*" #define ATTR_HIERAP "*[Ee][Xx][Tt]:[Aa][Pp][Hh]*" @@ -169,11 +169,11 @@ typedef struct { #define PARALLEL 1 #define ANTIPARALLEL 2 -/* +/* *--------------------------------------------------------- - * Variables used for merging parallel devs - * The merging of devs is based on the fact that spcdevVisit - * visits the devs in the same order all the time so the + * Variables used for merging parallel devs + * The merging of devs is based on the fact that spcdevVisit + * visits the devs in the same order all the time so the * value of esFMult[i] keeps the multiplier for the ith dev *--------------------------------------------------------- */ diff --git a/extcheck/extcheck.c b/extcheck/extcheck.c index b8aa6241..58f4c2c5 100644 --- a/extcheck/extcheck.c +++ b/extcheck/extcheck.c @@ -9,16 +9,16 @@ * Flattens the tree rooted at file.ext, reading in additional .ext * files as specified by "use" lines in file.ext. * - * ********************************************************************* - * * Copyright (C) 1985, 1990 Regents of the University of California. * - * * Permission to use, copy, modify, and distribute this * - * * software and its documentation for any purpose and without * - * * fee is hereby granted, provided that the above copyright * - * * notice appear in all copies. The University of California * - * * makes no representations about the suitability of this * - * * software for any purpose. It is provided "as is" without * - * * express or implied warranty. Export of this software outside * - * * of the United States of America may require an export license. * + * ********************************************************************* + * * Copyright (C) 1985, 1990 Regents of the University of California. * + * * Permission to use, copy, modify, and distribute this * + * * software and its documentation for any purpose and without * + * * fee is hereby granted, provided that the above copyright * + * * notice appear in all copies. The University of California * + * * makes no representations about the suitability of this * + * * software for any purpose. It is provided "as is" without * + * * express or implied warranty. Export of this software outside * + * * of the United States of America may require an export license. * * ********************************************************************* */ @@ -51,7 +51,7 @@ int ecNumNodeResists; /* Forward declarations */ int nodeVisit(), devVisit(), capVisit(), resistVisit(); - + /* * ---------------------------------------------------------------------------- * @@ -105,7 +105,7 @@ main(argc, argv) ecNumResists, ecNumThreshResists); exit (0); } - + /* * ---------------------------------------------------------------------------- * @@ -129,7 +129,7 @@ main(argc, argv) int nodeVisit(node, res, cap) EFNode *node; - int res; + int res; double cap; { cap = (cap + 500) / 1000; diff --git a/extflat/EFantenna.c b/extflat/EFantenna.c index 8cb0ea22..d31b6815 100644 --- a/extflat/EFantenna.c +++ b/extflat/EFantenna.c @@ -7,7 +7,7 @@ * * Flattens the tree rooted at file.ext, reading in additional .ext * files as specified by "use" lines in file.ext. - * + * */ #include @@ -40,12 +40,12 @@ int antennacheckArgs(); int antennacheckVisit(); typedef struct { - long visitMask:MAXDEVTYPES; + long visitMask:MAXDEVTYPES; } nodeClient; typedef struct { HierName *lastPrefix; - long visitMask:MAXDEVTYPES; + long visitMask:MAXDEVTYPES; } nodeClientHier; #define NO_RESCLASS -1 @@ -100,7 +100,7 @@ typedef struct _ams { CellDef *def; /* CellDef for adding feedback */ } AntennaMarkStruct; - + /* * ---------------------------------------------------------------------------- * @@ -126,7 +126,7 @@ CmdAntennaCheck(w, cmd) int option = ANTENNACHECK_RUN; int value; int argc = cmd->tx_argc; - char **argv = cmd->tx_argv; + char **argv = cmd->tx_argv; char **msg; bool err_result; @@ -195,7 +195,7 @@ runantennacheck: if (inName == NULL) { /* Assume that we want to do exttospice on the currently loaded cell */ - + if (w == (MagWindow *) NULL) windCheckOnlyWindow(&w, DBWclientID); @@ -243,7 +243,7 @@ runantennacheck: efAntennaDebug = FALSE; } - + /* * ---------------------------------------------------------------------------- * @@ -361,7 +361,7 @@ antennacheckVisit(dev, hierName, scale, trans, editUse) extern int areaAccumFunc(), antennaAccumFunc(), areaMarkFunc(); antennaarea = (dlong *)mallocMagic(DBNumTypes * sizeof(dlong)); - + switch(dev->dev_class) { case DEV_FET: @@ -559,10 +559,10 @@ antennacheckVisit(dev, hierName, scale, trans, editUse) TxError("Effective antenna ratio %g > limit %g\n", saveRatio * (float)anttotal / (float)gatearea, saveRatio); - TxError("Gate rect (%d %d) to (%d %d)\n", + TxError("Gate rect (%d %d) to (%d %d)\n", gdas.r.r_xbot, gdas.r.r_ybot, gdas.r.r_xtop, gdas.r.r_ytop); - TxError("Antenna rect (%d %d) to (%d %d)\n", + TxError("Antenna rect (%d %d) to (%d %d)\n", aas.r.r_xbot, aas.r.r_ybot, aas.r.r_xtop, aas.r.r_ytop); } @@ -594,10 +594,10 @@ antennacheckVisit(dev, hierName, scale, trans, editUse) TxError("Effective antenna ratio %g > limit %g\n", saveRatio * (float)anttotal / (float)gatearea, saveRatio); - TxError("Gate rect (%d %d) to (%d %d)\n", + TxError("Gate rect (%d %d) to (%d %d)\n", gdas.r.r_xbot, gdas.r.r_ybot, gdas.r.r_xtop, gdas.r.r_ytop); - TxError("Antenna rect (%d %d) to (%d %d)\n", + TxError("Antenna rect (%d %d) to (%d %d)\n", aas.r.r_xbot, aas.r.r_ybot, aas.r.r_xtop, aas.r.r_ytop); } diff --git a/extflat/EFargs.c b/extflat/EFargs.c index d94ebc16..4e5d6982 100644 --- a/extflat/EFargs.c +++ b/extflat/EFargs.c @@ -4,16 +4,16 @@ * General command-line argument processing and overall initialization * for the .ext file flattener. * - * ********************************************************************* - * * Copyright (C) 1985, 1990 Regents of the University of California. * - * * Permission to use, copy, modify, and distribute this * - * * software and its documentation for any purpose and without * - * * fee is hereby granted, provided that the above copyright * - * * notice appear in all copies. The University of California * - * * makes no representations about the suitability of this * - * * software for any purpose. It is provided "as is" without * - * * express or implied warranty. Export of this software outside * - * * of the United States of America may require an export license. * + * ********************************************************************* + * * Copyright (C) 1985, 1990 Regents of the University of California. * + * * Permission to use, copy, modify, and distribute this * + * * software and its documentation for any purpose and without * + * * fee is hereby granted, provided that the above copyright * + * * notice appear in all copies. The University of California * + * * makes no representations about the suitability of this * + * * software for any purpose. It is provided "as is" without * + * * express or implied warranty. Export of this software outside * + * * of the United States of America may require an export license. * * ********************************************************************* */ @@ -81,7 +81,7 @@ bool efScaleChanged = FALSE; /* TRUE if .ext scales mismatch */ extern int efLoadPathFunc(); extern void efLoadSearchPath(); #endif - + /* * ---------------------------------------------------------------------------- * @@ -160,7 +160,7 @@ EFArgs(argc, argv, err_result, argsProc, cdata) HierName *hierName; FILE *f; - char usage_text[] = + char usage_text[] = "Standard arguments: [-R] [-C] [-r rthresh] [-c cthresh] [-v]\n" "[-p searchpath] [-s sym=value] [-S symfile] [-t trimchars]\n" #ifdef MAGIC_WRAPPER @@ -341,7 +341,7 @@ usage: } #ifndef MAGIC_WRAPPER - + /* * ---------------------------------------------------------------------------- * diff --git a/extflat/EFbuild.c b/extflat/EFbuild.c index 33e43bc6..0eac0168 100644 --- a/extflat/EFbuild.c +++ b/extflat/EFbuild.c @@ -4,16 +4,16 @@ * Procedures for building up the hierarchical representation * of a circuit. These are all called from efReadDef() in EFread.c. * - * ********************************************************************* - * * Copyright (C) 1985, 1990 Regents of the University of California. * - * * Permission to use, copy, modify, and distribute this * - * * software and its documentation for any purpose and without * - * * fee is hereby granted, provided that the above copyright * - * * notice appear in all copies. The University of California * - * * makes no representations about the suitability of this * - * * software for any purpose. It is provided "as is" without * - * * express or implied warranty. Export of this software outside * - * * of the United States of America may require an export license. * + * ********************************************************************* + * * Copyright (C) 1985, 1990 Regents of the University of California. * + * * Permission to use, copy, modify, and distribute this * + * * software and its documentation for any purpose and without * + * * fee is hereby granted, provided that the above copyright * + * * notice appear in all copies. The University of California * + * * makes no representations about the suitability of this * + * * software for any purpose. It is provided "as is" without * + * * express or implied warranty. Export of this software outside * + * * of the United States of America may require an export license. * * ********************************************************************* */ @@ -65,7 +65,7 @@ bool efConnInitSubs(); extern float locScale; - + /* * ---------------------------------------------------------------------------- * @@ -288,7 +288,7 @@ efBuildAttr(def, nodeName, r, layerName, text) ap->efa_next = nn->efnn_node->efnode_attrs; nn->efnn_node->efnode_attrs = ap; } - + /* * ---------------------------------------------------------------------------- * @@ -371,7 +371,7 @@ efBuildDist(def, driver, receiver, min, max) HashSetValue(he, (ClientData) he->h_key.h_ptr); } } - + /* * ---------------------------------------------------------------------------- * @@ -401,7 +401,7 @@ efBuildKill(def, name) kill->kill_next = def->def_kills; def->def_kills = kill; } - + /* * ---------------------------------------------------------------------------- * @@ -476,7 +476,7 @@ efBuildEquiv(def, nodeName1, nodeName2) efNodeAddName(nn2->efnn_node, he1, EFStrToHN((HierName *) NULL, nodeName1)); } - + /* * ---------------------------------------------------------------------------- @@ -532,7 +532,7 @@ efBuildDeviceParams(name, argc, argv) pptr = strchr(argv[n], '='); if (pptr == NULL) { - efReadError("Bad parameter assignment \"%s\" for device \"%s\"\n", + efReadError("Bad parameter assignment \"%s\" for device \"%s\"\n", argv[n], name); continue; } @@ -805,7 +805,7 @@ efBuildDevice(def, class, type, r, argc, argv) newdev->dev_rect = *r; newdev->dev_type = efBuildAddStr(EFDevTypes, &EFDevNumTypes, MAXDEVTYPES, type); newdev->dev_class = class; - + switch (class) { case DEV_FET: /* old-style "fet" record */ @@ -967,7 +967,7 @@ efBuildPortNode(def, name, idx, x, y, layername, toplevel) if (nn != (EFNodeName *) NULL) { nn->efnn_node->efnode_flags |= EF_PORT; - if (toplevel) + if (toplevel) nn->efnn_node->efnode_flags |= EF_TOP_PORT; nn->efnn_port = idx; } @@ -1079,7 +1079,7 @@ efBuildDevNode(def, name, isSubsNode) } return nn->efnn_node; } - + /* * ---------------------------------------------------------------------------- * @@ -1123,7 +1123,7 @@ efBuildAddStr(table, pMax, size, str) return max; } - + /* * ---------------------------------------------------------------------------- * @@ -1212,7 +1212,7 @@ efBuildUse(def, subDefName, subUseId, ta, tb, tc, td, te, tf) TxError("Warning: use %s appears more than once in def!\n", newuse->use_id); HashSetValue(he, (ClientData)newuse); } - + /* * ---------------------------------------------------------------------------- * @@ -1263,7 +1263,7 @@ efBuildConnect(def, nodeName1, nodeName2, deltaC, av, ac) def->def_conns = conn; } } - + /* * ---------------------------------------------------------------------------- * @@ -1300,7 +1300,7 @@ efBuildResistor(def, nodeName1, nodeName2, resistance) def->def_resistors = conn; } } - + /* * ---------------------------------------------------------------------------- * @@ -1337,7 +1337,7 @@ efBuildCap(def, nodeName1, nodeName2, cap) def->def_caps = conn; } } - + /* * ---------------------------------------------------------------------------- * @@ -1392,7 +1392,7 @@ bad: freeMagic((char *) conn); return FALSE; } - + /* * ---------------------------------------------------------------------------- * @@ -1498,7 +1498,7 @@ again: cnp->cn_nsubs = nsubs; return TRUE; } - + /* * ---------------------------------------------------------------------------- * @@ -1558,7 +1558,7 @@ efNodeAddName(node, he, hn) oldnn->efnn_next = newnn; } } - + /* * ---------------------------------------------------------------------------- * @@ -1618,7 +1618,7 @@ efNodeMerge(node1ptr, node2ptr) { printf("\ncombine: %s\n", EFHNToStr(keeping->efnode_name->efnn_hier)); - printf(" with %s\n\n", + printf(" with %s\n\n", removing->efnode_name ? EFHNToStr(removing->efnode_name->efnn_hier) : "(unnamed)"); @@ -1742,7 +1742,7 @@ efNodeMerge(node1ptr, node2ptr) *node1ptr = keeping; *node2ptr = (EFNode *)NULL; /* Sanity check */ } - + /* * ---------------------------------------------------------------------------- @@ -1846,7 +1846,7 @@ efFreeNodeTable(table) freeMagic((char *) nn); } } - + /* * ---------------------------------------------------------------------------- * @@ -1880,7 +1880,7 @@ efFreeNodeList(head) freeMagic((char *) node); } } - + /* * ---------------------------------------------------------------------------- * diff --git a/extflat/EFdef.c b/extflat/EFdef.c index e0b7c30d..ecefb3d0 100644 --- a/extflat/EFdef.c +++ b/extflat/EFdef.c @@ -5,16 +5,16 @@ * There is a single Def for each .ext file in a hierarchically * extracted circuit. * - * ********************************************************************* - * * Copyright (C) 1985, 1990 Regents of the University of California. * - * * Permission to use, copy, modify, and distribute this * - * * software and its documentation for any purpose and without * - * * fee is hereby granted, provided that the above copyright * - * * notice appear in all copies. The University of California * - * * makes no representations about the suitability of this * - * * software for any purpose. It is provided "as is" without * - * * express or implied warranty. Export of this software outside * - * * of the United States of America may require an export license. * + * ********************************************************************* + * * Copyright (C) 1985, 1990 Regents of the University of California. * + * * Permission to use, copy, modify, and distribute this * + * * software and its documentation for any purpose and without * + * * fee is hereby granted, provided that the above copyright * + * * notice appear in all copies. The University of California * + * * makes no representations about the suitability of this * + * * software for any purpose. It is provided "as is" without * + * * express or implied warranty. Export of this software outside * + * * of the United States of America may require an export license. * * ********************************************************************* */ @@ -46,7 +46,7 @@ HashTable efFreeHashTable; /* Hash table used for keeping subcircuit parameter names for a device */ HashTable efDevParamTable; - + /* * ---------------------------------------------------------------------------- * @@ -75,7 +75,7 @@ EFInit() HashInit(&efDevParamTable, 8, HT_STRINGKEYS); efSymInit(); } - + /* * ---------------------------------------------------------------------------- * @@ -166,7 +166,7 @@ EFDone() /* Final cleanup */ HashKill(&efDefHashTable); } - + /* * ---------------------------------------------------------------------------- * @@ -198,7 +198,7 @@ efDefLook(name) return ((Def *) HashGetValue(he)); } - + /* * ---------------------------------------------------------------------------- * diff --git a/extflat/EFerr.c b/extflat/EFerr.c index ec80c266..280fb9ad 100644 --- a/extflat/EFerr.c +++ b/extflat/EFerr.c @@ -11,16 +11,16 @@ * version, all these functions are built in, so utils/LIBtextio.c is * not compiled or linked. * - * ********************************************************************* - * * Copyright (C) 1985, 1990 Regents of the University of California. * - * * Permission to use, copy, modify, and distribute this * - * * software and its documentation for any purpose and without * - * * fee is hereby granted, provided that the above copyright * - * * notice appear in all copies. The University of California * - * * makes no representations about the suitability of this * - * * software for any purpose. It is provided "as is" without * - * * express or implied warranty. Export of this software outside * - * * of the United States of America may require an export license. * + * ********************************************************************* + * * Copyright (C) 1985, 1990 Regents of the University of California. * + * * Permission to use, copy, modify, and distribute this * + * * software and its documentation for any purpose and without * + * * fee is hereby granted, provided that the above copyright * + * * notice appear in all copies. The University of California * + * * makes no representations about the suitability of this * + * * software for any purpose. It is provided "as is" without * + * * express or implied warranty. Export of this software outside * + * * of the United States of America may require an export license. * * ********************************************************************* */ @@ -44,7 +44,7 @@ extern int efReadLineNum; extern int Tcl_printf(); #endif - + /* * ---------------------------------------------------------------------------- * diff --git a/extflat/EFflat.c b/extflat/EFflat.c index 3e4f6fda..3c333dd1 100644 --- a/extflat/EFflat.c +++ b/extflat/EFflat.c @@ -4,16 +4,16 @@ * Procedures to flatten the hierarchical description built * by efReadDef(). * - * ********************************************************************* - * * Copyright (C) 1985, 1990 Regents of the University of California. * - * * Permission to use, copy, modify, and distribute this * - * * software and its documentation for any purpose and without * - * * fee is hereby granted, provided that the above copyright * - * * notice appear in all copies. The University of California * - * * makes no representations about the suitability of this * - * * software for any purpose. It is provided "as is" without * - * * express or implied warranty. Export of this software outside * - * * of the United States of America may require an export license. * + * ********************************************************************* + * * Copyright (C) 1985, 1990 Regents of the University of California. * + * * Permission to use, copy, modify, and distribute this * + * * software and its documentation for any purpose and without * + * * fee is hereby granted, provided that the above copyright * + * * notice appear in all copies. The University of California * + * * makes no representations about the suitability of this * + * * software for any purpose. It is provided "as is" without * + * * express or implied warranty. Export of this software outside * + * * of the United States of America may require an export license. * * ********************************************************************* */ @@ -67,7 +67,7 @@ int efAddOneConn(HierContext *, char *, char *, Connection *, bool); #define FLATNODE_STDCELL 0x01 #define FLATNODE_DOWARN 0x02 - + /* * ---------------------------------------------------------------------------- * @@ -233,7 +233,7 @@ EFFlatBuildOneLevel(def, flags) return &efFlatContext; } - + /* * ---------------------------------------------------------------------------- * @@ -268,7 +268,7 @@ EFFlatDone() HashKill(&efHNUseHashTable); return; } - + /* * ---------------------------------------------------------------------------- @@ -477,7 +477,7 @@ efAddNodes(hc, stdcell) // If called with "hierarchy on", all local node caps and adjustments // have been output and should be ignored. - + newnode->efnode_cap = (!stdcell) ? node->efnode_cap : (EFCapValue)0.0; newnode->efnode_client = (ClientData) NULL; newnode->efnode_flags = node->efnode_flags; @@ -602,7 +602,7 @@ efAddConns(hc, doWarn) return (0); } - + /* * ---------------------------------------------------------------------------- * @@ -660,7 +660,7 @@ efAddOneConn(hc, name1, name2, conn, doWarn) return 0; } - + /* * ---------------------------------------------------------------------------- * @@ -871,7 +871,7 @@ efFlatGlobHash(hierName) { return hierName->hn_hash; } - + /* * ---------------------------------------------------------------------------- * @@ -915,7 +915,7 @@ efFlatKills(hc) return (0); } - + /*---- * WIP @@ -1007,7 +1007,7 @@ efFlatCaps(hc) return (0); } - + /* * ---------------------------------------------------------------------------- * @@ -1042,7 +1042,7 @@ efFlatSingleCap(hc, name1, name2, conn) static char msg0[] = "cap(1)"; static char msg1[] = "cap(2)"; char *msg; - + /* Connections that are below threshold (ext2spice hierarchy only) */ /* will be missing. Do not generate errors for these. */ @@ -1080,7 +1080,7 @@ efFlatSingleCap(hc, name1, name2, conn) return 0; } - + /* * ---------------------------------------------------------------------------- * @@ -1167,14 +1167,14 @@ HashEntry *he; * CapHashSetValue() * if the pointer is null, allocate a EFCapValue and point to it. * Then copy in the new value. - * + * * need to pass doubles regardless of what CapValue is because of * argument promotion in ANSI C * */ void CapHashSetValue(he, c) -HashEntry *he; +HashEntry *he; double c; { EFCapValue *capp = (EFCapValue *)HashGetValue(he); diff --git a/extflat/EFhier.c b/extflat/EFhier.c index cef6bd52..53015361 100644 --- a/extflat/EFhier.c +++ b/extflat/EFhier.c @@ -4,16 +4,16 @@ * Procedures for traversing the hierarchical representation * of a circuit. * - * ********************************************************************* - * * Copyright (C) 1985, 1990 Regents of the University of California. * - * * Permission to use, copy, modify, and distribute this * - * * software and its documentation for any purpose and without * - * * fee is hereby granted, provided that the above copyright * - * * notice appear in all copies. The University of California * - * * makes no representations about the suitability of this * - * * software for any purpose. It is provided "as is" without * - * * express or implied warranty. Export of this software outside * - * * of the United States of America may require an export license. * + * ********************************************************************* + * * Copyright (C) 1985, 1990 Regents of the University of California. * + * * Permission to use, copy, modify, and distribute this * + * * software and its documentation for any purpose and without * + * * fee is hereby granted, provided that the above copyright * + * * notice appear in all copies. The University of California * + * * makes no representations about the suitability of this * + * * software for any purpose. It is provided "as is" without * + * * express or implied warranty. Export of this software outside * + * * of the United States of America may require an export license. * * ********************************************************************* */ @@ -32,7 +32,7 @@ static char rcsid[] __attribute__ ((unused)) = "$Header: /usr/cvsroot/magic-8.0/ #include "utils/utils.h" #include "extflat/extflat.h" #include "extflat/EFint.h" - + /* * ---------------------------------------------------------------------------- * @@ -119,7 +119,7 @@ efHierSrUses(hc, func, cdata) return (0); } - + /* * ---------------------------------------------------------------------------- * diff --git a/extflat/EFint.h b/extflat/EFint.h index a9cbf2c2..e43aa507 100644 --- a/extflat/EFint.h +++ b/extflat/EFint.h @@ -4,16 +4,16 @@ * Internal definitions for the procedures to flatten hierarchical * (.ext) circuit extraction files. * - * ********************************************************************* - * * Copyright (C) 1985, 1990 Regents of the University of California. * - * * Permission to use, copy, modify, and distribute this * - * * software and its documentation for any purpose and without * - * * fee is hereby granted, provided that the above copyright * - * * notice appear in all copies. The University of California * - * * makes no representations about the suitability of this * - * * software for any purpose. It is provided "as is" without * - * * express or implied warranty. Export of this software outside * - * * of the United States of America may require an export license. * + * ********************************************************************* + * * Copyright (C) 1985, 1990 Regents of the University of California. * + * * Permission to use, copy, modify, and distribute this * + * * software and its documentation for any purpose and without * + * * fee is hereby granted, provided that the above copyright * + * * notice appear in all copies. The University of California * + * * makes no representations about the suitability of this * + * * software for any purpose. It is provided "as is" without * + * * express or implied warranty. Export of this software outside * + * * of the United States of America may require an export license. * * ********************************************************************* * * rcsid $Header: /usr/cvsroot/magic-8.0/extflat/EFint.h,v 1.6 2010/12/16 18:59:03 tim Exp $ diff --git a/extflat/EFname.c b/extflat/EFname.c index 527d18a2..60365cdd 100644 --- a/extflat/EFname.c +++ b/extflat/EFname.c @@ -3,16 +3,16 @@ * * Procedures for manipulating HierNames. * - * ********************************************************************* - * * Copyright (C) 1985, 1990 Regents of the University of California. * - * * Permission to use, copy, modify, and distribute this * - * * software and its documentation for any purpose and without * - * * fee is hereby granted, provided that the above copyright * - * * notice appear in all copies. The University of California * - * * makes no representations about the suitability of this * - * * software for any purpose. It is provided "as is" without * - * * express or implied warranty. Export of this software outside * - * * of the United States of America may require an export license. * + * ********************************************************************* + * * Copyright (C) 1985, 1990 Regents of the University of California. * + * * Permission to use, copy, modify, and distribute this * + * * software and its documentation for any purpose and without * + * * fee is hereby granted, provided that the above copyright * + * * notice appear in all copies. The University of California * + * * makes no representations about the suitability of this * + * * software for any purpose. It is provided "as is" without * + * * express or implied warranty. Export of this software outside * + * * of the United States of America may require an export license. * * ********************************************************************* */ @@ -34,7 +34,7 @@ static char rcsid[] __attribute__ ((unused)) = "$Header: /usr/cvsroot/magic-8.0/ #include "extflat/extflat.h" #include "extflat/EFint.h" -#ifdef MAGIC_WRAPPER +#ifdef MAGIC_WRAPPER #define PrintErr TxError #else #define PrintErr printf @@ -59,7 +59,7 @@ extern void EFHNFree(); extern void efHNInit(); extern void efHNRecord(); - + /* * ---------------------------------------------------------------------------- * @@ -67,7 +67,7 @@ extern void efHNRecord(); * * Determine whether a HierName is of the format of a global name, * i.e, it ends in a '!'. - * + * * The Tcl version of magic further refines this to include names * which are defined in the global Tcl variable space. (7.3.94): * also check if the array variable "globals" contains the name as @@ -104,7 +104,7 @@ EFHNIsGlob(hierName) * EFHNIsGND -- * * Determine whether a HierName is the same as the global signal GND. - * + * * The Tcl version of magic expands this to include names which are * equal to the global Tcl variable $GND, if it is set. * @@ -139,7 +139,7 @@ EFHNIsGND(hierName) return (strcmp(hierName->hn_name, "GND!") == 0); } - + /* * ---------------------------------------------------------------------------- * @@ -184,7 +184,7 @@ EFHNConcat(prefix, suffix) return firstNew; } - + /* * ---------------------------------------------------------------------------- * @@ -247,7 +247,7 @@ EFStrToHN(prefix, suffixStr) return hierName; } - + /* * ---------------------------------------------------------------------------- * @@ -318,7 +318,7 @@ efHNToStrFunc(hierName, dstp) return --dstp; } - + /* * ---------------------------------------------------------------------------- * @@ -378,7 +378,7 @@ EFHNLook(prefix, suffixStr, errorStr) return he; } - + /* * ---------------------------------------------------------------------------- * @@ -430,7 +430,7 @@ EFHNConcatLook(prefix, suffix, errorStr) hn->hn_parent = (HierName *) NULL; return he; } - + /* * ---------------------------------------------------------------------------- * @@ -468,7 +468,7 @@ EFHNFree(hierName, prefix, type) } } } - + /* * ---------------------------------------------------------------------------- * @@ -539,7 +539,7 @@ EFHNBest(hierName1, hierName2) return (efHNLexOrder(hierName1, hierName2) > 0); } - + /* * ---------------------------------------------------------------------------- * @@ -577,7 +577,7 @@ efHNLexOrder(hierName1, hierName2) return strcmp(hierName1->hn_name, hierName2->hn_name); } - + /* * ---------------------------------------------------------------------------- * @@ -667,7 +667,7 @@ efHNFromUse(hc, prefix) return hierName; } - + /* * ---------------------------------------------------------------------------- * @@ -710,7 +710,7 @@ efHNUseHash(hierName) { return hierName->hn_hash + (spointertype) hierName->hn_parent; } - + /* * ---------------------------------------------------------------------------- * @@ -758,7 +758,7 @@ efHNInit(hierName, cp, endp) hierName->hn_hash = hashsum; } - + /* * ---------------------------------------------------------------------------- * @@ -818,7 +818,7 @@ efHNHash(hierName) return n; } - + /* * ---------------------------------------------------------------------------- * @@ -888,7 +888,7 @@ efHNDistKill(dist) freeMagic((char *) dist); } - + /* * ---------------------------------------------------------------------------- * @@ -930,7 +930,7 @@ efHNBuildDistKey(prefix, dist, distKey) distKey->dist_min = dist->dist_min; distKey->dist_max = dist->dist_max; } - + /* * ---------------------------------------------------------------------------- * diff --git a/extflat/EFread.c b/extflat/EFread.c index 96158edb..7e4f488d 100644 --- a/extflat/EFread.c +++ b/extflat/EFread.c @@ -4,16 +4,16 @@ * Procedures to read a .ext file and call the procedures * in EFbuild.c to build up a description of each def. * - * ********************************************************************* - * * Copyright (C) 1985, 1990 Regents of the University of California. * - * * Permission to use, copy, modify, and distribute this * - * * software and its documentation for any purpose and without * - * * fee is hereby granted, provided that the above copyright * - * * notice appear in all copies. The University of California * - * * makes no representations about the suitability of this * - * * software for any purpose. It is provided "as is" without * - * * express or implied warranty. Export of this software outside * - * * of the United States of America may require an export license. * + * ********************************************************************* + * * Copyright (C) 1985, 1990 Regents of the University of California. * + * * Permission to use, copy, modify, and distribute this * + * * software and its documentation for any purpose and without * + * * fee is hereby granted, provided that the above copyright * + * * notice appear in all copies. The University of California * + * * makes no representations about the suitability of this * + * * software for any purpose. It is provided "as is" without * + * * express or implied warranty. Export of this software outside * + * * of the United States of America may require an export license. * * ********************************************************************* */ @@ -105,7 +105,7 @@ static bool efReadDef(); /* atoCap - convert a string to a EFCapValue */ #define atoCap(s) ((EFCapValue)atof(s)) - + /* * ---------------------------------------------------------------------------- * @@ -207,7 +207,7 @@ efReadDef(def, dosubckt, resist, noscale, toplevel) if (sptr) { *sptr = '\0'; inf = PaOpen(name, "r", ".ext", filepath, EFLibPath, &efReadFileName); - } + } freeMagic(filepath); } } @@ -622,7 +622,7 @@ resistChanged: DoSubCircuit = FALSE; /* Read in each def that has not yet been read in */ - + HashStartSearch(&hs); while (he = HashNext(&def->def_uses, &hs)) { @@ -635,7 +635,7 @@ resistChanged: return rc; } - + /* * ---------------------------------------------------------------------------- * @@ -748,7 +748,7 @@ start: */ if (get == argv[argc]) break; - + /* Terminate the token and advance over the terminating character. */ if (*get != '\0') get++; /* Careful! could be at end of line! */ diff --git a/extflat/EFsym.c b/extflat/EFsym.c index d3d1fcd2..812e7539 100644 --- a/extflat/EFsym.c +++ b/extflat/EFsym.c @@ -11,16 +11,16 @@ * * w, l * - * ********************************************************************* - * * Copyright (C) 1985, 1990 Regents of the University of California. * - * * Permission to use, copy, modify, and distribute this * - * * software and its documentation for any purpose and without * - * * fee is hereby granted, provided that the above copyright * - * * notice appear in all copies. The University of California * - * * makes no representations about the suitability of this * - * * software for any purpose. It is provided "as is" without * - * * express or implied warranty. Export of this software outside * - * * of the United States of America may require an export license. * + * ********************************************************************* + * * Copyright (C) 1985, 1990 Regents of the University of California. * + * * Permission to use, copy, modify, and distribute this * + * * software and its documentation for any purpose and without * + * * fee is hereby granted, provided that the above copyright * + * * notice appear in all copies. The University of California * + * * makes no representations about the suitability of this * + * * software for any purpose. It is provided "as is" without * + * * express or implied warranty. Export of this software outside * + * * of the United States of America may require an export license. * * ********************************************************************* */ @@ -46,7 +46,7 @@ static char rcsid[] __attribute__ ((unused)) = "$Header: /usr/cvsroot/magic-8.0/ bool efSymAdd(); HashTable efSymHash; - + /* * ---------------------------------------------------------------------------- * @@ -69,7 +69,7 @@ efSymInit() { HashInit(&efSymHash, 16, HT_STRINGKEYS); } - + /* * ---------------------------------------------------------------------------- * @@ -116,7 +116,7 @@ efSymAddFile(name) return TRUE; } - + /* * ---------------------------------------------------------------------------- * @@ -170,7 +170,7 @@ efSymAdd(str) HashSetValue(he, (spointertype)atoi(value)); return TRUE; } - + /* * ---------------------------------------------------------------------------- * diff --git a/extflat/EFvisit.c b/extflat/EFvisit.c index 35de6766..fccdc9f7 100644 --- a/extflat/EFvisit.c +++ b/extflat/EFvisit.c @@ -4,16 +4,16 @@ * Procedures to traverse and output flattened nodes, capacitors, * transistors, resistors, and Distances. * - * ********************************************************************* - * * Copyright (C) 1985, 1990 Regents of the University of California. * - * * Permission to use, copy, modify, and distribute this * - * * software and its documentation for any purpose and without * - * * fee is hereby granted, provided that the above copyright * - * * notice appear in all copies. The University of California * - * * makes no representations about the suitability of this * - * * software for any purpose. It is provided "as is" without * - * * express or implied warranty. Export of this software outside * - * * of the United States of America may require an export license. * + * ********************************************************************* + * * Copyright (C) 1985, 1990 Regents of the University of California. * + * * Permission to use, copy, modify, and distribute this * + * * software and its documentation for any purpose and without * + * * fee is hereby granted, provided that the above copyright * + * * notice appear in all copies. The University of California * + * * makes no representations about the suitability of this * + * * software for any purpose. It is provided "as is" without * + * * express or implied warranty. Export of this software outside * + * * of the United States of America may require an export license. * * ********************************************************************* */ @@ -45,7 +45,7 @@ extern void efDevFixLW(); extern void efHNOutPrefix(); bool efDevKilled(); - + /* * ---------------------------------------------------------------------------- * @@ -311,7 +311,7 @@ efVisitDevs(hc, ca) scale = (efScaleChanged && def->def_scale != 1.0) ? def->def_scale : 1.0; t = hc->hc_trans; - + /* Visit our own devices */ HashStartSearch(&hs); @@ -326,7 +326,7 @@ efVisitDevs(hc, ca) } return 0; } - + /* * ---------------------------------------------------------------------------- * @@ -366,7 +366,7 @@ efDevKilled(dev, prefix) return FALSE; } - + /* * ---------------------------------------------------------------------------- * @@ -439,7 +439,7 @@ skip: /* Nothing */; } } - + /* * ---------------------------------------------------------------------------- * @@ -530,7 +530,7 @@ efVisitResists(hc, ca) return 0; } - + /* * ---------------------------------------------------------------------------- * @@ -567,7 +567,7 @@ efVisitSingleResist(hc, name1, name2, res, ca) return 0; if ((he = EFHNLook(hc->hc_hierName, name2, "resist(2)")) == NULL) - return 0; + return 0; n2 = ((EFNodeName *) HashGetValue(he))->efnn_node; if (n2->efnode_flags & EF_KILLED) return 0; @@ -580,7 +580,7 @@ efVisitSingleResist(hc, name1, name2, res, ca) n2->efnode_name->efnn_hier, res->conn_res, ca->ca_cdata); } - + /* * ---------------------------------------------------------------------------- * @@ -632,7 +632,7 @@ EFVisitCaps(capProc, cdata) return 0; } - + /* * ---------------------------------------------------------------------------- * @@ -714,7 +714,7 @@ EFVisitNodes(nodeProc, cdata) return 0; } - + /* * ---------------------------------------------------------------------------- * @@ -794,7 +794,7 @@ EFNodeResist(node) } return (resist); } - + /* * ---------------------------------------------------------------------------- * @@ -839,7 +839,7 @@ EFLookDist(hn1, hn2, pMinDist, pMaxDist) *pMaxDist = dist->dist_max; return TRUE; } - + /* * ---------------------------------------------------------------------------- * @@ -869,14 +869,14 @@ EFHNOut(hierName, outf) if (hierName->hn_parent) efHNOutPrefix(hierName->hn_parent, outf); if (EFTrimFlags) { - cp = hierName->hn_name; + cp = hierName->hn_name; trimGlob = (EFTrimFlags & EF_TRIMGLOB); trimLocal = (EFTrimFlags & EF_TRIMLOCAL); convComma = (EFTrimFlags & EF_CONVERTCOMMA); convBrackets = (EFTrimFlags & EF_CONVERTBRACKETS); while (c = *cp++) { - if (*cp) + if (*cp) { if (c == ',') { diff --git a/extflat/extflat.h b/extflat/extflat.h index 86eda232..0e2b361a 100644 --- a/extflat/extflat.h +++ b/extflat/extflat.h @@ -4,16 +4,16 @@ * Internal definitions for the procedures to flatten hierarchical * (.ext) circuit extraction files. * - * ********************************************************************* - * * Copyright (C) 1985, 1990 Regents of the University of California. * - * * Permission to use, copy, modify, and distribute this * - * * software and its documentation for any purpose and without * - * * fee is hereby granted, provided that the above copyright * - * * notice appear in all copies. The University of California * - * * makes no representations about the suitability of this * - * * software for any purpose. It is provided "as is" without * - * * express or implied warranty. Export of this software outside * - * * of the United States of America may require an export license. * + * ********************************************************************* + * * Copyright (C) 1985, 1990 Regents of the University of California. * + * * Permission to use, copy, modify, and distribute this * + * * software and its documentation for any purpose and without * + * * fee is hereby granted, provided that the above copyright * + * * notice appear in all copies. The University of California * + * * makes no representations about the suitability of this * + * * software for any purpose. It is provided "as is" without * + * * express or implied warranty. Export of this software outside * + * * of the United States of America may require an export license. * * ********************************************************************* * * rcsid $Header: /usr/cvsroot/magic-8.0/extflat/extflat.h,v 1.2 2008/12/03 14:12:09 tim Exp $ @@ -343,7 +343,7 @@ extern int EFGetPortMax(); /* ------------------------- constants used by clients -------------- */ /* This gives us a 32 or 64 dev types which should be ok */ #define BITSPERCHAR 8 -#define MAXDEVTYPES (sizeof(long)*BITSPERCHAR) +#define MAXDEVTYPES (sizeof(long)*BITSPERCHAR) /* * ANSI C definitions of arguments to EFvisit procedures diff --git a/extract/ExtArray.c b/extract/ExtArray.c index b4106c6d..7122e1eb 100644 --- a/extract/ExtArray.c +++ b/extract/ExtArray.c @@ -5,16 +5,16 @@ * Extract interactions between elements of an array. * The routines in this file are not re-entrant. * - * ********************************************************************* - * * Copyright (C) 1985, 1990 Regents of the University of California. * - * * Permission to use, copy, modify, and distribute this * - * * software and its documentation for any purpose and without * - * * fee is hereby granted, provided that the above copyright * - * * notice appear in all copies. The University of California * - * * makes no representations about the suitability of this * - * * software for any purpose. It is provided "as is" without * - * * express or implied warranty. Export of this software outside * - * * of the United States of America may require an export license. * + * ********************************************************************* + * * Copyright (C) 1985, 1990 Regents of the University of California. * + * * Permission to use, copy, modify, and distribute this * + * * software and its documentation for any purpose and without * + * * fee is hereby granted, provided that the above copyright * + * * notice appear in all copies. The University of California * + * * makes no representations about the suitability of this * + * * software for any purpose. It is provided "as is" without * + * * express or implied warranty. Export of this software outside * + * * of the United States of America may require an export license. * * ********************************************************************* */ @@ -71,7 +71,7 @@ void extArrayHardSearch(); #if 0 -/* +/* * ---------------------------------------------------------------------------- * extOutputGeneratedLabels --- * @@ -178,7 +178,7 @@ extArray(parentUse, f) extOutputConns(&ha.ha_connHash, f); HashKill(&ha.ha_connHash); } - + /* * ---------------------------------------------------------------------------- * @@ -329,7 +329,7 @@ extArrayFunc(scx, ha) return (2); } - + /* * ---------------------------------------------------------------------------- * @@ -392,7 +392,7 @@ done: if (extArrayPrimary) extHierFreeOne(extArrayPrimary); extArrayPrimary = (ExtTree *) NULL; } - + /* * ---------------------------------------------------------------------------- * @@ -466,7 +466,7 @@ extArrayPrimaryFunc(use, trans, x, y, ha) return (1); } - + /* * ---------------------------------------------------------------------------- * @@ -633,7 +633,7 @@ extArrayInterFunc(use, trans, x, y, ha) extFindCoupling(cumDef, &ha->ha_cumFlat.et_coupleHash, &ha->ha_clipArea); extArrayAdjust(ha, oneFlat, extArrayPrimary); - if (ExtOptions & EXT_DOCOUPLING) + if (ExtOptions & EXT_DOCOUPLING) extCapHashKill(&ha->ha_cumFlat.et_coupleHash); } @@ -717,7 +717,7 @@ extArrayNodeName(np, ha, et1, et2) return ("(none)"); } - + /* * ---------------------------------------------------------------------------- * @@ -855,7 +855,7 @@ done: *dstp = '\0'; return (name); } - + /* * ---------------------------------------------------------------------------- * @@ -892,7 +892,7 @@ extArrayRange(dstp, lo, hi, prevRange, followRange) *dstp = '\0'; return (dstp); } - + /* * ---------------------------------------------------------------------------- * @@ -976,7 +976,7 @@ extArrayHardNode(tp, pNum, def, ha) return ((LabRegion *) NULL); } - + /* * ---------------------------------------------------------------------------- * diff --git a/extract/ExtBasic.c b/extract/ExtBasic.c index d311f45e..03e018bf 100644 --- a/extract/ExtBasic.c +++ b/extract/ExtBasic.c @@ -4,16 +4,16 @@ * Circuit extraction. * Flat extraction of a single CellDef. * - * ********************************************************************* - * * Copyright (C) 1985, 1990 Regents of the University of California. * - * * Permission to use, copy, modify, and distribute this * - * * software and its documentation for any purpose and without * - * * fee is hereby granted, provided that the above copyright * - * * notice appear in all copies. The University of California * - * * makes no representations about the suitability of this * - * * software for any purpose. It is provided "as is" without * - * * express or implied warranty. Export of this software outside * - * * of the United States of America may require an export license. * + * ********************************************************************* + * * Copyright (C) 1985, 1990 Regents of the University of California. * + * * Permission to use, copy, modify, and distribute this * + * * software and its documentation for any purpose and without * + * * fee is hereby granted, provided that the above copyright * + * * notice appear in all copies. The University of California * + * * makes no representations about the suitability of this * + * * software for any purpose. It is provided "as is" without * + * * express or implied warranty. Export of this software outside * + * * of the United States of America may require an export license. * * ********************************************************************* */ @@ -337,7 +337,7 @@ extBasic(def, outFile) modelname = NULL; subsnode = NULL; propvalue = NULL; - + if (propfound) { /* Sanity checking on syntax of property line, plus */ @@ -521,7 +521,7 @@ extBasic(def, outFile) ExtFreeLabRegions((LabRegion *) transList); return (nodeList); } - + /* * ---------------------------------------------------------------------------- * @@ -737,7 +737,7 @@ extOutputNodes(nodeList, outFile) } } } - + /* * ---------------------------------------------------------------------------- * @@ -824,7 +824,7 @@ extFindDuplicateLabels(def, nreg) if (hashInitialized) HashKill(&labelHash); } - + /* * ---------------------------------------------------------------------------- * @@ -865,7 +865,7 @@ extNodeName(node) extMakeNodeNumPrint(namebuf, node->lreg_pnum, node->lreg_ll); return (namebuf); } - + /* * --------------------------------------------------------------------- * @@ -925,18 +925,18 @@ ExtSortTerminals(tran, ll) tran->tr_termnode[nsd] = tran->tr_termnode[nsd+1]; tran->tr_termpos[nsd] = tran->tr_termpos[nsd+1]; tran->tr_termlen[nsd] = tran->tr_termlen[nsd+1]; - + tran->tr_termnode[nsd+1] = tmp_node; tran->tr_termpos[nsd+1] = tmp_pos; tran->tr_termlen[nsd+1] = tmp_len; - /* Need to SWAP the indices in the labRegion too. - * These for loops within the bubblesort in here are kinda slow - * but S,D attributes are not that common so it should not matter + /* Need to SWAP the indices in the labRegion too. + * These for loops within the bubblesort in here are kinda slow + * but S,D attributes are not that common so it should not matter * that much -- Stefanos 5/96 */ - for ( lp = ll ; lp ; lp = lp->ll_next ) + for ( lp = ll ; lp ; lp = lp->ll_next ) if ( lp->ll_attr == nsd ) lp->ll_attr = LL_SORTATTR ; else if ( lp->ll_attr == nsd+1 ) lp->ll_attr = nsd ; - for ( lp = ll ; lp ; lp = lp->ll_next ) + for ( lp = ll ; lp ; lp = lp->ll_next ) if ( lp->ll_attr == LL_SORTATTR ) lp->ll_attr = nsd+1; } } @@ -1028,7 +1028,7 @@ extComputeEffectiveLW(rlengthptr, rwidthptr, numregions, chop) /* First, check for MOScap-connected transistors. In such * cases, one or more extSpecialBounds[] is NULL. Try to - * separate the existing extSpecialBounds[] vectors into + * separate the existing extSpecialBounds[] vectors into * independent (non-connecting) vectors. */ @@ -1182,7 +1182,7 @@ extComputeEffectiveLW(rlengthptr, rwidthptr, numregions, chop) width *= loclength; width /= length; length = loclength; - } + } isComplex = TRUE; } @@ -1220,7 +1220,7 @@ extComputeEffectiveLW(rlengthptr, rwidthptr, numregions, chop) testwid = segc - sege; if (testwid > loclength) testwid = loclength; if (testwid > 0) cornerw += testwid; - + /* corner extend bottom */ segc = MIN(lb2->r.r_ybot, lb->r.r_ybot); sege = MIN(segp, segn); @@ -1246,7 +1246,7 @@ extComputeEffectiveLW(rlengthptr, rwidthptr, numregions, chop) testwid = segc - sege; if (testwid > loclength) testwid = loclength; if (testwid > 0) cornerw += testwid; - + /* corner extend left */ segc = MIN(lb2->r.r_xbot, lb->r.r_xbot); sege = MIN(segp, segn); @@ -1289,7 +1289,7 @@ extComputeEffectiveLW(rlengthptr, rwidthptr, numregions, chop) " all widths to length %d\n", length); } } - + /* * ---------------------------------------------------------------------------- * @@ -1471,7 +1471,7 @@ extOutputParameters(def, transList, outFile) if (plist->pl_param[1] != '\0') { if (plist->pl_scale != 1.0) - fprintf(outFile, " %c%c=%s*%g", + fprintf(outFile, " %c%c=%s*%g", plist->pl_param[0], plist->pl_param[1], plist->pl_name, plist->pl_scale); else @@ -1481,13 +1481,13 @@ extOutputParameters(def, transList, outFile) else { if (plist->pl_scale != 1.0) - fprintf(outFile, " %c=%s*%g", + fprintf(outFile, " %c=%s*%g", plist->pl_param[0], plist->pl_name, plist->pl_scale); else fprintf(outFile, " %c=%s", plist->pl_param[0], plist->pl_name); - + } } fprintf(outFile, "\n"); @@ -1758,7 +1758,7 @@ extOutputDevices(def, transList, outFile) node = extTransRec.tr_termnode[extTransRec.tr_nterm - 1]; (void) strcat(mesg, ";\n connecting remainder to node "); (void) strcat(mesg, extNodeName((LabRegion *) node)); - while (extTransRec.tr_nterm < nsd) + while (extTransRec.tr_nterm < nsd) { extTransRec.tr_termlen[extTransRec.tr_nterm] = 0; extTransRec.tr_termnode[extTransRec.tr_nterm++] = node; @@ -1772,7 +1772,7 @@ extOutputDevices(def, transList, outFile) /* parts of devices are split into different cells. */ if ((extTransRec.tr_nterm == 0) || (node == NULL)) - continue; + continue; } else if (extTransRec.tr_nterm > nsd) { @@ -1830,7 +1830,7 @@ extOutputDevices(def, transList, outFile) devptr->exts_deviceName); fprintf(outFile, " %d %d %d %d", - reg->treg_ll.p_x, reg->treg_ll.p_y, + reg->treg_ll.p_x, reg->treg_ll.p_y, reg->treg_ll.p_x + 1, reg->treg_ll.p_y + 1); /* NOTE: The following code makes unreasonable simplifying */ @@ -1847,7 +1847,7 @@ extOutputDevices(def, transList, outFile) { case DEV_FET: /* old style, perimeter & area */ fprintf(outFile, " %d %d \"%s\"", - reg->treg_area, extTransRec.tr_perim, + reg->treg_area, extTransRec.tr_perim, (subsName == NULL) ? "None" : subsName); break; @@ -1968,7 +1968,7 @@ extOutputDevices(def, transList, outFile) hasModel = strcmp(devptr->exts_deviceName, "None"); length = extTransRec.tr_perim; isAnnular = FALSE; - + /* Boundary perimeter scan for resistors with more than */ /* one tile. */ @@ -2007,10 +2007,10 @@ extOutputDevices(def, transList, outFile) { extSeparateBounds(n - 1); if (isAnnular) - extComputeEffectiveLW(&length, &width, n, + extComputeEffectiveLW(&length, &width, n, ExtCurStyle->exts_cornerChop[t]); else - extComputeEffectiveLW(&width, &length, n, + extComputeEffectiveLW(&width, &length, n, ExtCurStyle->exts_cornerChop[t]); } else @@ -2204,7 +2204,7 @@ extOutputDevices(def, transList, outFile) /* permute, and the terminal order is fixed. */ if (TTMaskIsZero(&devptr->exts_deviceSDTypes[1])) - ExtSortTerminals(&extTransRec, ll); + ExtSortTerminals(&extTransRec, ll); /* each non-gate terminal */ for (nsd = 0; nsd < extTransRec.tr_nterm; nsd++) @@ -2447,8 +2447,8 @@ extTransTileFunc(tile, pNum, arg) if (ll->ll_attr != LL_NOATTR) continue; lab = ll->ll_label; TITORECT(tile, &r); - if (GEO_TOUCH(&r, &lab->lab_rect) && - extLabType(lab->lab_text, LABTYPE_GATEATTR)) + if (GEO_TOUCH(&r, &lab->lab_rect) && + extLabType(lab->lab_text, LABTYPE_GATEATTR)) { ll->ll_attr = LL_GATEATTR; } @@ -2719,7 +2719,7 @@ extTransPerimFunc(bp) { if( LEFT(otile) < pos->pt.p_x ) pos->pt = otile->ti_ll; - else if( LEFT(otile) == pos->pt.p_x && + else if( LEFT(otile) == pos->pt.p_x && BOTTOM(otile) < pos->pt.p_y ) pos->pt.p_y = BOTTOM(otile); } @@ -3099,11 +3099,11 @@ extSpecialPerimFunc(bp, sense) { lb->b_next = lastlb->b_next; break; - } + } } } freeMagic((char *)lastlb); - + /* New segment cannot extend more than two existing segments */ break; } @@ -3121,7 +3121,7 @@ extSpecialPerimFunc(bp, sense) return (0); } - + /* * ---------------------------------------------------------------------------- * @@ -3162,7 +3162,7 @@ extTransOutTerminal(lreg, ll, whichTerm, len, outFile) fprintf(outFile, " \"%s\" %d", extNodeName(lreg), len); - for (fmt = ' '; ll; ll = ll->ll_next) + for (fmt = ' '; ll; ll = ll->ll_next) if (ll->ll_attr == whichTerm) { fprintf(outFile, "%c\"", fmt); @@ -3178,7 +3178,7 @@ extTransOutTerminal(lreg, ll, whichTerm, len, outFile) if (fmt == ' ') fprintf(outFile, " 0"); } - + /* * ---------------------------------------------------------------------------- * @@ -3211,7 +3211,7 @@ extTransBad(def, tp, mesg) } extNumWarnings++; } - + /* * ---------------------------------------------------------------------------- * @@ -3252,7 +3252,7 @@ extLabType(text, typeMask) } /*NOTREACHED*/ } - + /* * ---------------------------------------------------------------------------- @@ -3431,7 +3431,7 @@ extTransEach(tile, pNum, arg) /* The following is non-ideal. It assumes that the lowest plane of */ /* types connected to a device is the plane of the device itself. */ /* Otherwise, the area of the device will be miscalculated. */ - + if (pNum < reg->treg_pnum) reg->treg_area = 0; extSetNodeNum((LabRegion *) reg, pNum, tile); @@ -3601,7 +3601,7 @@ extSubsFunc(tile, arg) Tile *tile; FindRegion *arg; { - int pNum; + int pNum; Rect tileArea; TileType type; TileTypeBitMask *smask; @@ -3636,7 +3636,7 @@ extSubsFunc2(tile, arg) Tile *tile; FindRegion *arg; { - int pNum; + int pNum; Rect tileArea; TileTypeBitMask *smask; int extSubsFunc3(); @@ -3659,7 +3659,7 @@ extSubsFunc2(tile, arg) pNum = ExtCurStyle->exts_globSubstratePlane; if (DBSrPaintArea((Tile *) NULL, arg->fra_def->cd_planes[pNum], - &tileArea, &DBAllButSpaceBits, + &tileArea, &DBAllButSpaceBits, extSubsFunc3, (ClientData)NULL) == 0) { /* Mark this tile as pending and push it */ @@ -3743,11 +3743,11 @@ extNodeAreaFunc(tile, arg) extShowTile(tile, "neighbor", 1); if (IsSplit(tile)) - { + { type = (SplitSide(tile)) ? SplitRightType(tile): SplitLeftType(tile); - } - else + } + else type = TiGetTypeExact(tile); /* Contacts are replaced by their residues when calculating */ @@ -4020,7 +4020,7 @@ donesides: /* tp and tile should have the same geometry for a contact */ if (IsSplit(tile) && IsSplit(tp)) - { + { if (SplitSide(tile)) { t = SplitRightType(tp); @@ -4037,7 +4037,7 @@ donesides: PUSHTILELEFT(tp, pNum); } } - } + } else if (IsSplit(tp)) { /* Need to test both sides of the tile */ @@ -4101,7 +4101,7 @@ donesides: return (0); } - + /* * ---------------------------------------------------------------------------- * @@ -4113,7 +4113,7 @@ donesides: * ---------------------------------------------------------------------------- */ -void +void extSetCapValue(he, value) HashEntry *he; CapValue value; @@ -4123,7 +4123,7 @@ extSetCapValue(he, value) *( (CapValue *) HashGetValue(he)) = value; } -CapValue +CapValue extGetCapValue(he) HashEntry *he; { @@ -4131,7 +4131,7 @@ extGetCapValue(he) extSetCapValue(he, (CapValue) 0); return *( (CapValue *) HashGetValue(he)); } - + /* * ---------------------------------------------------------------------------- * @@ -4157,7 +4157,7 @@ extCapHashKill(ht) HashStartSearch(&hs); while (he = HashNext(ht, &hs)) { - if (HashGetValue(he) != NULL) + if (HashGetValue(he) != NULL) { freeMagic(HashGetValue(he)); /* Free a malloc'ed CapValue */ HashSetValue(he, (ClientData) NULL); diff --git a/extract/ExtCell.c b/extract/ExtCell.c index 4aa8fb2a..8d7c1751 100644 --- a/extract/ExtCell.c +++ b/extract/ExtCell.c @@ -4,16 +4,16 @@ * Circuit extraction. * Extract a single cell. * - * ********************************************************************* - * * Copyright (C) 1985, 1990 Regents of the University of California. * - * * Permission to use, copy, modify, and distribute this * - * * software and its documentation for any purpose and without * - * * fee is hereby granted, provided that the above copyright * - * * notice appear in all copies. The University of California * - * * makes no representations about the suitability of this * - * * software for any purpose. It is provided "as is" without * - * * express or implied warranty. Export of this software outside * - * * of the United States of America may require an export license. * + * ********************************************************************* + * * Copyright (C) 1985, 1990 Regents of the University of California. * + * * Permission to use, copy, modify, and distribute this * + * * software and its documentation for any purpose and without * + * * fee is hereby granted, provided that the above copyright * + * * notice appear in all copies. The University of California * + * * makes no representations about the suitability of this * + * * software for any purpose. It is provided "as is" without * + * * express or implied warranty. Export of this software outside * + * * of the United States of America may require an export license. * * ********************************************************************* */ @@ -61,7 +61,7 @@ FILE *extFileOpen(); void extCellFile(); void extHeader(); - + /* * ---------------------------------------------------------------------------- * @@ -130,7 +130,7 @@ ExtCell(def, outName, doLength) TxPrintf("\n"); } } - + /* * ---------------------------------------------------------------------------- * @@ -218,7 +218,7 @@ extFileOpen(def, file, mode, doLocal, prealfile) } return (PaOpen(name, mode, ".ext", ".", ".", prealfile)); } - + /* * ---------------------------------------------------------------------------- * @@ -275,7 +275,7 @@ extCellFile(def, f, doLength) UndoEnable(); } - + /* * ---------------------------------------------------------------------------- * @@ -354,7 +354,7 @@ extHeader(def, f) /* Output all calls on subcells */ (void) DBCellEnum(def, extOutputUsesFunc, (ClientData) f); } - + /* * ---------------------------------------------------------------------------- * diff --git a/extract/ExtCouple.c b/extract/ExtCouple.c index 5223577b..64aa56d7 100644 --- a/extract/ExtCouple.c +++ b/extract/ExtCouple.c @@ -4,16 +4,16 @@ * Circuit extraction. * Extraction of coupling capacitance. * - * ********************************************************************* - * * Copyright (C) 1985, 1990 Regents of the University of California. * - * * Permission to use, copy, modify, and distribute this * - * * software and its documentation for any purpose and without * - * * fee is hereby granted, provided that the above copyright * - * * notice appear in all copies. The University of California * - * * makes no representations about the suitability of this * - * * software for any purpose. It is provided "as is" without * - * * express or implied warranty. Export of this software outside * - * * of the United States of America may require an export license. * + * ********************************************************************* + * * Copyright (C) 1985, 1990 Regents of the University of California. * + * * Permission to use, copy, modify, and distribute this * + * * software and its documentation for any purpose and without * + * * fee is hereby granted, provided that the above copyright * + * * notice appear in all copies. The University of California * + * * makes no representations about the suitability of this * + * * software for any purpose. It is provided "as is" without * + * * express or implied warranty. Export of this software outside * + * * of the United States of America may require an export license. * * ********************************************************************* */ @@ -85,7 +85,7 @@ typedef struct _esws { /* --------------------- Debugging stuff ---------------------- */ #define CAP_DEBUG FALSE -void extNregAdjustCap(nr, c, str) +void extNregAdjustCap(nr, c, str) NodeRegion *nr; CapValue c; char *str; @@ -109,7 +109,7 @@ void extAdjustCouple(he, c, str) fprintf(stderr, "CapDebug: %s-%s += %f (%s)\n", name1, name2, c, str); } - + /* * ---------------------------------------------------------------------------- * @@ -202,7 +202,7 @@ extFindCoupling(def, table, clipArea) * * ---------------------------------------------------------------------------- */ - + void extRelocateSubstrateCoupling(table, subsnode) HashTable *table; /* Coupling capacitance hash table */ @@ -238,7 +238,7 @@ extRelocateSubstrateCoupling(table, subsnode) } } - + /* * ---------------------------------------------------------------------------- * @@ -285,7 +285,7 @@ extOutputCoupling(table, outFile) fprintf(outFile, "\"%s\" %lg\n", text, cap); } } - + /* * ---------------------------------------------------------------------------- * @@ -356,7 +356,7 @@ extBasicOverlap(tile, ecs) return (0); } - + /* * ---------------------------------------------------------------------------- * @@ -493,14 +493,14 @@ extAddOverlap(tbelow, ecpls) */ rabove->nreg_cap -= ExtCurStyle->exts_areaCap[ta] * ov.o_area; if (CAP_DEBUG) - extNregAdjustCap(rabove, + extNregAdjustCap(rabove, -(ExtCurStyle->exts_areaCap[ta] * ov.o_area), "obsolete_overlap"); } else if (CAP_DEBUG) - extNregAdjustCap(rabove, 0.0, + extNregAdjustCap(rabove, 0.0, "obsolete_overlap (skipped, wrong direction)"); - + /* If the regions are the same, skip this part */ if (rabove == rbelow) return (0); @@ -513,7 +513,7 @@ extAddOverlap(tbelow, ecpls) c = extGetCapValue(he); c += ExtCurStyle->exts_overlapCap[ta][tb] * ov.o_area; if (CAP_DEBUG) - extAdjustCouple(he, ExtCurStyle->exts_overlapCap[ta][tb] * + extAdjustCouple(he, ExtCurStyle->exts_overlapCap[ta][tb] * ov.o_area, "overlap"); extSetCapValue(he, c); } @@ -584,7 +584,7 @@ extSubtractOverlap2(tile, ov) return (0); } - + /* * ---------------------------------------------------------------------------- * @@ -618,7 +618,7 @@ extBasicCouple(tile, ecs) ecs->plane, extAddCouple, (ClientData) ecs); return (0); } - + /* * ---------------------------------------------------------------------------- * @@ -684,7 +684,7 @@ extAddCouple(bp, ecs) { bpCopy = *bp; bp = &bpCopy; - + GEOCLIP(&bp->b_segment, extCoupleSearchArea); /* Fixed 2/27/2017 by Tim @@ -750,7 +750,7 @@ extAddCouple(bp, ecs) return (0); } - + /* * ---------------------------------------------------------------------------- * @@ -802,7 +802,7 @@ extSideOverlap(tp, esws) GEOCLIP(&ov.o_clip, &extSideOverlapSearchArea); ov.o_area = length; areaAccountedFor = 0; - ASSERT(length == GEO_WIDTH(&ov.o_clip) * GEO_HEIGHT(&ov.o_clip), + ASSERT(length == GEO_WIDTH(&ov.o_clip) * GEO_HEIGHT(&ov.o_clip), "extSideOverlap"); ta = TiGetType(bp->b_inside); tb = TiGetType(tp); @@ -827,8 +827,8 @@ extSideOverlap(tp, esws) /* Does this rule "e" include the tile we found? */ if (TTMaskHasType(&e->ec_near, TiGetType(tp))) { - /* We have a possible capacitor, but are the tiles shielded from - * each other part of the way? + /* We have a possible capacitor, but are the tiles shielded from + * each other part of the way? */ int pNum; ov.o_area = length; @@ -846,13 +846,13 @@ extSideOverlap(tp, esws) if (ov.o_pmask == 0) { (void) DBSrPaintArea((Tile *) NULL, - extOverlapDef->cd_planes[pNum], &ov.o_clip, + extOverlapDef->cd_planes[pNum], &ov.o_clip, &ov.o_tmask, extSubtractOverlap, (ClientData) &ov); } else { (void) DBSrPaintArea((Tile *) NULL, - extOverlapDef->cd_planes[pNum], &ov.o_clip, + extOverlapDef->cd_planes[pNum], &ov.o_clip, &DBAllTypeBits, extSubtractOverlap2, (ClientData) &ov); } @@ -864,11 +864,11 @@ extSideOverlap(tp, esws) areaAccountedFor += ov.o_area; } } - + /* Add in the new capacitance. */ if (tb == TT_SPACE) { - /* Is tp a space tile? If so, extGetRegion points to garbage; + /* Is tp a space tile? If so, extGetRegion points to garbage; * make terminal 2 point to ground. */ rbp->nreg_cap += cap; @@ -881,8 +881,8 @@ extSideOverlap(tp, esws) if (oa > ob) { /* If the overlapped tile is between the substrate and the boundary - * tile, then we subtract the fringe substrate capacitance - * from rbp's region due to the area of the sideoverlap, since + * tile, then we subtract the fringe substrate capacitance + * from rbp's region due to the area of the sideoverlap, since * we now know it is shielded from the substrate. */ CapValue subcap; @@ -900,7 +900,7 @@ extSideOverlap(tp, esws) if (CAP_DEBUG) extNregAdjustCap(rbp, -subcap, "obsolete_perimcap"); } else if (CAP_DEBUG) - extNregAdjustCap(rbp, 0.0, + extNregAdjustCap(rbp, 0.0, "obsolete_perimcap (skipped, wrong direction)"); /* If the nodes are electrically connected, then we don't add */ @@ -915,7 +915,7 @@ extSideOverlap(tp, esws) } return (0); } - + /* * ---------------------------------------------------------------------------- * @@ -969,7 +969,7 @@ extSideLeft(tpfar, bp) return (0); } - + /* * ---------------------------------------------------------------------------- * @@ -1018,7 +1018,7 @@ extSideRight(tpfar, bp) return (0); } - + /* * ---------------------------------------------------------------------------- * @@ -1067,7 +1067,7 @@ extSideTop(tpfar, bp) return (0); } - + /* * ---------------------------------------------------------------------------- * @@ -1116,7 +1116,7 @@ extSideBottom(tpfar, bp) return (0); } - + /* * ---------------------------------------------------------------------------- * @@ -1162,7 +1162,7 @@ extSideCommon(rinside, rfar, tpnear, tpfar, overlap, sep) for (e = extCoupleList; e; e = e->ec_next) if (TTMaskHasType(&e->ec_near, near) && TTMaskHasType(&e->ec_far, far)) { cap += (e->ec_cap * overlap) / sep; - if (CAP_DEBUG) + if (CAP_DEBUG) extAdjustCouple(he, (e->ec_cap * overlap) / sep, "sidewall"); } extSetCapValue(he, cap); diff --git a/extract/ExtHard.c b/extract/ExtHard.c index 5e92aaa6..1cacf94d 100644 --- a/extract/ExtHard.c +++ b/extract/ExtHard.c @@ -6,16 +6,16 @@ * extraction, when no label for that node could be found in the * interaction area. * - * ********************************************************************* - * * Copyright (C) 1985, 1990 Regents of the University of California. * - * * Permission to use, copy, modify, and distribute this * - * * software and its documentation for any purpose and without * - * * fee is hereby granted, provided that the above copyright * - * * notice appear in all copies. The University of California * - * * makes no representations about the suitability of this * - * * software for any purpose. It is provided "as is" without * - * * express or implied warranty. Export of this software outside * - * * of the United States of America may require an export license. * + * ********************************************************************* + * * Copyright (C) 1985, 1990 Regents of the University of California. * + * * Permission to use, copy, modify, and distribute this * + * * software and its documentation for any purpose and without * + * * fee is hereby granted, provided that the above copyright * + * * notice appear in all copies. The University of California * + * * makes no representations about the suitability of this * + * * software for any purpose. It is provided "as is" without * + * * express or implied warranty. Export of this software outside * + * * of the United States of America may require an export license. * * ********************************************************************* */ @@ -246,7 +246,7 @@ success: done: return (ret); } - + /* * ---------------------------------------------------------------------------- * @@ -335,7 +335,7 @@ extHardSetLabel(scx, reg, arg) /* forget it; we're never going to find the damn thing */ r=oldlab->lab_rect; } - + } } GeoTransRect(&scx->scx_trans, &r, &newlab->lab_rect); @@ -360,7 +360,7 @@ extHardSetLabel(scx, reg, arg) TxPrintf("Hard way: found label = \"%s\"\n", newlab->lab_text); return (TRUE); } - + /* * ---------------------------------------------------------------------------- * @@ -452,7 +452,7 @@ extHardGenerateLabel(scx, reg, arg) TxPrintf("Hard way: generated label = \"%s\"\n", newlab->lab_text); return (TRUE); } - + /* * ---------------------------------------------------------------------------- * diff --git a/extract/ExtHier.c b/extract/ExtHier.c index f5a4dfe1..c1445273 100644 --- a/extract/ExtHier.c +++ b/extract/ExtHier.c @@ -6,16 +6,16 @@ * and to array extraction. * The procedures in this file are not re-entrant. * - * ********************************************************************* - * * Copyright (C) 1985, 1990 Regents of the University of California. * - * * Permission to use, copy, modify, and distribute this * - * * software and its documentation for any purpose and without * - * * fee is hereby granted, provided that the above copyright * - * * notice appear in all copies. The University of California * - * * makes no representations about the suitability of this * - * * software for any purpose. It is provided "as is" without * - * * express or implied warranty. Export of this software outside * - * * of the United States of America may require an export license. * + * ********************************************************************* + * * Copyright (C) 1985, 1990 Regents of the University of California. * + * * Permission to use, copy, modify, and distribute this * + * * software and its documentation for any purpose and without * + * * fee is hereby granted, provided that the above copyright * + * * notice appear in all copies. The University of California * + * * makes no representations about the suitability of this * + * * software for any purpose. It is provided "as is" without * + * * express or implied warranty. Export of this software outside * + * * of the United States of America may require an export license. * * ********************************************************************* */ @@ -59,7 +59,7 @@ int extHierConnectFunc1(); int extHierConnectFunc2(); int extHierConnectFunc3(); Node *extHierNewNode(); - + /*----------------------------------------------*/ /* extHierSubstrate */ @@ -254,7 +254,7 @@ extHierConnectFunc1(oneTile, ha) rtype = ha->hierType; ha->hierType = (rtype & TT_SIDE) ? SplitRightType(oneTile) : SplitLeftType(oneTile); - } + } connected = &(ExtCurStyle->exts_nodeConn[ha->hierType]); TITORECT(oneTile, &r); @@ -343,7 +343,7 @@ extHierConnectFunc1(oneTile, ha) - sizeof lab->lab_text + 1; newlab = (Label *)mallocMagic((unsigned)n); bcopy((char *)lab, (char *)newlab, (int)n); - + newlab->lab_next = ha->ha_parentUse->cu_def->cd_labels; ha->ha_parentUse->cu_def->cd_labels = newlab; } @@ -467,7 +467,7 @@ extHierConnectFunc3(cum, ha) NodeName *nn; char *name; Rect r; - Label *lab = (Label *)(ha->hierOneTile); /* Lazy recasting */ + Label *lab = (Label *)(ha->hierOneTile); /* Lazy recasting */ /* Compute the overlap area */ r.r_xbot = MAX(lab->lab_rect.r_xbot, LEFT(cum)); @@ -643,7 +643,7 @@ extHierAdjustments(ha, cumFlat, oneFlat, lookFlat) } } } - + /* * ---------------------------------------------------------------------------- * @@ -722,7 +722,7 @@ extOutputConns(table, outf) freeMagic((char *) nfirst); } } - + /* * ---------------------------------------------------------------------------- * @@ -767,7 +767,7 @@ extHierNewNode(he) return (node); } - + /* * ---------------------------------------------------------------------------- * @@ -823,7 +823,7 @@ extHierLabEach(tile, pNum, arg) extSetNodeNum(reg, pNum, tile); return (0); } - + /* * ---------------------------------------------------------------------------- * @@ -875,7 +875,7 @@ extHierNewOne() HashInit(&et->et_coupleHash, 32, HashSize(sizeof (CoupleKey))); return (et); } - + /* * ---------------------------------------------------------------------------- * diff --git a/extract/ExtInter.c b/extract/ExtInter.c index 2b6e39db..f8be82fe 100644 --- a/extract/ExtInter.c +++ b/extract/ExtInter.c @@ -4,16 +4,16 @@ * Circuit extraction. * Finds interaction areas. * - * ********************************************************************* - * * Copyright (C) 1985, 1990 Regents of the University of California. * - * * Permission to use, copy, modify, and distribute this * - * * software and its documentation for any purpose and without * - * * fee is hereby granted, provided that the above copyright * - * * notice appear in all copies. The University of California * - * * makes no representations about the suitability of this * - * * software for any purpose. It is provided "as is" without * - * * express or implied warranty. Export of this software outside * - * * of the United States of America may require an export license. * + * ********************************************************************* + * * Copyright (C) 1985, 1990 Regents of the University of California. * + * * Permission to use, copy, modify, and distribute this * + * * software and its documentation for any purpose and without * + * * fee is hereby granted, provided that the above copyright * + * * notice appear in all copies. The University of California * + * * makes no representations about the suitability of this * + * * software for any purpose. It is provided "as is" without * + * * express or implied warranty. Export of this software outside * + * * of the United States of America may require an export license. * * ********************************************************************* */ @@ -59,7 +59,7 @@ int extInterSubtreePaint(); #define BLOATBY(r, h) ( (r)->r_xbot -= (h), (r)->r_ybot -= (h), \ (r)->r_xtop += (h), (r)->r_ytop += (h) ) - + /* * ---------------------------------------------------------------------------- * @@ -144,7 +144,7 @@ extInterSubtreePaint(scx, def) return (2); } - + /* * ---------------------------------------------------------------------------- * @@ -208,7 +208,7 @@ extInterSubtreeClip(overlapScx, scx) (ClientData) &r); return (2); } - + /* * ---------------------------------------------------------------------------- * @@ -246,7 +246,7 @@ extInterSubtreeElement(use, trans, x, y, r) extInterSubtreeTile, (ClientData) NULL); return (0); } - + /* * ---------------------------------------------------------------------------- * @@ -289,7 +289,7 @@ extInterSubtreeTile(tile, cxp) (void) DBCellSrArea(&newscx, extInterOverlapSubtree, (ClientData) NULL); return (0); } - + /* * ---------------------------------------------------------------------------- * @@ -320,7 +320,7 @@ extInterOverlapSubtree(scx) (void) extTreeSrPaintArea(scx, extInterOverlapTile, (ClientData) NULL); return (0); } - + /* * ---------------------------------------------------------------------------- * @@ -362,7 +362,7 @@ extInterOverlapTile(tile, cxp) return (0); } - + /* *----------------------------------------------------------------------------- * diff --git a/extract/ExtLength.c b/extract/ExtLength.c index 148eeac5..c212c786 100644 --- a/extract/ExtLength.c +++ b/extract/ExtLength.c @@ -8,16 +8,16 @@ * line mode, where delay is proportional to the driver-to-receiver * distance. * - * ********************************************************************* - * * Copyright (C) 1985, 1990 Regents of the University of California. * - * * Permission to use, copy, modify, and distribute this * - * * software and its documentation for any purpose and without * - * * fee is hereby granted, provided that the above copyright * - * * notice appear in all copies. The University of California * - * * makes no representations about the suitability of this * - * * software for any purpose. It is provided "as is" without * - * * express or implied warranty. Export of this software outside * - * * of the United States of America may require an export license. * + * ********************************************************************* + * * Copyright (C) 1985, 1990 Regents of the University of California. * + * * Permission to use, copy, modify, and distribute this * + * * software and its documentation for any purpose and without * + * * fee is hereby granted, provided that the above copyright * + * * notice appear in all copies. The University of California * + * * makes no representations about the suitability of this * + * * software for any purpose. It is provided "as is" without * + * * express or implied warranty. Export of this software outside * + * * of the United States of America may require an export license. * * ********************************************************************* * Lawrence Livermore National Laboratory */ @@ -123,7 +123,7 @@ void extPathPairDistance(); void extPathFlood(); void extPathFloodTile(); - + /* * ---------------------------------------------------------------------------- * @@ -161,7 +161,7 @@ ExtSetReceiver(name) he = HashFind(&extReceiverHash, name); HashSetValue(he, 0); } - + /* * ---------------------------------------------------------------------------- * @@ -185,7 +185,7 @@ ExtLengthClear() HashKill(&extReceiverHash); extLengthInit(); } - + /* * ---------------------------------------------------------------------------- * @@ -209,7 +209,7 @@ extLengthInit() HashInit(&extDriverHash, INITHASHSIZE, 0); HashInit(&extReceiverHash, INITHASHSIZE, 0); } - + /* * ---------------------------------------------------------------------------- * @@ -314,7 +314,7 @@ extLength(rootUse, f) } } - + /* * ---------------------------------------------------------------------------- * @@ -402,7 +402,7 @@ extLengthYank(use, labList) return (extLengthLabelList); } - + /* * ---------------------------------------------------------------------------- * @@ -449,7 +449,7 @@ extLengthLabels(tile, rootUse) return (0); } - + /* * ---------------------------------------------------------------------------- * @@ -513,7 +513,7 @@ extLengthLabelsFunc(scx, label, tpath) return (0); } - + /* * ---------------------------------------------------------------------------- * @@ -547,7 +547,7 @@ extPathLabel(use, text) TxError("Can't find terminal \"%s\"\n", text); return (lab); } - + /* * ---------------------------------------------------------------------------- * @@ -592,7 +592,7 @@ extPathLabelFunc(rect, text, childLab, pLabList) return (0); } - + /* * ---------------------------------------------------------------------------- * @@ -690,7 +690,7 @@ extPathResetClient(tile) tile->ti_client = (ClientData) CLIENTDEFAULT; return (0); } - + /* * ---------------------------------------------------------------------------- * @@ -738,7 +738,7 @@ extPathPairFunc(tile, epa) return (0); } - + /* * ---------------------------------------------------------------------------- * @@ -848,7 +848,7 @@ extPathFlood(tile, p, distance, epa) if (PlaneMaskHasPlane(pMask, pNum)) { Plane *plane = extPathDef->cd_planes[pNum]; - + /* Find the point on the new plane */ tp = plane->pl_hint; GOTOPOINT(tp, &tile->ti_ll); @@ -935,7 +935,7 @@ extPathFloodFunc(dstTile, epfa) extPathFlood(dstTile, p, dstDist, epfa->epfa_epa); return 0; } - + /* * ---------------------------------------------------------------------------- * @@ -985,7 +985,7 @@ extPathFloodTile(srcTile, srcPoint, srcDist, dstTile, epa) /* Recurse */ extPathFlood(dstTile, &dstPoint, dstDist, epa); } - + /* * ---------------------------------------------------------------------------- * diff --git a/extract/ExtMain.c b/extract/ExtMain.c index d56c2cea..664435a8 100644 --- a/extract/ExtMain.c +++ b/extract/ExtMain.c @@ -4,16 +4,16 @@ * Circuit extraction. * Command interface. * - * ********************************************************************* - * * Copyright (C) 1985, 1990 Regents of the University of California. * - * * Permission to use, copy, modify, and distribute this * - * * software and its documentation for any purpose and without * - * * fee is hereby granted, provided that the above copyright * - * * notice appear in all copies. The University of California * - * * makes no representations about the suitability of this * - * * software for any purpose. It is provided "as is" without * - * * express or implied warranty. Export of this software outside * - * * of the United States of America may require an export license. * + * ********************************************************************* + * * Copyright (C) 1985, 1990 Regents of the University of California. * + * * Permission to use, copy, modify, and distribute this * + * * software and its documentation for any purpose and without * + * * fee is hereby granted, provided that the above copyright * + * * notice appear in all copies. The University of California * + * * makes no representations about the suitability of this * + * * software for any purpose. It is provided "as is" without * + * * express or implied warranty. Export of this software outside * + * * of the United States of America may require an export license. * * ********************************************************************* */ @@ -88,7 +88,7 @@ void extExtractStack(); bool extContainsGeometry(); bool extContainsCellFunc(); bool extTimestampMisMatch(); - + /* * ---------------------------------------------------------------------------- * @@ -153,7 +153,7 @@ ExtInit() /* Initialize the hash tables used in ExtLength.c */ extLengthInit(); } - + /* * ---------------------------------------------------------------------------- * @@ -228,7 +228,7 @@ extDefPushFunc(use) (void) DBCellEnum(def, extDefPushFunc, (ClientData) 0); return (0); } - + /* * ---------------------------------------------------------------------------- * @@ -288,7 +288,7 @@ ExtUnique(rootUse, option) if (nwarn) TxError("%d uncorrected errors (see the feedback info)\n", nwarn); } - + /* * ---------------------------------------------------------------------------- * @@ -366,7 +366,7 @@ extDefParentFunc(def) if (parent->cu_parent) extDefParentFunc(parent->cu_parent); } - + /* * ---------------------------------------------------------------------------- * @@ -501,7 +501,7 @@ extContainsPaintFunc() { return (1); } - + /* * ---------------------------------------------------------------------------- * @@ -603,7 +603,7 @@ closeit: (void) fclose(extFile); return (ret); } - + /* * ---------------------------------------------------------------------------- * diff --git a/extract/ExtNghbors.c b/extract/ExtNghbors.c index b9ee25a0..bdfa8ce0 100644 --- a/extract/ExtNghbors.c +++ b/extract/ExtNghbors.c @@ -6,16 +6,16 @@ * for visiting all neighbors of a tile that connect to it, and * applying a filter function at each tile. * - * ********************************************************************* - * * Copyright (C) 1985, 1990 Regents of the University of California. * - * * Permission to use, copy, modify, and distribute this * - * * software and its documentation for any purpose and without * - * * fee is hereby granted, provided that the above copyright * - * * notice appear in all copies. The University of California * - * * makes no representations about the suitability of this * - * * software for any purpose. It is provided "as is" without * - * * express or implied warranty. Export of this software outside * - * * of the United States of America may require an export license. * + * ********************************************************************* + * * Copyright (C) 1985, 1990 Regents of the University of California. * + * * Permission to use, copy, modify, and distribute this * + * * software and its documentation for any purpose and without * + * * fee is hereby granted, provided that the above copyright * + * * notice appear in all copies. The University of California * + * * makes no representations about the suitability of this * + * * software for any purpose. It is provided "as is" without * + * * express or implied warranty. Export of this software outside * + * * of the United States of America may require an export license. * * ********************************************************************* */ @@ -321,7 +321,7 @@ fail: } return -1; } - + /* * ---------------------------------------------------------------------------- * diff --git a/extract/ExtPerim.c b/extract/ExtPerim.c index 31847a9c..7ef98a9f 100644 --- a/extract/ExtPerim.c +++ b/extract/ExtPerim.c @@ -5,16 +5,16 @@ * Functions for tracing the perimeter of a tile or of a * connected region. * - * ********************************************************************* - * * Copyright (C) 1985, 1990 Regents of the University of California. * - * * Permission to use, copy, modify, and distribute this * - * * software and its documentation for any purpose and without * - * * fee is hereby granted, provided that the above copyright * - * * notice appear in all copies. The University of California * - * * makes no representations about the suitability of this * - * * software for any purpose. It is provided "as is" without * - * * express or implied warranty. Export of this software outside * - * * of the United States of America may require an export license. * + * ********************************************************************* + * * Copyright (C) 1985, 1990 Regents of the University of California. * + * * Permission to use, copy, modify, and distribute this * + * * software and its documentation for any purpose and without * + * * fee is hereby granted, provided that the above copyright * + * * notice appear in all copies. The University of California * + * * makes no representations about the suitability of this * + * * software for any purpose. It is provided "as is" without * + * * express or implied warranty. Export of this software outside * + * * of the United States of America may require an export license. * * ********************************************************************* */ diff --git a/extract/ExtRegion.c b/extract/ExtRegion.c index c392462b..0843b7a0 100644 --- a/extract/ExtRegion.c +++ b/extract/ExtRegion.c @@ -5,16 +5,16 @@ * This file contains the code to trace out connected Regions * in a layout, and to build up or tear down lists of Regions. * - * ********************************************************************* - * * Copyright (C) 1985, 1990 Regents of the University of California. * - * * Permission to use, copy, modify, and distribute this * - * * software and its documentation for any purpose and without * - * * fee is hereby granted, provided that the above copyright * - * * notice appear in all copies. The University of California * - * * makes no representations about the suitability of this * - * * software for any purpose. It is provided "as is" without * - * * express or implied warranty. Export of this software outside * - * * of the United States of America may require an export license. * + * ********************************************************************* + * * Copyright (C) 1985, 1990 Regents of the University of California. * + * * Permission to use, copy, modify, and distribute this * + * * software and its documentation for any purpose and without * + * * fee is hereby granted, provided that the above copyright * + * * notice appear in all copies. The University of California * + * * makes no representations about the suitability of this * + * * software for any purpose. It is provided "as is" without * + * * express or implied warranty. Export of this software outside * + * * of the United States of America may require an export license. * * ********************************************************************* */ @@ -35,7 +35,7 @@ static char rcsid[] __attribute__ ((unused)) = "$Header: /usr/cvsroot/magic-8.0/ #include "extract/extract.h" #include "extract/extractInt.h" #include "utils/signals.h" - + /* * ---------------------------------------------------------------------------- * @@ -80,7 +80,7 @@ static char rcsid[] __attribute__ ((unused)) = "$Header: /usr/cvsroot/magic-8.0/ * * Non-interruptible. It is the caller's responsibility to check * for interrupts. - * + * * ---------------------------------------------------------------------------- */ @@ -126,7 +126,7 @@ ExtFindRegions(def, area, mask, connectsTo, uninit, first, each) return (arg.fra_region); } - + /* * ---------------------------------------------------------------------------- * @@ -167,7 +167,7 @@ extRegionAreaFunc(tile, arg) (void) ExtFindNeighbors(tile, arg->fra_pNum, arg); return (0); } - + /* * ---------------------------------------------------------------------------- @@ -279,13 +279,13 @@ ExtLabelRegions(def, connTo, nodeList, clipArea) for (n = 0; n < nclasses; n++) newNode->nreg_pa[n].pa_perim = newNode->nreg_pa[n].pa_area = 0; newNode->nreg_labels = ll; - + *nodeList = newNode; } } } } - + /* * ---------------------------------------------------------------------------- * @@ -353,7 +353,7 @@ ExtLabelOneRegion(def, connTo, reg) } } - + /* * ---------------------------------------------------------------------------- * @@ -386,7 +386,7 @@ ExtResetTiles(def, resetTo) for (pNum = PL_TECHDEPBASE; pNum < DBNumPlanes; pNum++) DBResetTilePlane(def->cd_planes[pNum], resetTo); } - + /* * ---------------------------------------------------------------------------- * diff --git a/extract/ExtSubtree.c b/extract/ExtSubtree.c index 338c2519..42763f04 100644 --- a/extract/ExtSubtree.c +++ b/extract/ExtSubtree.c @@ -9,16 +9,16 @@ * * The procedures in this file are not re-entrant. * - * ********************************************************************* - * * Copyright (C) 1985, 1990 Regents of the University of California. * - * * Permission to use, copy, modify, and distribute this * - * * software and its documentation for any purpose and without * - * * fee is hereby granted, provided that the above copyright * - * * notice appear in all copies. The University of California * - * * makes no representations about the suitability of this * - * * software for any purpose. It is provided "as is" without * - * * express or implied warranty. Export of this software outside * - * * of the United States of America may require an export license. * + * ********************************************************************* + * * Copyright (C) 1985, 1990 Regents of the University of California. * + * * Permission to use, copy, modify, and distribute this * + * * software and its documentation for any purpose and without * + * * fee is hereby granted, provided that the above copyright * + * * notice appear in all copies. The University of California * + * * makes no representations about the suitability of this * + * * software for any purpose. It is provided "as is" without * + * * express or implied warranty. Export of this software outside * + * * of the United States of America may require an export license. * * ********************************************************************* */ @@ -114,7 +114,7 @@ extClearUseFlags(use, clientData) return 0; } - + /* * ---------------------------------------------------------------------------- * @@ -236,7 +236,7 @@ extSubtree(parentUse, reg, f) // If result == FALSE then ha.ha_interArea is invalid. ha.ha_interArea = rlab; result = TRUE; - } + } else result |= GeoIncludeAll(&rlab, &ha.ha_interArea); } @@ -361,7 +361,7 @@ extSubtreeInterFunc(tile, ha) return (0); } #endif /* exactinteractions */ - + /* * ---------------------------------------------------------------------------- * @@ -494,7 +494,7 @@ extSubtreeInteraction(ha) * hierarchy are part of ha_connHash and have adjustments * that are printed in the "merge" statement. Nodes not in * the current cell are not considered. Anything left over - * has its adjusted value output. + * has its adjusted value output. */ for (reg = ha->ha_parentReg; reg; reg = reg->nreg_next) { @@ -555,7 +555,7 @@ extSubtreeInteraction(ha) extHierFreeLabels(cumDef); DBCellClearDef(cumDef); } - + /* * ---------------------------------------------------------------------------- * @@ -622,7 +622,7 @@ extSubtreeAdjustInit(ha) } } } - + /* * ---------------------------------------------------------------------------- * @@ -674,7 +674,7 @@ extSubtreeOutputCoupling(ha) fprintf(ha->ha_outf, "\"%s\" %lg\n", name, cap); } } - + /* * ---------------------------------------------------------------------------- * @@ -805,11 +805,11 @@ extSubtreeFunc(scx, ha) /* connected together in the cell def, so in the case of an */ /* array, just make sure that the first array entry is */ /* connected. */ - + if (use->cu_xhi == use->cu_xlo && use->cu_yhi == use->cu_ylo) extHierSubstrate(ha, use, -1, -1); else if (use->cu_xhi == use->cu_xlo && use->cu_yhi > use->cu_ylo) - { + { for (y = use->cu_ylo; y <= use->cu_yhi; y++) extHierSubstrate(ha, use, -1, y); } @@ -855,7 +855,7 @@ extSubtreeFunc(scx, ha) return (2); } - + /* * ---------------------------------------------------------------------------- @@ -890,11 +890,11 @@ extSubstrateFunc(scx, ha) /* connected together in the cell def, so in the case of an */ /* array, just make sure that the first array entry is */ /* connected. */ - + if (use->cu_xhi == use->cu_xlo && use->cu_yhi == use->cu_ylo) extHierSubstrate(ha, use, -1, -1); else if (use->cu_xhi == use->cu_xlo && use->cu_yhi > use->cu_ylo) - { + { for (y = use->cu_ylo; y <= use->cu_yhi; y++) extHierSubstrate(ha, use, -1, y); } @@ -912,7 +912,7 @@ extSubstrateFunc(scx, ha) use->cu_flags |= CU_SUB_EXTRACTED; return (2); } - + /* * ---------------------------------------------------------------------------- @@ -1080,7 +1080,7 @@ extConnFindFunc(tp, preg) return (0); } - + /* * ---------------------------------------------------------------------------- * diff --git a/extract/ExtTech.c b/extract/ExtTech.c index 5559f4db..55212d59 100644 --- a/extract/ExtTech.c +++ b/extract/ExtTech.c @@ -5,16 +5,16 @@ * Code to read and process the sections of a technology file * that are specific to circuit extraction. * - * ********************************************************************* - * * Copyright (C) 1985, 1990 Regents of the University of California. * - * * Permission to use, copy, modify, and distribute this * - * * software and its documentation for any purpose and without * - * * fee is hereby granted, provided that the above copyright * - * * notice appear in all copies. The University of California * - * * makes no representations about the suitability of this * - * * software for any purpose. It is provided "as is" without * - * * express or implied warranty. Export of this software outside * - * * of the United States of America may require an export license. * + * ********************************************************************* + * * Copyright (C) 1985, 1990 Regents of the University of California. * + * * Permission to use, copy, modify, and distribute this * + * * software and its documentation for any purpose and without * + * * fee is hereby granted, provided that the above copyright * + * * notice appear in all copies. The University of California * + * * makes no representations about the suitability of this * + * * software for any purpose. It is provided "as is" without * + * * express or implied warranty. Export of this software outside * + * * of the United States of America may require an export license. * * ********************************************************************* */ @@ -177,7 +177,7 @@ static keydesc keyTable[] = { 0 }; - + /* * Table used for parsing the "device" keyword types @@ -286,7 +286,7 @@ ExtCompareStyle(stylename) * inefficient, but keeps the netlist generator separated from * the extractor. Some of this code is seriously schizophrenic, * and should not be investigated too closely. - * + * * Results: * Return FALSE if no device corresponds to index "idx". TRUE * otherwise. @@ -475,7 +475,7 @@ ExtGetDiffTypesMask(mask) * ---------------------------------------------------------------------------- * * ExtGetZAxis -- - * + * * Get the height and thickness parameters for a layer (used by the * graphics module which does not have access to internal variables * in the extract section). @@ -629,7 +629,7 @@ ExtSetStyle(name) TxError("\"%s\" is not one of the extraction styles Magic knows.\n", name); ExtPrintStyle(FALSE, TRUE, TRUE); } - + /* * ---------------------------------------------------------------------------- * @@ -788,7 +788,7 @@ extTechStyleInit(style) TTMaskZero(&style->exts_globSubstrateShieldTypes); } - + /* * ---------------------------------------------------------------------------- * @@ -850,7 +850,7 @@ aToCap(str) * Re-read the technology file to load the specified technology extraction * style into structure ExtCurStyle. This is much more memory-efficient than * keeping a separate (and huge!) ExtStyle structure for each extraction style. - * It incurs a complete reading of the tech file on startup and every time the + * It incurs a complete reading of the tech file on startup and every time the * extraction style is changed, but we can assume that this does not happen * often. The first style in the technology file is assumed to be default, so * that re-reading the tech file is not necessary on startup unless the default @@ -920,7 +920,7 @@ ExtTechInit() * Parse the techfile line for the "defaultareacap" keyword. * This is equivalent to the "areacap" line but also applies * to "overlap" of types on the second plane (if specified) and - * all planes below it, with appropriate intervening types. + * all planes below it, with appropriate intervening types. * * Usage: * defaultareacap types plane [[subtypes] subplane] value @@ -954,7 +954,7 @@ ExtTechSimpleAreaCap(argc, argv) int plane1, plane2, plane3, pnum1, pnum2, pnum3; PlaneMask pshield; - if (ExtCurStyle->exts_planeOrderStatus != seenPlaneOrder) + if (ExtCurStyle->exts_planeOrderStatus != seenPlaneOrder) { TechError("Cannot parse area cap line without plane ordering!\n"); return; @@ -1083,7 +1083,7 @@ ExtTechSimplePerimCap(argc, argv) PlaneMask pshield; EdgeCap *cnew; - if (ExtCurStyle->exts_planeOrderStatus != seenPlaneOrder) + if (ExtCurStyle->exts_planeOrderStatus != seenPlaneOrder) { TechError("Cannot parse area cap line without plane ordering!\n"); return; @@ -1309,7 +1309,7 @@ ExtTechSimpleOverlapCap(argv) int plane1, plane2, plane3, pnum1, pnum2, pnum3; PlaneMask pshield; - if (ExtCurStyle->exts_planeOrderStatus != seenPlaneOrder) + if (ExtCurStyle->exts_planeOrderStatus != seenPlaneOrder) { TechError("Cannot parse area cap line without plane ordering!\n"); return; @@ -1404,7 +1404,7 @@ ExtTechSimpleSideOverlapCap(argv) PlaneMask pshield; EdgeCap *cnew; - if (ExtCurStyle->exts_planeOrderStatus != seenPlaneOrder) + if (ExtCurStyle->exts_planeOrderStatus != seenPlaneOrder) { TechError("Cannot parse area cap line without plane ordering!\n"); return; @@ -1767,7 +1767,7 @@ ExtTechLine(sectionName, argc, argv) for (es = ExtAllStyles; es->exts_next; es = es->exts_next); es->exts_next = newStyle; } - + if (cptr == NULL) break; else @@ -1781,7 +1781,7 @@ ExtTechLine(sectionName, argc, argv) /* style encountered. Otherwise, if we are changing styles, */ /* load this style only if the name matches that in ExtCurStyle.*/ - if (ExtCurStyle == NULL) + if (ExtCurStyle == NULL) { ExtCurStyle = extTechStyleNew(); ExtCurStyle->exts_name = newStyle->exts_name; @@ -1850,7 +1850,7 @@ ExtTechLine(sectionName, argc, argv) while (*tptr != '\0') { cptr = strchr(tptr, ','); - if (cptr != NULL) + if (cptr != NULL) { *cptr = '\0'; for (j = 1; isspace(*(cptr - j)); j++) @@ -1871,7 +1871,7 @@ ExtTechLine(sectionName, argc, argv) return TRUE; } } - + if (cptr == NULL) break; else @@ -1959,8 +1959,8 @@ ExtTechLine(sectionName, argc, argv) subsName = argv[5]; // From magic version 8.1, subs name can be a nonfunctional - // throwaway (e.g., "error"), so don't throw a warning. - + // throwaway (e.g., "error"), so don't throw a warning. + cp = strchr(subsName, '!'); if (cp == NULL || cp[1] != '\0') { @@ -2186,7 +2186,7 @@ ExtTechLine(sectionName, argc, argv) else { /* Normal symmetric device with swappable source/drain */ - + DBTechNoisyNameMask(argv[4], &termtypes[0]); /* source/drain */ termtypes[1] = DBZeroTypeBits; if (strcmp(argv[5], "None")) @@ -2277,7 +2277,7 @@ ExtTechLine(sectionName, argc, argv) nterm = argc - 4; iterm = 4; } - + /* terminals */ for (i = iterm; i < iterm + nterm; i++) DBTechNoisyNameMask(argv[iterm], &termtypes[i - iterm]); @@ -2320,7 +2320,7 @@ ExtTechLine(sectionName, argc, argv) for (i = 0; !TTMaskIsZero(&termtypes[i]); i++); devptr->exts_deviceSDTypes = (TileTypeBitMask *) mallocMagic((i + 1) * sizeof(TileTypeBitMask)); - + for (i = 0; !TTMaskIsZero(&termtypes[i]); i++) devptr->exts_deviceSDTypes[i] = termtypes[i]; devptr->exts_deviceSDTypes[i] = DBZeroTypeBits; @@ -2836,9 +2836,9 @@ ExtTechLine(sectionName, argc, argv) ExtCurStyle->exts_globSubstratePlane = DBTechNoisyNamePlane(argv[2]); break; case NOPLANEORDER: { - if ( ExtCurStyle->exts_planeOrderStatus == seenPlaneOrder ) + if ( ExtCurStyle->exts_planeOrderStatus == seenPlaneOrder ) TechError("\"noplaneordering\" specified after \"planeorder\".\n"); - else + else ExtCurStyle->exts_planeOrderStatus = noPlaneOrder ; } break ; @@ -2850,10 +2850,10 @@ ExtTechLine(sectionName, argc, argv) TechError("\"planeorder\" specified after \"noplaneordering\".\n"); } ExtCurStyle->exts_planeOrderStatus = seenPlaneOrder ; - if (pnum < 0) + if (pnum < 0) TechError("Unknown planeorder plane %s\n", argv[1]); else if (pos < 0 || pos >= DBNumPlanes-PL_TECHDEPBASE) - TechError("Planeorder index must be [0..%d]\n", + TechError("Planeorder index must be [0..%d]\n", DBNumPlanes-PL_TECHDEPBASE-1); else ExtCurStyle->exts_planeOrder[pnum] = pos; @@ -2872,7 +2872,7 @@ diffplane: "\tdifferent plane from intypes and outtypes.\n"); return (TRUE); } - + /* * ---------------------------------------------------------------------------- @@ -2987,7 +2987,7 @@ extTechFinalStyle(style) for (q = TT_TECHDEPBASE; q < DBNumUserLayers; q++) { - if (TTMaskHasType(&style->exts_overlapOtherTypes[q], r)) + if (TTMaskHasType(&style->exts_overlapOtherTypes[q], r)) TTMaskSetType(&style->exts_overlapOtherTypes[q], s); for (t = TT_TECHDEPBASE; t < DBNumUserLayers; t++) @@ -3000,7 +3000,7 @@ extTechFinalStyle(style) /* must count from TT_SPACE, not TT_TECHDEPBASE. */ for (t = TT_SPACE; t < DBNumUserLayers; t++) - if (TTMaskHasType(&style->exts_sideOverlapOtherTypes[q][t], r)) + if (TTMaskHasType(&style->exts_sideOverlapOtherTypes[q][t], r)) TTMaskSetType(&style->exts_sideOverlapOtherTypes[q][t], s); } } @@ -3043,9 +3043,9 @@ extTechFinalStyle(style) for (t = TT_TECHDEPBASE; t < DBNumTypes; t++) { - TTMaskAndMask(&style->exts_overlapShieldTypes[s][t], + TTMaskAndMask(&style->exts_overlapShieldTypes[s][t], &style->exts_activeTypes); - TTMaskAndMask(&style->exts_sideOverlapOtherTypes[s][t], + TTMaskAndMask(&style->exts_sideOverlapOtherTypes[s][t], &style->exts_activeTypes); TTMaskAndMask(&style->exts_sideCoupleOtherEdges[s][t], &style->exts_activeTypes); @@ -3058,7 +3058,7 @@ extTechFinalStyle(style) TTMaskAndMask(&style->exts_sideTypes[p], &style->exts_activeTypes); } - if ( style->exts_planeOrderStatus == noPlaneOrder ) + if ( style->exts_planeOrderStatus == noPlaneOrder ) return /* no need to check */ ; /* Else Check to make sure the plane order is a permutation of the numbers 0..DBNumPlanes-DBNumPlanes-1 */ @@ -3077,7 +3077,7 @@ extTechFinalStyle(style) if (indicis[p1] < 1) missing = TRUE ; } if (!conflict && !missing) /* Everything was ok */ - goto zinit; + goto zinit; TxError ("\nWarning: Extraction Style %s\n", style -> exts_name); if (conflict) { @@ -3155,7 +3155,7 @@ zinit: // a specific distance, the value (run / separation) // is unscaled, so the capacitance does not get // modified by the scalefactor. However, the lambda - // reference for sidewall cap is 2 lambda, so if + // reference for sidewall cap is 2 lambda, so if // the reference is to be interpreted as 1 micron, // the value needs to be divided by 2 (the factor of // 2 is made up by the fact that the sidewall is diff --git a/extract/ExtTest.c b/extract/ExtTest.c index 4428a28c..1c4474af 100644 --- a/extract/ExtTest.c +++ b/extract/ExtTest.c @@ -4,16 +4,16 @@ * Circuit extraction. * Interface for testing. * - * ********************************************************************* - * * Copyright (C) 1985, 1990 Regents of the University of California. * - * * Permission to use, copy, modify, and distribute this * - * * software and its documentation for any purpose and without * - * * fee is hereby granted, provided that the above copyright * - * * notice appear in all copies. The University of California * - * * makes no representations about the suitability of this * - * * software for any purpose. It is provided "as is" without * - * * express or implied warranty. Export of this software outside * - * * of the United States of America may require an export license. * + * ********************************************************************* + * * Copyright (C) 1985, 1990 Regents of the University of California. * + * * Permission to use, copy, modify, and distribute this * + * * software and its documentation for any purpose and without * + * * fee is hereby granted, provided that the above copyright * + * * notice appear in all copies. The University of California * + * * makes no representations about the suitability of this * + * * software for any purpose. It is provided "as is" without * + * * express or implied warranty. Export of this software outside * + * * of the United States of America may require an export license. * * ********************************************************************* */ @@ -84,7 +84,7 @@ void extShowMask(TileTypeBitMask *, FILE *); void extShowPlanes(PlaneMask, FILE *); void extShowConnect(char *, TileTypeBitMask *, FILE *); - + /* * ---------------------------------------------------------------------------- * @@ -319,7 +319,7 @@ extShowInter(tile) return (0); } - + /* * ---------------------------------------------------------------------------- * @@ -560,7 +560,7 @@ extShowPlanes(m, out) fprintf(out, "%s", DBPlaneShortName(pNum)); } } - + /* * ---------------------------------------------------------------------------- * @@ -588,7 +588,7 @@ extDispInit(def, w) extScreenClip = w->w_screenArea; GeoClip(&extScreenClip, &GrScreenRect); } - + /* * ---------------------------------------------------------------------------- * @@ -649,7 +649,7 @@ extShowEdge(s, bp) GrUnlock(extDebugWindow); (void) GrFlush(); } - + /* * ---------------------------------------------------------------------------- * @@ -744,7 +744,7 @@ ExtDumpCapsToFile(f) int p, found; fprintf(f, "Parasitic extraction capacitance values\n"); - + fprintf(f, "\n1) Area caps\n"); for (t = 0; t < DBNumTypes; t++) { @@ -1104,7 +1104,7 @@ ExtDumpCaps(filename) } TxPrintf("Parasitic extraction capacitance values\n"); - + TxPrintf("\n1) Area caps\n"); for (t = 0; t < DBNumTypes; t++) { diff --git a/extract/ExtTimes.c b/extract/ExtTimes.c index 72c0f33b..262b2bfe 100644 --- a/extract/ExtTimes.c +++ b/extract/ExtTimes.c @@ -3,16 +3,16 @@ * * Circuit extraction timing. * - * ********************************************************************* - * * Copyright (C) 1985, 1990 Regents of the University of California. * - * * Permission to use, copy, modify, and distribute this * - * * software and its documentation for any purpose and without * - * * fee is hereby granted, provided that the above copyright * - * * notice appear in all copies. The University of California * - * * makes no representations about the suitability of this * - * * software for any purpose. It is provided "as is" without * - * * express or implied warranty. Export of this software outside * - * * of the United States of America may require an export license. * + * ********************************************************************* + * * Copyright (C) 1985, 1990 Regents of the University of California. * + * * Permission to use, copy, modify, and distribute this * + * * software and its documentation for any purpose and without * + * * fee is hereby granted, provided that the above copyright * + * * notice appear in all copies. The University of California * + * * makes no representations about the suitability of this * + * * software for any purpose. It is provided "as is" without * + * * express or implied warranty. Export of this software outside * + * * of the United States of America may require an export license. * * ********************************************************************* */ @@ -114,7 +114,7 @@ int extCountTiles(); extern int extDefInitFunc(); - + /* * ---------------------------------------------------------------------------- * @@ -260,7 +260,7 @@ ExtTimes(rootUse, f) (void) fclose(extDevNull); } - + /* * ---------------------------------------------------------------------------- * @@ -308,7 +308,7 @@ extTimesInitFunc(use) (void) DBCellEnum(def, extTimesInitFunc, (ClientData) 0); return (0); } - + /* * ---------------------------------------------------------------------------- * @@ -394,7 +394,7 @@ extCountTiles(tile, cs) cs->cs_rects++; return (0); } - + /* * ---------------------------------------------------------------------------- * @@ -449,7 +449,7 @@ extTimesIncrFunc(cs) */ (void) extTimesFlatFunc(cs->cs_def, cs); } - + /* * ---------------------------------------------------------------------------- * @@ -556,7 +556,7 @@ extTimesSummaryFunc(cs, f) extCumAdd(&cumClippedArea, (double) cs->cs_cliparea); extCumAdd(&cumIncrTime, tincr); } - + /* * ---------------------------------------------------------------------------- * @@ -609,7 +609,7 @@ extTimesParentFunc(def, cs) if (parent->cu_parent) extTimesParentFunc(parent->cu_parent, cs); } - + /* * ---------------------------------------------------------------------------- * @@ -673,7 +673,7 @@ extTimesHierUse(use, cs) { return (extTimesHierFunc(use->cu_def, cs)); } - + /* * ---------------------------------------------------------------------------- * @@ -740,7 +740,7 @@ extTimesFlatUse(use, cs) cs->cs_frects += dummyCS.cs_frects * nel; return (0); } - + /* * ---------------------------------------------------------------------------- * @@ -809,7 +809,7 @@ extTimeProc(proc, def, tv) } #endif } - + /* * ---------------------------------------------------------------------------- * @@ -836,7 +836,7 @@ extPaintOnly(def) if (reg) ExtFreeLabRegions((LabRegion *) reg); ExtResetTiles(def, extUnInit); } - + /* * ---------------------------------------------------------------------------- * @@ -860,7 +860,7 @@ extHierCell(def) { extCellFile(def, extDevNull, FALSE); } - + /* * ---------------------------------------------------------------------------- * @@ -887,7 +887,7 @@ extCumInit(cum) cum->cums_sos = 0.0; cum->cums_n = 0; } - + /* * ---------------------------------------------------------------------------- * @@ -920,17 +920,17 @@ extCumOutput(str, cum, f) } fprintf(f, "%s", str); - if (cum->cums_min < INFINITY) + if (cum->cums_min < INFINITY) fprintf(f, " %8.2f", cum->cums_min); else fprintf(f, " "); - if (cum->cums_max > MINFINITY) + if (cum->cums_max > MINFINITY) fprintf(f, " %8.2f", cum->cums_max); else fprintf(f, " "); fprintf(f, " %8.2f %8.2f\n", mean, sqrt(var)); } - + /* * ---------------------------------------------------------------------------- * @@ -959,7 +959,7 @@ extCumAdd(cum, v) cum->cums_sos += v*v; cum->cums_n++; } - + /* * ---------------------------------------------------------------------------- * @@ -988,7 +988,7 @@ extGetStats(def) return ((struct cellStats *) HashGetValue(he)); } - + /* * ---------------------------------------------------------------------------- * diff --git a/extract/ExtUnique.c b/extract/ExtUnique.c index d928ad12..01947754 100644 --- a/extract/ExtUnique.c +++ b/extract/ExtUnique.c @@ -4,16 +4,16 @@ * Circuit extraction. * Generation of unique names. * - * ********************************************************************* - * * Copyright (C) 1985, 1990 Regents of the University of California. * - * * Permission to use, copy, modify, and distribute this * - * * software and its documentation for any purpose and without * - * * fee is hereby granted, provided that the above copyright * - * * notice appear in all copies. The University of California * - * * makes no representations about the suitability of this * - * * software for any purpose. It is provided "as is" without * - * * express or implied warranty. Export of this software outside * - * * of the United States of America may require an export license. * + * ********************************************************************* + * * Copyright (C) 1985, 1990 Regents of the University of California. * + * * Permission to use, copy, modify, and distribute this * + * * software and its documentation for any purpose and without * + * * fee is hereby granted, provided that the above copyright * + * * notice appear in all copies. The University of California * + * * makes no representations about the suitability of this * + * * software for any purpose. It is provided "as is" without * + * * express or implied warranty. Export of this software outside * + * * of the United States of America may require an export license. * * ********************************************************************* */ @@ -44,7 +44,7 @@ static char rcsid[] __attribute__ ((unused)) = "$Header: /usr/cvsroot/magic-8.0/ #include "dbwind/dbwind.h" #include "utils/main.h" #include "utils/undo.h" - + /* * ---------------------------------------------------------------------------- * @@ -52,7 +52,7 @@ static char rcsid[] __attribute__ ((unused)) = "$Header: /usr/cvsroot/magic-8.0/ * * For the cell 'def', look for the same label appearing in two or more * distinct nodes. For each such label found: - * + * * If option is 0, then generate unique names for all * but one of the nodes by appending a unique numeric * suffix to the offending labels. diff --git a/extract/ExtYank.c b/extract/ExtYank.c index b7c3fbdb..05eb7e5a 100644 --- a/extract/ExtYank.c +++ b/extract/ExtYank.c @@ -4,16 +4,16 @@ * Circuit extraction. * Hierarchical yanking of paint and labels. * - * ********************************************************************* - * * Copyright (C) 1985, 1990 Regents of the University of California. * - * * Permission to use, copy, modify, and distribute this * - * * software and its documentation for any purpose and without * - * * fee is hereby granted, provided that the above copyright * - * * notice appear in all copies. The University of California * - * * makes no representations about the suitability of this * - * * software for any purpose. It is provided "as is" without * - * * express or implied warranty. Export of this software outside * - * * of the United States of America may require an export license. * + * ********************************************************************* + * * Copyright (C) 1985, 1990 Regents of the University of California. * + * * Permission to use, copy, modify, and distribute this * + * * software and its documentation for any purpose and without * + * * fee is hereby granted, provided that the above copyright * + * * notice appear in all copies. The University of California * + * * makes no representations about the suitability of this * + * * software for any purpose. It is provided "as is" without * + * * express or implied warranty. Export of this software outside * + * * of the United States of America may require an export license. * * ********************************************************************* */ @@ -45,7 +45,7 @@ Rect extSubcellArea; /* Area of currently processed subcell, clipped /* Forward declarations of filter functions */ int extHierYankFunc(); int extHierLabelFunc(); - + /* * ---------------------------------------------------------------------------- * @@ -93,7 +93,7 @@ extHierCopyLabels(sourceDef, targetDef) targetDef->cd_labels = firstLab; } } - + /* * ---------------------------------------------------------------------------- * @@ -124,7 +124,7 @@ extHierFreeLabels(def) freeMagic((char *) lab); def->cd_labels = (Label *) NULL; } - + /* * ---------------------------------------------------------------------------- * diff --git a/extract/extDebugInt.h b/extract/extDebugInt.h index f7e415ff..5e59284e 100644 --- a/extract/extDebugInt.h +++ b/extract/extDebugInt.h @@ -8,16 +8,16 @@ * * rcsid "$Header: /usr/cvsroot/magic-8.0/extract/extDebugInt.h,v 1.1.1.1 2008/02/03 20:43:50 tim Exp $" * - * ********************************************************************* - * * Copyright (C) 1985, 1990 Regents of the University of California. * - * * Permission to use, copy, modify, and distribute this * - * * software and its documentation for any purpose and without * - * * fee is hereby granted, provided that the above copyright * - * * notice appear in all copies. The University of California * - * * makes no representations about the suitability of this * - * * software for any purpose. It is provided "as is" without * - * * express or implied warranty. Export of this software outside * - * * of the United States of America may require an export license. * + * ********************************************************************* + * * Copyright (C) 1985, 1990 Regents of the University of California. * + * * Permission to use, copy, modify, and distribute this * + * * software and its documentation for any purpose and without * + * * fee is hereby granted, provided that the above copyright * + * * notice appear in all copies. The University of California * + * * makes no representations about the suitability of this * + * * software for any purpose. It is provided "as is" without * + * * express or implied warranty. Export of this software outside * + * * of the United States of America may require an export license. * * ********************************************************************* * */ diff --git a/extract/extract.h b/extract/extract.h index 3bc6cb5b..7bb74dda 100644 --- a/extract/extract.h +++ b/extract/extract.h @@ -5,16 +5,16 @@ * * rcsid "$Header: /usr/cvsroot/magic-8.0/extract/extract.h,v 1.3 2009/01/30 03:51:02 tim Exp $" * - * ********************************************************************* - * * Copyright (C) 1985, 1990 Regents of the University of California. * - * * Permission to use, copy, modify, and distribute this * - * * software and its documentation for any purpose and without * - * * fee is hereby granted, provided that the above copyright * - * * notice appear in all copies. The University of California * - * * makes no representations about the suitability of this * - * * software for any purpose. It is provided "as is" without * - * * express or implied warranty. Export of this software outside * - * * of the United States of America may require an export license. * + * ********************************************************************* + * * Copyright (C) 1985, 1990 Regents of the University of California. * + * * Permission to use, copy, modify, and distribute this * + * * software and its documentation for any purpose and without * + * * fee is hereby granted, provided that the above copyright * + * * notice appear in all copies. The University of California * + * * makes no representations about the suitability of this * + * * software for any purpose. It is provided "as is" without * + * * express or implied warranty. Export of this software outside * + * * of the United States of America may require an export license. * * ********************************************************************* * */ diff --git a/extract/extractInt.h b/extract/extractInt.h index 72e2424f..ea139e54 100644 --- a/extract/extractInt.h +++ b/extract/extractInt.h @@ -6,16 +6,16 @@ * * rcsid "$Header: /usr/cvsroot/magic-8.0/extract/extractInt.h,v 1.7 2010/08/10 00:18:46 tim Exp $" * - * ********************************************************************* - * * Copyright (C) 1985, 1990 Regents of the University of California. * - * * Permission to use, copy, modify, and distribute this * - * * software and its documentation for any purpose and without * - * * fee is hereby granted, provided that the above copyright * - * * notice appear in all copies. The University of California * - * * makes no representations about the suitability of this * - * * software for any purpose. It is provided "as is" without * - * * express or implied warranty. Export of this software outside * - * * of the United States of America may require an export license. * + * ********************************************************************* + * * Copyright (C) 1985, 1990 Regents of the University of California. * + * * Permission to use, copy, modify, and distribute this * + * * software and its documentation for any purpose and without * + * * fee is hereby granted, provided that the above copyright * + * * notice appear in all copies. The University of California * + * * makes no representations about the suitability of this * + * * software for any purpose. It is provided "as is" without * + * * express or implied warranty. Export of this software outside * + * * of the United States of America may require an export license. * * ********************************************************************* * * This module has been modified at DEC/WRL and Stanford University. @@ -107,8 +107,8 @@ typedef struct ll * attribute, rather than one of the diffusion * terminals' attributes. */ -#define LL_SORTATTR -3 /* value for ll_attr used in - * ExtBasic.c/ExtSortTerminals() to swap +#define LL_SORTATTR -3 /* value for ll_attr used in + * ExtBasic.c/ExtSortTerminals() to swap * the attributes as well as the regions * -- Stefanos 5/96 */ @@ -221,7 +221,7 @@ typedef struct treg typedef struct { /* Maintain plane information when pushing */ Rect area; /* tiles on the node stack. For use with */ int plane; /* function extNbrPushFunc(). */ -} PlaneAndArea; +} PlaneAndArea; /* Structure to be kept in a hash table of node regions for the current */ /* extract cell. It tracks the original substrate cap calculated for */ @@ -247,7 +247,7 @@ typedef struct { #define extMakeNodeNumPrint(buf, plane, coord) \ (void) sprintf((buf), "%s_%s%d_%s%d#", DBPlaneShortName(plane), \ ((coord).p_x < 0) ? "n": "", abs((coord).p_x), \ - ((coord).p_y < 0) ? "n": "", abs((coord).p_y)) + ((coord).p_y < 0) ? "n": "", abs((coord).p_y)) /* Old way: cryptic numbers, but a bit shorter * @@ -577,7 +577,7 @@ typedef struct extDevice * We try to use use integers here, rather than floats, to be nice to * machines like Sun workstations that don't have hardware * floating point. - * + * * In the case of capacitances, though, we may have to use floats, depending * upon the type CapValue. In some newer processes the capacitance per * lambda^2 is less than 1 attofarad. @@ -728,7 +728,7 @@ typedef struct extstyle */ TileTypeBitMask exts_overlapOtherTypes[NT]; PlaneMask exts_overlapOtherPlanes[NT]; - + /* * Both exts_overlapShieldTypes[][] and exts_overlapShieldPlanes[][] * are indexed by the same pair of types used to index the table @@ -757,7 +757,7 @@ typedef struct extstyle * and the default planeorder is used for the style. */ int exts_planeOrder[NP]; - /* set/reset with planeorder commands to determine whether + /* set/reset with planeorder commands to determine whether * we will warn if no planeorder is specified. This is done * because at Stanford we use a lot of diagnostic extraction * styles (for floating wells etc.) and we don't want to specify @@ -816,7 +816,7 @@ typedef struct extstyle * overlap a type to which it has sidewall overlap capacitance, the * original capacitance to substrate is replaced with the overlap * capacitance to the tile overlapped, if the edge is above the tile - * being overlapped (according to ext_planeOrder). If the tiles are + * being overlapped (according to ext_planeOrder). If the tiles are * the other way around, then this replacement is not done. */ @@ -824,7 +824,7 @@ typedef struct extstyle * The entry exts_sideOverlapCap[i][j] is a list of the coupling * capacitance info between edges with type 'i' on the inside * and 'j' on the outside, and other kinds of tiles on other - * planes. The ec_near mask in the EdgeCap record identifies the + * planes. The ec_near mask in the EdgeCap record identifies the * types to which we have sidewall overlap capacitance, and the * ec_far mask identifies the types that shield the tiles preventing * a capacitance. @@ -839,8 +839,8 @@ typedef struct extstyle * exts_sideOverlapShieldPlanes[s][t] is a list of the planes that * need to be examined for shielding material when we are considering * a sidewall overlap capacitor between types s and t. This may - * be the "or" of the planes needed by several sideoverlap rules, - * since there can be several types of edges in which type s is + * be the "or" of the planes needed by several sideoverlap rules, + * since there can be several types of edges in which type s is * the "intype" member and the "outtype" member varies. Note that * sideOverlapShieldPlanes is indexed like overlapShieldPlanes, not * like sideOverlapOtherPlanes. diff --git a/garouter/gaChannel.c b/garouter/gaChannel.c index 828f8364..be830e2e 100644 --- a/garouter/gaChannel.c +++ b/garouter/gaChannel.c @@ -3,16 +3,16 @@ * * Channel management for the gate-array router. * - * ********************************************************************* - * * Copyright (C) 1985, 1990 Regents of the University of California. * - * * Permission to use, copy, modify, and distribute this * - * * software and its documentation for any purpose and without * - * * fee is hereby granted, provided that the above copyright * - * * notice appear in all copies. The University of California * - * * makes no representations about the suitability of this * - * * software for any purpose. It is provided "as is" without * - * * express or implied warranty. Export of this software outside * - * * of the United States of America may require an export license. * + * ********************************************************************* + * * Copyright (C) 1985, 1990 Regents of the University of California. * + * * Permission to use, copy, modify, and distribute this * + * * software and its documentation for any purpose and without * + * * fee is hereby granted, provided that the above copyright * + * * notice appear in all copies. The University of California * + * * makes no representations about the suitability of this * + * * software for any purpose. It is provided "as is" without * + * * express or implied warranty. Export of this software outside * + * * of the United States of America may require an export license. * * ********************************************************************* */ @@ -60,7 +60,7 @@ void gaInitRiverBlockages(); int gaTotNormCross, gaTotRiverCross, gaClearNormCross, gaClearRiverCross; - + /* * ---------------------------------------------------------------------------- * @@ -86,7 +86,7 @@ GAChannelInitOnce() RtrChannelPlane = gaChannelDef->cd_planes[PL_DRC_ERROR]; GAClearChannels(); } - + /* * ---------------------------------------------------------------------------- * @@ -123,7 +123,7 @@ GAClearChannels() gaChannelList = (GCRChannel *) NULL; SigEnableInterrupts(); } - + /* * ---------------------------------------------------------------------------- * @@ -213,7 +213,7 @@ GADefineChannel(chanType, r) return (TRUE); } - + /* * ---------------------------------------------------------------------------- * @@ -417,7 +417,7 @@ gaPinStats(pins, nPins, pTot, pClear) } } } - + /* * ---------------------------------------------------------------------------- * @@ -454,7 +454,7 @@ gaPropagateBlockages(list) changed = TRUE; } while (changed); } - + /* * ---------------------------------------------------------------------------- * @@ -480,7 +480,7 @@ gaSetClient(tile, cdata) tile->ti_client = (ClientData) cdata; return (0); } - + /* * ---------------------------------------------------------------------------- * @@ -535,7 +535,7 @@ gaSplitTile(tile, r) } return (0); } - + /* * ---------------------------------------------------------------------------- * diff --git a/garouter/gaDebug.h b/garouter/gaDebug.h index e19af70c..d8c5ab89 100644 --- a/garouter/gaDebug.h +++ b/garouter/gaDebug.h @@ -6,16 +6,16 @@ * can be added to it without forcing recompilation of the * entire module. * - * ********************************************************************* - * * Copyright (C) 1985, 1990 Regents of the University of California. * - * * Permission to use, copy, modify, and distribute this * - * * software and its documentation for any purpose and without * - * * fee is hereby granted, provided that the above copyright * - * * notice appear in all copies. The University of California * - * * makes no representations about the suitability of this * - * * software for any purpose. It is provided "as is" without * - * * express or implied warranty. Export of this software outside * - * * of the United States of America may require an export license. * + * ********************************************************************* + * * Copyright (C) 1985, 1990 Regents of the University of California. * + * * Permission to use, copy, modify, and distribute this * + * * software and its documentation for any purpose and without * + * * fee is hereby granted, provided that the above copyright * + * * notice appear in all copies. The University of California * + * * makes no representations about the suitability of this * + * * software for any purpose. It is provided "as is" without * + * * express or implied warranty. Export of this software outside * + * * of the United States of America may require an export license. * * ********************************************************************* * * rcsid $Header: /usr/cvsroot/magic-8.0/garouter/gaDebug.h,v 1.1.1.1 2008/02/03 20:43:50 tim Exp $ diff --git a/garouter/gaInternal.h b/garouter/gaInternal.h index 5b969991..b64289a3 100644 --- a/garouter/gaInternal.h +++ b/garouter/gaInternal.h @@ -4,26 +4,26 @@ * This file defines data structures and constantds and declares * variables INTERNAL TO THE GAROUTER. * but shard by two or more soruce files. - * * + * * * Structures etc. that are exported by the irouter are defined in * irouter.h. * - * Structures etc. that are local to a given source + * Structures etc. that are local to a given source * file are declared at the top of that source file. * - * Structures, etc., specific to a given function are usually defined at + * Structures, etc., specific to a given function are usually defined at * the head of that function. * - * ********************************************************************* - * * Copyright (C) 1985, 1990 Regents of the University of California. * - * * Permission to use, copy, modify, and distribute this * - * * software and its documentation for any purpose and without * - * * fee is hereby granted, provided that the above copyright * - * * notice appear in all copies. The University of California * - * * makes no representations about the suitability of this * - * * software for any purpose. It is provided "as is" without * - * * express or implied warranty. Export of this software outside * - * * of the United States of America may require an export license. * + * ********************************************************************* + * * Copyright (C) 1985, 1990 Regents of the University of California. * + * * Permission to use, copy, modify, and distribute this * + * * software and its documentation for any purpose and without * + * * fee is hereby granted, provided that the above copyright * + * * notice appear in all copies. The University of California * + * * makes no representations about the suitability of this * + * * software for any purpose. It is provided "as is" without * + * * express or implied warranty. Export of this software outside * + * * of the United States of America may require an export license. * * ********************************************************************* * * rcsid $Header: /usr/cvsroot/magic-8.0/garouter/gaInternal.h,v 1.1.1.1 2008/02/03 20:43:50 tim Exp $ diff --git a/garouter/gaMain.c b/garouter/gaMain.c index 539fb1ce..9a3d07fb 100644 --- a/garouter/gaMain.c +++ b/garouter/gaMain.c @@ -48,7 +48,7 @@ * - generates "stems" for all terminals, * - sets up the channels for global routing, * - calls the global router to determine the sequence of channel - * boundary points through which the route for each net will pass, + * boundary points through which the route for each net will pass, * - calls the channel router to fill in the detailed routes for * each net in each channel structure, and then paint this * information back into the edit cell, @@ -69,7 +69,7 @@ * one net. A given label may appear in several places in the same cell, * so a terminal may have several locations. The router assumes that all * of these locations are already electrically connected. - * + * * * Channels and pins: * ----------------- @@ -189,18 +189,18 @@ * channels are routed independently of what material is in adjacent * channels, sometimes it is necessary during this paintback to add * contacts at channel boundaries to switch routing layers. - * * - * ********************************************************************* - * * Copyright (C) 1985, 1990 Regents of the University of California. * - * * Permission to use, copy, modify, and distribute this * - * * software and its documentation for any purpose and without * - * * fee is hereby granted, provided that the above copyright * - * * notice appear in all copies. The University of California * - * * makes no representations about the suitability of this * - * * software for any purpose. It is provided "as is" without * - * * express or implied warranty. Export of this software outside * - * * of the United States of America may require an export license. * + * + * ********************************************************************* + * * Copyright (C) 1985, 1990 Regents of the University of California. * + * * Permission to use, copy, modify, and distribute this * + * * software and its documentation for any purpose and without * + * * fee is hereby granted, provided that the above copyright * + * * notice appear in all copies. The University of California * + * * makes no representations about the suitability of this * + * * software for any purpose. It is provided "as is" without * + * * express or implied warranty. Export of this software outside * + * * of the United States of America may require an export license. * * ********************************************************************* */ @@ -230,7 +230,7 @@ static char rcsid[] __attribute__ ((unused)) = "$Header: /usr/cvsroot/magic-8.0/ #include "debug/debug.h" #include "drc/drc.h" - + /* * ---------------------------------------------------------------------------- * @@ -300,7 +300,7 @@ done: return (errs); } - + /* * ---------------------------------------------------------------------------- * @@ -368,10 +368,10 @@ GARoute(list, routeUse, netList) { RtrMilestonePrint(); RtrPaintBack(ch, routeUse->cu_def); - /* update bounding box NOW so searches during stem gen. + /* update bounding box NOW so searches during stem gen. * work correctly. */ - DBReComputeBbox(routeUse->cu_def); + DBReComputeBbox(routeUse->cu_def); } RtrMilestoneDone(); if (SigInterruptPending) @@ -404,7 +404,7 @@ done: /* Return number of errors */ return (DBWFeedbackCount - feedCount); } - + /* * ---------------------------------------------------------------------------- * diff --git a/garouter/gaMaze.c b/garouter/gaMaze.c index 240d3ffb..fb112977 100644 --- a/garouter/gaMaze.c +++ b/garouter/gaMaze.c @@ -3,16 +3,16 @@ * * Code to interface to mzrouter for harder stems. * - * ********************************************************************* - * * Copyright (C) 1985, 1990 Regents of the University of California. * - * * Permission to use, copy, modify, and distribute this * - * * software and its documentation for any purpose and without * - * * fee is hereby granted, provided that the above copyright * - * * notice appear in all copies. The University of California * - * * makes no representations about the suitability of this * - * * software for any purpose. It is provided "as is" without * - * * express or implied warranty. Export of this software outside * - * * of the United States of America may require an export license. * + * ********************************************************************* + * * Copyright (C) 1985, 1990 Regents of the University of California. * + * * Permission to use, copy, modify, and distribute this * + * * software and its documentation for any purpose and without * + * * fee is hereby granted, provided that the above copyright * + * * notice appear in all copies. The University of California * + * * makes no representations about the suitability of this * + * * software for any purpose. It is provided "as is" without * + * * express or implied warranty. Export of this software outside * + * * of the United States of America may require an export license. * * ********************************************************************* */ @@ -54,7 +54,7 @@ static char rcsid[] __attribute__ ((unused)) = "$Header: /usr/cvsroot/magic-8.0/ MazeParameters *gaMazeParms = NULL; /* Top Level Cell used by mzrouter during stem generation. - * Contains a fence, to limit the scope of the search, + * Contains a fence, to limit the scope of the search, * and the edit cell as a subcell */ CellUse *gaMazeTopUse; @@ -65,7 +65,7 @@ CellUse *gaMazeTopSub; void gaMazeBounds(); - + /* * ---------------------------------------------------------------------------- * @@ -86,7 +86,7 @@ bool gaMazeInit(routeUse) CellUse *routeUse; /* Cell routing will be done in - made subcell * of gaMazeTop - */ + */ { UndoDisable(); @@ -114,12 +114,12 @@ gaMazeInit(routeUse) gaMazeTopSub = DBCellNewUse(routeUse->cu_def, "__MAZE_TOP_SUB"); DBPlaceCell(gaMazeTopSub, gaMazeTopDef); } - + UndoEnable(); return TRUE; -} +} + - /* * ---------------------------------------------------------------------------- * @@ -158,15 +158,15 @@ GAMazeInitParms() return TRUE; } - + /* * ---------------------------------------------------------------------------- * * gaMazeRoute -- * - * Try to maze route from pinPoint to terminalLoc + * Try to maze route from pinPoint to terminalLoc * ending up on a layer in `pinLayerMask' while constraining - * all wiring to stay within boundingRect. + * all wiring to stay within boundingRect. * * Uses the Magic maze router (mzrouter module). * @@ -187,7 +187,7 @@ gaMazeRoute(routeUse, terminalLoc, pinPoint, pinLayerMask, side, writeFlag) * by the router, i.e. their contents are * examined. And routing across the tops of * subcells is permitted. - */ + */ NLTermLoc *terminalLoc; /* Terminal to connect to - somewhere in * interior of cell */ Point *pinPoint; /* Point to connect from (on edge of cell) */ @@ -197,7 +197,7 @@ gaMazeRoute(routeUse, terminalLoc, pinPoint, pinLayerMask, side, writeFlag) */ int side; /* side of cell destPoint lies on */ bool writeFlag; /* If non-null, paint back result (into - * routeUse), otherwise just check if + * routeUse), otherwise just check if * route is possible. */ { @@ -241,7 +241,7 @@ gaMazeRoute(routeUse, terminalLoc, pinPoint, pinLayerMask, side, writeFlag) break; } } - + /* make sure we found a routelayer */ if (rL == NULL) { @@ -278,7 +278,7 @@ gaMazeRoute(routeUse, terminalLoc, pinPoint, pinLayerMask, side, writeFlag) } /* if write flag set, paint back route path */ - if (writeFlag) + if (writeFlag) { CellUse *resultUse; @@ -297,7 +297,7 @@ gaMazeRoute(routeUse, terminalLoc, pinPoint, pinLayerMask, side, writeFlag) DBReComputeBbox(routeUse->cu_def); } - /* Notify dbwind module (for redisplay), and DRC module + /* Notify dbwind module (for redisplay), and DRC module * of changed area */ { Rect changedArea; @@ -331,13 +331,13 @@ abort: return done; } - + /* * ---------------------------------------------------------------------------- * * gaMazeBounds -- * - * Pick a rectangular area for mazerouting containing terminalLoc and + * Pick a rectangular area for mazerouting containing terminalLoc and * enough extra slop to make sure connection and contacts are possible * at the end points. * @@ -370,7 +370,7 @@ gaMazeBounds(terminalLoc, pinPoint, r) /* compute max active width */ { RouteType *rT; - + for(rT=gaMazeParms->mp_rTypes; rT!=NULL; rT=rT->rt_next) { if(rT->rt_active) diff --git a/garouter/gaSimple.c b/garouter/gaSimple.c index 8506138e..eafb98bd 100644 --- a/garouter/gaSimple.c +++ b/garouter/gaSimple.c @@ -1,20 +1,20 @@ /* * gaSimple.c - * - * Code to try very simple stems - * (straight line connection from pin to terminal + * Code to try very simple stems + * (straight line connection from pin to terminal * with a possible contact at or near each end) * - * ********************************************************************* - * * Copyright (C) 1985, 1990 Regents of the University of California. * - * * Permission to use, copy, modify, and distribute this * - * * software and its documentation for any purpose and without * - * * fee is hereby granted, provided that the above copyright * - * * notice appear in all copies. The University of California * - * * makes no representations about the suitability of this * - * * software for any purpose. It is provided "as is" without * - * * express or implied warranty. Export of this software outside * - * * of the United States of America may require an export license. * + * ********************************************************************* + * * Copyright (C) 1985, 1990 Regents of the University of California. * + * * Permission to use, copy, modify, and distribute this * + * * software and its documentation for any purpose and without * + * * fee is hereby granted, provided that the above copyright * + * * notice appear in all copies. The University of California * + * * makes no representations about the suitability of this * + * * software for any purpose. It is provided "as is" without * + * * express or implied warranty. Export of this software outside * + * * of the United States of America may require an export license. * * ********************************************************************* */ @@ -56,16 +56,16 @@ extern int gaMetalClear; extern int gaPolyClear; extern int gaContactClear; - + /* * ---------------------------------------------------------------------------- * * gaStemSimpleInit -- * - * Initialize the SimpleStem struct to contain information on what + * Initialize the SimpleStem struct to contain information on what * simple routes are possible. * - * Simple routes are grid aligned straight routes from the terminal + * Simple routes are grid aligned straight routes from the terminal * to the pin, with a possible contact at the terminal and another near * the pin on the grid line just before the channel edge. * @@ -133,7 +133,7 @@ gaStemSimpleInit(routeUse, term, pinPoint, pinSide, simple) } /* Misc initialization */ - { + { simple->ss_dir = pinSide; simple->ss_pinPoint = *pinPoint; simple->ss_termArea = term->nloc_rect; @@ -143,30 +143,30 @@ gaStemSimpleInit(routeUse, term, pinPoint, pinSide, simple) sPoly->sw_type = RtrPolyType; } - /* Determine which types connect to terminal directly - * (without adding a contact) + /* Determine which types connect to terminal directly + * (without adding a contact) */ if (simple->ss_termType == RtrContactType) { TTMaskSetOnlyType(&(simple->ss_termMask), RtrMetalType); TTMaskSetType(&(simple->ss_termMask), RtrPolyType); } - else + else { TTMaskSetOnlyType(&(simple->ss_termMask), simple->ss_termType); } /* * Compute contact and wire areas. - * Defn of areas: + * Defn of areas: * - long wires run from terminal to pin, - * - short wires run from terminal to contact near pin, + * - short wires run from terminal to contact near pin, * - pinStubs run from pinContact to pin. */ { switch (pinSide) { - case GEO_NORTH: + case GEO_NORTH: /* pin is directly above terminal */ { /* compute terminal contact location */ @@ -177,8 +177,8 @@ gaStemSimpleInit(routeUse, term, pinPoint, pinSide, simple) /* compute pin contact location */ cPin->r_xbot = pinPoint->p_x + RtrContactOffset; - cPin->r_ybot = (RTR_GRIDDOWN(pinPoint->p_y, RtrOrigin.p_y) - + RtrContactOffset); + cPin->r_ybot = (RTR_GRIDDOWN(pinPoint->p_y, RtrOrigin.p_y) + + RtrContactOffset); cPin->r_xtop = cPin->r_xbot + RtrContactWidth; cPin->r_ytop = cPin->r_ybot + RtrContactWidth; @@ -216,18 +216,18 @@ gaStemSimpleInit(routeUse, term, pinPoint, pinSide, simple) break; } - case GEO_SOUTH: + case GEO_SOUTH: /* pin is directly below terminal */ { /* compute terminal contact location */ cTerm->r_xbot = pinPoint->p_x + RtrContactOffset; - cTerm->r_ybot = termLoc->r_ybot; + cTerm->r_ybot = termLoc->r_ybot; cTerm->r_xtop = cTerm->r_xbot + RtrContactWidth; cTerm->r_ytop = cTerm->r_ybot + RtrContactWidth; /* compute pin contact location */ cPin->r_xbot = pinPoint->p_x + RtrContactOffset; - cPin->r_ybot = (RTR_GRIDUP(pinPoint->p_y, RtrOrigin.p_y) + cPin->r_ybot = (RTR_GRIDUP(pinPoint->p_y, RtrOrigin.p_y) + RtrContactOffset); cPin->r_xtop = cPin->r_xbot + RtrContactWidth; cPin->r_ytop = cPin->r_ybot + RtrContactWidth; @@ -267,7 +267,7 @@ gaStemSimpleInit(routeUse, term, pinPoint, pinSide, simple) break; } - case GEO_EAST: + case GEO_EAST: /* pin is directly to right of terminal */ { /* compute terminal contact location */ @@ -317,7 +317,7 @@ gaStemSimpleInit(routeUse, term, pinPoint, pinSide, simple) break; } - case GEO_WEST: + case GEO_WEST: /* pin is directly to left of terminal */ { /* compute terminal contact location */ @@ -327,7 +327,7 @@ gaStemSimpleInit(routeUse, term, pinPoint, pinSide, simple) cTerm->r_ytop = cTerm->r_ybot + RtrContactWidth; /* compute pin contact location */ - cPin->r_xbot = (RTR_GRIDUP(pinPoint->p_x, RtrOrigin.p_x) + cPin->r_xbot = (RTR_GRIDUP(pinPoint->p_x, RtrOrigin.p_x) + RtrContactOffset); cPin->r_ybot = pinPoint->p_y + RtrContactOffset; cPin->r_xtop = cPin->r_xbot + RtrContactWidth; @@ -396,7 +396,7 @@ gaStemSimpleInit(routeUse, term, pinPoint, pinSide, simple) * material at the connection points. * * (NOTE the terminal contact area is not trimmed, but will - * only be checked on the layer (if any) that is not part + * only be checked on the layer (if any) that is not part * of the terminal) */ { @@ -454,14 +454,14 @@ gaStemSimpleInit(routeUse, term, pinPoint, pinSide, simple) { if(!TTMaskHasType(&simple->ss_termMask, RtrMetalType)) { - simple->ss_cTermOK = gaIsClear(routeUse, - &rTerm, + simple->ss_cTermOK = gaIsClear(routeUse, + &rTerm, &RtrMetalObstacles); } if(!TTMaskHasType(&simple->ss_termMask, RtrPolyType)) { - simple->ss_cTermOK = gaIsClear(routeUse, - &rTerm, + simple->ss_cTermOK = gaIsClear(routeUse, + &rTerm, &RtrPolyObstacles); } } @@ -474,12 +474,12 @@ gaStemSimpleInit(routeUse, term, pinPoint, pinSide, simple) simple->ss_cPinOK = gaIsClear(routeUse, &rPin, &allObs); } - /* short metal wire + /* short metal wire * (a short wire is only ok if both the short wire itself and * the complementary stub are clear) */ - sMetal->sw_shortOK = (gaIsClear(routeUse, - &rShortMetal, + sMetal->sw_shortOK = (gaIsClear(routeUse, + &rShortMetal, &RtrMetalObstacles) && gaIsClear(routeUse, @@ -488,12 +488,12 @@ gaStemSimpleInit(routeUse, term, pinPoint, pinSide, simple) /* long metal wire */ - sMetal->sw_longOK = gaIsClear(routeUse, - &rLongMetal, + sMetal->sw_longOK = gaIsClear(routeUse, + &rLongMetal, &RtrMetalObstacles); /* short poly wire */ - sPoly->sw_shortOK = (gaIsClear(routeUse, + sPoly->sw_shortOK = (gaIsClear(routeUse, &rShortPoly, &RtrPolyObstacles) && @@ -502,8 +502,8 @@ gaStemSimpleInit(routeUse, term, pinPoint, pinSide, simple) &RtrMetalObstacles)); /* long poly wire */ - sPoly->sw_longOK = gaIsClear(routeUse, - &rLongPoly, + sPoly->sw_longOK = gaIsClear(routeUse, + &rLongPoly, &RtrPolyObstacles); } } @@ -511,13 +511,13 @@ gaStemSimpleInit(routeUse, term, pinPoint, pinSide, simple) return (TRUE); } - + /* * ---------------------------------------------------------------------------- * * gaIsClear -- * - * + * * Check that r is clear of all material of types in mask. * * Results: @@ -559,7 +559,7 @@ gaIsClear(use, r, mask) * gaIsClearFunc -- * * Called for tiles whose type matches 'mask' underneath the area - * 'r' in gaIsClear() above. + * 'r' in gaIsClear() above. * * Results: * Always returns 1 since we only need a single obstacle to not have @@ -579,7 +579,7 @@ gaIsClearFunc(tile, cxp) return 1; } - + /* * ---------------------------------------------------------------------------- * @@ -639,7 +639,7 @@ gaStemSimpleRoute(simple, pinLayer, def) } /* contact at pin only */ else if (TTMaskHasType(&simple->ss_termMask, wOther->sw_type) && - wOther->sw_shortOK && + wOther->sw_shortOK && simple->ss_cPinOK) { if(def) diff --git a/garouter/gaStem.c b/garouter/gaStem.c index 8789f7c9..9abbbd01 100644 --- a/garouter/gaStem.c +++ b/garouter/gaStem.c @@ -3,16 +3,16 @@ * * Assignment of routing-grid pin locations to terminals. * - * ********************************************************************* - * * Copyright (C) 1985, 1990 Regents of the University of California. * - * * Permission to use, copy, modify, and distribute this * - * * software and its documentation for any purpose and without * - * * fee is hereby granted, provided that the above copyright * - * * notice appear in all copies. The University of California * - * * makes no representations about the suitability of this * - * * software for any purpose. It is provided "as is" without * - * * express or implied warranty. Export of this software outside * - * * of the United States of America may require an export license. * + * ********************************************************************* + * * Copyright (C) 1985, 1990 Regents of the University of California. * + * * Permission to use, copy, modify, and distribute this * + * * software and its documentation for any purpose and without * + * * fee is hereby granted, provided that the above copyright * + * * notice appear in all copies. The University of California * + * * makes no representations about the suitability of this * + * * software for any purpose. It is provided "as is" without * + * * express or implied warranty. Export of this software outside * + * * of the United States of America may require an export license. * * ********************************************************************* */ @@ -91,7 +91,7 @@ bool gaStemInternalFunc(); bool gaStemInternal(); bool gaStemGrow(); - + /* * ---------------------------------------------------------------------------- * @@ -184,7 +184,7 @@ gaStemAssignAll(routeUse, netList) gaNumSimpleStem, gaNumMazeStem); } } - + /* * ---------------------------------------------------------------------------- * @@ -248,7 +248,7 @@ fail: gaNumNoChan++; return (FALSE); } - + /* * ---------------------------------------------------------------------------- * @@ -359,7 +359,7 @@ gaStemContainingChannelFunc(tile, pCh) return (0); } - + /* * ---------------------------------------------------------------------------- * @@ -403,14 +403,14 @@ gaStemGrow(area) return (FALSE); } - + /* * ---------------------------------------------------------------------------- * * gaStemInternal -- * * Having determined that 'loc' lies entirely within a river-routing - * channel, try to bring it out to both sides of the channel. + * channel, try to bring it out to both sides of the channel. * * If the terminal permits a grid aligned route, "simple" routes are * tried first. A simple route is a grid aligned straight line from @@ -468,8 +468,8 @@ gaStemInternal(routeUse, doWarn, loc, net, ch, netList) */ if (gaStemInternalFunc(routeUse, loc, net, ch, start, netList)) return (TRUE); - for (lo = start - RtrGridSpacing, hi = start + RtrGridSpacing; - lo >= min || hi <= max; + for (lo = start - RtrGridSpacing, hi = start + RtrGridSpacing; + lo >= min || hi <= max; lo -= RtrGridSpacing, hi += RtrGridSpacing) { if (lo >= min) @@ -488,7 +488,7 @@ gaStemInternal(routeUse, doWarn, loc, net, ch, netList) } return (FALSE); } - + /* * ---------------------------------------------------------------------------- * @@ -612,7 +612,7 @@ gaStemInternalFunc(routeUse, loc, net, ch, gridLine, netList) return (TRUE); } - + /* * ---------------------------------------------------------------------------- * @@ -652,7 +652,7 @@ gaStemCheckPin(routeUse, terminalLoc, ch, side, gridPoint, netList) GCRPin *pin; SimpleStem simple; short code; - + /* * Discard this pin immediately if any of the following are true: * - it is already occupied by a net @@ -720,7 +720,7 @@ hardway: /* Simple connections have failed, so try using mzrouter. A connection * must be possible from EITHER ROUTING LAYER, so we know we can connect * no matter how the channel is routed. - * + * * NULL writeUse is used so no paint is generated, we just check * if the connections are possible, deferring the actual stem generation * until after channel routing, so we know what layers to connect to. @@ -731,9 +731,9 @@ hardway: TTMaskSetOnlyType(&polyMask, RtrPolyType); TTMaskSetOnlyType(&metalMask, RtrMetalType); - if(gaMazeRoute(routeUse, terminalLoc, gridPoint, polyMask, side, + if(gaMazeRoute(routeUse, terminalLoc, gridPoint, polyMask, side, writeFlag) && - gaMazeRoute(routeUse, terminalLoc, gridPoint, metalMask, side, + gaMazeRoute(routeUse, terminalLoc, gridPoint, metalMask, side, writeFlag)) { gaNumMazeStem++; @@ -745,7 +745,7 @@ hardway: } } } - + /* * ---------------------------------------------------------------------------- * @@ -795,7 +795,7 @@ gaStemNetClear(termArea, point, side, netList) NLNet *net; Rect r; - /* + /* * First cut: determine a search area large enough so that any * terminals lying entirely outside of it can't possibly conflict * with this one. @@ -853,7 +853,7 @@ gaStemNetClear(termArea, point, side, netList) return (TRUE); } - + /* * ---------------------------------------------------------------------------- * @@ -923,7 +923,7 @@ gaStemGridRange(type, r, pMinGrid, pMaxGrid, pStart) *pMinGrid = min; *pStart = start; } - + /* * ---------------------------------------------------------------------------- * @@ -979,7 +979,7 @@ out: TxPrintf("%d total stems painted.\n", numInt + gaNumExtPaint); } } - + /* * ---------------------------------------------------------------------------- * @@ -1006,7 +1006,7 @@ gaStemPaint(routeUse, terminalLoc) CellUse *routeUse; NLTermLoc *terminalLoc; { - TileTypeBitMask terminalLayerMask; /* Possible layers for stem at + TileTypeBitMask terminalLayerMask; /* Possible layers for stem at terminal */ TileTypeBitMask pinLayerMask; /* Possible layers for stem at pin */ Rect errArea; @@ -1032,7 +1032,7 @@ gaStemPaint(routeUse, terminalLoc) * it was unable to connect to). */ flags = pin->gcr_ch->gcr_result[pin->gcr_x][pin->gcr_y]; - if (!rtrStemMask(routeUse, terminalLoc, flags, + if (!rtrStemMask(routeUse, terminalLoc, flags, &terminalLayerMask, &pinLayerMask)) { errReason = "Terminal is not on a legal routing layer"; @@ -1049,7 +1049,7 @@ gaStemPaint(routeUse, terminalLoc) /* * The terminal could be internal (terminalLoc->nloc_rect lies - * inside a river-routing channel) or external (terminalLoc->nloc_rect + * inside a river-routing channel) or external (terminalLoc->nloc_rect * lies outside of a channel but the stem tip borders on a normal * routing channel). In the latter case, use the old stem * generation code (temporary measure until we get our own @@ -1066,7 +1066,7 @@ gaStemPaint(routeUse, terminalLoc) ASSERT(pin->gcr_linked->gcr_ch->gcr_type != CHAN_NORMAL, "gaStemPaint"); - /* + /* * Try a simple stem. */ @@ -1098,9 +1098,9 @@ gaStemPaint(routeUse, terminalLoc) } } } - + /* - * Try the maze router. + * Try the maze router. */ if (RtrMazeStems) { @@ -1118,16 +1118,16 @@ gaStemPaint(routeUse, terminalLoc) if (gaMazeInit(EditCellUse) == FALSE) goto totalLoss; - - if(gaMazeRoute(routeUse, terminalLoc, pinPoint, pinLayerMask, side, + + if(gaMazeRoute(routeUse, terminalLoc, pinPoint, pinLayerMask, side, writeResult)) { gaNumMazePaint++; - + if(DebugIsSet(gaDebugID,gaDebShowMaze)) - /* Feedback all maze routes so we can check them - * (this will cause all maze routes to be reported as - * routing errors) + /* Feedback all maze routes so we can check them + * (this will cause all maze routes to be reported as + * routing errors) */ { Rect area; @@ -1138,10 +1138,10 @@ gaStemPaint(routeUse, terminalLoc) { GEO_EXPAND(&area, 1, &area); } - - DBWFeedbackAdd(&area, - "MAZE ROUTE", - routeUse->cu_def, + + DBWFeedbackAdd(&area, + "MAZE ROUTE", + routeUse->cu_def, 1, STYLE_PALEHIGHLIGHTS); } @@ -1167,7 +1167,7 @@ totalLoss: { GEO_EXPAND(&errArea, 1, &errArea); } - + failure: DBWFeedbackAdd(&errArea, errReason, routeUse->cu_def, 1, STYLE_PALEHIGHLIGHTS); diff --git a/garouter/gaTest.c b/garouter/gaTest.c index 590be2cf..b48c78d5 100644 --- a/garouter/gaTest.c +++ b/garouter/gaTest.c @@ -3,16 +3,16 @@ * * Testing code for the gate-array router. * - * ********************************************************************* - * * Copyright (C) 1985, 1990 Regents of the University of California. * - * * Permission to use, copy, modify, and distribute this * - * * software and its documentation for any purpose and without * - * * fee is hereby granted, provided that the above copyright * - * * notice appear in all copies. The University of California * - * * makes no representations about the suitability of this * - * * software for any purpose. It is provided "as is" without * - * * express or implied warranty. Export of this software outside * - * * of the United States of America may require an export license. * + * ********************************************************************* + * * Copyright (C) 1985, 1990 Regents of the University of California. * + * * Permission to use, copy, modify, and distribute this * + * * software and its documentation for any purpose and without * + * * fee is hereby granted, provided that the above copyright * + * * notice appear in all copies. The University of California * + * * makes no representations about the suitability of this * + * * software for any purpose. It is provided "as is" without * + * * express or implied warranty. Export of this software outside * + * * of the United States of America may require an export license. * * ********************************************************************* */ @@ -69,7 +69,7 @@ int gaSplitType; void GAInit(); - + /* * ---------------------------------------------------------------------------- * @@ -137,7 +137,7 @@ badCmd: } return; } - + /* * ---------------------------------------------------------------------------- * @@ -148,7 +148,7 @@ badCmd: * or chanType (either CHAN_HRIVER or CHAN_VRIVER) for channels over * existing subcells. The output is a collection of "garoute channel" * commands on the file 'f'. - * + * * Results: * None. * @@ -233,7 +233,7 @@ GAGenChans(chanType, area, f) (void) DBSrPaintArea((Tile *) NULL, plane, &gaSplitArea, &DBAllTypeBits, gaSplitOut, (ClientData) f); } - + /* * ---------------------------------------------------------------------------- * @@ -243,7 +243,7 @@ GAGenChans(chanType, area, f) * above. Outputs each tile as the appropriate type of channel (space * tiles are CHAN_NORMAL, non-space are either CHAN_HRIVER or CHAN_VRIVER) * after first clipping to the area gaSplitArea. - * + * * Results: * Always returns 0. * @@ -272,7 +272,7 @@ gaSplitOut(tile, f) fprintf(f, "\n"); return (0); } - + /* * ---------------------------------------------------------------------------- * @@ -290,7 +290,7 @@ gaSplitOut(tile, f) * If producing CHAN_VRIVER channels, we extend the box to the * left and right of gaSplitArea, and bloat it to the top and * bottom to the next farthest-out line between two grid lines. - * + * * Results: * Always returns 0. * @@ -360,7 +360,7 @@ gaSplitFunc(scx, plane) (PaintUndoInfo *) NULL, PAINT_NORMAL); return (0); } - + /* * ---------------------------------------------------------------------------- * diff --git a/garouter/garouter.h b/garouter/garouter.h index f00f4cbe..397a3eff 100644 --- a/garouter/garouter.h +++ b/garouter/garouter.h @@ -3,16 +3,16 @@ * * Header file for the gate-array router. * - * ********************************************************************* - * * Copyright (C) 1985, 1990 Regents of the University of California. * - * * Permission to use, copy, modify, and distribute this * - * * software and its documentation for any purpose and without * - * * fee is hereby granted, provided that the above copyright * - * * notice appear in all copies. The University of California * - * * makes no representations about the suitability of this * - * * software for any purpose. It is provided "as is" without * - * * express or implied warranty. Export of this software outside * - * * of the United States of America may require an export license. * + * ********************************************************************* + * * Copyright (C) 1985, 1990 Regents of the University of California. * + * * Permission to use, copy, modify, and distribute this * + * * software and its documentation for any purpose and without * + * * fee is hereby granted, provided that the above copyright * + * * notice appear in all copies. The University of California * + * * makes no representations about the suitability of this * + * * software for any purpose. It is provided "as is" without * + * * express or implied warranty. Export of this software outside * + * * of the United States of America may require an export license. * * ********************************************************************* * * rcsid $Header: /usr/cvsroot/magic-8.0/garouter/garouter.h,v 1.1.1.1 2008/02/03 20:43:50 tim Exp $ diff --git a/gcr/gcr.h b/gcr/gcr.h index 733609ac..f8c39acf 100644 --- a/gcr/gcr.h +++ b/gcr/gcr.h @@ -3,16 +3,16 @@ * * Routines to implement a modified version of Rivest's Greedy Router. * - * ********************************************************************* - * * Copyright (C) 1985, 1990 Regents of the University of California. * - * * Permission to use, copy, modify, and distribute this * - * * software and its documentation for any purpose and without * - * * fee is hereby granted, provided that the above copyright * - * * notice appear in all copies. The University of California * - * * makes no representations about the suitability of this * - * * software for any purpose. It is provided "as is" without * - * * express or implied warranty. Export of this software outside * - * * of the United States of America may require an export license. * + * ********************************************************************* + * * Copyright (C) 1985, 1990 Regents of the University of California. * + * * Permission to use, copy, modify, and distribute this * + * * software and its documentation for any purpose and without * + * * fee is hereby granted, provided that the above copyright * + * * notice appear in all copies. The University of California * + * * makes no representations about the suitability of this * + * * software for any purpose. It is provided "as is" without * + * * express or implied warranty. Export of this software outside * + * * of the United States of America may require an export license. * * ********************************************************************* * * @@ -210,7 +210,7 @@ typedef struct chan ClientData gcr_client; /* For hire */ int gcr_orient; /* Channel orientation */ } GCRChannel; - + /* Macros that look like procedures */ /************************************************************************ @@ -300,7 +300,7 @@ typedef struct chan /* The metal maximizer sets these bits */ #define GCRVM 0x0800 /* 1 if vertical poly changed to metal */ -#define GCRXX 0x1000 /* 1 if via not deleted */ +#define GCRXX 0x1000 /* 1 if via not deleted */ /* The hazard generation code uses these bits */ #define GCRVR 0x2000 /* 1 if hazard to nets entering from the right */ diff --git a/gcr/gcrChannel.c b/gcr/gcrChannel.c index 0da9651b..1252d99a 100644 --- a/gcr/gcrChannel.c +++ b/gcr/gcrChannel.c @@ -6,16 +6,16 @@ * is done so that the channel can be routed in the easiest * direction. * - * ********************************************************************* - * * Copyright (C) 1985, 1990 Regents of the University of California. * - * * Permission to use, copy, modify, and distribute this * - * * software and its documentation for any purpose and without * - * * fee is hereby granted, provided that the above copyright * - * * notice appear in all copies. The University of California * - * * makes no representations about the suitability of this * - * * software for any purpose. It is provided "as is" without * - * * express or implied warranty. Export of this software outside * - * * of the United States of America may require an export license. * + * ********************************************************************* + * * Copyright (C) 1985, 1990 Regents of the University of California. * + * * Permission to use, copy, modify, and distribute this * + * * software and its documentation for any purpose and without * + * * fee is hereby granted, provided that the above copyright * + * * notice appear in all copies. The University of California * + * * makes no representations about the suitability of this * + * * software for any purpose. It is provided "as is" without * + * * express or implied warranty. Export of this software outside * + * * of the United States of America may require an export license. * * ********************************************************************* */ @@ -31,7 +31,7 @@ static char rcsid[] __attribute__ ((unused)) = "$Header: /usr/cvsroot/magic-8.0/ #include "gcr/gcr.h" #include "utils/malloc.h" - + /* * ---------------------------------------------------------------------------- * @@ -145,7 +145,7 @@ GCRNewChannel(length, width) return (ch); } - + /* * ---------------------------------------------------------------------------- * @@ -195,7 +195,7 @@ GCRFreeChannel(ch) freeMagic((char *) ch->gcr_result); freeMagic((char *) ch); } - + /* * ---------------------------------------------------------------------------- * @@ -304,7 +304,7 @@ GCRFlipLeftRight(src, dst) dst->gcr_area = src->gcr_area; dst->gcr_type = src->gcr_type; } - + /* * ---------------------------------------------------------------------------- * @@ -404,7 +404,7 @@ GCRFlipXY(src, dst) bcopy((char *) src->gcr_iColsByRow, (char *) dst->gcr_iRowsByCol, sizeof (short) * widWds); #endif /* IDENSITY */ - + /* Lastly, make a new transform */ GeoTransTrans(&flipxy, &src->gcr_transform, &dst->gcr_transform); dst->gcr_origin = src->gcr_origin; @@ -416,7 +416,7 @@ GCRFlipXY(src, dst) default: dst->gcr_type = CHAN_NORMAL; break; } } - + /* * ---------------------------------------------------------------------------- * diff --git a/gcr/gcrColl.c b/gcr/gcrColl.c index 003de9a9..2d04ec27 100644 --- a/gcr/gcrColl.c +++ b/gcr/gcrColl.c @@ -2,16 +2,16 @@ * * The greedy router: Collapsing split nets. * - * ********************************************************************* - * * Copyright (C) 1985, 1990 Regents of the University of California. * - * * Permission to use, copy, modify, and distribute this * - * * software and its documentation for any purpose and without * - * * fee is hereby granted, provided that the above copyright * - * * notice appear in all copies. The University of California * - * * makes no representations about the suitability of this * - * * software for any purpose. It is provided "as is" without * - * * express or implied warranty. Export of this software outside * - * * of the United States of America may require an export license. * + * ********************************************************************* + * * Copyright (C) 1985, 1990 Regents of the University of California. * + * * Permission to use, copy, modify, and distribute this * + * * software and its documentation for any purpose and without * + * * fee is hereby granted, provided that the above copyright * + * * notice appear in all copies. The University of California * + * * makes no representations about the suitability of this * + * * software for any purpose. It is provided "as is" without * + * * express or implied warranty. Export of this software outside * + * * of the United States of America may require an export license. * * ********************************************************************* */ @@ -41,7 +41,7 @@ int * gcrNthSplit=(int *) NULL; /* Forward declarations */ void gcrEvalPat(); - + /* * ---------------------------------------------------------------------------- * gcrCollapse -- @@ -118,7 +118,7 @@ gcrCollapse(col, width, bot, top, freed) gcrEvalPat( col, freed, width); *col=(GCRColEl *) NULL; } - + /* * ---------------------------------------------------------------------------- * @@ -155,7 +155,7 @@ gcrInitCollapse(size) gcrBestCol = (GCRColEl *) NULL; } } - + /* * ---------------------------------------------------------------------------- * gcrEvalPat -- @@ -248,7 +248,7 @@ gcrEvalPat(col, freed, size) freeMagic((char *) *col); return; } - + /* * ---------------------------------------------------------------------------- * gcrNextSplit -- @@ -277,7 +277,7 @@ gcrNextSplit(col, size, i) return(i); return(size+1); } - + /* * ---------------------------------------------------------------------------- * gcrPickBest -- @@ -302,7 +302,7 @@ gcrPickBest(ch) ch->gcr_lCol=gcrBestCol; gcrBestCol=(GCRColEl *) NULL; } - + /* * ---------------------------------------------------------------------------- * gcrReduceRange -- @@ -311,7 +311,7 @@ gcrPickBest(ch) * of each uncollapsed split net downward, and trying to move the * outermost bottom track of each uncollapsed split net upwards. * Make no jogs which are shorter than minimum jog length. - * + * * Results: * None. * diff --git a/gcr/gcrDebug.c b/gcr/gcrDebug.c index efb5c052..a0fad0e1 100644 --- a/gcr/gcrDebug.c +++ b/gcr/gcrDebug.c @@ -2,16 +2,16 @@ * * The greedy router, debug routines. * - * ********************************************************************* - * * Copyright (C) 1985, 1990 Regents of the University of California. * - * * Permission to use, copy, modify, and distribute this * - * * software and its documentation for any purpose and without * - * * fee is hereby granted, provided that the above copyright * - * * notice appear in all copies. The University of California * - * * makes no representations about the suitability of this * - * * software for any purpose. It is provided "as is" without * - * * express or implied warranty. Export of this software outside * - * * of the United States of America may require an export license. * + * ********************************************************************* + * * Copyright (C) 1985, 1990 Regents of the University of California. * + * * Permission to use, copy, modify, and distribute this * + * * software and its documentation for any purpose and without * + * * fee is hereby granted, provided that the above copyright * + * * notice appear in all copies. The University of California * + * * makes no representations about the suitability of this * + * * software for any purpose. It is provided "as is" without * + * * express or implied warranty. Export of this software outside * + * * of the United States of America may require an export license. * * ********************************************************************* */ @@ -48,7 +48,7 @@ bool gcrMakeChannel(); void gcrPrintCol(GCRChannel *, int, int); - + /* * ---------------------------------------------------------------------------- * @@ -112,7 +112,7 @@ GCRRouteFromFile(fname) gcrShowMap(ch); return (ch); } - + /* * ---------------------------------------------------------------------------- * @@ -261,7 +261,7 @@ gcrMakePinLR(fp, x, size) return (result); } - + /* * ---------------------------------------------------------------------------- * @@ -343,7 +343,7 @@ gcrSaveChannel(ch) fprintf(fp, "\n"); (void) fclose(fp); } - + /* * ---------------------------------------------------------------------------- * @@ -426,7 +426,7 @@ gcrPrDensity(ch, chanDensity) if (fp != stdout) (void) fclose(fp); } - + /* * ---------------------------------------------------------------------------- * @@ -483,7 +483,7 @@ gcrDumpPins(ch) pinArray[i].gcr_pNext, pinArray[i].gcr_pPrev, pinArray[i].gcr_pId); } } - + /* * ---------------------------------------------------------------------------- * @@ -514,7 +514,7 @@ gcrDumpPinList(pin, dir) else gcrDumpPinList(pin->gcr_pPrev, dir); } } - + /* * ---------------------------------------------------------------------------- * @@ -548,7 +548,7 @@ gcrDumpCol(col, size) col[i].gcr_h, col[i].gcr_v, col[i].gcr_wanted, col[i].gcr_flags); } - + /* * ---------------------------------------------------------------------------- * @@ -773,7 +773,7 @@ void gcrPrintCol(ch, i, showResult) } TxPrintf(":\n"); } - + /* * ---------------------------------------------------------------------------- * @@ -853,7 +853,7 @@ gcrStats(ch) TxPrintf("Hwire : %d\n", hWire); TxPrintf("Vwire : %d\n", vWire); } - + /* * ---------------------------------------------------------------------------- * @@ -908,7 +908,7 @@ gcrCheckCol(ch, c, where) niceabort(); } if(col[i].gcr_h!=(GCRNet *) NULL) - + /* Look upward from the track for the next higher track assigned to * the net, if any. Just take the first one, breaking afterwards. */ @@ -947,7 +947,7 @@ gcrCheckCol(ch, c, where) } } } - + /* * ---------------------------------------------------------------------------- * diff --git a/gcr/gcrEdge.c b/gcr/gcrEdge.c index 1ebfd185..81994f4d 100644 --- a/gcr/gcrEdge.c +++ b/gcr/gcrEdge.c @@ -4,16 +4,16 @@ * The greedy router: * Functions to make connections at the far end of the channel. * - * ********************************************************************* - * * Copyright (C) 1985, 1990 Regents of the University of California. * - * * Permission to use, copy, modify, and distribute this * - * * software and its documentation for any purpose and without * - * * fee is hereby granted, provided that the above copyright * - * * notice appear in all copies. The University of California * - * * makes no representations about the suitability of this * - * * software for any purpose. It is provided "as is" without * - * * express or implied warranty. Export of this software outside * - * * of the United States of America may require an export license. * + * ********************************************************************* + * * Copyright (C) 1985, 1990 Regents of the University of California. * + * * Permission to use, copy, modify, and distribute this * + * * software and its documentation for any purpose and without * + * * fee is hereby granted, provided that the above copyright * + * * notice appear in all copies. The University of California * + * * makes no representations about the suitability of this * + * * software for any purpose. It is provided "as is" without * + * * express or implied warranty. Export of this software outside * + * * of the United States of America may require an export license. * * ********************************************************************* */ @@ -27,7 +27,7 @@ static char rcsid[] __attribute__ ((unused)) = "$Header: /usr/cvsroot/magic-8.0/ #include "utils/geometry.h" #include "tiles/tile.h" #include "gcr/gcr.h" - + /* * ---------------------------------------------------------------------------- * @@ -80,7 +80,7 @@ gcrWanted(ch, track, column) col[next->gcr_y].gcr_wanted = net; } } - + /* * ---------------------------------------------------------------------------- * @@ -110,7 +110,7 @@ gcrMarkWanted(ch) if (pin[track].gcr_pId) col[track].gcr_wanted = pin[track].gcr_pId; } - + /* * ---------------------------------------------------------------------------- * diff --git a/gcr/gcrFeas.c b/gcr/gcrFeas.c index 35b1fafc..bc6eafa8 100644 --- a/gcr/gcrFeas.c +++ b/gcr/gcrFeas.c @@ -4,16 +4,16 @@ * This includes the initial attempt and widening if a * connection could not be made. * - * ********************************************************************* - * * Copyright (C) 1985, 1990 Regents of the University of California. * - * * Permission to use, copy, modify, and distribute this * - * * software and its documentation for any purpose and without * - * * fee is hereby granted, provided that the above copyright * - * * notice appear in all copies. The University of California * - * * makes no representations about the suitability of this * - * * software for any purpose. It is provided "as is" without * - * * express or implied warranty. Export of this software outside * - * * of the United States of America may require an export license. * + * ********************************************************************* + * * Copyright (C) 1985, 1990 Regents of the University of California. * + * * Permission to use, copy, modify, and distribute this * + * * software and its documentation for any purpose and without * + * * fee is hereby granted, provided that the above copyright * + * * notice appear in all copies. The University of California * + * * makes no representations about the suitability of this * + * * software for any purpose. It is provided "as is" without * + * * express or implied warranty. Export of this software outside * + * * of the United States of America may require an export license. * * ********************************************************************* */ @@ -36,7 +36,7 @@ extern int gcrRouterErrors; /* Forward declarations */ void gcrMakeFeasible(); - + /* * ---------------------------------------------------------------------------- * gcrFeasible -- @@ -166,7 +166,7 @@ gcrFeasible(ch, col) { if( (! failedTop) && (topNet!=(GCRNet *) NULL) ) { - gcrMakeFeasible(column, topNet, ch->gcr_width+1, topTarget, + gcrMakeFeasible(column, topNet, ch->gcr_width+1, topTarget, ch->gcr_width); gcrWanted(ch, topTarget, col); } @@ -190,7 +190,7 @@ gcrFeasible(ch, col) gcrRouterErrors++; } } - + /* * ---------------------------------------------------------------------------- * gcrMakeFeasible -- diff --git a/gcr/gcrFlags.c b/gcr/gcrFlags.c index b3ccbe1f..b36d9f5a 100644 --- a/gcr/gcrFlags.c +++ b/gcr/gcrFlags.c @@ -17,16 +17,16 @@ * END FLAGS mark locations beyond which tracks or columns cannot be * extended due to two-layer obstacles. * - * ********************************************************************* - * * Copyright (C) 1985, 1990 Regents of the University of California. * - * * Permission to use, copy, modify, and distribute this * - * * software and its documentation for any purpose and without * - * * fee is hereby granted, provided that the above copyright * - * * notice appear in all copies. The University of California * - * * makes no representations about the suitability of this * - * * software for any purpose. It is provided "as is" without * - * * express or implied warranty. Export of this software outside * - * * of the United States of America may require an export license. * + * ********************************************************************* + * * Copyright (C) 1985, 1990 Regents of the University of California. * + * * Permission to use, copy, modify, and distribute this * + * * software and its documentation for any purpose and without * + * * fee is hereby granted, provided that the above copyright * + * * notice appear in all copies. The University of California * + * * makes no representations about the suitability of this * + * * software for any purpose. It is provided "as is" without * + * * express or implied warranty. Export of this software outside * + * * of the United States of America may require an export license. * * ********************************************************************* */ @@ -40,7 +40,7 @@ static char rcsid[] __attribute__ ((unused)) = "$Header: /usr/cvsroot/magic-8.0/ #include "utils/geometry.h" #include "tiles/tile.h" #include "gcr/gcr.h" - + /* * ---------------------------------------------------------------------------- * diff --git a/gcr/gcrInit.c b/gcr/gcrInit.c index 340ea275..32618449 100644 --- a/gcr/gcrInit.c +++ b/gcr/gcrInit.c @@ -2,16 +2,16 @@ * * Initialization for the greedy router. * - * ********************************************************************* - * * Copyright (C) 1985, 1990 Regents of the University of California. * - * * Permission to use, copy, modify, and distribute this * - * * software and its documentation for any purpose and without * - * * fee is hereby granted, provided that the above copyright * - * * notice appear in all copies. The University of California * - * * makes no representations about the suitability of this * - * * software for any purpose. It is provided "as is" without * - * * express or implied warranty. Export of this software outside * - * * of the United States of America may require an export license. * + * ********************************************************************* + * * Copyright (C) 1985, 1990 Regents of the University of California. * + * * Permission to use, copy, modify, and distribute this * + * * software and its documentation for any purpose and without * + * * fee is hereby granted, provided that the above copyright * + * * notice appear in all copies. The University of California * + * * makes no representations about the suitability of this * + * * software for any purpose. It is provided "as is" without * + * * express or implied warranty. Export of this software outside * + * * of the United States of America may require an export license. * * ********************************************************************* */ @@ -47,7 +47,7 @@ float GCRObstDist; /* Sun lint brain death */ /* Forward declarations */ void gcrLinkPin(); - + /* * ---------------------------------------------------------------------------- * @@ -98,7 +98,7 @@ gcrSetEndDist(ch) GCREndDist = (multiTotal/2 + rightTotal/4) * RtrEndConst; if (GCREndDist < 1) GCREndDist = 1; } - + /* * ---------------------------------------------------------------------------- * @@ -144,7 +144,7 @@ gcrBuildNets(ch) HashKill(&ht); } - + /* * ---------------------------------------------------------------------------- * @@ -212,7 +212,7 @@ gcrLinkPin(pin, ht, ch) pin->gcr_pId = net; pin->gcr_pNext = (GCRPin *) NULL; } - + /* * ---------------------------------------------------------------------------- * @@ -244,7 +244,7 @@ gcrUnlinkPin(pin) pin->gcr_pNext->gcr_pPrev = pin->gcr_pPrev; } } - + /* * ---------------------------------------------------------------------------- * @@ -320,7 +320,7 @@ gcrDensity(ch) return (maxVal); } - + /* * ---------------------------------------------------------------------------- * diff --git a/gcr/gcrLib.c b/gcr/gcrLib.c index 81cba281..e7ea697c 100644 --- a/gcr/gcrLib.c +++ b/gcr/gcrLib.c @@ -3,16 +3,16 @@ * * Miscellaneous stuff for the greedy router. * - * ********************************************************************* - * * Copyright (C) 1985, 1990 Regents of the University of California. * - * * Permission to use, copy, modify, and distribute this * - * * software and its documentation for any purpose and without * - * * fee is hereby granted, provided that the above copyright * - * * notice appear in all copies. The University of California * - * * makes no representations about the suitability of this * - * * software for any purpose. It is provided "as is" without * - * * express or implied warranty. Export of this software outside * - * * of the United States of America may require an export license. * + * ********************************************************************* + * * Copyright (C) 1985, 1990 Regents of the University of California. * + * * Permission to use, copy, modify, and distribute this * + * * software and its documentation for any purpose and without * + * * fee is hereby granted, provided that the above copyright * + * * notice appear in all copies. The University of California * + * * makes no representations about the suitability of this * + * * software for any purpose. It is provided "as is" without * + * * express or implied warranty. Export of this software outside * + * * of the United States of America may require an export license. * * ********************************************************************* */ @@ -31,7 +31,7 @@ static char rcsid[] __attribute__ ((unused)) = "$Header: /usr/cvsroot/magic-8.0/ /* Forward declarations */ void gcrUnlinkTrack(); - + /* * ---------------------------------------------------------------------------- * @@ -80,7 +80,7 @@ gcrBlocked(col, i, net, last) /* All clear */ return (FALSE); } - + /* * ---------------------------------------------------------------------------- * @@ -212,7 +212,7 @@ gcrMoveTrack(column, net, from, to) column[to].gcr_hi=column[from].gcr_hi; if(column[from].gcr_hi!= EMPTY) column[column[from].gcr_hi].gcr_lo=to; - if(column[from].gcr_logcr_lo = colPtr->gcr_hi = EMPTY; colPtr->gcr_h = (GCRNet *) NULL; } - + /* * ---------------------------------------------------------------------------- * @@ -325,7 +325,7 @@ gcrShellSort(v, n, isUp) } } - + /* * ---------------------------------------------------------------------------- * @@ -368,14 +368,14 @@ gcrVertClear(col, from, to) if((flags & GCRCE) && (i!=to)) return(FALSE); /* Column ended */ else - if( (flags & (GCRBLKP|GCRBLKM|GCRX|GCRCC)) && + if( (flags & (GCRBLKP|GCRBLKM|GCRX|GCRCC)) && (col[i].gcr_h!=net) && (col[i].gcr_h!=(GCRNet *) NULL) ) return(FALSE); /* Poly and metal blocked */ } return(TRUE); } - + /* * ---------------------------------------------------------------------------- * @@ -406,7 +406,7 @@ gcrCopyCol(col, size) result[i] = col[i]; return (result); } - + /* * ---------------------------------------------------------------------------- * diff --git a/gcr/gcrRiver.c b/gcr/gcrRiver.c index dcf21f02..8ed915a4 100644 --- a/gcr/gcrRiver.c +++ b/gcr/gcrRiver.c @@ -3,16 +3,16 @@ * * The greedy router: river-routing across the tops of channels. * - * ********************************************************************* - * * Copyright (C) 1985, 1990 Regents of the University of California. * - * * Permission to use, copy, modify, and distribute this * - * * software and its documentation for any purpose and without * - * * fee is hereby granted, provided that the above copyright * - * * notice appear in all copies. The University of California * - * * makes no representations about the suitability of this * - * * software for any purpose. It is provided "as is" without * - * * express or implied warranty. Export of this software outside * - * * of the United States of America may require an export license. * + * ********************************************************************* + * * Copyright (C) 1985, 1990 Regents of the University of California. * + * * Permission to use, copy, modify, and distribute this * + * * software and its documentation for any purpose and without * + * * fee is hereby granted, provided that the above copyright * + * * notice appear in all copies. The University of California * + * * makes no representations about the suitability of this * + * * software for any purpose. It is provided "as is" without * + * * express or implied warranty. Export of this software outside * + * * of the United States of America may require an export license. * * ********************************************************************* */ @@ -32,7 +32,7 @@ static char rcsid[] __attribute__ ((unused)) = "$Header: /usr/cvsroot/magic-8.0/ bool gcrOverCellVert(); bool gcrOverCellHoriz(); - + /* * ---------------------------------------------------------------------------- * @@ -71,7 +71,7 @@ gcrRiverRoute(ch) return (FALSE); } - + /* * ---------------------------------------------------------------------------- * diff --git a/gcr/gcrRoute.c b/gcr/gcrRoute.c index aeb91ebc..f3974a6e 100644 --- a/gcr/gcrRoute.c +++ b/gcr/gcrRoute.c @@ -2,16 +2,16 @@ * * The greedy router: Top level procedures. * - * ********************************************************************* - * * Copyright (C) 1985, 1990 Regents of the University of California. * - * * Permission to use, copy, modify, and distribute this * - * * software and its documentation for any purpose and without * - * * fee is hereby granted, provided that the above copyright * - * * notice appear in all copies. The University of California * - * * makes no representations about the suitability of this * - * * software for any purpose. It is provided "as is" without * - * * express or implied warranty. Export of this software outside * - * * of the United States of America may require an export license. * + * ********************************************************************* + * * Copyright (C) 1985, 1990 Regents of the University of California. * + * * Permission to use, copy, modify, and distribute this * + * * software and its documentation for any purpose and without * + * * fee is hereby granted, provided that the above copyright * + * * notice appear in all copies. The University of California * + * * makes no representations about the suitability of this * + * * software for any purpose. It is provided "as is" without * + * * express or implied warranty. Export of this software outside * + * * of the United States of America may require an export license. * * ********************************************************************* */ @@ -38,7 +38,7 @@ extern int gcrStandalone; void gcrRouteCol(); void gcrExtend(); - + /* * ---------------------------------------------------------------------------- * @@ -130,7 +130,7 @@ bottom: return (gcrRouterErrors); } - + /* * ---------------------------------------------------------------------------- * @@ -200,7 +200,7 @@ gcrRouteCol(ch, indx) gcrCheckCol(ch, indx, "After widen and extend"); gcrPrintCol(ch, indx, GcrShowResult); } - + /* * ---------------------------------------------------------------------------- * diff --git a/gcr/gcrShwFlgs.c b/gcr/gcrShwFlgs.c index fc18e6ed..084a2a76 100644 --- a/gcr/gcrShwFlgs.c +++ b/gcr/gcrShwFlgs.c @@ -2,16 +2,16 @@ * * Code to highlight areas flagged by the router. * - * ********************************************************************* - * * Copyright (C) 1985, 1990 Regents of the University of California. * - * * Permission to use, copy, modify, and distribute this * - * * software and its documentation for any purpose and without * - * * fee is hereby granted, provided that the above copyright * - * * notice appear in all copies. The University of California * - * * makes no representations about the suitability of this * - * * software for any purpose. It is provided "as is" without * - * * express or implied warranty. Export of this software outside * - * * of the United States of America may require an export license. * + * ********************************************************************* + * * Copyright (C) 1985, 1990 Regents of the University of California. * + * * Permission to use, copy, modify, and distribute this * + * * software and its documentation for any purpose and without * + * * fee is hereby granted, provided that the above copyright * + * * notice appear in all copies. The University of California * + * * makes no representations about the suitability of this * + * * software for any purpose. It is provided "as is" without * + * * express or implied warranty. Export of this software outside * + * * of the United States of America may require an export license. * * ********************************************************************* */ @@ -67,7 +67,7 @@ char * GCRFlagDescr[]={ }; CellDef * gcrShowCell = (CellDef *) NULL; - + /* * ---------------------------------------------------------------------------- * @@ -180,7 +180,7 @@ GCRShow(point, arg) dx += RtrGridSpacing; } } - + /* * ---------------------------------------------------------------------------- * diff --git a/gcr/gcrUnsplit.c b/gcr/gcrUnsplit.c index 1e64be9f..cef28781 100644 --- a/gcr/gcrUnsplit.c +++ b/gcr/gcrUnsplit.c @@ -4,16 +4,16 @@ * * Raising rising nets and lowering falling nets. * * Vacating tracks needed at the end of the channel. * - * ********************************************************************* - * * Copyright (C) 1985, 1990 Regents of the University of California. * - * * Permission to use, copy, modify, and distribute this * - * * software and its documentation for any purpose and without * - * * fee is hereby granted, provided that the above copyright * - * * notice appear in all copies. The University of California * - * * makes no representations about the suitability of this * - * * software for any purpose. It is provided "as is" without * - * * express or implied warranty. Export of this software outside * - * * of the United States of America may require an export license. * + * ********************************************************************* + * * Copyright (C) 1985, 1990 Regents of the University of California. * + * * Permission to use, copy, modify, and distribute this * + * * software and its documentation for any purpose and without * + * * fee is hereby granted, provided that the above copyright * + * * notice appear in all copies. The University of California * + * * makes no representations about the suitability of this * + * * software for any purpose. It is provided "as is" without * + * * express or implied warranty. Export of this software outside * + * * of the United States of America may require an export license. * * ********************************************************************* */ @@ -34,7 +34,7 @@ static char rcsid[] __attribute__ ((unused)) = "$Header: /usr/cvsroot/magic-8.0/ void gcrMakeRuns(); - + /* * ---------------------------------------------------------------------------- * gcrVacate -- @@ -120,7 +120,7 @@ gcrVacate(ch, column) gcrMakeRuns(ch, column, list, count, FALSE); } } - + /* * ---------------------------------------------------------------------------- * gcrLook -- @@ -254,7 +254,7 @@ gcrLook(ch, track, canCover) else return(bestUp); } - + /* * ---------------------------------------------------------------------------- * gcrClassify -- @@ -333,7 +333,7 @@ gcrClassify(ch, count) gcrShellSort(result, *count, FALSE); return(result); } - + /* * ---------------------------------------------------------------------------- * @@ -371,7 +371,7 @@ gcrRealDist(col, i, dist) } return(abs(dist-last)); } - + /* * ---------------------------------------------------------------------------- * gcrClass -- @@ -414,7 +414,7 @@ gcrClass(net, track) } return(dist); } - + /* * ---------------------------------------------------------------------------- * gcrMakeRuns -- @@ -507,7 +507,7 @@ gcrMakeRuns(ch, column, list, count, riseFall) } freeMagic((char *) list); } - + /* * ---------------------------------------------------------------------------- * @@ -542,7 +542,7 @@ gcrTryRun(ch, net, from, to, column) runTo = EMPTY; firstFlag = col[from].gcr_flags; covered = (firstFlag & (GCRBLKM | GCRBLKP)) ? TRUE : FALSE; - sourceEnds = (firstFlag & GCRTE) ? TRUE : FALSE; + sourceEnds = (firstFlag & GCRTE) ? TRUE : FALSE; for(i=from; (up && (i<=to)) || (!up && (i>=to)); i=i + ((from>to) ? -1 : 1)) { flag=col[i].gcr_flags; diff --git a/graphics/W3Dmain.c b/graphics/W3Dmain.c index 1198c375..7d1944f3 100644 --- a/graphics/W3Dmain.c +++ b/graphics/W3Dmain.c @@ -94,7 +94,7 @@ w3dUnlock(w) { glFlush(); glFinish(); - + glDisable(GL_CULL_FACE); glDisable(GL_COLOR_MATERIAL); @@ -260,7 +260,7 @@ w3dFillOps(trans, tile, cliprect, ztop, zbot) GeoClip(&r, cliprect); GrClipTriangle(&fullr, &r, cliprect != NULL, dinfo, p, &np); - + if (np > 0) { w3dFillPolygon(p, np, ztop, TRUE); @@ -393,7 +393,7 @@ w3dRenderVolume(tile, trans, cliprect) zbot = ztop - (fthk * crec->scale_z); GR_CHECK_LOCK(); - if (!grDriverInformed) + if (!grDriverInformed) grInformDriver(); if ((grCurFill == GR_STSOLID) || (grCurFill == GR_STSTIPPLE)) @@ -425,7 +425,7 @@ w3dRenderCIF(tile, layer, trans) zbot = ztop - (fthk * crec->scale_z); GR_CHECK_LOCK(); - if (!grDriverInformed) + if (!grDriverInformed) grInformDriver(); if ((grCurFill == GR_STSOLID) || (grCurFill == GR_STSTIPPLE)) @@ -489,7 +489,7 @@ w3dSetProjection(w) glEnable(GL_LINE_SMOOTH); glEnable(GL_POLYGON_SMOOTH); } - + /* Need to look into dealing properly with double-buffered graphics */ glDrawBuffer(GL_FRONT); /* glDrawBuffer(GL_BACK); */ @@ -722,9 +722,9 @@ w3dCutBox(w, cmd) } else { - if (StrIsInt(cmd->tx_argv[1]) && - StrIsInt(cmd->tx_argv[2]) && - StrIsInt(cmd->tx_argv[3]) && + if (StrIsInt(cmd->tx_argv[1]) && + StrIsInt(cmd->tx_argv[2]) && + StrIsInt(cmd->tx_argv[3]) && StrIsInt(cmd->tx_argv[4])) { crec->clipped = TRUE; @@ -829,7 +829,7 @@ w3dClose(w, cmd) void w3dRescale(crec, scalefactor) W3DclientRec *crec; - float scalefactor; + float scalefactor; { crec->scale_xy /= scalefactor; crec->prescale_z /= scalefactor; @@ -1416,7 +1416,7 @@ W3DloadWindow(window, name) * * W3Dcreate -- * - * A new window has been created. Create and initialize the needed + * A new window has been created. Create and initialize the needed * structures. * * Results: @@ -1436,7 +1436,7 @@ W3Dcreate(window, argc, argv) { W3DclientRec *crec; Tk_Window tkwind, tktop; - Window wind; + Window wind; Colormap colormap; HashEntry *entry; CellDef *boxDef; @@ -1458,12 +1458,12 @@ W3Dcreate(window, argc, argv) if (!GrIsDisplay(MainDisplayType, "OGL")) { - TxError("Display type is \"%s\". OpenGL is required for the 3D display.\n", + TxError("Display type is \"%s\". OpenGL is required for the 3D display.\n", MainDisplayType); TxError("Please restart magic with option \"-d OGL\".\n"); return FALSE; } - + crec = (W3DclientRec *) mallocMagic(sizeof(W3DclientRec)); /* The MagWindow structure and frameArea indicates the cross-sectional */ @@ -1471,7 +1471,7 @@ W3Dcreate(window, argc, argv) /* Need to parse the argument list here. . . At least one argument */ /* should allow the Tk path name to be passed to the routine, as */ - /* it is for the standard layout window in the Tk interface. */ + /* it is for the standard layout window in the Tk interface. */ /* Set surface area, etc. of the MagWindow. . . ? */ @@ -1526,7 +1526,7 @@ W3Dcreate(window, argc, argv) grVisualInfo->visual, AllocNone); if (!(tktop = Tk_MainWindow(magicinterp))) return FALSE; - + /* Check for a Tk pathname for the window; allows window to be */ /* by a Tk GUI script. */ if (argc > 1) name = argv[1]; @@ -1569,7 +1569,7 @@ W3Dcreate(window, argc, argv) /* Use Tcl to pass commands to the window */ MakeWindowCommand((name == NULL) ? ".magic3d" : name, window); - + /* Now that a cell is loaded, set default values for the */ /* client record based on the cell bounding box. */ @@ -1691,7 +1691,7 @@ W3Dredisplay(w, rootArea, clipArea) } } } - + /* * ---------------------------------------------------------------------------- @@ -1855,7 +1855,7 @@ W3Dinit() "defaults revert to defaults", w3dDefaults, FALSE); WindAddCommand(W3DclientID, - "closewindow close the 3D display", + "closewindow close the 3D display", w3dClose, FALSE); WindAddCommand(W3DclientID, "render name [height thick [style]]\n" diff --git a/graphics/X11Helper.c b/graphics/X11Helper.c index 9d47e102..cf0de41f 100644 --- a/graphics/X11Helper.c +++ b/graphics/X11Helper.c @@ -19,7 +19,7 @@ #include #include -/* +/* * Portability stuff */ @@ -28,7 +28,7 @@ #endif /* Some machines have signal handlers returning an int, while other machines - * have it returning a void. If you have a machine that requires ints put + * have it returning a void. If you have a machine that requires ints put * it in the list of machines in utils/magic.h. */ #ifdef SIG_RETURNS_INT @@ -91,7 +91,7 @@ main (argc, argv) /* sigSetAction(SIGINT, SIG_IGN); */ /* sigSetAction(SIGQUIT, SIG_IGN); */ - sigSetAction(SIGTERM, MapWindow); + sigSetAction(SIGTERM, MapWindow); #ifdef SIGTSTP sigSetAction(SIGTSTP, SIG_IGN); #endif @@ -113,7 +113,7 @@ main (argc, argv) * Pass XEvents on to the magic main process by writing into the * connecting pipe. Keystrokes must be handled such that magic * can treat untranslated keyboard input from stdin the same way - * that it treats translated keyboard input through X11. + * that it treats translated keyboard input through X11. * Use XLookupString() to get an ASCII character out of the * keycode, but also pass back the event structure so we can * pull out key modifier information in grX11Stdin(). @@ -127,7 +127,7 @@ void ParseEvent (event) XEvent *event; { - if (event->type == KeyPress) + if (event->type == KeyPress) { XKeyPressedEvent *KeyPressedEvent = (XKeyPressedEvent *) event; char inChar[10], c, *p; @@ -193,7 +193,7 @@ ParseEvent (event) if ((c = *p++) == 3) /* Ctrl-C interrupt */ { kill(parentID, SIGINT); - } + } else { /* When Control modifier is present, use the capital */ @@ -279,7 +279,7 @@ TimeOut(int signo) } SetTimeOut(); /* Renew the timer and signal handler */ } - + /* * MapWindow(): * On startup of any new magic window, magic writes the X11 window ID diff --git a/graphics/cairo_new/grTCairo1.c b/graphics/cairo_new/grTCairo1.c index 37a870e7..741d13f7 100644 --- a/graphics/cairo_new/grTCairo1.c +++ b/graphics/cairo_new/grTCairo1.c @@ -71,7 +71,7 @@ extern int GrTCairoWindowId(); extern char *GrTkWindowName(); /* Use routine from grTkCommon.c */ extern void tcairoSetProjection(); - + /*--------------------------------------------------------- * grtcairoSetWMandC: * This is a local routine that resets the value of the current @@ -115,7 +115,7 @@ int c; /* New value for current color */ oldMask = mask; } - + /*--------------------------------------------------------- * grtcairoSetLineStyle: * This local routine sets the current line style. @@ -135,7 +135,7 @@ int style; /* New stipple pattern for lines. */ // unimplemented for cairo } - + /*--------------------------------------------------------- * grtcairoSetSPattern: * tcairoSetSPattern associates a stipple pattern with a given @@ -180,7 +180,7 @@ int numstipples; /* Number of stipples */ } } - + /*--------------------------------------------------------- * grtcairoSetStipple: * This routine sets the Xs current stipple number. @@ -213,7 +213,7 @@ int stipple; /* The stipple number to be used. */ } } - + /*------------------------------------------------------------------------ * GrTCairoInit: * GrTCairoInit initializes the graphics display and clears its screen. @@ -275,7 +275,7 @@ GrTCairoInit () return grTkLoadFont(); } - + /*--------------------------------------------------------- * GrTCairoClose: * @@ -296,7 +296,7 @@ GrTCairoClose () /* do XCloseDisplay() */ } - + /*--------------------------------------------------------- * GrTCairoFlush: * Flush output to display. @@ -358,7 +358,7 @@ int llx, lly, width, height; cairo_scale(tcairodata->context, 1.0, -1.0); } - + /* * --------------------------------------------------------------------------- * @@ -804,7 +804,7 @@ keys_and_buttons: } } - + /*--------------------------------------------------------- * cairoSetDisplay: @@ -916,7 +916,7 @@ char *mouseFileName; } extern void MakeWindowCommand(); - + /* * ---------------------------------------------------------------------------- * @@ -1080,7 +1080,7 @@ char *name; return 0; } - + /* * ---------------------------------------------------------------------------- * @@ -1110,7 +1110,7 @@ MagWindow *w; Tcl_DeleteCommand(magicinterp, Tk_PathName(xw)); Tk_DestroyWindow(xw); } - + /* * ---------------------------------------------------------------------------- * @@ -1139,11 +1139,11 @@ MagWindow *w; height = w->w_frameArea.r_ytop - w->w_frameArea.r_ybot; Tk_MoveResizeWindow((Tk_Window)w->w_grdata, w->w_frameArea.r_xbot, grTransYs(w->w_frameArea.r_ytop), - width, height); + width, height); tcairodata = (TCairoData *)w->w_grdata2; cairo_xlib_surface_set_size(tcairodata->surface, width, height); } - + /* * ---------------------------------------------------------------------------- * @@ -1171,7 +1171,7 @@ MagWindow *w; tkwind = (Tk_Window)w->w_grdata; Tk_RestackWindow(tkwind, Above, NULL); } - + /* * ---------------------------------------------------------------------------- * @@ -1199,7 +1199,7 @@ MagWindow *w; tkwind = (Tk_Window)w->w_grdata; Tk_RestackWindow(tkwind, Below, NULL); } - + /* * ---------------------------------------------------------------------------- @@ -1245,7 +1245,7 @@ bool flag; w->w_allArea.r_ytop - w->w_allArea.r_ybot); } } - + /* * ---------------------------------------------------------------------------- * @@ -1269,7 +1269,7 @@ MagWindow *w; GrTCairoFlush(); grSimpleUnlock(w); } - + /* *------------------------------------------------------------------------- diff --git a/graphics/cairo_new/grTCairo2.c b/graphics/cairo_new/grTCairo2.c index 11b98974..05925f24 100644 --- a/graphics/cairo_new/grTCairo2.c +++ b/graphics/cairo_new/grTCairo2.c @@ -30,7 +30,7 @@ extern char *DBWStyleType; extern Display *grXdpy; extern cairo_pattern_t *currentStipple; - + /*--------------------------------------------------------- * GrTCairoSetCMap -- * @@ -84,7 +84,7 @@ int nb; // cairo_set_line_width(tcairodata->context, width); cairo_stroke(tcairodata->context); } - + /*--------------------------------------------------------- * grtcairoDrawLine: * This routine draws a line. @@ -123,7 +123,7 @@ int x2, y2; /* Screen coordinates of second point. */ grtcairoNbDiagonal++; } } - + /*--------------------------------------------------------- * grtcairoFillRects: * This routine draws a bunch of solid rectangles. @@ -145,7 +145,7 @@ int nb; for (i = 0; i < nb; i++) { - cairo_rectangle(tcairodata->context, + cairo_rectangle(tcairodata->context, rects[i].r_ll.p_x, rects[i].r_ll.p_y, rects[i].r_ur.p_x-rects[i].r_ll.p_x, rects[i].r_ur.p_y-rects[i].r_ll.p_y); // TxPrintf("%d %d %d %d \n", rects[i].r_ll.p_x, rects[i].r_ll.p_y, rects[i].r_ur.p_x-rects[i].r_ll.p_x, rects[i].r_ur.p_y-rects[i].r_ll.p_y); @@ -153,7 +153,7 @@ int nb; cairo_clip(tcairodata->context); cairo_mask(tcairodata->context, currentStipple); } - + /*--------------------------------------------------------- * grtcairoFillRect: * This routine draws a solid rectangle. diff --git a/graphics/cairo_new/grTCairo3.c b/graphics/cairo_new/grTCairo3.c index f9f5d33c..ea35854a 100644 --- a/graphics/cairo_new/grTCairo3.c +++ b/graphics/cairo_new/grTCairo3.c @@ -38,7 +38,7 @@ static GC grXcopyGC = (GC)NULL; /* locals */ - + /*--------------------------------------------------------- * grtcairoDrawGrid: * grxDrawGrid adds a grid to the grid layer, using the current @@ -104,7 +104,7 @@ Rect *clip; /* a clipping rectangle */ return TRUE; } - + /*--------------------------------------------------------- * grtcairoLoadFont * This local routine loads the default ("toy API") @@ -124,7 +124,7 @@ grtcairoLoadFont() return TRUE; } - + /*--------------------------------------------------------- * grtcairoSetCharSize: * This local routine sets the character size in the display, @@ -165,7 +165,7 @@ int size; /* Width of characters, in pixels (6 or 8). */ } } - + /* * ---------------------------------------------------------------------------- * GrTCairoTextSize -- @@ -404,13 +404,13 @@ grtcairoPutBackingStore(MagWindow *w, Rect *area) cairo_rectangle(tcairodata->backing_context, xbot, ybot, width, height); cairo_set_operator(tcairodata->backing_context, CAIRO_OPERATOR_SOURCE); cairo_fill(tcairodata->backing_context); - + // cairo_surface_flush(tcairodata->backing_surface); // w->w_backingStore = (ClientData) cairo_image_surface_get_data(tcairodata->backing_surface); // cairo_surface_mark_dirty(tcairodata->backing_surface); } - + /* * ---------------------------------------------------------------------------- * GrTCairoReadPixel -- @@ -434,7 +434,7 @@ int x, y; /* the location of a pixel in screen coords */ return 0; /* (unimplemented) */ } - + /* * ---------------------------------------------------------------------------- * GrTCairoBitBlt -- diff --git a/graphics/cairo_new/grTCairo4.c b/graphics/cairo_new/grTCairo4.c index 10b8eba8..506b03b0 100644 --- a/graphics/cairo_new/grTCairo4.c +++ b/graphics/cairo_new/grTCairo4.c @@ -27,14 +27,14 @@ extern Display *grXdpy; - + /*--------------------------------------------------------- * GrTCairoDisableTablet: * Turns off the cursor. * * Results: None. * - * Side Effects: None. + * Side Effects: None. *--------------------------------------------------------- */ @@ -44,12 +44,12 @@ GrTCairoDisableTablet () /* (Unimplemented) */ } - + /*--------------------------------------------------------- * GrTCairoEnableTablet: * This routine enables the graphics tablet. * - * Results: + * Results: * None. * * Side Effects: @@ -63,7 +63,7 @@ GrTCairoEnableTablet () /* (Unimplemented) */ } - + /* * ---------------------------------------------------------------------------- * grtcairoGetCursorPos: @@ -89,7 +89,7 @@ grtcairoGetCursorPos (mw, p) Window win1, win2; if (mw == (MagWindow *)NULL) mw = tcairoCurrent.mw; - + XQueryPointer(grXdpy, Tk_WindowId((Tk_Window)(mw->w_grdata)), &win1, &win2, &x1, &y1, &x, &y, &buttons); @@ -125,7 +125,7 @@ grtcairoGetCursorRootPos (mw, p) Window win1, win2; if (mw == (MagWindow *)NULL) mw = tcairoCurrent.mw; - + XQueryPointer(grXdpy, Tk_WindowId((Tk_Window)(mw->w_grdata)), &win1, &win2, &x1, &y1, &x, &y, &buttons); diff --git a/graphics/cairo_new/grTCairo5.c b/graphics/cairo_new/grTCairo5.c index 464b9b72..2f1de6eb 100644 --- a/graphics/cairo_new/grTCairo5.c +++ b/graphics/cairo_new/grTCairo5.c @@ -29,7 +29,7 @@ extern Display *grXdpy; extern int grXscrn; extern HashTable grTCairoWindowTable; - + /* * ---------------------------------------------------------------------------- * GrTCairoDrawGlyph -- @@ -165,7 +165,7 @@ Point *p; /* screen pos of lower left corner */ } } - + /* * ---------------------------------------------------------------------------- * GrTCairoSetCursor: diff --git a/graphics/cairo_orig/grTCairo1.c b/graphics/cairo_orig/grTCairo1.c index b632b984..c5866500 100644 --- a/graphics/cairo_orig/grTCairo1.c +++ b/graphics/cairo_orig/grTCairo1.c @@ -73,7 +73,7 @@ extern int GrTCairoWindowId(); extern char *GrTkWindowName(); extern void tcairoSetProjection(); - + /*--------------------------------------------------------- * grtcairoSetWMandC: * This is a local routine that resets the value of the current @@ -116,7 +116,7 @@ int c; /* New value for current color */ oldMask = mask; } - + /*--------------------------------------------------------- * grtcairoSetLineStyle: * This local routine sets the current line style. @@ -136,7 +136,7 @@ int style; /* New stipple pattern for lines. */ // unimplemented for cairo } - + /*--------------------------------------------------------- * grtcairoSetSPattern: * tcairoSetSPattern associates a stipple pattern with a given @@ -181,7 +181,7 @@ int numstipples; /* Number of stipples */ } } - + /*--------------------------------------------------------- * grtcairoSetStipple: * This routine sets the Xs current stipple number. @@ -214,7 +214,7 @@ int stipple; /* The stipple number to be used. */ } } - + /*------------------------------------------------------------------------ * GrTCairoInit: * GrTCairoInit initializes the graphics display and clears its screen. @@ -283,7 +283,7 @@ GrTCairoInit () return grTkLoadFont(); } - + /*--------------------------------------------------------- * GrTCairoClose: * @@ -304,7 +304,7 @@ GrTCairoClose () /* do XCloseDisplay() */ } - + /*--------------------------------------------------------- * GrTCairoFlush: * Flush output to display. @@ -348,7 +348,7 @@ int llx, lly, width, height; cairo_scale(grCairoContext, 1.0, -1.0); } - + /* * --------------------------------------------------------------------------- * @@ -794,7 +794,7 @@ keys_and_buttons: } } - + /*--------------------------------------------------------- * cairoSetDisplay: @@ -916,7 +916,7 @@ char *mouseFileName; } extern void MakeWindowCommand(); - + /* * ---------------------------------------------------------------------------- * @@ -1067,7 +1067,7 @@ char *name; return 0; } - + /* * ---------------------------------------------------------------------------- * @@ -1097,7 +1097,7 @@ MagWindow *w; Tcl_DeleteCommand(magicinterp, Tk_PathName(xw)); Tk_DestroyWindow(xw); } - + /* * ---------------------------------------------------------------------------- * @@ -1124,7 +1124,7 @@ MagWindow *w; w->w_frameArea.r_xtop - w->w_frameArea.r_xbot, w->w_frameArea.r_ytop - w->w_frameArea.r_ybot); } - + /* * ---------------------------------------------------------------------------- * @@ -1152,7 +1152,7 @@ MagWindow *w; tkwind = (Tk_Window)w->w_grdata; Tk_RestackWindow(tkwind, Above, NULL); } - + /* * ---------------------------------------------------------------------------- * @@ -1180,7 +1180,7 @@ MagWindow *w; tkwind = (Tk_Window)w->w_grdata; Tk_RestackWindow(tkwind, Below, NULL); } - + /* * ---------------------------------------------------------------------------- @@ -1226,7 +1226,7 @@ bool flag; w->w_allArea.r_ytop - w->w_allArea.r_ybot); } } - + /* * ---------------------------------------------------------------------------- * @@ -1251,7 +1251,7 @@ MagWindow *w; GrTCairoFlush(); grSimpleUnlock(w); } - + /* *------------------------------------------------------------------------- diff --git a/graphics/cairo_orig/grTCairo2.c b/graphics/cairo_orig/grTCairo2.c index d1c37fd3..450190d2 100644 --- a/graphics/cairo_orig/grTCairo2.c +++ b/graphics/cairo_orig/grTCairo2.c @@ -32,7 +32,7 @@ extern Display *grXdpy; extern cairo_t *grCairoContext; extern cairo_surface_t *grCairoSurface; extern cairo_pattern_t *currentStipple; - + /*--------------------------------------------------------- * GrTCairoSetCMap -- * @@ -85,7 +85,7 @@ int nb; // cairo_set_line_width(grCairoContext, width); cairo_stroke(grCairoContext); } - + /*--------------------------------------------------------- * grtcairoDrawLine: * This routine draws a line. @@ -124,7 +124,7 @@ int x2, y2; /* Screen coordinates of second point. */ grtcairoNbDiagonal++; } } - + /*--------------------------------------------------------- * grtcairoFillRects: * This routine draws a bunch of solid rectangles. @@ -145,7 +145,7 @@ int nb; for (i = 0; i < nb; i++) { - cairo_rectangle(grCairoContext, + cairo_rectangle(grCairoContext, rects[i].r_ll.p_x, rects[i].r_ll.p_y, rects[i].r_ur.p_x-rects[i].r_ll.p_x, rects[i].r_ur.p_y-rects[i].r_ll.p_y); // TxPrintf("%d %d %d %d \n", rects[i].r_ll.p_x, rects[i].r_ll.p_y, rects[i].r_ur.p_x-rects[i].r_ll.p_x, rects[i].r_ur.p_y-rects[i].r_ll.p_y); @@ -153,7 +153,7 @@ int nb; cairo_clip(grCairoContext); cairo_mask(grCairoContext, currentStipple); } - + /*--------------------------------------------------------- * grtcairoFillRect: * This routine draws a solid rectangle. diff --git a/graphics/cairo_orig/grTCairo3.c b/graphics/cairo_orig/grTCairo3.c index dbea19af..d86d3f0f 100644 --- a/graphics/cairo_orig/grTCairo3.c +++ b/graphics/cairo_orig/grTCairo3.c @@ -40,7 +40,7 @@ static GC grXcopyGC = (GC)NULL; /* locals */ - + /*--------------------------------------------------------- * grtcairoDrawGrid: * grxDrawGrid adds a grid to the grid layer, using the current @@ -105,7 +105,7 @@ Rect *clip; /* a clipping rectangle */ return TRUE; } - + /*--------------------------------------------------------- * grtcairoLoadFont * This local routine loads the default ("toy API") @@ -124,7 +124,7 @@ grtcairoLoadFont() return TRUE; } - + /*--------------------------------------------------------- * grtcairoSetCharSize: * This local routine sets the character size in the display, @@ -164,7 +164,7 @@ int size; /* Width of characters, in pixels (6 or 8). */ } } - + /* * ---------------------------------------------------------------------------- * GrTCairoTextSize -- @@ -408,13 +408,13 @@ grtcairoPutBackingStore(MagWindow *w, Rect *area) cairo_rectangle(tempContext, xbot, ybot, width, height); cairo_set_operator(tempContext, CAIRO_OPERATOR_SOURCE); cairo_fill(tempContext); - + // cairo_surface_flush(backingStoreSurface); // w->w_backingStore = (ClientData) cairo_image_surface_get_data(backingStoreSurface); // cairo_surface_mark_dirty(backingStoreSurface); } - + /* * ---------------------------------------------------------------------------- * GrTCairoReadPixel -- @@ -438,7 +438,7 @@ int x, y; /* the location of a pixel in screen coords */ return 0; /* (unimplemented) */ } - + /* * ---------------------------------------------------------------------------- * GrTCairoBitBlt -- diff --git a/graphics/cairo_orig/grTCairo4.c b/graphics/cairo_orig/grTCairo4.c index 37c5e857..efdd95a4 100644 --- a/graphics/cairo_orig/grTCairo4.c +++ b/graphics/cairo_orig/grTCairo4.c @@ -28,14 +28,14 @@ extern Display *grXdpy; - + /*--------------------------------------------------------- * GrTCairoDisableTablet: * Turns off the cursor. * * Results: None. * - * Side Effects: None. + * Side Effects: None. *--------------------------------------------------------- */ @@ -45,12 +45,12 @@ GrTCairoDisableTablet () /* (Unimplemented) */ } - + /*--------------------------------------------------------- * GrTCairoEnableTablet: * This routine enables the graphics tablet. * - * Results: + * Results: * None. * * Side Effects: @@ -64,7 +64,7 @@ GrTCairoEnableTablet () /* (Unimplemented) */ } - + /* * ---------------------------------------------------------------------------- * grtcairoGetCursorPos: @@ -90,7 +90,7 @@ grtcairoGetCursorPos (mw, p) Window win1, win2; if (mw == (MagWindow *)NULL) mw = tcairoCurrent.mw; - + XQueryPointer(grXdpy, Tk_WindowId((Tk_Window)(mw->w_grdata)), &win1, &win2, &x1, &y1, &x, &y, &buttons); @@ -126,7 +126,7 @@ grtcairoGetCursorRootPos (mw, p) Window win1, win2; if (mw == (MagWindow *)NULL) mw = tcairoCurrent.mw; - + XQueryPointer(grXdpy, Tk_WindowId((Tk_Window)(mw->w_grdata)), &win1, &win2, &x1, &y1, &x, &y, &buttons); diff --git a/graphics/cairo_orig/grTCairo5.c b/graphics/cairo_orig/grTCairo5.c index dc55060b..88ba9a64 100644 --- a/graphics/cairo_orig/grTCairo5.c +++ b/graphics/cairo_orig/grTCairo5.c @@ -30,7 +30,7 @@ extern int grXscrn; extern HashTable grTCairoWindowTable; extern cairo_t *grCairoContext; - + /* * ---------------------------------------------------------------------------- * GrTCairoDrawGlyph -- @@ -166,7 +166,7 @@ Point *p; /* screen pos of lower left corner */ } } - + /* * ---------------------------------------------------------------------------- * GrTCairoSetCursor: diff --git a/graphics/glyphs.h b/graphics/glyphs.h index 9b045921..af101c8d 100644 --- a/graphics/glyphs.h +++ b/graphics/glyphs.h @@ -4,16 +4,16 @@ * * Data structures to hold glyphs. * - * ********************************************************************* - * * Copyright (C) 1985, 1990 Regents of the University of California. * - * * Permission to use, copy, modify, and distribute this * - * * software and its documentation for any purpose and without * - * * fee is hereby granted, provided that the above copyright * - * * notice appear in all copies. The University of California * - * * makes no representations about the suitability of this * - * * software for any purpose. It is provided "as is" without * - * * express or implied warranty. Export of this software outside * - * * of the United States of America may require an export license. * + * ********************************************************************* + * * Copyright (C) 1985, 1990 Regents of the University of California. * + * * Permission to use, copy, modify, and distribute this * + * * software and its documentation for any purpose and without * + * * fee is hereby granted, provided that the above copyright * + * * notice appear in all copies. The University of California * + * * makes no representations about the suitability of this * + * * software for any purpose. It is provided "as is" without * + * * express or implied warranty. Export of this software outside * + * * of the United States of America may require an export license. * * ********************************************************************* * * @@ -41,7 +41,7 @@ typedef struct GR_GLY2 { typedef struct GR_GLY3 { int gr_num; /* The number of glyphs in this record. */ - GrGlyph *gr_glyph[1]; /* Will be big enough to hold as many glyphs as + GrGlyph *gr_glyph[1]; /* Will be big enough to hold as many glyphs as * we have. */ } GrGlyphs; diff --git a/graphics/grCMap.c b/graphics/grCMap.c index 905175d0..b60b5b86 100644 --- a/graphics/grCMap.c +++ b/graphics/grCMap.c @@ -1,15 +1,15 @@ /* grCmap.c - * - * ********************************************************************* - * * Copyright (C) 1985, 1990 Regents of the University of California. * - * * Permission to use, copy, modify, and distribute this * - * * software and its documentation for any purpose and without * - * * fee is hereby granted, provided that the above copyright * - * * notice appear in all copies. The University of California * - * * makes no representations about the suitability of this * - * * software for any purpose. It is provided "as is" without * - * * express or implied warranty. Export of this software outside * - * * of the United States of America may require an export license. * + * ********************************************************************* + * * Copyright (C) 1985, 1990 Regents of the University of California. * + * * Permission to use, copy, modify, and distribute this * + * * software and its documentation for any purpose and without * + * * fee is hereby granted, provided that the above copyright * + * * notice appear in all copies. The University of California * + * * makes no representations about the suitability of this * + * * software for any purpose. It is provided "as is" without * + * * express or implied warranty. Export of this software outside * + * * of the United States of America may require an export license. * * ********************************************************************* * * This file provides routines that manipulate the color map on behalf @@ -38,7 +38,7 @@ static char rcsid[] __attribute__ ((unused)) = "$Header: /usr/cvsroot/magic-8.0/ static colorEntry *colorMap = NULL; /* Storage for the color map. */ int GrNumColors = 0; /* Number of colors */ - + /*----------------------------------------------------------------------------- * * GrResetCMap -- @@ -74,7 +74,7 @@ GrResetCMap() GrNumColors = 0; } - + /*----------------------------------------------------------------------------- * GrReadCmap: * @@ -137,7 +137,7 @@ char *libPath; /* a library search path */ f = PaOpen(fullName, "r", ".cmap", path, libPath, (char **) NULL); if (f == NULL) - { + { /* Check for original ".cmap1" file (prior to magic v. 7.2.27) */ f = PaOpen(fullName, "r", ".cmap1", path, libPath, (char **) NULL); if (f == NULL) @@ -221,7 +221,7 @@ char *libPath; /* a library search path */ return TRUE; } - + /*----------------------------------------------------------------------------- * GrSaveCMap * @@ -362,7 +362,7 @@ GrGetColor(color, red, green, blue) return TRUE; } - + /*----------------------------------------------------------------------------- * GrPutColor -- * modifies the color map values for a single layer spec. @@ -398,7 +398,7 @@ GrPutColor(color, red, green, blue) return TRUE; } - + /*----------------------------------------------------------------------------- * GrPutManyColors -- * @@ -425,7 +425,7 @@ GrPutManyColors(color, red, green, blue, opaqueBit) int color; /* A specification of colors to be modified. */ int red, green, blue; /* New intensity values. */ int opaqueBit; /* The opaque/transparent bit. It is assumed - * that the opaque layer colors or + * that the opaque layer colors or * transparent layer bits lie to the right * of the opaque/transparent bit. */ diff --git a/graphics/grClip.c b/graphics/grClip.c index fa3204eb..7631ba75 100644 --- a/graphics/grClip.c +++ b/graphics/grClip.c @@ -1,15 +1,15 @@ /* grClip.c - * - * ********************************************************************* - * * Copyright (C) 1985, 1990 Regents of the University of California. * - * * Permission to use, copy, modify, and distribute this * - * * software and its documentation for any purpose and without * - * * fee is hereby granted, provided that the above copyright * - * * notice appear in all copies. The University of California * - * * makes no representations about the suitability of this * - * * software for any purpose. It is provided "as is" without * - * * express or implied warranty. Export of this software outside * - * * of the United States of America may require an export license. * + * ********************************************************************* + * * Copyright (C) 1985, 1990 Regents of the University of California. * + * * Permission to use, copy, modify, and distribute this * + * * software and its documentation for any purpose and without * + * * fee is hereby granted, provided that the above copyright * + * * notice appear in all copies. The University of California * + * * makes no representations about the suitability of this * + * * software for any purpose. It is provided "as is" without * + * * express or implied warranty. Export of this software outside * + * * of the United States of America may require an export license. * * ********************************************************************* * * This file contains additional functions to manipulate a @@ -100,7 +100,7 @@ GrSetStuff(style) * * Inform the driver about the last GrSetStuff call. * - * Results: + * Results: * None. * * Side Effects: @@ -119,7 +119,7 @@ grInformDriver() grDriverInformed = TRUE; } - + /* * ---------------------------------------------------------------------------- * grClipAgainst -- @@ -137,7 +137,7 @@ grInformDriver() void grClipAgainst(startllr, clip) - LinkedRect **startllr; /* A pointer to the pointer that heads + LinkedRect **startllr; /* A pointer to the pointer that heads * the list . */ Rect *clip; /* The rectangle to clip against */ @@ -152,7 +152,7 @@ grClipAgainst(startllr, clip) lr = *llr; *llr = lr->r_next; /* this will modify the list that we are traversing! */ - (void) GrDisjoint(&lr->r_r, clip, grClipAddFunc, + (void) GrDisjoint(&lr->r_r, clip, grClipAddFunc, (ClientData) &llr); freeMagic( (char *) lr); } @@ -166,7 +166,7 @@ grClipAgainst(startllr, clip) * our pointer into the list */ -bool grClipAddFunc(box, cd) +bool grClipAddFunc(box, cd) Rect *box; ClientData cd; { @@ -217,7 +217,7 @@ grObsBox(r) } } - + /*--------------------------------------------------------- * grClipPoints: * This routine computes the 0, 1, or 2 intersection points @@ -271,7 +271,7 @@ grClipPoints(line, box, p1, p1OK, p2, p2OK) dely = -dely; delyneg = TRUE; } - else + else delyneg = FALSE; /* we know that delx is nonnegative if this is a real (non-empty) line */ if (delx < 0) return FALSE; @@ -284,7 +284,7 @@ grClipPoints(line, box, p1, p1OK, p2, p2OK) else y1 += tmp; x1 = box->r_xbot; } - else + else if (x1 > box->r_xtop) return FALSE; if (x2 > box->r_xtop) @@ -295,7 +295,7 @@ grClipPoints(line, box, p1, p1OK, p2, p2OK) else y2 -= tmp; x2 = box->r_xtop; } - else + else if (x2 < box->r_xbot) return FALSE; if (y2 > y1) @@ -352,12 +352,12 @@ grClipPoints(line, box, p1, p1OK, p2, p2OK) ok2 = TRUE; } /* is part of the line in the box? */ - return ok1 || ok2 || + return ok1 || ok2 || ((x1 >= box->r_xbot) && (x1 <= box->r_xtop) && (y1 >= box->r_ybot) && (y1 <= box->r_ytop)); } - + #define NEWAREA(lr,x1,y1,x2,y2) {LinkedRect *tmp; \ tmp = (LinkedRect *) mallocMagic((unsigned) (sizeof (LinkedRect))); \ tmp->r_r.r_xbot = x1; tmp->r_r.r_xtop = x2; \ @@ -448,13 +448,13 @@ GrClipLine(x1, y1, x2, y2) goto deleteit; } - if (ok1 && + if (ok1 && ( ((l->r_xbot == p1.p_x) && (l->r_ybot == p1.p_y)) || ((l->r_xtop == p1.p_x) && (l->r_ytop == p1.p_y)) ) ) { ok1 = FALSE; /* do not split or clip at an endpoint */ } - if (ok2 && + if (ok2 && ( ((l->r_xbot == p2.p_x) && (l->r_ybot == p2.p_y)) || ((l->r_xtop == p2.p_x) && (l->r_ytop == p2.p_y)) ) ) { @@ -824,14 +824,14 @@ GrBox(MagWindow *mw, Transform *trans, Tile *tile) GrClipTriangle(&fullr, &clipr, needClip, dinfo, polyp, &np); - if ((grCurFill == GR_STSOLID) || + if ((grCurFill == GR_STSOLID) || (grCurFill == GR_STSTIPPLE) || (grCurFill == GR_STGRID) ) { if (needObscure) grObsBox(&clipr); else if (grFillPolygonPtr) (void) (*grFillPolygonPtr)(polyp, np); - } + } } else { @@ -848,7 +848,7 @@ GrBox(MagWindow *mw, Transform *trans, Tile *tile) grObsBox(&clipr); else (void) (*grFillRectPtr)(&clipr); - } + } } /* return if outline is too small to be worth drawing */ @@ -970,7 +970,7 @@ GrBox(MagWindow *mw, Transform *trans, Tile *tile) * Usually this is called as GrFastBox, defined as GrDrawFastBox(p, 0). * The "scale" is only used to reduce the size of crosses drawn at * point positions, to prevent point labels from dominating a layout - * in top-level views. + * in top-level views. * * Results: None. * @@ -1018,7 +1018,7 @@ GrDrawFastBox(prect, scale) needObscure |= GEO_TOUCH(r, &(ob->r_r)); /* do solid areas */ - if ( (grCurFill == GR_STSOLID) || + if ( (grCurFill == GR_STSOLID) || (grCurFill == GR_STSTIPPLE) || (grCurFill == GR_STGRID) ) { Rect clipr; @@ -1035,7 +1035,7 @@ GrDrawFastBox(prect, scale) else (void) (*grFillRectPtr)(&clipr); } - } + } /* return if rectangle is too small to see */ if ((r->r_xtop - r->r_xbot < GR_THRESH) @@ -1060,7 +1060,7 @@ GrDrawFastBox(prect, scale) } /* turn the outline into a cross */ - if (needClip || needObscure) + if (needClip || needObscure) goto clipit; else { @@ -1078,7 +1078,7 @@ GrDrawFastBox(prect, scale) for (ob = grCurObscure; ob != NULL; ob = ob->r_next) crossObscure |= GEO_TOUCH(&crossBox, &(ob->r_r)); - if (crossClip || crossObscure) + if (crossClip || crossObscure) goto clipit; else goto noclipit; @@ -1098,7 +1098,7 @@ GrDrawFastBox(prect, scale) r->r_xtop + crossSize - 1 + GrPixelCorrect, r->r_ytop); endit: ; - } + } else { if (needClip || needObscure) @@ -1190,7 +1190,7 @@ GrClipTriangle(r, c, clipped, dinfo, points, np) *np = 3; /* Clip the triangle to the clipping rectangle. Result is */ - /* a 3- to 5-sided polygon, or empty. */ + /* a 3- to 5-sided polygon, or empty. */ if (clipped) { @@ -1426,11 +1426,11 @@ GrDrawTriangleEdge(r, dinfo) GrClipTriangle(r, &grCurClip, TRUE, dinfo, tpoints, &tnum); for (i = 0; i < tnum; i++) - { + { j = (i + 1) % tnum; - if (tpoints[i].p_x != tpoints[j].p_x && + if (tpoints[i].p_x != tpoints[j].p_x && tpoints[i].p_y != tpoints[j].p_y) - { + { GrClipLine(tpoints[i].p_x, tpoints[i].p_y, tpoints[j].p_x, tpoints[j].p_y); break; @@ -1501,18 +1501,18 @@ GrDiagonal(prect, dinfo) GrClipTriangle(&fullr, &clipr, needClip, dinfo, polyp, &np); /* do solid areas */ - if ( (grCurFill == GR_STSOLID) || + if ( (grCurFill == GR_STSOLID) || (grCurFill == GR_STSTIPPLE) || (grCurFill == GR_STGRID) ) { if (needObscure) grObsBox(&clipr); else if (grFillPolygonPtr) (void) (*grFillPolygonPtr)(polyp, np); - } + } /* return if rectangle is too small to see */ - if ((r->r_xtop - r->r_xbot < GR_THRESH) && + if ((r->r_xtop - r->r_xbot < GR_THRESH) && (r->r_ytop - r->r_ybot < GR_THRESH) && (grCurFill != GR_STOUTLINE)) return; @@ -1548,7 +1548,7 @@ GrFillPolygon(polyp, np) } } - + /*--------------------------------------------------------- * GrClipBox: * GrClipBox will draw a rectangle on the screen in one @@ -1574,7 +1574,7 @@ GrClipBox(prect, style) GrFastBox(prect); } - + /* * ---------------------------------------------------------------------------- * GrDisjoint -- @@ -1625,7 +1625,7 @@ GrDisjoint(area, clipBox, func, cdarg) * into one piece that is DEFINITELY outside clipBox, and one * piece left to check some more. */ - + /* Top edge of clipBox: */ rArea = *area; diff --git a/graphics/grDStyle.c b/graphics/grDStyle.c index 04b5da1d..badcefd7 100644 --- a/graphics/grDStyle.c +++ b/graphics/grDStyle.c @@ -2,16 +2,16 @@ * * Parse and read in the display style file. * - * ********************************************************************* - * * Copyright (C) 1985, 1990 Regents of the University of California. * - * * Permission to use, copy, modify, and distribute this * - * * software and its documentation for any purpose and without * - * * fee is hereby granted, provided that the above copyright * - * * notice appear in all copies. The University of California * - * * makes no representations about the suitability of this * - * * software for any purpose. It is provided "as is" without * - * * express or implied warranty. Export of this software outside * - * * of the United States of America may require an export license. * + * ********************************************************************* + * * Copyright (C) 1985, 1990 Regents of the University of California. * + * * Permission to use, copy, modify, and distribute this * + * * software and its documentation for any purpose and without * + * * fee is hereby granted, provided that the above copyright * + * * notice appear in all copies. The University of California * + * * makes no representations about the suitability of this * + * * software for any purpose. It is provided "as is" without * + * * express or implied warranty. Export of this software outside * + * * of the United States of America may require an export license. * * ********************************************************************* * * Portions of this code are Copyright (C) 2003 Open Circuit Design, Inc., @@ -51,7 +51,7 @@ extern void (*grDefineCursorPtr)(); /* Define a linked-list record to keep track of styles prior */ /* to allocating the fixed array GrStyleTable. */ -typedef struct _dstylelink { +typedef struct _dstylelink { GR_STYLE_LINE style; char shortname; struct _dstylelink *next; @@ -76,7 +76,7 @@ char *fillStyles[] = { "grid", NULL }; - + /* Internal constants for each section of the style file. */ /* These are bitmask-mapped so the display style reader */ @@ -96,7 +96,7 @@ char *fillStyles[] = { int GrStyleNames[128]; /* short names for styles */ GR_STYLE_LINE *GrStyleTable; - + bool GrDrawGlyphNum(num, xoff, yoff) @@ -139,7 +139,7 @@ GrGetStyleFromName(stylename) for (style = 0; style < maxstyles; style++) if (GrStyleTable[style].longname != NULL) if (!strcmp(stylename, GrStyleTable[style].longname)) - break; + break; return (style == maxstyles) ? -1 : style; } @@ -177,7 +177,7 @@ GrResetStyles() DBWNumStyles = 0; } - + /* * ---------------------------------------------------------------------------- * styleBuildDisplayStyle: @@ -257,7 +257,7 @@ styleBuildDisplayStyle(line, version) return(res); } - + /* * ---------------------------------------------------------------------------- * styleBuildStippleStyle: @@ -289,8 +289,8 @@ styleBuildStipplesStyle(line, version) res = TRUE; if (sscanf(line, scanline, - &ord, &(row[0]), &(row[1]), &(row[2]), &(row[3]), - &(row[4]), &(row[5]), &(row[6]), &(row[7]) ) != 9) + &ord, &(row[0]), &(row[1]), &(row[2]), &(row[3]), + &(row[4]), &(row[5]), &(row[6]), &(row[7]) ) != 9) { res = FALSE; } @@ -328,7 +328,7 @@ styleBuildStipplesStyle(line, version) return(res); } - + /* * ---------------------------------------------------------------------------- * GrLoadCursors -- @@ -366,13 +366,13 @@ char *libPath; if (grDefineCursorPtr == NULL) TxError("Display does not have a programmable cursor.\n"); - else + else (*grDefineCursorPtr)(grCursorGlyphs); - return TRUE; + return TRUE; } - + /* * ---------------------------------------------------------------------------- * GrLoadStyles: @@ -445,7 +445,7 @@ char *libPath; { sres = fgets(line, STRLEN, inp); if (sres == NULL) break; - if (StrIsWhite(line, FALSE)) + if (StrIsWhite(line, FALSE)) newSection = TRUE; else if (line[0] == '#') { @@ -455,7 +455,7 @@ char *libPath; { if (sscanf(line, "%s", sectionName) != 1) { - TxError("File contained format error: " + TxError("File contained format error: " "unable to read section name.\n"); res = -1; } diff --git a/graphics/grGlyphs.c b/graphics/grGlyphs.c index 034f32f5..d9e879fe 100644 --- a/graphics/grGlyphs.c +++ b/graphics/grGlyphs.c @@ -3,16 +3,16 @@ * * Handle glyphs -- reading and display. * - * ********************************************************************* - * * Copyright (C) 1985, 1990 Regents of the University of California. * - * * Permission to use, copy, modify, and distribute this * - * * software and its documentation for any purpose and without * - * * fee is hereby granted, provided that the above copyright * - * * notice appear in all copies. The University of California * - * * makes no representations about the suitability of this * - * * software for any purpose. It is provided "as is" without * - * * express or implied warranty. Export of this software outside * - * * of the United States of America may require an export license. * + * ********************************************************************* + * * Copyright (C) 1985, 1990 Regents of the University of California. * + * * Permission to use, copy, modify, and distribute this * + * * software and its documentation for any purpose and without * + * * fee is hereby granted, provided that the above copyright * + * * notice appear in all copies. The University of California * + * * makes no representations about the suitability of this * + * * software for any purpose. It is provided "as is" without * + * * express or implied warranty. Export of this software outside * + * * of the United States of America may require an export license. * * ********************************************************************* */ @@ -38,7 +38,7 @@ static char rcsid[] __attribute__ ((unused)) = "$Header: /usr/cvsroot/magic-8.0/ extern void (*grFreeCursorPtr)(); - + /* * ---------------------------------------------------------------------------- * GrFreeGlyphs -- @@ -76,7 +76,7 @@ GrFreeGlyphs(g) freeMagic( (char *) g); } - + /* * ---------------------------------------------------------------------------- * GrReadGlyphs -- @@ -97,7 +97,7 @@ bool GrReadGlyphs(filename, path, libPath, gl) char *filename; char *path, *libPath; /* paths to search in for the file */ - GrGlyphs **gl; /* To be filled in with a malloc'ed structure + GrGlyphs **gl; /* To be filled in with a malloc'ed structure * This structure must be freed by the caller * if it is not to live forever. */ @@ -148,7 +148,7 @@ GrReadGlyphs(filename, path, libPath, gl) glyphnum++; if (glyphnum > glyphnummax) { - TxError("Extra lines at end of glyph file '%s'\n", + TxError("Extra lines at end of glyph file '%s'\n", fullname); result = TRUE; goto endit; @@ -168,7 +168,7 @@ GrReadGlyphs(filename, path, libPath, gl) result = FALSE; goto endit; } - ourgl->gr_glyph[glyphnum]->gr_pixels[x + (xmax+1) * y] = + ourgl->gr_glyph[glyphnum]->gr_pixels[x + (xmax+1) * y] = GrStyleNames[ (*cp) & 127 ]; cp++; @@ -184,7 +184,7 @@ GrReadGlyphs(filename, path, libPath, gl) cp++; if ((trailingChar == '\0') || (*cp == '\0')) { - TxError("Error in glyph file '%s', %s\n ", + TxError("Error in glyph file '%s', %s\n ", fullname, "line is too short."); TxError("Line in error is '%s'\n", line); result = FALSE; @@ -196,7 +196,7 @@ GrReadGlyphs(filename, path, libPath, gl) else { int i; - if (sscanf(line, "size %d %d %d\n", + if (sscanf(line, "size %d %d %d\n", &glyphnummax, &xmax, &ymax) != 3) { TxError("Format error in file '%s'\n", fullname); @@ -210,7 +210,7 @@ GrReadGlyphs(filename, path, libPath, gl) glyphnum = 0; x = 0; y = ymax + 1; - ourgl = (GrGlyphs *) mallocMagic((unsigned) (sizeof(GrGlyphs) + + ourgl = (GrGlyphs *) mallocMagic((unsigned) (sizeof(GrGlyphs) + ((glyphnummax + 1) * sizeof(GrGlyph *))) ); ourgl->gr_num = glyphnummax + 1; for (i = 0; i <= glyphnummax; i++) diff --git a/graphics/grLock.c b/graphics/grLock.c index 747d8efb..626cd095 100644 --- a/graphics/grLock.c +++ b/graphics/grLock.c @@ -1,15 +1,15 @@ /* grLock.c - * - * ********************************************************************* - * * Copyright (C) 1985, 1990 Regents of the University of California. * - * * Permission to use, copy, modify, and distribute this * - * * software and its documentation for any purpose and without * - * * fee is hereby granted, provided that the above copyright * - * * notice appear in all copies. The University of California * - * * makes no representations about the suitability of this * - * * software for any purpose. It is provided "as is" without * - * * express or implied warranty. Export of this software outside * - * * of the United States of America may require an export license. * + * ********************************************************************* + * * Copyright (C) 1985, 1990 Regents of the University of California. * + * * Permission to use, copy, modify, and distribute this * + * * software and its documentation for any purpose and without * + * * fee is hereby granted, provided that the above copyright * + * * notice appear in all copies. The University of California * + * * makes no representations about the suitability of this * + * * software for any purpose. It is provided "as is" without * + * * express or implied warranty. Export of this software outside * + * * of the United States of America may require an export license. * * ********************************************************************* * * This file contains information related to the locking of windows. @@ -93,7 +93,7 @@ grWindName(w) void grSimpleLock(w, inside) - MagWindow *w; /* The window to lock, or GR_LOCK_SCREEN if the + MagWindow *w; /* The window to lock, or GR_LOCK_SCREEN if the * whole screen. */ bool inside; /* If TRUE, clip to inside of window, otherwise clip @@ -109,7 +109,7 @@ grSimpleLock(w, inside) } else { if (grLockedWindow != NULL) { TxError("Magic error: Attempt to lock more than one window!\n"); - TxError("Currently locked window is: '%s'\n", + TxError("Currently locked window is: '%s'\n", grWindName(grLockedWindow)); TxError("Window to be locked is: '%s'\n", grWindName(w)); /* dump core here */ @@ -135,7 +135,7 @@ grSimpleUnlock(w) if (grTraceLocks) TxError("--- Unlock %s\n", grWindName(w)); if (w != grLockedWindow) { TxError("Magic error: Attempt to unlock a window that wasn't locked\n"); - TxError("Currently locked window is: '%s'\n", + TxError("Currently locked window is: '%s'\n", grWindName(grLockedWindow)); TxError("Window to be unlocked is: '%s'\n", grWindName(w)); /* dump core here */ diff --git a/graphics/grMain.c b/graphics/grMain.c index ad2c5b8b..286e39cd 100644 --- a/graphics/grMain.c +++ b/graphics/grMain.c @@ -1,15 +1,15 @@ /* grMain.c - * - * ********************************************************************* - * * Copyright (C) 1985, 1990 Regents of the University of California. * - * * Permission to use, copy, modify, and distribute this * - * * software and its documentation for any purpose and without * - * * fee is hereby granted, provided that the above copyright * - * * notice appear in all copies. The University of California * - * * makes no representations about the suitability of this * - * * software for any purpose. It is provided "as is" without * - * * express or implied warranty. Export of this software outside * - * * of the United States of America may require an export license. * + * ********************************************************************* + * * Copyright (C) 1985, 1990 Regents of the University of California. * + * * Permission to use, copy, modify, and distribute this * + * * software and its documentation for any purpose and without * + * * fee is hereby granted, provided that the above copyright * + * * notice appear in all copies. The University of California * + * * makes no representations about the suitability of this * + * * software for any purpose. It is provided "as is" without * + * * express or implied warranty. Export of this software outside * + * * of the United States of America may require an export license. * * ********************************************************************* * * This file contains a few core variables and routines for @@ -45,7 +45,7 @@ static char rcsid[] __attribute__ ((unused)) = "$Header: /usr/cvsroot/magic-8.0/ * the table 'grDisplayTypes' and then add a pointer to an initialization * routine to 'grInitProcs'. The initialization routine will fill in all * of the graphics routine pointers so that they point to procedures that - * can handle the new display type. All calls to device-specific + * can handle the new display type. All calls to device-specific * procedures are made by indirecting through these pointers. */ @@ -98,7 +98,7 @@ global unsigned char GrDisplayStatus = DISPLAY_IDLE; static char *grDisplayTypes[] = { #ifdef X11 "XWIND", - "X11", + "X11", "8BIT", "16BIT", "24BIT", @@ -122,11 +122,11 @@ extern bool cairoSetDisplay(); static bool (*(grInitProcs[]))() = { #ifdef X11 - x11SetDisplay, - x11SetDisplay, - x11SetDisplay, - x11SetDisplay, - x11SetDisplay, + x11SetDisplay, + x11SetDisplay, + x11SetDisplay, + x11SetDisplay, + x11SetDisplay, #endif /* X11 */ #ifdef OGL oglSetDisplay, @@ -220,7 +220,7 @@ extern void grNullProc(); void (*GrStopPtr)() = grNullProc; void (*GrResumePtr)() = grNullProc; - + /*--------------------------------------------------------- * GrSetDisplay -- * This routine sets a display type, opens files, and initializes the @@ -228,7 +228,7 @@ void (*GrResumePtr)() = grNullProc; * * Results: * TRUE is returned if the display was found and initialized - * successfully. If the type didn't register, or the file is + * successfully. If the type didn't register, or the file is * NULL, then FALSE is returned. * * Side Effects: @@ -241,9 +241,9 @@ void (*GrResumePtr)() = grNullProc; bool GrSetDisplay(type, outName, mouseName) char *type; /* Name of the display type. */ -char *outName; /* Filename used for communciation with +char *outName; /* Filename used for communciation with * display. */ -char *mouseName; /* Filename used for communciation +char *mouseName; /* Filename used for communciation * with tablet. */ { @@ -252,7 +252,7 @@ char *mouseName; /* Filename used for communciation int i; bool res; - if (outName == NULL) + if (outName == NULL) { TxError("No graphics device specified.\n"); return FALSE; @@ -294,7 +294,7 @@ char *mouseName; /* Filename used for communciation /* Call the initialization procedure. */ res = (*(grInitProcs[i]))(type, outName, mouseName); - if (!res) + if (!res) { TxError("The graphics display couldn't be correctly initialized.\n"); TxError("Use '-d NULL' if you don't need graphics.\n"); @@ -357,7 +357,7 @@ GrIsDisplay(disp1, disp2) return FALSE; } - + /* * ---------------------------------------------------------------------------- * GrGuessDisplayType -- @@ -421,13 +421,13 @@ GrGuessDisplayType(graphics, mouse, display, monitor) } } - + /* * ---------------------------------------------------------------------------- * grFgets -- * * Just like fgets, except that it times out after 20 seconds, and prints - * a warning message. After one second a warning message is also + * a warning message. After one second a warning message is also * printed. * * Results: @@ -449,9 +449,9 @@ grFgets(str, n, stream, name) char *newstr; struct timeval threeSec, twentySecs; - threeSec.tv_sec = 3; + threeSec.tv_sec = 3; threeSec.tv_usec = 0; - twentySecs.tv_sec = 20; + twentySecs.tv_sec = 20; twentySecs.tv_usec = 0; FD_ZERO(&fn); @@ -527,7 +527,7 @@ grFgets(str, n, stream, name) * Used when we need to point a procedure pointer to something, but * don't want it to do anything. * - * Results: + * Results: * None. * * Side Effects: diff --git a/graphics/grNull.c b/graphics/grNull.c index d9bfe8f3..6451a4e7 100644 --- a/graphics/grNull.c +++ b/graphics/grNull.c @@ -1,16 +1,16 @@ /* * grNull.c - * - * ********************************************************************* - * * Copyright (C) 1985, 1990 Regents of the University of California. * - * * Permission to use, copy, modify, and distribute this * - * * software and its documentation for any purpose and without * - * * fee is hereby granted, provided that the above copyright * - * * notice appear in all copies. The University of California * - * * makes no representations about the suitability of this * - * * software for any purpose. It is provided "as is" without * - * * express or implied warranty. Export of this software outside * - * * of the United States of America may require an export license. * + * ********************************************************************* + * * Copyright (C) 1985, 1990 Regents of the University of California. * + * * Permission to use, copy, modify, and distribute this * + * * software and its documentation for any purpose and without * + * * fee is hereby granted, provided that the above copyright * + * * notice appear in all copies. The University of California * + * * makes no representations about the suitability of this * + * * software for any purpose. It is provided "as is" without * + * * express or implied warranty. Export of this software outside * + * * of the United States of America may require an export license. * * ********************************************************************* * * This file contains dummy functions for use when there is no @@ -40,7 +40,7 @@ static char rcsid[] __attribute__ ((unused)) = "$Header: /usr/cvsroot/magic-8.0/ extern bool nullReturnFalse(); extern void nullDoNothing(); extern int nullReturnZero(); - + /* *--------------------------------------------------------- * @@ -61,7 +61,7 @@ void nullDoNothing() { } - + /* *--------------------------------------------------------- * @@ -83,7 +83,7 @@ nullReturnFalse() { return (FALSE); } - + /* *--------------------------------------------------------- * @@ -105,7 +105,7 @@ nullReturnZero() { return (0); } - + /* *--------------------------------------------------------- * @@ -127,13 +127,13 @@ NullInit() { return TRUE; } - + /* * ---------------------------------------------------------------------------- * * NullTextSize -- * - * Determine the size of a text string. + * Determine the size of a text string. * * Results: * None. @@ -219,7 +219,7 @@ NullBitBlt() { } - + /* *--------------------------------------------------------- * diff --git a/graphics/grOGL1.c b/graphics/grOGL1.c index ec856bb2..a8eeef47 100644 --- a/graphics/grOGL1.c +++ b/graphics/grOGL1.c @@ -61,7 +61,7 @@ extern void GrOGLLock(), GrOGLUnlock(), GrOGLIconUpdate(); extern bool GrOGLInit(), GrOGLCreate(); extern void grOGLWStdin(); - + /*--------------------------------------------------------- * groglSetWMandC: * This is a local routine that resets the value of the current @@ -111,13 +111,13 @@ groglSetWMandC (mask, c) glEnable(GL_BLEND); glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA); } - glColor4f(fr, fb, fg, aval); + glColor4f(fr, fb, fg, aval); oldMask = mask; oldColor = c; } - + /*--------------------------------------------------------- * groglSetLineStyle: * This local routine sets the current line style. @@ -154,7 +154,7 @@ groglSetLineStyle (style) } } - + /*--------------------------------------------------------- * groglSetSPattern: * xSetSPattern associates stipple patterns with @@ -191,7 +191,7 @@ groglSetSPattern (sttable, numstipples) } } - + /*--------------------------------------------------------- * groglSetStipple: * This routine sets the Xs current stipple number. @@ -221,7 +221,7 @@ groglSetStipple (stipple) } } - + /*--------------------------------------------------------- * GrOGLInit: * GrOGLInit initializes the graphics display and clears its screen. @@ -247,7 +247,7 @@ GrOGLInit() grXdpy = XOpenDisplay(NULL); if (grXdpy == NULL) - { + { TxError("Couldn't open display; check DISPLAY variable\n"); return FALSE; } @@ -294,7 +294,7 @@ GrOGLInit() if (grVisualInfo != NULL) XFree(grVisualInfo); return groglPreLoadFont(); } - + /*--------------------------------------------------------- * GrOGLClose: * @@ -322,7 +322,7 @@ GrOGLClose() #endif } - + /*--------------------------------------------------------- * GrOGLFlush: * Flush output to display. @@ -506,7 +506,7 @@ pipehandler() screenRect.r_xtop = ConfigureEvent->x + width; screenRect.r_ybot = glTransYs(ConfigureEvent->y); screenRect.r_ytop = glTransYs(ConfigureEvent->y + height); - + SigDisableInterrupts(); /* Redraw the window */ @@ -568,7 +568,7 @@ pipehandler() WindScreenToSurface(mw, &screenRect, &surface); DBWHLRedrawPrepWindow(mw, &surface); WindDrawBorder(mw, &screenRect); - } + } else WindAreaChanged(mw, &screenRect); WindUpdate(mw); @@ -576,7 +576,7 @@ pipehandler() } break; case CreateNotify: { - + XAnyEvent *AnyEvent = (XAnyEvent *) &xevent; entry = HashLookOnly(&grOGLWindowTable, AnyEvent->window); @@ -614,7 +614,7 @@ oglSetDisplay (dispType, outFileName, mouseFileName) WindPackageType = WIND_X_WINDOWS; /* This works okay. */ grCursorType = "bw"; - + WindScrollBarWidth = 14; pipe(fildes); @@ -646,7 +646,7 @@ oglSetDisplay (dispType, outFileName, mouseFileName) else { fclose(f); } - + FORK(Xhelper); if (Xhelper == 0) { /* Child process */ char argv[2][100]; @@ -688,7 +688,7 @@ oglSetDisplay (dispType, outFileName, mouseFileName) GrConfigureWindowPtr = GrOGLConfigure; GrOverWindowPtr = GrOGLRaise; GrUnderWindowPtr = GrOGLLower; - GrUpdateIconPtr = GrOGLIconUpdate; + GrUpdateIconPtr = GrOGLIconUpdate; GrBitBltPtr = GrOGLBitBlt; GrFreeBackingStorePtr = groglFreeBackingStore; @@ -910,7 +910,7 @@ GrOGLDelete(w) XDestroyWindow(grXdpy, xw); } - + /* * ---------------------------------------------------------------------------- * @@ -958,7 +958,7 @@ GrOGLRaise(w) { XRaiseWindow(grXdpy, (Window) w->w_grdata ); } - + /* * ---------------------------------------------------------------------------- * @@ -981,7 +981,7 @@ GrOGLLower(w) { XLowerWindow(grXdpy, (Window) w->w_grdata ); } - + /* * ---------------------------------------------------------------------------- * @@ -1014,7 +1014,7 @@ GrOGLLock(w, flag) w->w_allArea.r_ytop - w->w_allArea.r_ybot); } } - + /* * ---------------------------------------------------------------------------- * @@ -1037,7 +1037,7 @@ GrOGLUnlock(w) GrOGLFlush(); grSimpleUnlock(w); } - + /* *------------------------------------------------------------------------- @@ -1059,7 +1059,7 @@ GrOGLIconUpdate(w,text) Window wind = (Window) w->w_grdata; XClassHint class; char *brack; - + if (w->w_grdata == (ClientData)NULL) return; class.res_name = "magic"; class.res_class = "magic"; diff --git a/graphics/grOGL2.c b/graphics/grOGL2.c index f94c938c..e1c98275 100644 --- a/graphics/grOGL2.c +++ b/graphics/grOGL2.c @@ -1,15 +1,15 @@ /* grOGL2.c - * - * ********************************************************************* - * * Copyright (C) 1985, 1990 Regents of the University of California. * - * * Permission to use, copy, modify, and distribute this * - * * software and its documentation for any purpose and without * - * * fee is hereby granted, provided that the above copyright * - * * notice appear in all copies. The University of California * - * * makes no representations about the suitability of this * - * * software for any purpose. It is provided "as is" without * - * * express or implied warranty. Export of this software outside * - * * of the United States of America may require an export license. * + * ********************************************************************* + * * Copyright (C) 1985, 1990 Regents of the University of California. * + * * Permission to use, copy, modify, and distribute this * + * * software and its documentation for any purpose and without * + * * fee is hereby granted, provided that the above copyright * + * * notice appear in all copies. The University of California * + * * makes no representations about the suitability of this * + * * software for any purpose. It is provided "as is" without * + * * express or implied warranty. Export of this software outside * + * * of the United States of America may require an export license. * * ********************************************************************* * * This file contains additional functions to manipulate an X @@ -34,9 +34,9 @@ char *getenv(); extern char *DBWStyleType; - + /* GROGLSetCMap (pmap) - * + * * OpenGL uses R,G,B values explicitly, so there is no * need to install or record colors in a colormap. * @@ -94,7 +94,7 @@ groglDrawLines(lines, nb) #endif } - + /*--------------------------------------------------------- * groglDrawLine: * This routine queues a line for batch drawing. @@ -121,7 +121,7 @@ groglDrawLine (x1, y1, x2, y2) groglNbLines++; } - + /*--------------------------------------------------------- * groglFillRects: * This routine draws a bunch of solid rectangles. @@ -147,14 +147,14 @@ groglFillRects(rects, nb) rects[i].r_ur.p_x, rects[i].r_ur.p_y); #else - + glVertexPointer(2, GL_INT, 0, (GLvoid *)rects); /* Use (nb << 2) because there are 4 vertices per rect */ glDrawArrays(GL_QUADS, 0, nb << 2); #endif } - + /*--------------------------------------------------------- * groglFillRect: * This routine queues a solid rectangle for batch drawing. @@ -183,12 +183,12 @@ groglFillRect(r) #ifndef OGL_SERVER_SIDE_ONLY groglRects[groglNbRects].r_ul.p_x = r->r_ll.p_x; groglRects[groglNbRects].r_ul.p_y = r->r_ur.p_y; - + groglRects[groglNbRects].r_lr.p_x = r->r_ur.p_x; groglRects[groglNbRects].r_lr.p_y = r->r_ll.p_y; #endif - - groglNbRects++; + + groglNbRects++; } /*--------------------------------------------------------- diff --git a/graphics/grOGL3.c b/graphics/grOGL3.c index 0fa0af08..acd4366d 100644 --- a/graphics/grOGL3.c +++ b/graphics/grOGL3.c @@ -1,19 +1,19 @@ /* grOGL3.c - * - * ********************************************************************* - * * Copyright (C) 1985, 1990 Regents of the University of California. * - * * Permission to use, copy, modify, and distribute this * - * * software and its documentation for any purpose and without * - * * fee is hereby granted, provided that the above copyright * - * * notice appear in all copies. The University of California * - * * makes no representations about the suitability of this * - * * software for any purpose. It is provided "as is" without * - * * express or implied warranty. Export of this software outside * - * * of the United States of America may require an export license. * + * ********************************************************************* + * * Copyright (C) 1985, 1990 Regents of the University of California. * + * * Permission to use, copy, modify, and distribute this * + * * software and its documentation for any purpose and without * + * * fee is hereby granted, provided that the above copyright * + * * notice appear in all copies. The University of California * + * * makes no representations about the suitability of this * + * * software for any purpose. It is provided "as is" without * + * * express or implied warranty. Export of this software outside * + * * of the United States of America may require an export license. * * ********************************************************************* * * This file contains additional functions to manipulate an X window system - * color display. Included here are device-dependent routines to draw and + * color display. Included here are device-dependent routines to draw and * erase text and draw a grid. * */ @@ -48,7 +48,7 @@ static XFontStruct *grXFonts[4]; GLuint grXBases[4]; - + /*--------------------------------------------------------- * groglDrawGrid: * groglDrawGrid adds a grid to the grid layer, using the current @@ -84,12 +84,12 @@ groglDrawGrid (prect, outline, clip) return FALSE; if (GRID_TOO_SMALL(xsize, ysize)) return FALSE; - + xstart = prect->r_xbot % xsize; while (xstart < clip->r_xbot << SUBPIXELBITS) xstart += xsize; ystart = prect->r_ybot % ysize; while (ystart < clip->r_ybot << SUBPIXELBITS) ystart += ysize; - + groglSetLineStyle(outline); glBegin(GL_LINES); @@ -120,7 +120,7 @@ groglDrawGrid (prect, outline, clip) return TRUE; } - + /*--------------------------------------------------------- * groglPreLoadFont * This local routine loads the X fonts used by Magic. @@ -170,7 +170,7 @@ groglPreLoadFont() return TRUE; } - + /*--------------------------------------------------------- * groglLoadFont * This local routine transfers the X font bitmaps @@ -206,7 +206,7 @@ groglLoadFont() return TRUE; } - + /*--------------------------------------------------------- * groglSetCharSize: * This local routine sets the character size in the display, @@ -246,12 +246,12 @@ groglSetCharSize (size) } } - + /* * ---------------------------------------------------------------------------- * GrOGLTextSize -- * - * Determine the size of a text string. + * Determine the size of a text string. * * Results: * None. @@ -272,7 +272,7 @@ GrOGLTextSize(text, size, r) XCharStruct overall; XFontStruct *font; int dir,fa,fd; - + switch (size) { case GR_TEXT_DEFAULT: case GR_TEXT_SMALL: @@ -301,7 +301,7 @@ GrOGLTextSize(text, size, r) r->r_xbot = -overall.lbearing - 1; } - + /* * ---------------------------------------------------------------------------- * GrOGLReadPixel -- @@ -326,7 +326,7 @@ GrOGLReadPixel (w, x, y) return 0; } - + /* * ---------------------------------------------------------------------------- * GrOGLBitBlt -- @@ -371,7 +371,7 @@ myCombine(GLdouble coords[3], GLdouble *vertex_data[4], new[1] = coords[1]; *outData = new; /* Diagnostic */ - TxError("Intersecting polygon in char \"%c\" at %g %g!\n", + TxError("Intersecting polygon in char \"%c\" at %g %g!\n", *((char *)dataptr), coords[0], coords[1]); } @@ -458,7 +458,7 @@ groglDrawCharacter(clist, tc, pixsize) * * For speed, we should be transferring the font * vectors into OpenGL display lists! - * + * *--------------------------------------------------------- */ @@ -470,7 +470,7 @@ groglFontText(text, font, size, rotate, pos, clip, obscure) int rotate; /* Text rotation */ Point *pos; /* Text base position */ Rect *clip; /* Clipping area */ - LinkedRect *obscure; /* List of obscuring areas */ + LinkedRect *obscure; /* List of obscuring areas */ { char *tptr; Point *coffset; /* vector to next character */ @@ -551,7 +551,7 @@ groglFreeBackingStore(MagWindow *window) * * Side effects: * memory Allocated. - * + * * ---------------------------------------------------------------------------- */ @@ -599,7 +599,7 @@ groglCreateBackingStore(MagWindow *w) * * Side effects: * Data copied into Pixmap memory. - * + * * ---------------------------------------------------------------------------- */ @@ -648,7 +648,7 @@ groglGetBackingStore(MagWindow *w, Rect *area) * * Side effects: * Data shifted in Pixmap memory. - * + * * ---------------------------------------------------------------------------- */ @@ -745,7 +745,7 @@ groglPutBackingStore(MagWindow *w, Rect *area) /* TxPrintf("groglPutBackingStore %d %d %d %d\n", area->r_xbot, area->r_ybot, area->r_xtop, area->r_ytop); */ } - + /*--------------------------------------------------------- * groglPutText: @@ -756,11 +756,11 @@ groglPutBackingStore(MagWindow *w, Rect *area) * the screen -- no clipping is done except to the obscuring rectangle * list and the clip rectangle. * - * Results: + * Results: * none. * * Side Effects: - * The text is drawn on the screen. + * The text is drawn on the screen. * *--------------------------------------------------------- */ @@ -800,7 +800,7 @@ groglPutText (text, pos, clip, obscure) grOGLGeoSub(&location, &overlap); } } - + overlap = location; GeoClip(&overlap, clip); diff --git a/graphics/grOGL4.c b/graphics/grOGL4.c index c50c729b..472b1caa 100644 --- a/graphics/grOGL4.c +++ b/graphics/grOGL4.c @@ -1,15 +1,15 @@ /* grOGL4.c - * - * ********************************************************************* - * * Copyright (C) 1985, 1990 Regents of the University of California. * - * * Permission to use, copy, modify, and distribute this * - * * software and its documentation for any purpose and without * - * * fee is hereby granted, provided that the above copyright * - * * notice appear in all copies. The University of California * - * * makes no representations about the suitability of this * - * * software for any purpose. It is provided "as is" without * - * * express or implied warranty. Export of this software outside * - * * of the United States of America may require an export license. * + * ********************************************************************* + * * Copyright (C) 1985, 1990 Regents of the University of California. * + * * Permission to use, copy, modify, and distribute this * + * * software and its documentation for any purpose and without * + * * fee is hereby granted, provided that the above copyright * + * * notice appear in all copies. The University of California * + * * makes no representations about the suitability of this * + * * software for any purpose. It is provided "as is" without * + * * express or implied warranty. Export of this software outside * + * * of the United States of America may require an export license. * * ********************************************************************* * * This file contains functions to manage the graphics tablet associated @@ -34,14 +34,14 @@ extern Display *grXdpy; extern int *grXscrn; - + /*--------------------------------------------------------- * GrOGLDisableTablet: * Turns off the cursor. * * Results: None. * - * Side Effects: None. + * Side Effects: None. *--------------------------------------------------------- */ @@ -50,12 +50,12 @@ GrOGLDisableTablet() { } - + /*--------------------------------------------------------- * GrOGLEnableTablet: * This routine enables the graphics tablet. * - * Results: + * Results: * None. * * Side Effects: @@ -68,7 +68,7 @@ GrOGLEnableTablet() { } - + /* * ---------------------------------------------------------------------------- * groglGetCursorPos: @@ -94,7 +94,7 @@ groglGetCursorPos (mw, p) Window win1, win2; if (mw == (MagWindow *)NULL) mw = oglCurrent.mw; - + XQueryPointer(grXdpy, (Window)mw->w_grdata, &win1, &win2, &x1, &y1, &x, &y, &buttons); @@ -106,7 +106,7 @@ groglGetCursorPos (mw, p) /* * ---------------------------------------------------------------------------- * groglGetCursorRootPos: - * Read the cursor position in screen root coordinates + * Read the cursor position in screen root coordinates * * Results: * TRUE is returned if the coordinates were succesfully read, FALSE @@ -128,7 +128,7 @@ groglGetCursorRootPos (mw, p) Window win1, win2; if (mw == (MagWindow *)NULL) mw = oglCurrent.mw; - + XQueryPointer(grXdpy, (Window)mw->w_grdata, &win1, &win2, &x1, &y1, &x, &y, &buttons); diff --git a/graphics/grOGL5.c b/graphics/grOGL5.c index 71d315c8..f4ab4d0f 100644 --- a/graphics/grOGL5.c +++ b/graphics/grOGL5.c @@ -1,15 +1,15 @@ /* grOGL5.c - * - * ********************************************************************* - * * Copyright (C) 1985, 1990 Regents of the University of California. * - * * Permission to use, copy, modify, and distribute this * - * * software and its documentation for any purpose and without * - * * fee is hereby granted, provided that the above copyright * - * * notice appear in all copies. The University of California * - * * makes no representations about the suitability of this * - * * software for any purpose. It is provided "as is" without * - * * express or implied warranty. Export of this software outside * - * * of the United States of America may require an export license. * + * ********************************************************************* + * * Copyright (C) 1985, 1990 Regents of the University of California. * + * * Permission to use, copy, modify, and distribute this * + * * software and its documentation for any purpose and without * + * * fee is hereby granted, provided that the above copyright * + * * notice appear in all copies. The University of California * + * * makes no representations about the suitability of this * + * * software for any purpose. It is provided "as is" without * + * * express or implied warranty. Export of this software outside * + * * of the United States of America may require an export license. * * ********************************************************************* * * Manipulate the programable cursor on the graphics display. @@ -61,7 +61,7 @@ GrOGLDrawGlyph (gl, p) Rect bBox; bool anyObscure; LinkedRect *ob; - + GR_CHECK_LOCK(); /* We're going to change the graphics state without affecting */ @@ -116,7 +116,7 @@ GrOGLDrawGlyph (gl, p) if ( (yloc <= grCurClip.r_ytop) && (yloc >= grCurClip.r_ybot) ) { int laststartx; laststartx = bBox.r_xbot - 1; - for (startx = bBox.r_xbot; startx <= bBox.r_xtop; + for (startx = bBox.r_xbot; startx <= bBox.r_xtop; startx = endx + 1) { int *pixelp; @@ -125,7 +125,7 @@ GrOGLDrawGlyph (gl, p) if (anyObscure) { for (ob = grCurObscure; ob != NULL; ob = ob->r_next) { - if ( (ob->r_r.r_ybot <= yloc) && + if ( (ob->r_r.r_ybot <= yloc) && (ob->r_r.r_ytop >= yloc) ) { if (ob->r_r.r_xbot <= startx) startx = MAX(startx, ob->r_r.r_xtop + 1); @@ -136,7 +136,7 @@ GrOGLDrawGlyph (gl, p) } /* stop if we aren't advancing */ - if (startx == laststartx) break; + if (startx == laststartx) break; laststartx = startx; if (startx > endx) continue; @@ -165,7 +165,7 @@ GrOGLDrawGlyph (gl, p) } } - + /* * ---------------------------------------------------------------------------- * groglDefineCursor: @@ -190,7 +190,7 @@ groglDefineCursor(glyphs) int red, green, blue; Pixmap source,mask; XColor curcolor; - + if (glyphs->gr_num <= 0) return; @@ -205,7 +205,7 @@ groglDefineCursor(glyphs) oldClip = grCurClip; grCurClip = GrScreenRect; grCurClip.r_ytop += 16; - + /* what color should the cursor be? The following makes it the opposite of what the background "mostly" is. */ @@ -234,13 +234,13 @@ groglDefineCursor(glyphs) GrGlyph *g; int x, y; unsigned char curs[32]; - + g = glyphs->gr_glyph[glyphnum]; if ((g->gr_xsize != 16) || (g->gr_ysize != 16)) { TxError("Cursors for the X must be 16 X 16 pixels.\n"); return; } - + /* Perform transposition on the glyph matrix since X displays * the least significant bit on the left hand side. */ @@ -249,20 +249,20 @@ groglDefineCursor(glyphs) int i; curs[i = 31 - y - 1] = 0; - for (x = 0; x < 8; x++) + for (x = 0; x < 8; x++) { if (GrStyleTable[*p].color != 0) { - curs[i] |= 1 << x; + curs[i] |= 1 << x; } p++; } curs[i += 1] = 0; - for (x = 0; x < 8; x++) + for (x = 0; x < 8; x++) { if (GrStyleTable[*p].color != 0) { - curs[i] |= 1 << x; + curs[i] |= 1 << x; } p++; } @@ -282,7 +282,7 @@ groglDefineCursor(glyphs) GrUnlock(GR_LOCK_SCREEN); } - + /* * ---------------------------------------------------------------------------- * GrOGLSetCursor: @@ -313,7 +313,7 @@ int cursorNum; /* The cursor number as defined in the display } oglCurrent.cursor = grCursors[cursorNum]; - + HashStartSearch(&hs); while (entry = HashNext(&grOGLWindowTable, &hs)) if (HashGetValue(entry)) diff --git a/graphics/grTCairo1.c b/graphics/grTCairo1.c index e84789a0..82637438 100644 --- a/graphics/grTCairo1.c +++ b/graphics/grTCairo1.c @@ -74,7 +74,7 @@ extern char *GrTkWindowName(); /* Use routine from grTkCommon.c */ extern void tcairoSetProjection(); extern int grCurColor; - + /*--------------------------------------------------------- * grtcairoSetWMandC: * This is a local routine that resets the value of the current @@ -130,7 +130,7 @@ int c; /* New value for current color */ oldMask = mask; } - + /*--------------------------------------------------------- * grtcairoSetLineStyle: * This local routine sets the current line style. @@ -150,7 +150,7 @@ int style; /* New stipple pattern for lines. */ // unimplemented for cairo } - + /*--------------------------------------------------------- * grtcairoSetSPattern: * tcairoSetSPattern associates a stipple pattern with a given @@ -197,7 +197,7 @@ int numstipples; /* Number of stipples */ } } - + /*--------------------------------------------------------- * grtcairoSetStipple: * This routine sets the Xs current stipple number. @@ -236,7 +236,7 @@ int stipple; /* The stipple number to be used. */ } } - + /*------------------------------------------------------------------------ * GrTCairoInit: * GrTCairoInit initializes the graphics display and clears its screen. @@ -301,7 +301,7 @@ GrTCairoInit () return grTkLoadFont(); } - + /*--------------------------------------------------------- * GrTCairoClose: * @@ -322,7 +322,7 @@ GrTCairoClose () /* do XCloseDisplay() */ } - + /*--------------------------------------------------------- * GrTCairoFlush: * Flush output to display. @@ -447,7 +447,7 @@ int llx, lly, width, height; cairo_scale(tcairodata->context, 1.0, -1.0); } - + /* * --------------------------------------------------------------------------- * @@ -924,7 +924,7 @@ TCairoOffScreen() grtcairoSetSPattern(GrStippleTable, grNumStipples); } - + /*--------------------------------------------------------- * cairoSetDisplay: @@ -1036,7 +1036,7 @@ char *mouseFileName; } extern void MakeWindowCommand(); - + /* * ---------------------------------------------------------------------------- * @@ -1202,7 +1202,7 @@ char *name; return 0; } - + /* * ---------------------------------------------------------------------------- * @@ -1243,7 +1243,7 @@ MagWindow *w; Tcl_DeleteCommand(magicinterp, Tk_PathName(xw)); Tk_DestroyWindow(xw); } - + /* * ---------------------------------------------------------------------------- * @@ -1272,11 +1272,11 @@ MagWindow *w; height = w->w_frameArea.r_ytop - w->w_frameArea.r_ybot; Tk_MoveResizeWindow((Tk_Window)w->w_grdata, w->w_frameArea.r_xbot, grTransYs(w->w_frameArea.r_ytop), - width, height); + width, height); tcairodata = (TCairoData *)w->w_grdata2; cairo_xlib_surface_set_size(tcairodata->surface, width, height); } - + /* * ---------------------------------------------------------------------------- * @@ -1304,7 +1304,7 @@ MagWindow *w; tkwind = (Tk_Window)w->w_grdata; Tk_RestackWindow(tkwind, Above, NULL); } - + /* * ---------------------------------------------------------------------------- * @@ -1332,7 +1332,7 @@ MagWindow *w; tkwind = (Tk_Window)w->w_grdata; Tk_RestackWindow(tkwind, Below, NULL); } - + /* * ---------------------------------------------------------------------------- @@ -1378,7 +1378,7 @@ bool flag; w->w_allArea.r_ytop - w->w_allArea.r_ybot); } } - + /* * ---------------------------------------------------------------------------- * @@ -1402,7 +1402,7 @@ MagWindow *w; GrTCairoFlush(); grSimpleUnlock(w); } - + /* *------------------------------------------------------------------------- diff --git a/graphics/grTCairo2.c b/graphics/grTCairo2.c index 1641bc5b..032317cd 100644 --- a/graphics/grTCairo2.c +++ b/graphics/grTCairo2.c @@ -30,7 +30,7 @@ extern char *DBWStyleType; extern Display *grXdpy; extern cairo_pattern_t *currentStipple; - + /*--------------------------------------------------------- * GrTCairoSetCMap -- * @@ -85,7 +85,7 @@ int nb; cairo_stroke(tcairodata->context); cairo_restore(tcairodata->context); } - + /*--------------------------------------------------------- * grtcairoDrawLine: * This routine draws a line. @@ -124,7 +124,7 @@ int x2, y2; /* Screen coordinates of second point. */ grtcairoNbDiagonal++; } } - + /*--------------------------------------------------------- * grtcairoFillRects: * This routine draws a bunch of solid rectangles. @@ -147,7 +147,7 @@ int nb; cairo_save(tcairodata->context); for (i = 0; i < nb; i++) { - cairo_rectangle(tcairodata->context, + cairo_rectangle(tcairodata->context, rects[i].r_ll.p_x, rects[i].r_ll.p_y, rects[i].r_ur.p_x-rects[i].r_ll.p_x, rects[i].r_ur.p_y-rects[i].r_ll.p_y); // TxPrintf("%d %d %d %d \n", rects[i].r_ll.p_x, rects[i].r_ll.p_y, rects[i].r_ur.p_x-rects[i].r_ll.p_x, rects[i].r_ur.p_y-rects[i].r_ll.p_y); @@ -156,7 +156,7 @@ int nb; cairo_mask(tcairodata->context, currentStipple); cairo_restore(tcairodata->context); } - + /*--------------------------------------------------------- * grtcairoFillRect: * This routine draws a solid rectangle. diff --git a/graphics/grTCairo3.c b/graphics/grTCairo3.c index 4f8c8b8a..5ebfa8d2 100644 --- a/graphics/grTCairo3.c +++ b/graphics/grTCairo3.c @@ -38,7 +38,7 @@ static GC grXcopyGC = (GC)NULL; /* locals */ - + /*--------------------------------------------------------- * grtcairoDrawGrid: * grxDrawGrid adds a grid to the grid layer, using the current @@ -104,7 +104,7 @@ Rect *clip; /* a clipping rectangle */ return TRUE; } - + /*--------------------------------------------------------- * grtcairoLoadFont * This local routine loads the default ("toy API") @@ -124,7 +124,7 @@ grtcairoLoadFont() return TRUE; } - + /*--------------------------------------------------------- * grtcairoSetCharSize: * This local routine sets the character size in the display, @@ -165,7 +165,7 @@ int size; /* Width of characters, in pixels (6 or 8). */ } } - + /* * ---------------------------------------------------------------------------- * GrTCairoTextSize -- @@ -411,7 +411,7 @@ grtcairoPutBackingStore(MagWindow *w, Rect *area) cairo_restore(tcairodata->backing_context); } - + /* * ---------------------------------------------------------------------------- * GrTCairoReadPixel -- @@ -435,7 +435,7 @@ int x, y; /* the location of a pixel in screen coords */ return 0; /* (unimplemented) */ } - + /* * ---------------------------------------------------------------------------- * GrTCairoBitBlt -- diff --git a/graphics/grTCairo4.c b/graphics/grTCairo4.c index 10b8eba8..506b03b0 100644 --- a/graphics/grTCairo4.c +++ b/graphics/grTCairo4.c @@ -27,14 +27,14 @@ extern Display *grXdpy; - + /*--------------------------------------------------------- * GrTCairoDisableTablet: * Turns off the cursor. * * Results: None. * - * Side Effects: None. + * Side Effects: None. *--------------------------------------------------------- */ @@ -44,12 +44,12 @@ GrTCairoDisableTablet () /* (Unimplemented) */ } - + /*--------------------------------------------------------- * GrTCairoEnableTablet: * This routine enables the graphics tablet. * - * Results: + * Results: * None. * * Side Effects: @@ -63,7 +63,7 @@ GrTCairoEnableTablet () /* (Unimplemented) */ } - + /* * ---------------------------------------------------------------------------- * grtcairoGetCursorPos: @@ -89,7 +89,7 @@ grtcairoGetCursorPos (mw, p) Window win1, win2; if (mw == (MagWindow *)NULL) mw = tcairoCurrent.mw; - + XQueryPointer(grXdpy, Tk_WindowId((Tk_Window)(mw->w_grdata)), &win1, &win2, &x1, &y1, &x, &y, &buttons); @@ -125,7 +125,7 @@ grtcairoGetCursorRootPos (mw, p) Window win1, win2; if (mw == (MagWindow *)NULL) mw = tcairoCurrent.mw; - + XQueryPointer(grXdpy, Tk_WindowId((Tk_Window)(mw->w_grdata)), &win1, &win2, &x1, &y1, &x, &y, &buttons); diff --git a/graphics/grTCairo5.c b/graphics/grTCairo5.c index 464b9b72..2f1de6eb 100644 --- a/graphics/grTCairo5.c +++ b/graphics/grTCairo5.c @@ -29,7 +29,7 @@ extern Display *grXdpy; extern int grXscrn; extern HashTable grTCairoWindowTable; - + /* * ---------------------------------------------------------------------------- * GrTCairoDrawGlyph -- @@ -165,7 +165,7 @@ Point *p; /* screen pos of lower left corner */ } } - + /* * ---------------------------------------------------------------------------- * GrTCairoSetCursor: diff --git a/graphics/grTOGL1.c b/graphics/grTOGL1.c index c8dab912..c5359d0b 100644 --- a/graphics/grTOGL1.c +++ b/graphics/grTOGL1.c @@ -70,7 +70,7 @@ extern char *GrTkWindowName(); extern void toglSetProjection(); - + /*--------------------------------------------------------- * grtoglSetWMandC: * This is a local routine that resets the value of the current @@ -129,12 +129,12 @@ grtoglSetWMandC (mask, c) glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA); } glColor4f(fr, fb, fg, aval); - + oldColor = c; oldMask = mask; } - + /*--------------------------------------------------------- * grtoglSetLineStyle: * This local routine sets the current line style. @@ -172,7 +172,7 @@ grtoglSetLineStyle (style) } } - + /*--------------------------------------------------------- * grtoglSetSPattern: * toglSetSPattern associates a stipple pattern with a given @@ -209,7 +209,7 @@ grtoglSetSPattern (sttable, numstipples) } } - + /*--------------------------------------------------------- * grtoglSetStipple: * This routine sets the Xs current stipple number. @@ -239,7 +239,7 @@ grtoglSetStipple (stipple) } } - + /*------------------------------------------------------------------------ * GrTOGLInit: * GrTOGLInit initializes the graphics display and clears its screen. @@ -249,7 +249,7 @@ grtoglSetStipple (stipple) * * Notes: When 3D rendering is compiled in, we search for a double-buffered * configuration first, because it generates the smoothest graphics, - * and fall back on a single-buffered configuration if necessary. + * and fall back on a single-buffered configuration if necessary. * For normal, 2D-only rendering, we look for a single-buffered * configuration first because we don't use the back buffer, so a * double-buffered configuration just wastes space. @@ -318,7 +318,7 @@ GrTOGLInit () /* determine from OpenGL attributes if indirect rendering */ /* is allowed, and handle automatically. */ -#ifdef X11_BACKING_STORE +#ifdef X11_BACKING_STORE grXcontext = glXCreateContext(grXdpy, grVisualInfo, NULL, GL_FALSE); #else grXcontext = glXCreateContext(grXdpy, grVisualInfo, NULL, GL_TRUE); @@ -342,7 +342,7 @@ GrTOGLInit () return grTkLoadFont(); } - + /*--------------------------------------------------------- * GrTOGLClose: * @@ -357,14 +357,14 @@ GrTOGLClose () { if (grXdpy == NULL) return; if (grVisualInfo != NULL) XFree(grVisualInfo); - + grTkFreeFonts(); /* Pop down Tk window but let Tcl/Tk */ /* do XCloseDisplay() */ } - + /*--------------------------------------------------------- * GrTOGLFlush: * Flush output to display. @@ -465,7 +465,7 @@ toglSetProjection(llx, lly, width, height) glLoadIdentity(); } - + /* * --------------------------------------------------------------------------- * @@ -502,7 +502,7 @@ TOGLEventProc(clientData, xevent) * keys to the terminal or console. */ - switch (xevent->type) + switch (xevent->type) { case ButtonPress: { @@ -811,7 +811,7 @@ keys_and_buttons: } } } - } + } break; case ConfigureNotify: { @@ -819,7 +819,7 @@ keys_and_buttons: Rect screenRect; int width, height; bool result, need_resize; - + width = ConfigureEvent->width; height = ConfigureEvent->height; @@ -882,7 +882,7 @@ keys_and_buttons: screenRect.r_xbot = ExposeEvent->x; screenRect.r_xtop = ExposeEvent->x+ExposeEvent->width; screenRect.r_ytop = mw->w_allArea.r_ytop-ExposeEvent->y; - screenRect.r_ybot = mw->w_allArea.r_ytop - + screenRect.r_ybot = mw->w_allArea.r_ytop - (ExposeEvent->y + ExposeEvent->height); if (mw->w_backingStore != (ClientData)NULL) @@ -913,7 +913,7 @@ keys_and_buttons: } } - + /* Set for on-screen display */ @@ -993,7 +993,7 @@ oglSetDisplay (dispType, outFileName, mouseFileName) GrConfigureWindowPtr = GrTOGLConfigure; GrOverWindowPtr = GrTOGLRaise; GrUnderWindowPtr = GrTOGLLower; - GrUpdateIconPtr = GrTOGLIconUpdate; + GrUpdateIconPtr = GrTOGLIconUpdate; GrEventPendingPtr = GrTOGLEventPending; GrWindowIdPtr = GrTOGLWindowId; GrWindowNamePtr = GrTkWindowName; /* from grTkCommon.c */ @@ -1031,7 +1031,7 @@ oglSetDisplay (dispType, outFileName, mouseFileName) GrPutBackingStorePtr = grtoglPutBackingStore; GrScrollBackingStorePtr = grtoglScrollBackingStore; #endif - + if (execFailed) { TxError("Execution failed!\n"); return FALSE; @@ -1051,7 +1051,7 @@ oglSetDisplay (dispType, outFileName, mouseFileName) } extern void MakeWindowCommand(); - + /* * ---------------------------------------------------------------------------- * @@ -1151,7 +1151,7 @@ GrTOGLCreate(w, name) toglCurrent.mw = w; w->w_grdata = (ClientData) tkwind; - + entry = HashFind(&grTOGLWindowTable, (char *)tkwind); HashSetValue(entry,w); @@ -1174,7 +1174,7 @@ GrTOGLCreate(w, name) glXMakeCurrent(grXdpy, (GLXDrawable)wind, grXcontext); Tk_DefineCursor(tkwind, toglCurrent.cursor); - GrTOGLIconUpdate(w, w->w_caption); + GrTOGLIconUpdate(w, w->w_caption); WindowNumber++; @@ -1188,7 +1188,7 @@ GrTOGLCreate(w, name) | ButtonPressMask | KeyPressMask | VisibilityChangeMask, (Tk_EventProc *)TOGLEventProc, (ClientData) tkwind); - /* set up commands to be passed expressly to this window */ + /* set up commands to be passed expressly to this window */ MakeWindowCommand((name == NULL) ? windowname : name, w); @@ -1201,7 +1201,7 @@ GrTOGLCreate(w, name) return 0; } - + /* * ---------------------------------------------------------------------------- * @@ -1231,7 +1231,7 @@ GrTOGLDelete(w) Tcl_DeleteCommand(magicinterp, Tk_PathName(xw)); Tk_DestroyWindow(xw); } - + /* * ---------------------------------------------------------------------------- * @@ -1258,7 +1258,7 @@ GrTOGLConfigure(w) w->w_frameArea.r_xtop - w->w_frameArea.r_xbot, w->w_frameArea.r_ytop - w->w_frameArea.r_ybot); } - + /* * ---------------------------------------------------------------------------- * @@ -1286,7 +1286,7 @@ GrTOGLRaise(w) tkwind = (Tk_Window)w->w_grdata; Tk_RestackWindow(tkwind, Above, NULL); } - + /* * ---------------------------------------------------------------------------- * @@ -1314,7 +1314,7 @@ GrTOGLLower(w) tkwind = (Tk_Window)w->w_grdata; Tk_RestackWindow(tkwind, Below, NULL); } - + /* * ---------------------------------------------------------------------------- @@ -1376,7 +1376,7 @@ GrTOGLLock(w, flag) w->w_allArea.r_ytop - w->w_allArea.r_ybot); } } - + /* * ---------------------------------------------------------------------------- * @@ -1462,10 +1462,10 @@ GrTOGLUnlock(w) } grSimpleUnlock(w); } - -/* + +/* *------------------------------------------------------------------------- * GrTOGLEventPending -- * check for pending graphics events. @@ -1480,22 +1480,22 @@ GrTOGLUnlock(w) * None, hopefully (put back the event!) * *------------------------------------------------------------------------- - */ - + */ + bool GrTOGLEventPending() -{ +{ Window wind = toglCurrent.windowid; XEvent genEvent; bool retval; XSync(grXdpy, FALSE); /* Necessary, or it won't catch mouse/key events */ - retval = XCheckWindowEvent(grXdpy, wind, ExposureMask + retval = XCheckWindowEvent(grXdpy, wind, ExposureMask | StructureNotifyMask | ButtonPressMask | KeyPressMask, &genEvent); - if (retval) XPutBackEvent(grXdpy, &genEvent); + if (retval) XPutBackEvent(grXdpy, &genEvent); return retval; -} +} /* *------------------------------------------------------------------------- @@ -1520,7 +1520,7 @@ GrTOGLIconUpdate(w,text) /* See Blt code */ char *brack; if (w->w_flags & WIND_OFFSCREEN) return; - + tkwind = (Tk_Window)(w->w_grdata); if (tkwind == NULL) { tkwind = Tk_MainWindow(magicinterp); @@ -1565,20 +1565,20 @@ GrTOGLIconUpdate(w,text) /* See Blt code */ */ int -GrTOGLWindowId(tkname) +GrTOGLWindowId(tkname) char *tkname; { Tk_Window tkwind; MagWindow *mw; HashEntry *entry; int id = 0; - + tkwind = Tk_NameToWindow(magicinterp, tkname, Tk_MainWindow(magicinterp)); if (tkwind != NULL) - { + { entry = HashLookOnly(&grTOGLWindowTable, (char *)tkwind); mw = (entry) ? (MagWindow *)HashGetValue(entry) : 0; if (mw) id = mw->w_wid; - } + } return id; -} +} diff --git a/graphics/grTOGL2.c b/graphics/grTOGL2.c index 49b9c081..0b01ee9b 100644 --- a/graphics/grTOGL2.c +++ b/graphics/grTOGL2.c @@ -27,7 +27,7 @@ extern char *DBWStyleType; extern GLXContext grXcontext; extern Display *grXdpy; - + /*--------------------------------------------------------- * GrOGLSetCMap -- * @@ -90,7 +90,7 @@ grtoglDrawLines(lines, nb) #endif } - + /*--------------------------------------------------------- * grtoglDrawLine: * This routine draws a line. @@ -130,7 +130,7 @@ grtoglDrawLine (x1, y1, x2, y2) grtoglNbDiagonal++; } } - + /*--------------------------------------------------------- * grtoglFillRects: * This routine draws a bunch of solid rectangles. @@ -165,7 +165,7 @@ grtoglFillRects(rects, nb) #endif } - + /*--------------------------------------------------------- * grtoglFillRect: * This routine draws a solid rectangle. diff --git a/graphics/grTOGL3.c b/graphics/grTOGL3.c index 6e236203..97820a62 100644 --- a/graphics/grTOGL3.c +++ b/graphics/grTOGL3.c @@ -3,7 +3,7 @@ * Copyright 2003 Open Circuit Design, Inc., for MultiGiG Ltd. * * This file contains additional functions to manipulate an X window system - * color display. Included here are device-dependent routines to draw and + * color display. Included here are device-dependent routines to draw and * erase text and draw a grid. * */ @@ -42,7 +42,7 @@ typedef struct { GLuint renderbuffer; } RenderFrame; - + /*--------------------------------------------------------- * grtoglDrawGrid: * grxDrawGrid adds a grid to the grid layer, using the current @@ -76,12 +76,12 @@ grtoglDrawGrid (prect, outline, clip) ysize = prect->r_ytop - prect->r_ybot; if (!xsize || !ysize || GRID_TOO_SMALL(xsize, ysize)) return FALSE; - + xstart = prect->r_xbot % xsize; while (xstart < clip->r_xbot << SUBPIXELBITS) xstart += xsize; ystart = prect->r_ybot % ysize; while (ystart < clip->r_ybot << SUBPIXELBITS) ystart += ysize; - + grtoglSetLineStyle(outline); glBegin(GL_LINES); @@ -111,7 +111,7 @@ grtoglDrawGrid (prect, outline, clip) return TRUE; } - + /*--------------------------------------------------------- * grtoglLoadFont * This local routine transfers the X font bitmaps @@ -143,7 +143,7 @@ grtoglLoadFont() return TRUE; } - + /*--------------------------------------------------------- * grtoglSetCharSize: * This local routine sets the character size in the display, @@ -182,12 +182,12 @@ grtoglSetCharSize (size) } } - + /* * ---------------------------------------------------------------------------- * GrTOGLTextSize -- * - * Determine the size of a text string. + * Determine the size of a text string. * * Results: * None. @@ -208,7 +208,7 @@ GrTOGLTextSize(text, size, r) Tk_FontMetrics overall; Tk_Font font; int width; - + switch (size) { case GR_TEXT_DEFAULT: case GR_TEXT_SMALL: @@ -429,7 +429,7 @@ grtoglPutBackingStore(MagWindow *w, Rect *area) glBindFramebuffer(GL_DRAW_FRAMEBUFFER, 0); } - + /* * ---------------------------------------------------------------------------- * GrTOGLReadPixel -- @@ -453,7 +453,7 @@ GrTOGLReadPixel (w, x, y) return 0; /* OpenGL has no such function, so return 0 */ } - + /* * ---------------------------------------------------------------------------- * GrTOGLBitBlt -- @@ -498,7 +498,7 @@ myCombine(GLdouble coords[3], GLdouble *vertex_data[4], new[1] = coords[1]; *outData = new; /* Diagnostic */ - TxError("Intersecting polygon in char \"%c\" at %g %g!\n", + TxError("Intersecting polygon in char \"%c\" at %g %g!\n", *((char *)dataptr), coords[0], coords[1]); } @@ -585,7 +585,7 @@ grtoglDrawCharacter(clist, tc, pixsize) * * For speed, we should be transferring the font * vectors into OpenGL display lists! - * + * *--------------------------------------------------------- */ @@ -597,7 +597,7 @@ grtoglFontText(text, font, size, rotate, pos, clip, obscure) int rotate; /* Text rotation */ Point *pos; /* Text base position */ Rect *clip; /* Clipping area */ - LinkedRect *obscure; /* List of obscuring areas */ + LinkedRect *obscure; /* List of obscuring areas */ { char *tptr; Point *coffset; /* vector to next character */ @@ -650,11 +650,11 @@ grtoglFontText(text, font, size, rotate, pos, clip, obscure) * the screen -- no clipping is done except to the obscuring rectangle * list and the clip rectangle. * - * Results: + * Results: * none. * * Side Effects: - * The text is drawn on the screen. + * The text is drawn on the screen. * *--------------------------------------------------------- */ @@ -694,7 +694,7 @@ grtoglPutText (text, pos, clip, obscure) grTOGLGeoSub(&location, &overlap); } } - + overlap = location; GeoClip(&overlap, clip); diff --git a/graphics/grTOGL4.c b/graphics/grTOGL4.c index 327cc8cd..9912d3ef 100644 --- a/graphics/grTOGL4.c +++ b/graphics/grTOGL4.c @@ -25,14 +25,14 @@ extern Display *grXdpy; - + /*--------------------------------------------------------- * GrTOGLDisableTablet: * Turns off the cursor. * * Results: None. * - * Side Effects: None. + * Side Effects: None. *--------------------------------------------------------- */ @@ -41,12 +41,12 @@ GrTOGLDisableTablet () { } - + /*--------------------------------------------------------- * GrTOGLEnableTablet: * This routine enables the graphics tablet. * - * Results: + * Results: * None. * * Side Effects: @@ -59,7 +59,7 @@ GrTOGLEnableTablet () { } - + /* * ---------------------------------------------------------------------------- * grtoglGetCursorPos: @@ -85,7 +85,7 @@ grtoglGetCursorPos (mw, p) Window win1, win2; if (mw == (MagWindow *)NULL) mw = toglCurrent.mw; - + XQueryPointer(grXdpy, Tk_WindowId((Tk_Window)(mw->w_grdata)), &win1, &win2, &x1, &y1, &x, &y, &buttons); @@ -121,7 +121,7 @@ grtoglGetCursorRootPos (mw, p) Window win1, win2; if (mw == (MagWindow *)NULL) mw = toglCurrent.mw; - + XQueryPointer(grXdpy, Tk_WindowId((Tk_Window)(mw->w_grdata)), &win1, &win2, &x1, &y1, &x, &y, &buttons); diff --git a/graphics/grTOGL5.c b/graphics/grTOGL5.c index edd9a9bf..ffe271f8 100644 --- a/graphics/grTOGL5.c +++ b/graphics/grTOGL5.c @@ -29,7 +29,7 @@ extern Display *grXdpy; extern int grXscrn; extern HashTable grTOGLWindowTable; - + /* * ---------------------------------------------------------------------------- * GrTOGLDrawGlyph -- @@ -52,7 +52,7 @@ GrTOGLDrawGlyph (gl, p) Rect bBox; bool anyObscure; LinkedRect *ob; - + GR_CHECK_LOCK(); /* We're going to change the graphics state without affecting */ @@ -64,7 +64,7 @@ GrTOGLDrawGlyph (gl, p) bBox.r_xtop = p->p_x + gl->gr_xsize - 1; bBox.r_ytop = p->p_y + gl->gr_ysize - 1; - anyObscure = FALSE; + anyObscure = FALSE; for (ob = grCurObscure; ob != NULL; ob = ob->r_next) { if (GEO_TOUCH( &(ob->r_r), &bBox)) { anyObscure = TRUE; @@ -84,13 +84,13 @@ GrTOGLDrawGlyph (gl, p) y1 = bBox.r_ybot + y; for (x = 0; x < gl->gr_xsize; x++) { lastp = thisp; - thisp = *pixelp++; + thisp = *pixelp++; if (thisp != 0) { /* Note: mask has traditionally been 0-127 */ if (thisp != lastp) { if (lastp != -1) glEnd(); - + mask = GrStyleTable[thisp].mask << 1; color = GrStyleTable[thisp].color; GrGetColor(color, &red, &green, &blue); @@ -114,7 +114,7 @@ GrTOGLDrawGlyph (gl, p) if ( (yloc <= grCurClip.r_ytop) && (yloc >= grCurClip.r_ybot) ) { int laststartx; laststartx = bBox.r_xbot - 1; - for (startx = bBox.r_xbot; startx <= bBox.r_xtop; + for (startx = bBox.r_xbot; startx <= bBox.r_xtop; startx = endx + 1) { int *pixelp; @@ -123,7 +123,7 @@ GrTOGLDrawGlyph (gl, p) if (anyObscure) { for (ob = grCurObscure; ob != NULL; ob = ob->r_next) { - if ( (ob->r_r.r_ybot <= yloc) && + if ( (ob->r_r.r_ybot <= yloc) && (ob->r_r.r_ytop >= yloc) ) { if (ob->r_r.r_xbot <= startx) startx = MAX(startx, ob->r_r.r_xtop + 1); @@ -134,7 +134,7 @@ GrTOGLDrawGlyph (gl, p) } /* stop if we aren't advancing */ - if (startx == laststartx) break; + if (startx == laststartx) break; laststartx = startx; if (startx > endx) continue; @@ -164,7 +164,7 @@ GrTOGLDrawGlyph (gl, p) } } - + /* * ---------------------------------------------------------------------------- * GrTOGLSetCursor: @@ -196,7 +196,7 @@ GrTOGLSetCursor(cursorNum) } toglCurrent.cursor = grCursors[cursorNum]; - + HashStartSearch(&hs); while (entry = HashNext(&grTOGLWindowTable,&hs)) { diff --git a/graphics/grText.c b/graphics/grText.c index 32076732..f99c5130 100644 --- a/graphics/grText.c +++ b/graphics/grText.c @@ -3,16 +3,16 @@ * Contains functions for manipulating text that are not dependent * upon the display type. * - * ********************************************************************* - * * Copyright (C) 1985, 1990 Regents of the University of California. * - * * Permission to use, copy, modify, and distribute this * - * * software and its documentation for any purpose and without * - * * fee is hereby granted, provided that the above copyright * - * * notice appear in all copies. The University of California * - * * makes no representations about the suitability of this * - * * software for any purpose. It is provided "as is" without * - * * express or implied warranty. Export of this software outside * - * * of the United States of America may require an export license. * + * ********************************************************************* + * * Copyright (C) 1985, 1990 Regents of the University of California. * + * * Permission to use, copy, modify, and distribute this * + * * software and its documentation for any purpose and without * + * * fee is hereby granted, provided that the above copyright * + * * notice appear in all copies. The University of California * + * * makes no representations about the suitability of this * + * * software for any purpose. It is provided "as is" without * + * * express or implied warranty. Export of this software outside * + * * of the United States of America may require an export license. * * ********************************************************************* */ @@ -86,13 +86,13 @@ GrFontText(str, style, p, font, size, rotate, clip) #define TEXTOFFSET 5 - + /*--------------------------------------------------------- * GrPutText: * This routine puts a chunk of text on the screen in the given * color, size, and position. It is clipped to a rectangle. * - * Results: + * Results: * True if the text was able to be displayed. * * Side Effects: @@ -114,11 +114,11 @@ GrPutText(str, style, p, pos, size, adjust, clip, actual) */ Point *p; /* The point to align with */ - int pos; /* The alignment desired (GR_NORTH, + int pos; /* The alignment desired (GR_NORTH, * GR_NORTHEAST, etc.) */ - int size; /* The desired size of the text - * (such as GR_TEXT_MEDIUM). + int size; /* The desired size of the text + * (such as GR_TEXT_MEDIUM). */ bool adjust; /* TRUE means adjust the text (either by * sliding it around or using a smaller font) @@ -180,7 +180,7 @@ GrPutText(str, style, p, pos, size, adjust, clip, actual) xpos = p->p_x + TEXTOFFSET; break; default: - TxError("Illegal position (%d) for text (internal error)\n", + TxError("Illegal position (%d) for text (internal error)\n", pos); return FALSE; break; @@ -278,7 +278,7 @@ GrPutText(str, style, p, pos, size, adjust, clip, actual) } /* ASSERTION: By now the text is positioned properly. */ - + /* do all clipping within the grPutTextPtr routine */ (*grSetCharSizePtr)(size); diff --git a/graphics/grTk1.c b/graphics/grTk1.c index acc1ec8b..19093847 100644 --- a/graphics/grTk1.c +++ b/graphics/grTk1.c @@ -103,7 +103,7 @@ extern bool GrTkInit(); extern bool GrTkEventPending(), GrTkCreate(), grtkGetCursorPos(); extern int GrTkWindowId(); extern char *GrTkWindowName(); - + /*--------------------------------------------------------- * grtkSetWMandC: @@ -147,7 +147,7 @@ grtkSetWMandC (mask, c) oldM = mask; } - + /*--------------------------------------------------------- * grtkSetLineStyle: * This local routine sets the current line style. @@ -242,7 +242,7 @@ grtkSetLineStyle (style) #endif } - + /*--------------------------------------------------------- * grtkSetSPattern: * xSetSPattern associates a stipple pattern with a given @@ -295,7 +295,7 @@ grtkSetSPattern (sttable, numstipples) } } - + /*--------------------------------------------------------- * grtkSetStipple: * This routine sets the Xs current stipple number. @@ -325,7 +325,7 @@ grtkSetStipple (stipple) } } - + /*--------------------------------------------------------- * GrTkInit: * @@ -404,7 +404,7 @@ GrTkInit(dispType) * to set. The top colors will remain identical to those * in the default colormap. */ - + grXcmap = XDefaultColormap(grXdpy,grXscrn); /* Discover properties of Server. */ @@ -412,7 +412,7 @@ GrTkInit(dispType) grVisual = XDefaultVisual(grXdpy, grXscrn); defpsvid = XVisualIDFromVisual(grVisual); grtemplate.screen = grXscrn; - grtemplate.depth = 0; + grtemplate.depth = 0; grvisual_get = XGetVisualInfo(grXdpy, VisualScreenMask, &grtemplate, &gritems); if (grvisual_get == NULL) { @@ -501,7 +501,7 @@ GrTkInit(dispType) color_reserved = (int)atoi(env_str); else color_reserved = X_COLORMAP_RESERVED; - + gritems = -1; if (log_color != NULL) { @@ -560,9 +560,9 @@ GrTkInit(dispType) { status = 0; if (grClass != 4) - status= XAllocColorCells(grXdpy, grXcmap, TRUE, grDisplay.planes, - grDisplay.planeCount, &grDisplay.basepixel, 1); - if (status == 0) + status= XAllocColorCells(grXdpy, grXcmap, TRUE, grDisplay.planes, + grDisplay.planeCount, &grDisplay.basepixel, 1); + if (status == 0) { /* * Ok, we tried to be nice; now lets whack the default colormap @@ -579,7 +579,7 @@ GrTkInit(dispType) if (xwind == 0) { xwind = Tk_WindowId(Tk_MainWindow(magicinterp)); - if (xwind == 0) + if (xwind == 0) xwind = DefaultRootWindow(grXdpy); } @@ -618,8 +618,8 @@ GrTkInit(dispType) grDisplay.colorCount = grDisplay.realColors; } } - - if (grXcmap == 0 || status ==0) + + if (grXcmap == 0 || status ==0) { TxError( "Tk/X11 setup: Unable to allocate %d planes\n", grDisplay.planeCount); @@ -658,7 +658,7 @@ GrTkInit(dispType) rstatus = grTkLoadFont(); return rstatus; } - + /*--------------------------------------------------------- * GrTkClose: * @@ -687,7 +687,7 @@ GrTkClose () /* do XCloseDisplay() */ } - + /*--------------------------------------------------------- * GrTkFlush: * Flush output to display. @@ -707,7 +707,7 @@ GrTkFlush () GR_TK_FLUSH_BATCH(); } - + /* * --------------------------------------------------------------------------- * @@ -742,7 +742,7 @@ MagicEventProc(clientData, xevent) * keys to the terminal/console. */ - switch (xevent->type) + switch (xevent->type) { case ButtonPress: { @@ -865,9 +865,9 @@ keys_and_buttons: /* Allow buttons to bypass the console and be */ /* treated as macros. */ - + if (LocRedirect == TX_INPUT_REDIRECTED) - { + { switch (keysym) { case XK_Pointer_Button1: @@ -943,7 +943,7 @@ keys_and_buttons: } else if (LocRedirect == TX_INPUT_REDIRECTED) { - int tl; + int tl; if (TxBuffer == NULL) { TxBuffer = Tcl_Alloc(2); @@ -1066,7 +1066,7 @@ keys_and_buttons: } } } - } + } break; case VisibilityNotify: { @@ -1110,7 +1110,7 @@ keys_and_buttons: screenRect.r_xbot = ExposeEvent->x; screenRect.r_xtop = ExposeEvent->x+ExposeEvent->width; screenRect.r_ytop = mw->w_allArea.r_ytop-ExposeEvent->y; - screenRect.r_ybot = mw->w_allArea.r_ytop - + screenRect.r_ybot = mw->w_allArea.r_ytop - (ExposeEvent->y + ExposeEvent->height); if (mw->w_backingStore != (ClientData)NULL) @@ -1133,7 +1133,7 @@ keys_and_buttons: XConfigureEvent *ConfigureEvent = (XConfigureEvent*) xevent; Rect screenRect; bool need_resize; - + entry = HashLookOnly(&grTkWindowTable, (char *)wind); mw = (entry)?(MagWindow *)HashGetValue(entry):0; grCurrent.window = wind; @@ -1169,7 +1169,7 @@ keys_and_buttons: } } - + /*--------------------------------------------------------- * x11SetDisplay: * This routine sets the appropriate parameters so that @@ -1228,7 +1228,7 @@ x11SetDisplay (dispType, outFileName, mouseFileName) GrConfigureWindowPtr = GrTkConfigure; GrOverWindowPtr = GrTkRaise; GrUnderWindowPtr = GrTkLower; - GrUpdateIconPtr = GrTkIconUpdate; + GrUpdateIconPtr = GrTkIconUpdate; GrEventPendingPtr = GrTkEventPending; GrWindowIdPtr = GrTkWindowId; GrWindowNamePtr = GrTkWindowName; @@ -1256,7 +1256,7 @@ x11SetDisplay (dispType, outFileName, mouseFileName) GrGetBackingStorePtr = grtkGetBackingStore; GrPutBackingStorePtr = grtkPutBackingStore; GrScrollBackingStorePtr = grtkScrollBackingStore; - + if (execFailed) { TxError("Execution failed!\n"); return FALSE; @@ -1277,7 +1277,7 @@ x11SetDisplay (dispType, outFileName, mouseFileName) extern void MakeWindowCommand(); - + /* * ---------------------------------------------------------------------------- * @@ -1381,7 +1381,7 @@ GrTkCreate(w, name) /* set the window attributes, since Tk doesn't do this in the */ /* Tk_CreateWindowFromPath() function. */ - + Tk_ChangeWindowAttributes(tkwind, attribmask, &grAttributes); /* ensure that the visual is what we wanted, if possible to change */ @@ -1411,7 +1411,7 @@ GrTkCreate(w, name) XSetPlaneMask(grXdpy, grGCGlyph, AllPlanes); Tk_DefineCursor(tkwind, grCurrent.cursor); - GrTkIconUpdate(w, w->w_caption); + GrTkIconUpdate(w, w->w_caption); /*----------------------------------------------------------------------*/ /* If we're using TkCon in a PseudoColor visual, we need to set the */ @@ -1502,7 +1502,7 @@ GrTkCreate(w, name) return 0; } - + /* * ---------------------------------------------------------------------------- * @@ -1533,7 +1533,7 @@ GrTkDelete(w) Tk_DestroyWindow(xw); } - + /* * ---------------------------------------------------------------------------- * @@ -1560,7 +1560,7 @@ GrTkConfigure(w) w->w_frameArea.r_xtop - w->w_frameArea.r_xbot, w->w_frameArea.r_ytop - w->w_frameArea.r_ybot); } - + /* * ---------------------------------------------------------------------------- * @@ -1588,7 +1588,7 @@ GrTkRaise(w) tkwind = (Tk_Window)w->w_grdata; Tk_RestackWindow(tkwind, Above, NULL); } - + /* * ---------------------------------------------------------------------------- * @@ -1616,7 +1616,7 @@ GrTkLower(w) tkwind = (Tk_Window)w->w_grdata; Tk_RestackWindow(tkwind, Below, NULL); } - + /* * ---------------------------------------------------------------------------- * @@ -1655,7 +1655,7 @@ GrTkLock(w, flag) } } } - + /* * ---------------------------------------------------------------------------- * @@ -1679,7 +1679,7 @@ GrTkUnlock(w) GR_TK_FLUSH_BATCH(); grSimpleUnlock(w); } - + /* *------------------------------------------------------------------------- @@ -1709,7 +1709,7 @@ GrTkEventPending() retval = XCheckWindowEvent(grXdpy, wind, ExposureMask | StructureNotifyMask | ButtonPressMask - | KeyPressMask, &genEvent); + | KeyPressMask, &genEvent); if (retval) XPutBackEvent(grXdpy, &genEvent); return retval; } @@ -1735,7 +1735,7 @@ GrTkIconUpdate(w, text) /* See Blt code */ Window wind; XClassHint class; char *brack; - + if (w->w_flags & WIND_OFFSCREEN) return; tkwind = (Tk_Window)(w->w_grdata); diff --git a/graphics/grTk2.c b/graphics/grTk2.c index 6574be95..013e6444 100644 --- a/graphics/grTk2.c +++ b/graphics/grTk2.c @@ -28,7 +28,7 @@ extern unsigned long grPlanes[256]; extern XColor colors[256 * 3]; extern Colormap grXcmap; - + /*--------------------------------------------------------------------- * GrXSetCMap: * @@ -51,7 +51,7 @@ GrTkSetCMap() int red_shift, green_shift, blue_shift; unsigned long grCompleteMask; - /* grCompleteMask is a mask of all the planes not used by this + /* grCompleteMask is a mask of all the planes not used by this * technology. It is OR'd in with the mask that magic supplies * to ensure that unused bits of the pixel are cleared. */ @@ -128,7 +128,7 @@ GrTkSetCMap() } } else /* grDisplay.planeCount <= 8 */ - { + { grCompleteMask = 0; for (i=0; i < grDisplay.planeCount; i++) { @@ -145,13 +145,13 @@ GrTkSetCMap() { grPixels[i] |= grDisplay.planes[j]; grPlanes[i] |= grDisplay.planes[j]; - } + } } } if (grDisplay.depth) { - for (i = 0; i < grDisplay.realColors; i++) + for (i = 0; i < grDisplay.realColors; i++) { if (!(GrGetColor(i, &red, &green, &blue))) break; colors[i].pixel = grPixels[i]; @@ -200,7 +200,7 @@ grtkDrawLines(lines, nb) lines, nb); } - + /*--------------------------------------------------------- * grtkDrawLine: * This routine draws a line. @@ -226,7 +226,7 @@ grtkDrawLine (x1, y1, x2, y2) grtkNbLines++; } - + /*--------------------------------------------------------- * grtkFillRects: * This routine draws a bunch of solid rectangles. @@ -246,7 +246,7 @@ grtkFillRects(rects, nb) XFillRectangles(grXdpy, grCurrent.windowid, grGCFill, rects, nb); } - + /*--------------------------------------------------------- * grtkFillRect: * This routine draws a solid rectangle. diff --git a/graphics/grTk3.c b/graphics/grTk3.c index 5bfba54c..032e4c27 100644 --- a/graphics/grTk3.c +++ b/graphics/grTk3.c @@ -3,7 +3,7 @@ * Copyright 2003 Open Circuit Design, Inc., for MultiGiG Ltd. * * This file contains additional functions to manipulate an X window system - * color display. Included here are device-dependent routines to draw and + * color display. Included here are device-dependent routines to draw and * erase text and draw a grid. * */ @@ -29,7 +29,7 @@ #include "graphics/grTkCommon.h" #include "database/fonts.h" - + /*--------------------------------------------------------- * grtkDrawGrid: * grxDrawGrid adds a grid to the grid layer, using the current @@ -66,12 +66,12 @@ grtkDrawGrid (prect, outline, clip) ysize = prect->r_ytop - prect->r_ybot; if (!xsize || !ysize || GRID_TOO_SMALL(xsize, ysize)) return FALSE; - + xstart = prect->r_xbot % xsize; while (xstart < clip->r_xbot << SUBPIXELBITS) xstart += xsize; ystart = prect->r_ybot % ysize; while (ystart < clip->r_ybot << SUBPIXELBITS) ystart += ysize; - + grtkSetLineStyle(outline); snum = 0; @@ -114,7 +114,7 @@ grtkDrawGrid (prect, outline, clip) return TRUE; } - + /*--------------------------------------------------------- * grtkSetCharSize: * This local routine sets the character size in the display, @@ -153,12 +153,12 @@ grtkSetCharSize (size) } } - + /* * ---------------------------------------------------------------------------- * GrTkTextSize -- * - * Determine the size of a text string. + * Determine the size of a text string. * * Results: * None. @@ -179,7 +179,7 @@ GrTkTextSize(text, size, r) Tk_FontMetrics overall; Tk_Font font; int width; - + switch (size) { case GR_TEXT_DEFAULT: case GR_TEXT_SMALL: @@ -208,7 +208,7 @@ GrTkTextSize(text, size, r) r->r_xbot = 0; } - + /* * ---------------------------------------------------------------------------- * GrTkReadPixel -- @@ -241,7 +241,7 @@ GrTkReadPixel (w, x, y) return (value & (1 << grDisplay.depth) - 1); } - + /* * ---------------------------------------------------------------------------- * GrTkBitBlt -- @@ -269,7 +269,7 @@ GrTkBitBlt(r, p) p->p_x, grMagicToX(p->p_y)); } - + /* * ---------------------------------------------------------------------------- @@ -459,11 +459,11 @@ grtkFontText(text, font, size, rotate, pos, clip, obscure) * the screen -- no clipping is done except to the obscuring rectangle * list and the clip rectangle. * - * Results: + * Results: * none. * * Side Effects: - * The text is drawn on the screen. + * The text is drawn on the screen. * *--------------------------------------------------------- */ @@ -503,7 +503,7 @@ grtkPutText (text, pos, clip, obscure) grtkGeoSub(&location, &overlap); } } - + overlap = location; GeoClip(&overlap, clip); @@ -534,7 +534,7 @@ grtkPutText (text, pos, clip, obscure) * * Side effects: * Source rectangle "r" is modified. - * + * *--------------------------------------------------------- */ diff --git a/graphics/grTk4.c b/graphics/grTk4.c index 6056cb80..bff58098 100644 --- a/graphics/grTk4.c +++ b/graphics/grTk4.c @@ -23,14 +23,14 @@ #include "grTkInt.h" #include "grTkCommon.h" - + /*--------------------------------------------------------- * GrTkDisableTablet: * Turns off the cursor. * * Results: None. * - * Side Effects: None. + * Side Effects: None. *--------------------------------------------------------- */ @@ -39,12 +39,12 @@ GrTkDisableTablet () { } - + /*--------------------------------------------------------- * GrTkEnableTablet: * This routine enables the graphics tablet. * - * Results: + * Results: * None. * * Side Effects: @@ -57,7 +57,7 @@ GrTkEnableTablet () { } - + /* * ---------------------------------------------------------------------------- * grtkGetCursorPos: @@ -83,7 +83,7 @@ grtkGetCursorPos (mw, p) Window win1, win2; if (mw == NULL) mw = grCurrent.mw; - + XQueryPointer(grXdpy, Tk_WindowId((Tk_Window)mw->w_grdata), &win1, &win2, &x1, &y1, &x, &y, &buttons); @@ -118,7 +118,7 @@ grtkGetCursorRootPos (mw, p) Window win1, win2; if (mw == NULL) mw = grCurrent.mw; - + XQueryPointer(grXdpy, Tk_WindowId((Tk_Window)mw->w_grdata), &win1, &win2, &x1, &y1, &x, &y, &buttons); diff --git a/graphics/grTk5.c b/graphics/grTk5.c index 6eef9b50..fa4b155e 100644 --- a/graphics/grTk5.c +++ b/graphics/grTk5.c @@ -26,7 +26,7 @@ extern HashTable grTkWindowTable; extern XColor colors[]; - + /* * ---------------------------------------------------------------------------- * GrTkDrawGlyph -- @@ -49,7 +49,7 @@ GrTkDrawGlyph (gl, p) Rect bBox; bool anyObscure; LinkedRect *ob; - + GR_CHECK_LOCK(); bBox.r_ll = *p; bBox.r_xtop = p->p_x + gl->gr_xsize - 1; @@ -96,7 +96,7 @@ GrTkDrawGlyph (gl, p) if ( (yloc <= grCurClip.r_ytop) && (yloc >= grCurClip.r_ybot) ) { int laststartx; laststartx = bBox.r_xbot - 1; - for (startx = bBox.r_xbot; startx <= bBox.r_xtop; + for (startx = bBox.r_xbot; startx <= bBox.r_xtop; startx = endx + 1) { int *pixelp; @@ -105,7 +105,7 @@ GrTkDrawGlyph (gl, p) if (anyObscure) { for (ob = grCurObscure; ob != NULL; ob = ob->r_next) { - if ( (ob->r_r.r_ybot <= yloc) && + if ( (ob->r_r.r_ybot <= yloc) && (ob->r_r.r_ytop >= yloc) ) { if (ob->r_r.r_xbot <= startx) startx = MAX(startx, ob->r_r.r_xtop + 1); @@ -116,7 +116,7 @@ GrTkDrawGlyph (gl, p) } /* stop if we aren't advancing */ - if (startx == laststartx) break; + if (startx == laststartx) break; laststartx = startx; if (startx > endx) continue; @@ -141,7 +141,7 @@ GrTkDrawGlyph (gl, p) } } - + /* * ---------------------------------------------------------------------------- * GrTkSetCursor: @@ -172,7 +172,7 @@ GrTkSetCursor(cursorNum) return; } grCurrent.cursor = grCursors[cursorNum]; - + HashStartSearch(&hs); while (entry = HashNext(&grTkWindowTable,&hs)) { diff --git a/graphics/grTkCommon.c b/graphics/grTkCommon.c index 00850f22..e6f94fa6 100644 --- a/graphics/grTkCommon.c +++ b/graphics/grTkCommon.c @@ -87,11 +87,11 @@ grTkLoadFont() s = XGetDefault(grXdpy, "magic", optionnames[i]); if (s) fontnames[i] = s; if ((grTkFonts[i] = Tk_GetFont(magicinterp, - tkwind, fontnames[i])) == NULL) + tkwind, fontnames[i])) == NULL) { TxError("%s %s\n", unable, fontnames[i]); if ((grTkFonts[i] = Tk_GetFont(magicinterp, - tkwind, TK_DEFAULT_FONT)) == NULL) + tkwind, TK_DEFAULT_FONT)) == NULL) { TxError("%s %s\n", unable, TK_DEFAULT_FONT); return FALSE; @@ -191,7 +191,7 @@ grTkDefineCursor(glyphs) oldClip = grCurClip; grCurClip = GrScreenRect; grCurClip.r_ytop += 16; - + /* enter the glyphs */ for (glyphnum = 0; glyphnum < glyphs->gr_num; glyphnum++) { int i, *p, fgstyle; @@ -209,7 +209,7 @@ grTkDefineCursor(glyphs) glyphcache = (CursorCache *)mallocMagic(sizeof(CursorCache)); g->gr_cache = (ClientData)glyphcache; g->gr_free = freeMagic; - + /* Find the foreground and background colors of the glyph */ p = &(g->gr_pixels[0]); @@ -260,7 +260,7 @@ grTkDefineCursor(glyphs) for (y = 0; y < 32; y++) { i = (y & 1) ? (32 - y) : (30 - y); glyphcache->source[i] = glyphcache->mask[i] = 0; - for (x = 0; x < 8; x++) + for (x = 0; x < 8; x++) { if (*p == fgstyle) glyphcache->source[i] |= (1 << x); @@ -294,18 +294,18 @@ grTkDefineCursor(glyphs) * Side Effects: * None. *------------------------------------------------------------------------- - */ - + */ + char * GrTkWindowName(mw) MagWindow *mw; -{ +{ Tk_Window tkwind; char *tkname; - + tkwind = (Tk_Window) mw->w_grdata; return Tk_PathName(tkwind); -} +} /* * ---------------------------------------------------------------------------- @@ -341,7 +341,7 @@ grtkFreeBackingStore(MagWindow *window) * * Side effects: * memory Allocated. - * + * * ---------------------------------------------------------------------------- */ @@ -383,7 +383,7 @@ grtkCreateBackingStore(MagWindow *w) * * Side effects: * Data copied into Pixmap memory. - * + * * ---------------------------------------------------------------------------- */ @@ -450,7 +450,7 @@ grtkGetBackingStore(MagWindow *w, Rect *area) * * Side effects: * Data shifted in Pixmap memory. - * + * * ---------------------------------------------------------------------------- */ @@ -749,7 +749,7 @@ static int ImgLayerCreate _ANSI_ARGS_((Tcl_Interp *interp, static ClientData ImgLayerGet _ANSI_ARGS_((Tk_Window tkwin, ClientData clientData)); static void ImgLayerDisplay _ANSI_ARGS_((ClientData clientData, - Display *display, Drawable drawable, + Display *display, Drawable drawable, int imageX, int imageY, int width, int height, int drawableX, int drawableY)); static void ImgLayerFree _ANSI_ARGS_((ClientData clientData, @@ -800,7 +800,7 @@ static void ImgLayerConfigureInstance _ANSI_ARGS_(( static int ImgLayerConfigureMaster _ANSI_ARGS_(( LayerMaster *masterPtr, int argc, Tcl_Obj *CONST objv[], int flags)); - + /* *---------------------------------------------------------------------- * @@ -852,7 +852,7 @@ ImgLayerCreate(interp, name, argc, argv, typePtr, master, clientDataPtr) *clientDataPtr = (ClientData) masterPtr; return TCL_OK; } - + /* *---------------------------------------------------------------------- * @@ -919,7 +919,7 @@ ImgLayerConfigureMaster(masterPtr, objc, objv, flags) * grDrawOffScreenBox -- * Draw a box on an off-screen drawable (convenience function for * the following procedure ImgLayerConfigureInstance() - * + * * Results: * None. * @@ -943,7 +943,7 @@ grDrawOffScreenBox(rect) rect->r_ytop - 1); } - + /* *---------------------------------------------------------------------- * @@ -1038,7 +1038,7 @@ ImgLayerConfigureInstance(instancePtr) if (layer < 0) { - layer = (*GrWindowIdPtr)(masterPtr->layerString); + layer = (*GrWindowIdPtr)(masterPtr->layerString); if (layer >= 0) special = LAYER_LAYOUT; @@ -1121,7 +1121,7 @@ ImgLayerConfigureInstance(instancePtr) mask = DBWStyleToTypes(i); if (TTMaskHasType(mask, layer)) { - GrSetStuff(i + TECHBEGINSTYLES + + GrSetStuff(i + TECHBEGINSTYLES + ((masterPtr->layerOff == 0) ? 0 : DBWNumStyles)); grInformDriver(); @@ -1143,7 +1143,7 @@ ImgLayerConfigureInstance(instancePtr) } } } - + switch(special) { case LAYER_LABELS: GrSetStuff(STYLE_LABEL); @@ -1180,7 +1180,7 @@ error: if (instancePtr->gc != None) Tk_FreeGC(grXdpy, instancePtr->gc); - instancePtr->gc = None; + instancePtr->gc = None; Tcl_AddErrorInfo(masterPtr->interp, "\n (while configuring image \""); Tcl_AddErrorInfo(masterPtr->interp, Tk_NameOfImage(masterPtr->tkMaster)); @@ -1188,7 +1188,7 @@ error: Tcl_BackgroundError(masterPtr->interp); } - + /* *-------------------------------------------------------------- * @@ -1255,7 +1255,7 @@ ImgLayerCmd(clientData, interp, objc, objv) } return TCL_OK; } - + /* *---------------------------------------------------------------------- * @@ -1324,7 +1324,7 @@ ImgLayerGet(tkwin, masterData) return (ClientData) instancePtr; } - + /* *---------------------------------------------------------------------- * @@ -1367,7 +1367,7 @@ ImgLayerDisplay(clientData, display, drawable, imageX, imageY, width, imageX, imageY, (unsigned) width, (unsigned) height, drawableX, drawableY); } - + /* *---------------------------------------------------------------------- * @@ -1426,7 +1426,7 @@ ImgLayerFree(clientData, display) } Tcl_Free((char *) instancePtr); } - + /* *---------------------------------------------------------------------- * @@ -1461,7 +1461,7 @@ ImgLayerDelete(masterData) Tk_FreeOptions(configSpecs, (char *) masterPtr, (Display *) NULL, 0); Tcl_Free((char *) masterPtr); } - + /* *---------------------------------------------------------------------- * diff --git a/graphics/grX11su1.c b/graphics/grX11su1.c index 054d2e13..8e888329 100644 --- a/graphics/grX11su1.c +++ b/graphics/grX11su1.c @@ -1,15 +1,15 @@ /* grX11su1.c - * - * ********************************************************************* - * * Copyright (C) 1985, 1990 Regents of the University of California. * - * * Permission to use, copy, modify, and distribute this * - * * software and its documentation for any purpose and without * - * * fee is hereby granted, provided that the above copyright * - * * notice appear in all copies. The University of California * - * * makes no representations about the suitability of this * - * * software for any purpose. It is provided "as is" without * - * * express or implied warranty. Export of this software outside * - * * of the United States of America may require an export license. * + * ********************************************************************* + * * Copyright (C) 1985, 1990 Regents of the University of California. * + * * Permission to use, copy, modify, and distribute this * + * * software and its documentation for any purpose and without * + * * fee is hereby granted, provided that the above copyright * + * * notice appear in all copies. The University of California * + * * makes no representations about the suitability of this * + * * software for any purpose. It is provided "as is" without * + * * express or implied warranty. Export of this software outside * + * * of the United States of America may require an export license. * * ********************************************************************* * * This file contains primitive functions to manipulate an X window system @@ -117,7 +117,7 @@ extern void grXWStdin(); extern bool grx11GetCursorPos(); - + /*--------------------------------------------------------- * grxSetWMandC: * This is a local routine that resets the value of the current @@ -158,7 +158,7 @@ grx11SetWMandC (mask, c) oldM = mask; } - + /*--------------------------------------------------------- * grxSetLineStyle: * This local routine sets the current line style. @@ -253,7 +253,7 @@ grx11SetLineStyle (style) #endif } - + /*--------------------------------------------------------- * grxSetSPattern: * xSetSPattern associates a stipple pattern with a given @@ -293,7 +293,7 @@ grx11SetSPattern (sttable, numstipples) } } - + /*--------------------------------------------------------- * grxSetStipple: * This routine sets the Xs current stipple number. @@ -323,7 +323,7 @@ grx11SetStipple (stipple) } } - + /*--------------------------------------------------------- * GrX11Init: * @@ -367,7 +367,7 @@ GrX11Init(dispType) XInitThreads(); #endif - grXdpy = XOpenDisplay(NULL); + grXdpy = XOpenDisplay(NULL); if (grXdpy == NULL) { TxError("Couldn't open display; check DISPLAY variable\n"); @@ -406,7 +406,7 @@ GrX11Init(dispType) grVisual = XDefaultVisual(grXdpy, grXscrn); defpsvid = XVisualIDFromVisual(grVisual); grtemplate.screen = grXscrn; - grtemplate.depth = 0; + grtemplate.depth = 0; grvisual_get = XGetVisualInfo(grXdpy, VisualScreenMask, &grtemplate, &gritems); if(grvisual_get == NULL) { @@ -525,7 +525,7 @@ GrX11Init(dispType) color_reserved = (int)atoi(env_str); else color_reserved = X_COLORMAP_RESERVED; - + gritems = -1; if (log_color != NULL) { @@ -589,8 +589,8 @@ GrX11Init(dispType) status = 0; if (grClass != 4) status= XAllocColorCells(grXdpy, grXcmap, TRUE, grDisplay.planes, - grDisplay.planeCount, &grDisplay.basepixel, 1); - if (status == 0) + grDisplay.planeCount, &grDisplay.basepixel, 1); + if (status == 0) /* * Ok, we tried to be nice; now lets whack the default colormap * and put in one of our own. @@ -621,7 +621,7 @@ GrX11Init(dispType) grDisplay.planes[j] = 1 << j; status = 1; for (i = 0; i < usableColors; i++) colors[i].pixel = i; - XQueryColors(grXdpy, XDefaultColormap(grXdpy, + XQueryColors(grXdpy, XDefaultColormap(grXdpy, grXscrn), colors, usableColors); if (grDisplay.planeCount <= 8) XStoreColors(grXdpy, grXcmap, colors, usableColors); @@ -636,8 +636,8 @@ GrX11Init(dispType) grDisplay.colorCount = grDisplay.realColors; } } - - if (grXcmap == 0 || status == 0) + + if (grXcmap == 0 || status == 0) { TxError( "X11 setup: Unable to allocate %d planes\n", grDisplay.planeCount); @@ -676,7 +676,7 @@ GrX11Init(dispType) return grx11LoadFont(); } - + /*--------------------------------------------------------- * GrXClose -- * @@ -710,7 +710,7 @@ GrX11Close () #endif } - + /*--------------------------------------------------------- * GrXFlush: * Flush output to display. @@ -730,7 +730,7 @@ GrX11Flush () XFlush(grXdpy); } - + /* * --------------------------------------------------------------------------- * @@ -754,7 +754,7 @@ grX11Stdin() XEvent xevent; HashEntry *entry; read(pipeRead, &xevent, sizeof(XEvent)); - switch (xevent.type) + switch (xevent.type) { case ButtonPress: case ButtonRelease: @@ -818,14 +818,14 @@ grX11Stdin() event->txe_p.p_y = grXToMagic(KeyPressedEvent->y); event->txe_wid = grCurrent.mw->w_wid; TxAddEvent(event); - } + } break; case Expose: { XExposeEvent *ExposeEvent = (XExposeEvent*) &xevent; Rect screenRect; MagWindow *w; - + grCurrent.window = ExposeEvent->window; entry = HashLookOnly(&grX11WindowTable,grCurrent.window); w = (entry)?(MagWindow *)HashGetValue(entry):0; @@ -833,9 +833,9 @@ grX11Stdin() screenRect.r_xbot = ExposeEvent->x; screenRect.r_xtop = ExposeEvent->x+ExposeEvent->width; - screenRect.r_ytop = + screenRect.r_ytop = w->w_allArea.r_ytop-ExposeEvent->y; - screenRect.r_ybot = w->w_allArea.r_ytop - + screenRect.r_ybot = w->w_allArea.r_ytop - (ExposeEvent->y + ExposeEvent->height); if (w->w_backingStore != (ClientData)NULL) @@ -858,7 +858,7 @@ grX11Stdin() XConfigureEvent *ConfigureEvent = (XConfigureEvent*) &xevent; Rect screenRect; MagWindow *w; - + grCurrent.window = ConfigureEvent->window; entry = HashLookOnly(&grX11WindowTable,grCurrent.window); w = (entry)?(MagWindow *)HashGetValue(entry):0; @@ -868,10 +868,10 @@ grX11Stdin() screenRect.r_xtop = ConfigureEvent->x+ ConfigureEvent->width; screenRect.r_ytop = grXsToMagic(ConfigureEvent->y); - screenRect.r_ybot = + screenRect.r_ybot = grXsToMagic(ConfigureEvent->y+ ConfigureEvent->height); - + WindReframe(w,&screenRect,FALSE,FALSE); WindRedisplay(w); } @@ -909,7 +909,7 @@ grX11Stdin() { XAnyEvent *anyEvent = (XAnyEvent*) &xevent; MagWindow *w; - + grCurrent.window = anyEvent->window; entry = HashLookOnly(&grX11WindowTable, grCurrent.window); w = (entry)?(MagWindow *)HashGetValue(entry):0; @@ -931,7 +931,7 @@ grX11Stdin() } } - + /*--------------------------------------------------------- * x11SetDisplay: * This routine sets the appropriate parameters so that @@ -1036,7 +1036,7 @@ x11SetDisplay (dispType, outFileName, mouseFileName) GrConfigureWindowPtr = GrX11Configure; GrOverWindowPtr = GrX11Raise; GrUnderWindowPtr = GrX11Lower; - GrUpdateIconPtr = GrX11IconUpdate; + GrUpdateIconPtr = GrX11IconUpdate; GrGetCursorPosPtr = grx11GetCursorPos; GrGetCursorRootPosPtr = grx11GetCursorRootPos; @@ -1061,7 +1061,7 @@ x11SetDisplay (dispType, outFileName, mouseFileName) grSetLineStylePtr = grx11SetLineStyle; grSetCharSizePtr = grx11SetCharSize; grFillPolygonPtr = grx11FillPolygon; - + if (execFailed) { TxError("Execution failed!\n"); @@ -1079,7 +1079,7 @@ x11SetDisplay (dispType, outFileName, mouseFileName) return TRUE; } - + /* * ---------------------------------------------------------------------------- * @@ -1116,7 +1116,7 @@ grXWStdin(fd, cdata) event->txe_p.p_y = GR_CURSOR_Y; TxAddEvent(event); } - + /* * ---------------------------------------------------------------------------- * @@ -1197,7 +1197,7 @@ GrX11Create(w, name) /* * Signal xhelper to poll window. */ - grCurrent.window = wind; + grCurrent.window = wind; /* * Define window cursor and complete initialization. */ @@ -1220,15 +1220,15 @@ GrX11Create(w, name) grGCGlyph = XCreateGC(grXdpy, grCurrent.window, 0, 0); } XSetPlaneMask(grXdpy,grGCGlyph,AllPlanes); - grCurrent.window = wind; + grCurrent.window = wind; grCurrent.mw = w; w->w_grdata = (ClientData) wind; - + entry = HashFind(&grX11WindowTable,grCurrent.window); HashSetValue(entry,w); XDefineCursor(grXdpy, grCurrent.window,grCurrent.cursor); - GrX11IconUpdate(w,w->w_caption); + GrX11IconUpdate(w,w->w_caption); #ifdef HAVE_PTHREADS xloop_create(wind); @@ -1249,7 +1249,7 @@ GrX11Create(w, name) return 0; } - + /* * ---------------------------------------------------------------------------- * @@ -1275,10 +1275,10 @@ GrX11Delete(w) xw = (Window) w->w_grdata; entry = HashLookOnly(&grX11WindowTable,xw); HashSetValue(entry,NULL); - + XDestroyWindow(grXdpy,xw); } - + /* * ---------------------------------------------------------------------------- * @@ -1303,7 +1303,7 @@ GrX11Configure(w) w->w_frameArea.r_xtop - w->w_frameArea.r_xbot, w->w_frameArea.r_ytop - w->w_frameArea.r_ybot); } - + /* * ---------------------------------------------------------------------------- * @@ -1326,7 +1326,7 @@ GrX11Raise(w) { XRaiseWindow(grXdpy, (Window) w->w_grdata ); } - + /* * ---------------------------------------------------------------------------- * @@ -1350,7 +1350,7 @@ GrX11Lower(w) XLowerWindow(grXdpy, (Window) w->w_grdata ); } - + /* * ---------------------------------------------------------------------------- * @@ -1380,7 +1380,7 @@ GrX11Lock(w, flag) } } - + /* * ---------------------------------------------------------------------------- * @@ -1405,7 +1405,7 @@ GrX11Unlock(w) grSimpleUnlock(w); } - + /* *------------------------------------------------------------------------- * @@ -1427,7 +1427,7 @@ GrX11IconUpdate(w,text) Window wind = (Window)(w->w_grdata); XClassHint class; char *brack; - + if (w->w_grdata == (ClientData)NULL) return; class.res_name = "magic"; class.res_class = "magic"; diff --git a/graphics/grX11su2.c b/graphics/grX11su2.c index 10db0ce3..33f10873 100644 --- a/graphics/grX11su2.c +++ b/graphics/grX11su2.c @@ -1,15 +1,15 @@ /* grX11su2.c - * - * ********************************************************************* - * * Copyright (C) 1985, 1990 Regents of the University of California. * - * * Permission to use, copy, modify, and distribute this * - * * software and its documentation for any purpose and without * - * * fee is hereby granted, provided that the above copyright * - * * notice appear in all copies. The University of California * - * * makes no representations about the suitability of this * - * * software for any purpose. It is provided "as is" without * - * * express or implied warranty. Export of this software outside * - * * of the United States of America may require an export license. * + * ********************************************************************* + * * Copyright (C) 1985, 1990 Regents of the University of California. * + * * Permission to use, copy, modify, and distribute this * + * * software and its documentation for any purpose and without * + * * fee is hereby granted, provided that the above copyright * + * * notice appear in all copies. The University of California * + * * makes no representations about the suitability of this * + * * software for any purpose. It is provided "as is" without * + * * express or implied warranty. Export of this software outside * + * * of the United States of America may require an export license. * * ********************************************************************* * * This file contains additional functions to manipulate an X @@ -39,7 +39,7 @@ extern unsigned long grPixels[256]; extern XColor colors[256*3]; /* Unique colors used by Magic */ extern Colormap grXcmap; - + /*--------------------------------------------------------- * GrXSetCMap: * @@ -63,7 +63,7 @@ GrX11SetCMap () int red_shift, green_shift, blue_shift; unsigned long grCompleteMask; - /* grCompleteMask is a mask of all the planes not used by this + /* grCompleteMask is a mask of all the planes not used by this * technology. It is OR'd in with the mask that magic supplies * to ensure that unused bits of the pixel are cleared. */ @@ -171,13 +171,13 @@ GrX11SetCMap () { grPixels[i] |= grDisplay.planes[j]; grPlanes[i] |= grDisplay.planes[j]; - } + } } } if (grDisplay.depth) { - for (i = 0; i < grDisplay.realColors; i++) + for (i = 0; i < grDisplay.realColors; i++) { if (!GrGetColor(i, &red, &green, &blue)) break; colors[i].pixel = grPixels[i]; @@ -229,7 +229,7 @@ grx11DrawLines(lines, nb) XDrawSegments(grXdpy, grCurrent.window, grGCDraw, lines, nb); } - + /*--------------------------------------------------------- * grxDrawLine: * This routine draws a line. @@ -254,7 +254,7 @@ grx11DrawLine (x1, y1, x2, y2) grx11NbLines++; } - + /*--------------------------------------------------------- * grxFillRects: * This routine draws a bunch of solid rectangles. @@ -274,7 +274,7 @@ grx11FillRects(rects, nb) XFillRectangles(grXdpy, grCurrent.window, grGCFill, rects, nb); } - + /*--------------------------------------------------------- * grxFillRect: * This routine draws a solid rectangle. diff --git a/graphics/grX11su3.c b/graphics/grX11su3.c index 0e9f0212..4a1da69e 100644 --- a/graphics/grX11su3.c +++ b/graphics/grX11su3.c @@ -1,19 +1,19 @@ /* grX11su3.c - * - * ********************************************************************* - * * Copyright (C) 1985, 1990 Regents of the University of California. * - * * Permission to use, copy, modify, and distribute this * - * * software and its documentation for any purpose and without * - * * fee is hereby granted, provided that the above copyright * - * * notice appear in all copies. The University of California * - * * makes no representations about the suitability of this * - * * software for any purpose. It is provided "as is" without * - * * express or implied warranty. Export of this software outside * - * * of the United States of America may require an export license. * + * ********************************************************************* + * * Copyright (C) 1985, 1990 Regents of the University of California. * + * * Permission to use, copy, modify, and distribute this * + * * software and its documentation for any purpose and without * + * * fee is hereby granted, provided that the above copyright * + * * notice appear in all copies. The University of California * + * * makes no representations about the suitability of this * + * * software for any purpose. It is provided "as is" without * + * * express or implied warranty. Export of this software outside * + * * of the United States of America may require an export license. * * ********************************************************************* * * This file contains additional functions to manipulate an X window system - * color display. Included here are device-dependent routines to draw and + * color display. Included here are device-dependent routines to draw and * erase text and draw a grid. * */ @@ -45,7 +45,7 @@ static XFontStruct *grXFonts[4]; #define grXLargeFont grXFonts[3] - + /*--------------------------------------------------------- * grxDrawGrid: * grxDrawGrid adds a grid to the grid layer, using the current @@ -87,7 +87,7 @@ grx11DrawGrid (prect, outline, clip) while (xstart < clip->r_xbot << SUBPIXELBITS) xstart += xsize; ystart = prect->r_ybot % ysize; while (ystart < clip->r_ybot << SUBPIXELBITS) ystart += ysize; - + grx11SetLineStyle(outline); snum = 0; @@ -130,7 +130,7 @@ grx11DrawGrid (prect, outline, clip) return TRUE; } - + /*--------------------------------------------------------- * grxLoadFont * This local routine loads the X fonts used by Magic. @@ -162,10 +162,10 @@ grx11LoadFont() { char *s = XGetDefault(grXdpy,"magic",optionnames[i]); if (s) fontnames[i] = s; - if ((grXFonts[i] = XLoadQueryFont(grXdpy, fontnames[i])) == NULL) + if ((grXFonts[i] = XLoadQueryFont(grXdpy, fontnames[i])) == NULL) { TxError("%s %s\n",unable,fontnames[i]); - if ((grXFonts[i]= XLoadQueryFont(grXdpy,GR_DEFAULT_FONT))==NULL) + if ((grXFonts[i]= XLoadQueryFont(grXdpy,GR_DEFAULT_FONT))==NULL) { TxError("%s %s\n",unable,GR_DEFAULT_FONT); return FALSE; @@ -175,7 +175,7 @@ grx11LoadFont() return TRUE; } - + /*--------------------------------------------------------- * grxSetCharSize: * This local routine sets the character size in the display, @@ -214,12 +214,12 @@ grx11SetCharSize (size) } } - + /* * ---------------------------------------------------------------------------- * GrXTextSize -- * - * Determine the size of a text string. + * Determine the size of a text string. * * Results: * None. @@ -240,7 +240,7 @@ GrX11TextSize(text, size, r) XCharStruct overall; XFontStruct *font; int dir,fa,fd; - + switch (size) { case GR_TEXT_DEFAULT: case GR_TEXT_SMALL: @@ -268,7 +268,7 @@ GrX11TextSize(text, size, r) r->r_xbot = -overall.lbearing - 1; } - + /* * ---------------------------------------------------------------------------- * GrXReadPixel -- @@ -303,7 +303,7 @@ GrX11ReadPixel (w, x, y) return (value & (1 << grDisplay.depth) - 1); } - + /* * ---------------------------------------------------------------------------- * GrXBitBlt -- @@ -368,7 +368,7 @@ grx11FreeBackingStore(MagWindow *window) * * Side effects: * memory Allocated. - * + * * ---------------------------------------------------------------------------- */ @@ -387,7 +387,7 @@ grx11CreateBackingStore(MagWindow *w) /* deferred */ if (w->w_grdata == (Window)NULL) return; - + width = w->w_screenArea.r_xtop - w->w_screenArea.r_xbot; height = w->w_screenArea.r_ytop - w->w_screenArea.r_ybot; @@ -421,7 +421,7 @@ grx11CreateBackingStore(MagWindow *w) * * Side effects: * Data copied into Pixmap memory. - * + * * ---------------------------------------------------------------------------- */ @@ -470,7 +470,7 @@ grx11GetBackingStore(MagWindow *w, Rect *area) * * Side effects: * Data shifted in Pixmap memory. - * + * * ---------------------------------------------------------------------------- */ @@ -757,11 +757,11 @@ grx11FontText(text, font, size, rotate, pos, clip, obscure) * the screen -- no clipping is done except to the obscuring rectangle * list and the clip rectangle. * - * Results: + * Results: * none. * * Side Effects: - * The text is drawn on the screen. + * The text is drawn on the screen. * *--------------------------------------------------------- */ @@ -801,7 +801,7 @@ grx11PutText (text, pos, clip, obscure) grX11suGeoSub(&location, &overlap); } } - + overlap = location; GeoClip(&overlap, clip); @@ -825,7 +825,7 @@ grx11PutText (text, pos, clip, obscure) * grX11suGeoSub -- * return the tallest sub-rectangle of r not obscured by area * area must be within r. - * + * * Results: * None. * diff --git a/graphics/grX11su4.c b/graphics/grX11su4.c index a2f4b725..2a4c45ca 100644 --- a/graphics/grX11su4.c +++ b/graphics/grX11su4.c @@ -1,15 +1,15 @@ /* grX11su4.c - * - * ********************************************************************* - * * Copyright (C) 1985, 1990 Regents of the University of California. * - * * Permission to use, copy, modify, and distribute this * - * * software and its documentation for any purpose and without * - * * fee is hereby granted, provided that the above copyright * - * * notice appear in all copies. The University of California * - * * makes no representations about the suitability of this * - * * software for any purpose. It is provided "as is" without * - * * express or implied warranty. Export of this software outside * - * * of the United States of America may require an export license. * + * ********************************************************************* + * * Copyright (C) 1985, 1990 Regents of the University of California. * + * * Permission to use, copy, modify, and distribute this * + * * software and its documentation for any purpose and without * + * * fee is hereby granted, provided that the above copyright * + * * notice appear in all copies. The University of California * + * * makes no representations about the suitability of this * + * * software for any purpose. It is provided "as is" without * + * * express or implied warranty. Export of this software outside * + * * of the United States of America may require an export license. * * ********************************************************************* * * This file contains functions to manage the graphics tablet associated @@ -31,14 +31,14 @@ #include "textio/txcommands.h" #include "grX11Int.h" - + /*--------------------------------------------------------- * GrXDisableTablet: * Turns off the cursor. * * Results: None. * - * Side Effects: None. + * Side Effects: None. *--------------------------------------------------------- */ @@ -47,12 +47,12 @@ GrX11DisableTablet() { } - + /*--------------------------------------------------------- * GrXEnableTablet: * This routine enables the graphics tablet. * - * Results: + * Results: * None. * * Side Effects: @@ -65,7 +65,7 @@ GrX11EnableTablet() { } - + /* * ---------------------------------------------------------------------------- * grx11GetCursorPos: @@ -89,7 +89,7 @@ grx11GetCursorPos (mw, p) int x, y, x1, y1; unsigned int buttons; Window win1, win2; - + if (mw == (MagWindow *)NULL) mw = grCurrent.mw; XQueryPointer(grXdpy, (Window)mw->w_grdata, @@ -124,7 +124,7 @@ grx11GetCursorRootPos (mw, p) int x, y, x1, y1; unsigned int buttons; Window win1, win2; - + if (mw == (MagWindow *)NULL) mw = grCurrent.mw; XQueryPointer(grXdpy, (Window)mw->w_grdata, diff --git a/graphics/grX11su5.c b/graphics/grX11su5.c index 38b70b7b..e583cfb9 100644 --- a/graphics/grX11su5.c +++ b/graphics/grX11su5.c @@ -1,15 +1,15 @@ /* grX11su5.c - * - * ********************************************************************* - * * Copyright (C) 1985, 1990 Regents of the University of California. * - * * Permission to use, copy, modify, and distribute this * - * * software and its documentation for any purpose and without * - * * fee is hereby granted, provided that the above copyright * - * * notice appear in all copies. The University of California * - * * makes no representations about the suitability of this * - * * software for any purpose. It is provided "as is" without * - * * express or implied warranty. Export of this software outside * - * * of the United States of America may require an export license. * + * ********************************************************************* + * * Copyright (C) 1985, 1990 Regents of the University of California. * + * * Permission to use, copy, modify, and distribute this * + * * software and its documentation for any purpose and without * + * * fee is hereby granted, provided that the above copyright * + * * notice appear in all copies. The University of California * + * * makes no representations about the suitability of this * + * * software for any purpose. It is provided "as is" without * + * * express or implied warranty. Export of this software outside * + * * of the United States of America may require an export license. * * ********************************************************************* * * Manipulate the programable cursor on the graphics display. @@ -37,7 +37,7 @@ extern XColor colors[]; Cursor grCursors[MAX_CURSORS]; - + /* * ---------------------------------------------------------------------------- * GrXDrawGlyph -- @@ -60,7 +60,7 @@ GrX11DrawGlyph (gl, p) Rect bBox; bool anyObscure; LinkedRect *ob; - + GR_CHECK_LOCK(); bBox.r_ll = *p; bBox.r_xtop = p->p_x + gl->gr_xsize - 1; @@ -106,7 +106,7 @@ GrX11DrawGlyph (gl, p) if ( (yloc <= grCurClip.r_ytop) && (yloc >= grCurClip.r_ybot) ) { int laststartx; laststartx = bBox.r_xbot - 1; - for (startx = bBox.r_xbot; startx <= bBox.r_xtop; + for (startx = bBox.r_xbot; startx <= bBox.r_xtop; startx = endx + 1) { int *pixelp; @@ -115,7 +115,7 @@ GrX11DrawGlyph (gl, p) if (anyObscure) { for (ob = grCurObscure; ob != NULL; ob = ob->r_next) { - if ( (ob->r_r.r_ybot <= yloc) && + if ( (ob->r_r.r_ybot <= yloc) && (ob->r_r.r_ytop >= yloc) ) { if (ob->r_r.r_xbot <= startx) startx = MAX(startx, ob->r_r.r_xtop + 1); @@ -126,7 +126,7 @@ GrX11DrawGlyph (gl, p) } /* stop if we aren't advancing */ - if (startx == laststartx) break; + if (startx == laststartx) break; laststartx = startx; if (startx > endx) continue; @@ -151,7 +151,7 @@ GrX11DrawGlyph (gl, p) } } - + /* * ---------------------------------------------------------------------------- * grxDefineCursor: @@ -189,7 +189,7 @@ grx11DefineCursor(glyphs) oldClip = grCurClip; grCurClip = GrScreenRect; grCurClip.r_ytop += 16; - + /* enter the glyphs */ for (glyphnum = 0; glyphnum < glyphs->gr_num; glyphnum++) { @@ -261,7 +261,7 @@ grx11DefineCursor(glyphs) i = (y & 1) ? (32 - y) : (30 - y); curs[i] = mbits[i] = 0; - for (x = 0; x < 8; x++) + for (x = 0; x < 8; x++) { if (*p == fgstyle) curs[i] |= (1 << x); @@ -285,7 +285,7 @@ grx11DefineCursor(glyphs) GrUnlock(GR_LOCK_SCREEN); } - + /* * ---------------------------------------------------------------------------- * GrXSetCursor: @@ -316,7 +316,7 @@ GrX11SetCursor(cursorNum) } grCurrent.cursor = grCursors[cursorNum]; - + HashStartSearch(&hs); while (entry = HashNext(&grX11WindowTable,&hs)) { diff --git a/graphics/grX11thread.c b/graphics/grX11thread.c index 0e817b43..cb98ba22 100644 --- a/graphics/grX11thread.c +++ b/graphics/grX11thread.c @@ -40,7 +40,7 @@ pthread_t xloop_thread = 0; * Pass XEvents on to the magic main process by writing into the * connecting pipe. Keystrokes must be handled such that magic * can treat untranslated keyboard input from stdin the same way - * that it treats translated keyboard input through X11. + * that it treats translated keyboard input through X11. * Use XLookupString() to get an ASCII character out of the * keycode, but also pass back the event structure so we can * pull out key modifier information in grX11Stdin(). @@ -52,7 +52,7 @@ pthread_t xloop_thread = 0; * Results: * None. * - * Side effects: + * Side effects: * pipe I/O * *-------------------------------------------------------------- @@ -63,7 +63,7 @@ ParseEvent (event, parentID) XEvent *event; int parentID; { - if (event->type == KeyPress) + if (event->type == KeyPress) { XKeyPressedEvent *KeyPressedEvent = (XKeyPressedEvent *) event; char inChar[10], c, *p; @@ -123,7 +123,7 @@ ParseEvent (event, parentID) if ((c = *p++) == 3) /* Ctrl-C interrupt */ { kill(parentID, SIGINT); - } + } else { /* When Control modifier is present, use the capital */ @@ -182,7 +182,7 @@ xloop_begin(window) ParseEvent(&xevent, parentID); XUnlockDisplay(grXdpy); } -} +} /*---------------------------------------------------------------------- * xloop_create -- diff --git a/graphics/graphics.h b/graphics/graphics.h index 1d4762ec..e12be6d0 100644 --- a/graphics/graphics.h +++ b/graphics/graphics.h @@ -1,15 +1,15 @@ /* graphics.h - * - * ********************************************************************* - * * Copyright (C) 1985, 1990 Regents of the University of California. * - * * Permission to use, copy, modify, and distribute this * - * * software and its documentation for any purpose and without * - * * fee is hereby granted, provided that the above copyright * - * * notice appear in all copies. The University of California * - * * makes no representations about the suitability of this * - * * software for any purpose. It is provided "as is" without * - * * express or implied warranty. Export of this software outside * - * * of the United States of America may require an export license. * + * ********************************************************************* + * * Copyright (C) 1985, 1990 Regents of the University of California. * + * * Permission to use, copy, modify, and distribute this * + * * software and its documentation for any purpose and without * + * * fee is hereby granted, provided that the above copyright * + * * notice appear in all copies. The University of California * + * * makes no representations about the suitability of this * + * * software for any purpose. It is provided "as is" without * + * * express or implied warranty. Export of this software outside * + * * of the United States of America may require an export license. * * ********************************************************************* * * This file contains a bunch of macros that look like @@ -27,7 +27,7 @@ /* data structures */ typedef struct { - int idx, mask, color, outline, fill, stipple; + int idx, mask, color, outline, fill, stipple; char shortname; char *longname; } GR_STYLE_LINE; @@ -44,10 +44,10 @@ extern bool (*GrInitPtr)(); extern void (*GrClosePtr)(); extern void (*GrTextSizePtr)(); -/* - * Display painting and text routines +/* + * Display painting and text routines * - * You must call GrLock() before using these, and + * You must call GrLock() before using these, and * call GrUnlock() afterwards. */ extern void (*GrLockPtr)(); @@ -141,7 +141,7 @@ extern void (*GrResumePtr)(); /* Number of colors defined in the colormap */ extern int GrNumColors; -/* Different graphics (OpenGL vs. X11, for instance) have different +/* Different graphics (OpenGL vs. X11, for instance) have different * definitions of line and rectangle/polygon coordinates. Usually * this boils down to a single pixel difference on rectangle edges. * GrPixelCorrect should be set to 0 for OpenGL and other real-valued @@ -202,11 +202,11 @@ extern unsigned char GrDisplayStatus; #define GR_STSTIPPLE 3 #define GR_STGRID 4 -/* 4 text sizes that are specified by the graphics driver, plus a 5th one. - * This last one is for systems that allow the user to specify a default font +/* 4 text sizes that are specified by the graphics driver, plus a 5th one. + * This last one is for systems that allow the user to specify a default font * (such as a sun) -- on other systems it's size is decided by the driver. * - * Note: + * Note: * These must be in sequential, ascending order. */ #define GR_TEXT_SMALL 0 diff --git a/graphics/graphicsInt.h b/graphics/graphicsInt.h index a2b75cfe..4d23fc67 100644 --- a/graphics/graphicsInt.h +++ b/graphics/graphicsInt.h @@ -3,16 +3,16 @@ * * Internal definitions for the graphics module. * - * ********************************************************************* - * * Copyright (C) 1985, 1990 Regents of the University of California. * - * * Permission to use, copy, modify, and distribute this * - * * software and its documentation for any purpose and without * - * * fee is hereby granted, provided that the above copyright * - * * notice appear in all copies. The University of California * - * * makes no representations about the suitability of this * - * * software for any purpose. It is provided "as is" without * - * * express or implied warranty. Export of this software outside * - * * of the United States of America may require an export license. * + * ********************************************************************* + * * Copyright (C) 1985, 1990 Regents of the University of California. * + * * Permission to use, copy, modify, and distribute this * + * * software and its documentation for any purpose and without * + * * fee is hereby granted, provided that the above copyright * + * * notice appear in all copies. The University of California * + * * makes no representations about the suitability of this * + * * software for any purpose. It is provided "as is" without * + * * express or implied warranty. Export of this software outside * + * * of the United States of America may require an export license. * * ********************************************************************* * * @@ -25,11 +25,11 @@ #include "windows/windows.h" #include "utils/magic.h" - + extern int grNumBitPlanes; extern int grBitPlaneMask; - + /* procedures */ extern void (*grPutTextPtr)(); extern void (*grFontTextPtr)(); /* Vector-drawn text */ @@ -48,7 +48,7 @@ extern void (*grFillPolygonPtr)(); extern char *grFgets(); extern void grSimpleLock(), grSimpleUnlock(); extern void grNoLock(); -#define GR_CHECK_LOCK() {if (grLockedWindow == NULL) grNoLock();} +#define GR_CHECK_LOCK() {if (grLockedWindow == NULL) grNoLock();} /* The size of the crosses drawn for degenerate box outlines: */ #define GR_CROSSSIZE 5 @@ -82,7 +82,7 @@ extern int grNumStipples; extern bool grDriverInformed; extern void grInformDriver(); -/* Macro to check for a bogusly small grid. +/* Macro to check for a bogusly small grid. * Turn off grid if gridlines are less than 4 pixels apart. */ #define GRID_TOO_SMALL(x,y) ( \ diff --git a/grouter/grouteChan.c b/grouter/grouteChan.c index cdf9a84d..c0f201ec 100644 --- a/grouter/grouteChan.c +++ b/grouter/grouteChan.c @@ -6,16 +6,16 @@ * channel area, namely one that contains no embedded regions * where the channel's density has been exceeded. * - * ********************************************************************* - * * Copyright (C) 1985, 1990 Regents of the University of California. * - * * Permission to use, copy, modify, and distribute this * - * * software and its documentation for any purpose and without * - * * fee is hereby granted, provided that the above copyright * - * * notice appear in all copies. The University of California * - * * makes no representations about the suitability of this * - * * software for any purpose. It is provided "as is" without * - * * express or implied warranty. Export of this software outside * - * * of the United States of America may require an export license. * + * ********************************************************************* + * * Copyright (C) 1985, 1990 Regents of the University of California. * + * * Permission to use, copy, modify, and distribute this * + * * software and its documentation for any purpose and without * + * * fee is hereby granted, provided that the above copyright * + * * notice appear in all copies. The University of California * + * * makes no representations about the suitability of this * + * * software for any purpose. It is provided "as is" without * + * * express or implied warranty. Export of this software outside * + * * of the United States of America may require an export license. * * ********************************************************************* */ @@ -77,7 +77,7 @@ typedef struct pa } PaintArea; PaintArea *glChanPaintList; - + /* * ---------------------------------------------------------------------------- * @@ -117,7 +117,7 @@ PaintArea *glChanPaintList; * |HRIVER | normal * | | * +-------+ - * + * * The reason for splitting CT_HRIVER tiles in this way (and CT_VRIVER tiles * vertically using similar criteria) is to ensure that there is a different * river tile for each channel on its opposite side. This fact is crucial @@ -251,7 +251,7 @@ glChanFeedFunc(tile) DBWFeedbackAdd(&r, mesg, EditCellUse->cu_def, 1, STYLE_OUTLINEHIGHLIGHTS); return 0; } - + /* * ---------------------------------------------------------------------------- * @@ -282,7 +282,7 @@ glChanFreeMap() TiSetBody(newCenterTile, CHAN_BLOCKED); dbSetPlaneTile(glChanPlane, newCenterTile); } - + /* * ---------------------------------------------------------------------------- * @@ -371,7 +371,7 @@ glChanCheckFunc(tile, ch) } return 0; } - + /* * ---------------------------------------------------------------------------- * @@ -476,7 +476,7 @@ glChanShowFunc(tile) ShowRect(EditCellUse->cu_def, &ch->gcr_area, STYLE_ERASEHIGHLIGHTS); return 0; } - + /* * ---------------------------------------------------------------------------- * @@ -539,7 +539,7 @@ glChanClipFunc(tile, area) return ret; } - + /* * ---------------------------------------------------------------------------- * @@ -622,7 +622,7 @@ glChanMergeFunc(tile) return ret; } - + /* * ---------------------------------------------------------------------------- * @@ -791,7 +791,7 @@ glChanPaintFunc(tile, type) TiSetBody(tile, changeTable[TiGetType(tile)][type]); return 0; } - + /* * ---------------------------------------------------------------------------- * @@ -901,7 +901,7 @@ glChanFloodHFunc(tile, area) return 0; } - + /* * ---------------------------------------------------------------------------- * @@ -981,7 +981,7 @@ glChanSplitRiver(tile) return ret; } - + /* * ---------------------------------------------------------------------------- * @@ -1048,7 +1048,7 @@ glChanRiverBlock(tile) TiSetBody(tile, CHAN_BLOCKED); return 0; } - + /* * ---------------------------------------------------------------------------- * diff --git a/grouter/grouteCrss.c b/grouter/grouteCrss.c index ff98ebb3..3d12540b 100644 --- a/grouter/grouteCrss.c +++ b/grouter/grouteCrss.c @@ -3,16 +3,16 @@ * * Global signal router. Code to do crossing placement. * - * ********************************************************************* - * * Copyright (C) 1985, 1990 Regents of the University of California. * - * * Permission to use, copy, modify, and distribute this * - * * software and its documentation for any purpose and without * - * * fee is hereby granted, provided that the above copyright * - * * notice appear in all copies. The University of California * - * * makes no representations about the suitability of this * - * * software for any purpose. It is provided "as is" without * - * * express or implied warranty. Export of this software outside * - * * of the United States of America may require an export license. * + * ********************************************************************* + * * Copyright (C) 1985, 1990 Regents of the University of California. * + * * Permission to use, copy, modify, and distribute this * + * * software and its documentation for any purpose and without * + * * fee is hereby granted, provided that the above copyright * + * * notice appear in all copies. The University of California * + * * makes no representations about the suitability of this * + * * software for any purpose. It is provided "as is" without * + * * express or implied warranty. Export of this software outside * + * * of the United States of America may require an export license. * * ********************************************************************* * Lawrence Livermore National Laboratory */ @@ -60,7 +60,7 @@ GlPoint *glCrossAdjust(); int glCrossChoose(); void glCrossTakePin(); - + /* * ---------------------------------------------------------------------------- * @@ -141,7 +141,7 @@ glCrossMark(rootUse, path, pNetId) glCrossTakePin(rootUse, dstPin, markNetId); } } - + /* * ---------------------------------------------------------------------------- * @@ -212,7 +212,7 @@ glCrossTakePin(rootUse, pin, netid) else TxError("%s\n", c); } } - + /* * ---------------------------------------------------------------------------- * @@ -242,7 +242,7 @@ glCrossUnreserve(net) NLTermLoc *loc; NLTerm *term; GCRPin *pin; - + /* De-reserve the pins taken by each terminal location in this net */ for (term = net->nnet_terms; term; term = term->nterm_next) for (loc = term->nterm_locs; loc; loc = loc->nloc_next) @@ -253,7 +253,7 @@ glCrossUnreserve(net) pin->gcr_pSeg = 0; } } - + /* * ---------------------------------------------------------------------------- * @@ -343,7 +343,7 @@ glCrossEnum(inPt, tp, func, cdata) * * lo' = pin with least coordinate >= lo * hi' = pin with greatest coordinate < hi - * + * * The range of pins shared should be non-NULL; if it's not, * something is wrong (most likely the channel is too small). * The pins range from lo to hi, inclusive, and should not @@ -430,7 +430,7 @@ glCrossEnum(inPt, tp, func, cdata) return 0; } - + /* * ---------------------------------------------------------------------------- * @@ -548,7 +548,7 @@ glCrossAdjust(lookAhead, path) return newPath; } - + /* * ---------------------------------------------------------------------------- * @@ -609,7 +609,7 @@ glCrossChoose(newRest, tp, pin, newPath) /* Keep looking at more crossing points */ return 0; } - + /* * ---------------------------------------------------------------------------- * @@ -760,7 +760,7 @@ glCrossCost(lookAhead, exitPt, entryPt) return cost; } - + /* * ---------------------------------------------------------------------------- * diff --git a/grouter/grouteDebug.h b/grouter/grouteDebug.h index 153873d8..14920fc6 100644 --- a/grouter/grouteDebug.h +++ b/grouter/grouteDebug.h @@ -6,16 +6,16 @@ * can be added to it without forcing recompilation of the * entire module. * - * ********************************************************************* - * * Copyright (C) 1985, 1990 Regents of the University of California. * - * * Permission to use, copy, modify, and distribute this * - * * software and its documentation for any purpose and without * - * * fee is hereby granted, provided that the above copyright * - * * notice appear in all copies. The University of California * - * * makes no representations about the suitability of this * - * * software for any purpose. It is provided "as is" without * - * * express or implied warranty. Export of this software outside * - * * of the United States of America may require an export license. * + * ********************************************************************* + * * Copyright (C) 1985, 1990 Regents of the University of California. * + * * Permission to use, copy, modify, and distribute this * + * * software and its documentation for any purpose and without * + * * fee is hereby granted, provided that the above copyright * + * * notice appear in all copies. The University of California * + * * makes no representations about the suitability of this * + * * software for any purpose. It is provided "as is" without * + * * express or implied warranty. Export of this software outside * + * * of the United States of America may require an export license. * * ********************************************************************* * and the Regents of the University of California * diff --git a/grouter/grouteDens.c b/grouter/grouteDens.c index b172f3a3..89b122cb 100644 --- a/grouter/grouteDens.c +++ b/grouter/grouteDens.c @@ -3,16 +3,16 @@ * * Procedures for manipulating DensMap structures. * - * ********************************************************************* - * * Copyright (C) 1985, 1990 Regents of the University of California. * - * * Permission to use, copy, modify, and distribute this * - * * software and its documentation for any purpose and without * - * * fee is hereby granted, provided that the above copyright * - * * notice appear in all copies. The University of California * - * * makes no representations about the suitability of this * - * * software for any purpose. It is provided "as is" without * - * * express or implied warranty. Export of this software outside * - * * of the United States of America may require an export license. * + * ********************************************************************* + * * Copyright (C) 1985, 1990 Regents of the University of California. * + * * Permission to use, copy, modify, and distribute this * + * * software and its documentation for any purpose and without * + * * fee is hereby granted, provided that the above copyright * + * * notice appear in all copies. The University of California * + * * makes no representations about the suitability of this * + * * software for any purpose. It is provided "as is" without * + * * express or implied warranty. Export of this software outside * + * * of the United States of America may require an export license. * * ********************************************************************* */ @@ -38,7 +38,7 @@ static char rcsid[] __attribute__ ((unused)) = "$Header: /usr/cvsroot/magic-8.0/ #include "utils/malloc.h" #include "utils/styles.h" #include "debug/debug.h" - + /* * ---------------------------------------------------------------------------- * @@ -168,7 +168,7 @@ glDensAdjust(dens, srcPin, dstPin, netid) dens[CZ_COL].dm_max = maxhd; return densChanged; } - + /* * ---------------------------------------------------------------------------- * @@ -196,7 +196,7 @@ glDMAlloc(dm, top, cap) dm->dm_cap = cap; dm->dm_value = (short *) callocMagic((unsigned) (sizeof (short) * dm->dm_size)); } - + /* * ---------------------------------------------------------------------------- * @@ -225,7 +225,7 @@ glDMCopy(dm1, dm2) bcopy((char *) dm1->dm_value, (char *) dm2->dm_value, sizeof (short) * dm1->dm_size); } - + /* * ---------------------------------------------------------------------------- * @@ -248,7 +248,7 @@ glDMFree(dm) { freeMagic((char *) dm->dm_value); } - + /* * ---------------------------------------------------------------------------- * @@ -284,7 +284,7 @@ glDMMaxInRange(dm, lo, hi) return (max); } - + /* * ---------------------------------------------------------------------------- * diff --git a/grouter/grouteMain.c b/grouter/grouteMain.c index 52b730f1..e1dfd23d 100644 --- a/grouter/grouteMain.c +++ b/grouter/grouteMain.c @@ -13,16 +13,16 @@ * has the effect of routing more constrained nets first, and less * constrained ones later. * - * ********************************************************************* - * * Copyright (C) 1985, 1990 Regents of the University of California. * - * * Permission to use, copy, modify, and distribute this * - * * software and its documentation for any purpose and without * - * * fee is hereby granted, provided that the above copyright * - * * notice appear in all copies. The University of California * - * * makes no representations about the suitability of this * - * * software for any purpose. It is provided "as is" without * - * * express or implied warranty. Export of this software outside * - * * of the United States of America may require an export license. * + * ********************************************************************* + * * Copyright (C) 1985, 1990 Regents of the University of California. * + * * Permission to use, copy, modify, and distribute this * + * * software and its documentation for any purpose and without * + * * fee is hereby granted, provided that the above copyright * + * * notice appear in all copies. The University of California * + * * makes no representations about the suitability of this * + * * software for any purpose. It is provided "as is" without * + * * express or implied warranty. Export of this software outside * + * * of the United States of America may require an export license. * * ********************************************************************* */ @@ -59,7 +59,7 @@ int glNumTries; /* Debugging too -- # calls to glProcessLoc() */ void glClientInit(); void glClientFree(); - + /* * ---------------------------------------------------------------------------- * @@ -145,7 +145,7 @@ GlGlobalRoute(chanList, netList) glChanFreeMap(); glStatsDone(netList->nnl_numNets, numTerms); } - + /* * ---------------------------------------------------------------------------- * @@ -194,7 +194,7 @@ glClientInit(chanList, netList) for (net = netList->nnl_nets; net; net = net->nnet_next) net->nnet_cdata = (ClientData) callocMagic((unsigned) (sizeof (NetClient))); } - + /* * ---------------------------------------------------------------------------- * @@ -243,7 +243,7 @@ glClientFree(chanList, netList) net->nnet_cdata = (ClientData) NULL; } } - + /* * ---------------------------------------------------------------------------- * diff --git a/grouter/grouteMaze.c b/grouter/grouteMaze.c index 1419dd5a..d422d6ba 100644 --- a/grouter/grouteMaze.c +++ b/grouter/grouteMaze.c @@ -8,16 +8,16 @@ * the search strongly toward the destination rather than * propagating isotropically from the starting points. * - * ********************************************************************* - * * Copyright (C) 1985, 1990 Regents of the University of California. * - * * Permission to use, copy, modify, and distribute this * - * * software and its documentation for any purpose and without * - * * fee is hereby granted, provided that the above copyright * - * * notice appear in all copies. The University of California * - * * makes no representations about the suitability of this * - * * software for any purpose. It is provided "as is" without * - * * express or implied warranty. Export of this software outside * - * * of the United States of America may require an export license. * + * ********************************************************************* + * * Copyright (C) 1985, 1990 Regents of the University of California. * + * * Permission to use, copy, modify, and distribute this * + * * software and its documentation for any purpose and without * + * * fee is hereby granted, provided that the above copyright * + * * notice appear in all copies. The University of California * + * * makes no representations about the suitability of this * + * * software for any purpose. It is provided "as is" without * + * * express or implied warranty. Export of this software outside * + * * of the United States of America may require an export license. * * ********************************************************************* */ @@ -65,7 +65,7 @@ void glMazePropNormal(); void glMazeTile(); bool glMazeCheckLoop(); - + /* * ---------------------------------------------------------------------------- * @@ -162,7 +162,7 @@ glMazeFindPath(loc, bestCost) return lastPt; } - + /* * ---------------------------------------------------------------------------- * @@ -208,7 +208,7 @@ glMazePropFinal(inPt, loc) HeapAddInt(&glMazeHeap, cost, (char *) outPt); glCrossingsAdded++; } - + /* * ---------------------------------------------------------------------------- * @@ -281,7 +281,7 @@ glMazePropRiver(inPt) glCrossingsAdded++; } - + /* * ---------------------------------------------------------------------------- * @@ -335,7 +335,7 @@ glMazePropNormal(inPt) if (NOTBLOCKEDH(tp)) glMazeTile(inPt, tp, GEO_EAST); } - + /* * ---------------------------------------------------------------------------- * @@ -446,7 +446,7 @@ glMazeTile(inPt, tile, dir) break; } } - + /* * ---------------------------------------------------------------------------- * @@ -511,7 +511,7 @@ glMazeTileFunc(inPt, tp, pin) return 1; } - + /* * ---------------------------------------------------------------------------- * @@ -539,7 +539,7 @@ glMazeCheckLoop(path, tp) return FALSE; } - + /* * ---------------------------------------------------------------------------- * diff --git a/grouter/grouteMult.c b/grouter/grouteMult.c index 587b106a..cd493402 100644 --- a/grouter/grouteMult.c +++ b/grouter/grouteMult.c @@ -7,16 +7,16 @@ * something like a steiner-tree, with intermediate points introduced * at channel boundaries. * - * ********************************************************************* - * * Copyright (C) 1985, 1990 Regents of the University of California. * - * * Permission to use, copy, modify, and distribute this * - * * software and its documentation for any purpose and without * - * * fee is hereby granted, provided that the above copyright * - * * notice appear in all copies. The University of California * - * * makes no representations about the suitability of this * - * * software for any purpose. It is provided "as is" without * - * * express or implied warranty. Export of this software outside * - * * of the United States of America may require an export license. * + * ********************************************************************* + * * Copyright (C) 1985, 1990 Regents of the University of California. * + * * Permission to use, copy, modify, and distribute this * + * * software and its documentation for any purpose and without * + * * fee is hereby granted, provided that the above copyright * + * * notice appear in all copies. The University of California * + * * makes no representations about the suitability of this * + * * software for any purpose. It is provided "as is" without * + * * express or implied warranty. Export of this software outside * + * * of the United States of America may require an export license. * * ********************************************************************* */ @@ -46,7 +46,7 @@ static char rcsid[] __attribute__ ((unused)) = "$Header: /usr/cvsroot/magic-8.0/ void glMultiAddStart(); - + /* * ---------------------------------------------------------------------------- * @@ -163,7 +163,7 @@ glMultiSteiner(rootUse, net, routeProc, markProc, cdRoute, cdMark) * After each call to rgRoutePath, 'dest' will be a GlPoint * for one of the zero-cost points to 'loc' (or NULL if no * path could be found). - */ + */ bestCost = INFINITY; bestDest = (GlPoint *) NULL; for (loc = term->nterm_locs; loc; loc = loc->nloc_next) @@ -221,7 +221,7 @@ glMultiSteiner(rootUse, net, routeProc, markProc, cdRoute, cdMark) glPathFreePerm(startList); return nterms; } - + /* * ---------------------------------------------------------------------------- * @@ -254,7 +254,7 @@ glMultiStemCost(loc) return cost; } - + /* * ---------------------------------------------------------------------------- * diff --git a/grouter/grouteName.c b/grouter/grouteName.c index 13b8a417..86699074 100644 --- a/grouter/grouteName.c +++ b/grouter/grouteName.c @@ -2,16 +2,16 @@ * * Maintain a translation from net number to net name. * - * ********************************************************************* - * * Copyright (C) 1985, 1990 Regents of the University of California. * - * * Permission to use, copy, modify, and distribute this * - * * software and its documentation for any purpose and without * - * * fee is hereby granted, provided that the above copyright * - * * notice appear in all copies. The University of California * - * * makes no representations about the suitability of this * - * * software for any purpose. It is provided "as is" without * - * * express or implied warranty. Export of this software outside * - * * of the United States of America may require an export license. * + * ********************************************************************* + * * Copyright (C) 1985, 1990 Regents of the University of California. * + * * Permission to use, copy, modify, and distribute this * + * * software and its documentation for any purpose and without * + * * fee is hereby granted, provided that the above copyright * + * * notice appear in all copies. The University of California * + * * makes no representations about the suitability of this * + * * software for any purpose. It is provided "as is" without * + * * express or implied warranty. Export of this software outside * + * * of the United States of America may require an export license. * * ********************************************************************* */ @@ -39,7 +39,7 @@ char **glNameTable; int glNameTableSize = 0, glNameTableUsed = 0; static bool glNameDidInit = FALSE; - + /* * ---------------------------------------------------------------------------- * @@ -95,7 +95,7 @@ glNetNameInit(netList, numNets) glNameTableUsed = (int) net->nnet_cdata; } } - + /* * ---------------------------------------------------------------------------- * diff --git a/grouter/grouteNet.c b/grouter/grouteNet.c index 3c631dcf..dc80795c 100644 --- a/grouter/grouteNet.c +++ b/grouter/grouteNet.c @@ -8,16 +8,16 @@ * the search strongly toward the destination rather than * propagating isotropically from the starting points. * - * ********************************************************************* - * * Copyright (C) 1985, 1990 Regents of the University of California. * - * * Permission to use, copy, modify, and distribute this * - * * software and its documentation for any purpose and without * - * * fee is hereby granted, provided that the above copyright * - * * notice appear in all copies. The University of California * - * * makes no representations about the suitability of this * - * * software for any purpose. It is provided "as is" without * - * * express or implied warranty. Export of this software outside * - * * of the United States of America may require an export license. * + * ********************************************************************* + * * Copyright (C) 1985, 1990 Regents of the University of California. * + * * Permission to use, copy, modify, and distribute this * + * * software and its documentation for any purpose and without * + * * fee is hereby granted, provided that the above copyright * + * * notice appear in all copies. The University of California * + * * makes no representations about the suitability of this * + * * software for any purpose. It is provided "as is" without * + * * express or implied warranty. Export of this software outside * + * * of the United States of America may require an export license. * * ********************************************************************* */ @@ -105,7 +105,7 @@ int fudgeDenom = 10; /* Marker to indicate an already-processed GlPoint */ #define PROCESSED_MARK ((GlPoint *) 1) - + /* * ---------------------------------------------------------------------------- * @@ -246,7 +246,7 @@ glRouteToPoint(loc, bestCost) return (lastPt); } - + /* * ---------------------------------------------------------------------------- * @@ -276,7 +276,7 @@ glScalePenalties() glChanPenalty *= RtrGridSpacing; glPenaltiesScaled = TRUE; } - + /* * ---------------------------------------------------------------------------- * @@ -346,7 +346,7 @@ glPopFromHeap(pNewBest, newPaths, hEntry) if (*pNewBest) { /* - * Pop bestcost heap until path that hasn't already been + * Pop bestcost heap until path that hasn't already been * processed is reached. (Already processed paths are marked * by setting their gl_next field to PROCESSED_MARK). This * point will be the one with the best possible cost plus @@ -409,7 +409,7 @@ glPopFromHeap(pNewBest, newPaths, hEntry) * The minimum acceptable cost for transfer from the * Reserve heap (glHeap) to the proximity and best heaps * will be glBestCost * (fudgeNumer / fudgeDenom). - */ + */ minAcceptableCost = (glBestCost * fudgeNumer) / fudgeDenom; if (DebugIsSet(glDebugID, glDebHeap)) TxPrintf("Min acceptable cost = %d\n", minAcceptableCost); @@ -470,7 +470,7 @@ glPopFromHeap(pNewBest, newPaths, hEntry) } return TRUE; } - + /* * ---------------------------------------------------------------------------- * @@ -544,7 +544,7 @@ glFinalPropagate(inPt, loc) return (TRUE); } - + /* * ---------------------------------------------------------------------------- * @@ -611,7 +611,7 @@ glRiverPropagate(inPt) return (-1); } - + /* * ---------------------------------------------------------------------------- * @@ -889,7 +889,7 @@ glNormalPropagate(inPt, inCh, heapCost) } else glCrossingsComplete++; } - + /* * ---------------------------------------------------------------------------- * @@ -1065,7 +1065,7 @@ glPinCost(inPt, pin, oldCost) return (MIN(cost, oldCost)); } - + /* * ---------------------------------------------------------------------------- * @@ -1167,7 +1167,7 @@ glSetDensityClip(inPt, ch, dRect) return (dRect->r_xtop >= dRect->r_xbot && dRect->r_ytop >= dRect->r_ybot); } - + /* * ---------------------------------------------------------------------------- * @@ -1253,7 +1253,7 @@ glSetPinClip(inPt, inCh, heapCost, dRect, pRect) /* Clip against dRect */ GEOCLIP(pRect, dRect); } - + /* * ---------------------------------------------------------------------------- * @@ -1294,7 +1294,7 @@ glResetCost(headPage, headFree) headFree = 0; } } - + /* * ---------------------------------------------------------------------------- * @@ -1378,7 +1378,7 @@ glPropagateFn(outCh, outPin, inPt) } return (finalCost); } - + /* * ---------------------------------------------------------------------------- * @@ -1498,7 +1498,7 @@ glCrossPenalty(cost, inCh, outCh, inPin, outPin) return (cost); } - + /* * ---------------------------------------------------------------------------- * @@ -1563,7 +1563,7 @@ glDensityExceeded(inCh, inPin, outPin) return (FALSE); } - + /* * ---------------------------------------------------------------------------- * @@ -1622,7 +1622,7 @@ glRectToRange(ch, r, pr) if (r->r_xtop == ch->gcr_length + 1) pr->pr_rmin = clipR.r_ybot, pr->pr_rmax = clipR.r_ytop; } - + /* * ---------------------------------------------------------------------------- * @@ -1671,7 +1671,7 @@ glJogsAcrossChannel(inPin, outPin) return (FALSE); } - + /* * ---------------------------------------------------------------------------- * @@ -1732,7 +1732,7 @@ glPropagateDebug(inPt, inPin, outCh, outPin, prevCost, distCost) nrMore(mesg); nrShowRect(EditCellUse->cu_def, &r, STYLE_ERASEHIGHLIGHTS); } - + /* * ---------------------------------------------------------------------------- * @@ -1766,7 +1766,7 @@ glLogPath(inPt, cost) inPt->gl_length, cost); } } - + /* * ---------------------------------------------------------------------------- * diff --git a/grouter/groutePath.c b/grouter/groutePath.c index d9f34e70..13e62d9e 100644 --- a/grouter/groutePath.c +++ b/grouter/groutePath.c @@ -3,16 +3,16 @@ * * Global signal router code for low-level manipulation of GlPoints. * - * ********************************************************************* - * * Copyright (C) 1985, 1990 Regents of the University of California. * - * * Permission to use, copy, modify, and distribute this * - * * software and its documentation for any purpose and without * - * * fee is hereby granted, provided that the above copyright * - * * notice appear in all copies. The University of California * - * * makes no representations about the suitability of this * - * * software for any purpose. It is provided "as is" without * - * * express or implied warranty. Export of this software outside * - * * of the United States of America may require an export license. * + * ********************************************************************* + * * Copyright (C) 1985, 1990 Regents of the University of California. * + * * Permission to use, copy, modify, and distribute this * + * * software and its documentation for any purpose and without * + * * fee is hereby granted, provided that the above copyright * + * * notice appear in all copies. The University of California * + * * makes no representations about the suitability of this * + * * software for any purpose. It is provided "as is" without * + * * express or implied warranty. Export of this software outside * + * * of the United States of America may require an export license. * * ********************************************************************* */ @@ -42,7 +42,7 @@ static char sccsid[] = "@(#)groutePoint.c 4.9 MAGIC (Berkeley) 12/6/85"; GlPage *glPathFirstPage = NULL; GlPage *glPathLastPage = NULL; GlPage *glPathCurPage = NULL; - + /* * ---------------------------------------------------------------------------- * @@ -83,7 +83,7 @@ glListAdd(list, pin, cost) newPt->gl_path = *list; *list = newPt; } - + /* * ---------------------------------------------------------------------------- * @@ -135,7 +135,7 @@ glListToHeap(list, destPt) } } } - + /* * ---------------------------------------------------------------------------- * @@ -192,7 +192,7 @@ glPathFreePerm(list) freeMagic((char *) p); return 0; } - + /* * ---------------------------------------------------------------------------- * @@ -252,7 +252,7 @@ glPathNew(pin, cost, prev) return result; } - + /* * ---------------------------------------------------------------------------- * diff --git a/grouter/groutePen.c b/grouter/groutePen.c index 87e1fd46..f02d4b38 100644 --- a/grouter/groutePen.c +++ b/grouter/groutePen.c @@ -4,16 +4,16 @@ * Computation of the penalties to be assigned for each net using * certain congested regions. * - * ********************************************************************* - * * Copyright (C) 1985, 1990 Regents of the University of California. * - * * Permission to use, copy, modify, and distribute this * - * * software and its documentation for any purpose and without * - * * fee is hereby granted, provided that the above copyright * - * * notice appear in all copies. The University of California * - * * makes no representations about the suitability of this * - * * software for any purpose. It is provided "as is" without * - * * express or implied warranty. Export of this software outside * - * * of the United States of America may require an export license. * + * ********************************************************************* + * * Copyright (C) 1985, 1990 Regents of the University of California. * + * * Permission to use, copy, modify, and distribute this * + * * software and its documentation for any purpose and without * + * * fee is hereby granted, provided that the above copyright * + * * notice appear in all copies. The University of California * + * * makes no representations about the suitability of this * + * * software for any purpose. It is provided "as is" without * + * * express or implied warranty. Export of this software outside * + * * of the United States of America may require an export license. * * ********************************************************************* */ @@ -49,7 +49,7 @@ NetSet *glPenFindCrossingNets(); CZone *glPenScanDens(); CZone *glPenFindCZones(); - + /* * ---------------------------------------------------------------------------- * @@ -108,7 +108,7 @@ glPenClearPerChan(net) } return 0; } - + /* * ---------------------------------------------------------------------------- * @@ -240,7 +240,7 @@ glPenCompute(chanList, netList) } #endif /* notdef */ } - + /* * ---------------------------------------------------------------------------- * @@ -277,7 +277,7 @@ glPenFindCZones(chanList) return czList; } - + /* * ---------------------------------------------------------------------------- * @@ -352,7 +352,7 @@ glPenScanDens(czList, ch, dm, type) return czList; } - + /* * ---------------------------------------------------------------------------- * @@ -486,7 +486,7 @@ glPenSortNetSet(ns1, ns2) if ((*ns1)->ns_cost < (*ns2)->ns_cost) return -1; return 0; } - + /* * ---------------------------------------------------------------------------- * @@ -539,7 +539,7 @@ glPenFindCrossingNets(cz, netList) return rcc.rcc_set; } - + /* * ---------------------------------------------------------------------------- * @@ -575,7 +575,7 @@ glPenFindCrossingFunc(cz, srcPin, dstPin, rcc) rcc->rcc_set = ns; return 1; } - + /* * ---------------------------------------------------------------------------- * @@ -650,7 +650,7 @@ glPenEnumCross(cz, rp, func, cdata) return 0; } - + /* * ---------------------------------------------------------------------------- * @@ -711,7 +711,7 @@ glPenRouteCost(rootUse, bestPath, pNetId, pCost) *pCost += bestPath->gl_cost; return 0; } - + /* * ---------------------------------------------------------------------------- * @@ -796,7 +796,7 @@ glPenDeleteFunc(cz, srcPin, dstPin, dm) return 0; } - + /* * ---------------------------------------------------------------------------- * @@ -826,7 +826,7 @@ glPenCleanNet(net) ListDealloc(list); nc->nc_paths = (List *) NULL; } - + /* * ---------------------------------------------------------------------------- * @@ -860,7 +860,7 @@ glPenSavePath(rootUse, path, pNetId) newpath = glPathCopyPerm(path); LIST_ADD(newpath, nc->nc_paths); } - + /* * ---------------------------------------------------------------------------- * diff --git a/grouter/groutePin.c b/grouter/groutePin.c index 56a62f4b..f286ad15 100644 --- a/grouter/groutePin.c +++ b/grouter/groutePin.c @@ -4,16 +4,16 @@ * Global signal router code to implement operations on pins at * the boundaries of channels. * - * ********************************************************************* - * * Copyright (C) 1985, 1990 Regents of the University of California. * - * * Permission to use, copy, modify, and distribute this * - * * software and its documentation for any purpose and without * - * * fee is hereby granted, provided that the above copyright * - * * notice appear in all copies. The University of California * - * * makes no representations about the suitability of this * - * * software for any purpose. It is provided "as is" without * - * * express or implied warranty. Export of this software outside * - * * of the United States of America may require an export license. * + * ********************************************************************* + * * Copyright (C) 1985, 1990 Regents of the University of California. * + * * Permission to use, copy, modify, and distribute this * + * * software and its documentation for any purpose and without * + * * fee is hereby granted, provided that the above copyright * + * * notice appear in all copies. The University of California * + * * makes no representations about the suitability of this * + * * software for any purpose. It is provided "as is" without * + * * express or implied warranty. Export of this software outside * + * * of the United States of America may require an export license. * * ********************************************************************* */ @@ -39,7 +39,7 @@ static char sccsid[] = "@(#)groutePin.c 4.9 MAGIC (Berkeley) 12/8/85"; #include "grouter/grouter.h" #include "textio/textio.h" - + /* * ---------------------------------------------------------------------------- * @@ -100,7 +100,7 @@ glPointToPin(ch, side, point) ASSERT(FALSE, "Pin not on side of channel in glPointToPin"); return &ch->gcr_lPins[0]; } - + /* * ---------------------------------------------------------------------------- * @@ -243,7 +243,7 @@ glPinArrayInit(ch, side, pins, nPins) } } } - + /* * ---------------------------------------------------------------------------- * @@ -258,7 +258,7 @@ glPinArrayInit(ch, side, pins, nPins) * * Also propagate obstacle flags for pins. If a pin's obstacle flags * contain GCROBST, then set this bit in gcr_linked's flags as well. - * + * * Results: * TRUE if the blockage state of any pins changed, FALSE * otherwise. The caller should iterate over all channels @@ -332,7 +332,7 @@ glPinArrayBlock(ch, pins, opins, nPins) return changed; } - + /* * ---------------------------------------------------------------------------- * @@ -342,7 +342,7 @@ glPinArrayBlock(ch, pins, opins, nPins) * list headed by the zero-th pin along that side. Usable pins (for purposes * of global routing) are those that are unassigned (gcr_pId == 0) and that * have gcr_linked != NULL. - * + * * Results: * None. * @@ -429,7 +429,7 @@ glShowPin(pin) nrShowRect(EditCellUse->cu_def, &r, STYLE_ERASEHIGHLIGHTS); #endif /* notdef */ } - + /* * ---------------------------------------------------------------------------- * @@ -439,7 +439,7 @@ glShowPin(pin) * actually used during global routing. The unused ones have gcr_pSeg * equal to GCR_STEMSEGID and must be unmarked here (otherwise the channel * router will try to route them!). - * + * * Results: * None. * diff --git a/grouter/grouteTest.c b/grouter/grouteTest.c index b54bcff3..27b5163f 100644 --- a/grouter/grouteTest.c +++ b/grouter/grouteTest.c @@ -3,16 +3,16 @@ * * Testing code for the global router. * - * ********************************************************************* - * * Copyright (C) 1985, 1990 Regents of the University of California. * - * * Permission to use, copy, modify, and distribute this * - * * software and its documentation for any purpose and without * - * * fee is hereby granted, provided that the above copyright * - * * notice appear in all copies. The University of California * - * * makes no representations about the suitability of this * - * * software for any purpose. It is provided "as is" without * - * * express or implied warranty. Export of this software outside * - * * of the United States of America may require an export license. * + * ********************************************************************* + * * Copyright (C) 1985, 1990 Regents of the University of California. * + * * Permission to use, copy, modify, and distribute this * + * * software and its documentation for any purpose and without * + * * fee is hereby granted, provided that the above copyright * + * * notice appear in all copies. The University of California * + * * makes no representations about the suitability of this * + * * software for any purpose. It is provided "as is" without * + * * express or implied warranty. Export of this software outside * + * * of the United States of America may require an export license. * * ********************************************************************* */ @@ -92,7 +92,7 @@ GlNetHisto *glNetHistoList = NULL; void GlInit(); void glShowCross(); - + /* * ---------------------------------------------------------------------------- * @@ -233,7 +233,7 @@ glDebugSides(side) return 0; } - + /* * ---------------------------------------------------------------------------- * @@ -291,7 +291,7 @@ GlInit() for (n = 0; dflags[n].di_name; n++) *(dflags[n].di_id) = DebugAddFlag(glDebugID, dflags[n].di_name); } - + /* * ---------------------------------------------------------------------------- * @@ -320,7 +320,7 @@ glShowPath(dest, root, kind) for (temp = dest; temp != root; temp = temp->gl_path) glShowCross(temp->gl_pin, dummyId, kind); } - + /* * ---------------------------------------------------------------------------- * @@ -381,7 +381,7 @@ glShowCross(pin, netId, kind) r.r_ytop += RtrMetalWidth; ShowRect(EditCellUse->cu_def, &r, style); } - + /* * ---------------------------------------------------------------------------- * @@ -413,7 +413,7 @@ glHistoAdd(heapPtsBefore, frontierPtsBefore, startPtsBefore) gh->glh_next = glNetHistoList; glNetHistoList = gh; } - + /* * ---------------------------------------------------------------------------- * @@ -511,7 +511,7 @@ glHistoDump() /* Done */ (void) fclose(fp); } - + /* * ---------------------------------------------------------------------------- * @@ -554,7 +554,7 @@ glStatsInit() perror(logFileName); } } - + /* * ---------------------------------------------------------------------------- * diff --git a/grouter/grouteTile.c b/grouter/grouteTile.c index 774f95f3..f913f966 100644 --- a/grouter/grouteTile.c +++ b/grouter/grouteTile.c @@ -2,16 +2,16 @@ * * Global signal router code for tile and channel related things. * - * ********************************************************************* - * * Copyright (C) 1985, 1990 Regents of the University of California. * - * * Permission to use, copy, modify, and distribute this * - * * software and its documentation for any purpose and without * - * * fee is hereby granted, provided that the above copyright * - * * notice appear in all copies. The University of California * - * * makes no representations about the suitability of this * - * * software for any purpose. It is provided "as is" without * - * * express or implied warranty. Export of this software outside * - * * of the United States of America may require an export license. * + * ********************************************************************* + * * Copyright (C) 1985, 1990 Regents of the University of California. * + * * Permission to use, copy, modify, and distribute this * + * * software and its documentation for any purpose and without * + * * fee is hereby granted, provided that the above copyright * + * * notice appear in all copies. The University of California * + * * makes no representations about the suitability of this * + * * software for any purpose. It is provided "as is" without * + * * express or implied warranty. Export of this software outside * + * * of the United States of America may require an export license. * * ********************************************************************* */ @@ -43,7 +43,7 @@ bool GlDebugCrossings = FALSE; #define isSpaceTile(tile) (TiGetBody(tile) == NULL) - + /* * ---------------------------------------------------------------------------- * @@ -93,7 +93,7 @@ glAdjacentChannel(ch, point) return (glTileToChannel(TiSrPointNoHint(RtrChannelPlane, &p))); } - + /* * ---------------------------------------------------------------------------- * @@ -131,7 +131,7 @@ glBadChannel(oldCh, newCh, entryPt) return (FALSE); } - + /* * ---------------------------------------------------------------------------- * @@ -177,7 +177,7 @@ glDebug(point, text, value, size) GlDebugCrossings = FALSE; TxPrintf("\n"); } - + /* * ---------------------------------------------------------------------------- * @@ -199,7 +199,7 @@ glDebug(point, text, value, size) GCRChannel * glPointToChannel(point, dir) - Point *point; /* The point from which the channel is found */ + Point *point; /* The point from which the channel is found */ int dir; /* The direction in which the search goes */ { Point p; @@ -222,7 +222,7 @@ glPointToChannel(point, dir) } return (glTileToChannel(TiSrPointNoHint(RtrChannelPlane, &p))); } - + /* * ---------------------------------------------------------------------------- * @@ -267,7 +267,7 @@ glPointToSide(ch, pt) ASSERT(FALSE, "glPointToSide point not on edge"); return (GEO_CENTER); } - + /* * ---------------------------------------------------------------------------- * @@ -362,7 +362,7 @@ glSide(point) } return(GEO_CENTER); } - + /* * ---------------------------------------------------------------------------- * diff --git a/grouter/grouter.h b/grouter/grouter.h index 1e1de64a..a061deeb 100644 --- a/grouter/grouter.h +++ b/grouter/grouter.h @@ -3,16 +3,16 @@ * * Header file for the global router. * - * ********************************************************************* - * * Copyright (C) 1985, 1990 Regents of the University of California. * - * * Permission to use, copy, modify, and distribute this * - * * software and its documentation for any purpose and without * - * * fee is hereby granted, provided that the above copyright * - * * notice appear in all copies. The University of California * - * * makes no representations about the suitability of this * - * * software for any purpose. It is provided "as is" without * - * * express or implied warranty. Export of this software outside * - * * of the United States of America may require an export license. * + * ********************************************************************* + * * Copyright (C) 1985, 1990 Regents of the University of California. * + * * Permission to use, copy, modify, and distribute this * + * * software and its documentation for any purpose and without * + * * fee is hereby granted, provided that the above copyright * + * * notice appear in all copies. The University of California * + * * makes no representations about the suitability of this * + * * software for any purpose. It is provided "as is" without * + * * express or implied warranty. Export of this software outside * + * * of the United States of America may require an export license. * * ********************************************************************* * * diff --git a/irouter/irCommand.c b/irouter/irCommand.c index 700ba795..f48c2c10 100644 --- a/irouter/irCommand.c +++ b/irouter/irCommand.c @@ -2,22 +2,22 @@ * irCommand.c -- * * Command interface for interactive router. This file processes command - * lines beginning with the `iroute' command. - * - * (The "wizard" command, `*iroute', for testing, debugging, etc., + * lines beginning with the `iroute' command. + * + * (The "wizard" command, `*iroute', for testing, debugging, etc., * is processed in irTestCmd.c.) - * - * ********************************************************************* + * + * ********************************************************************* * * Copyright (C) 1987, 1990 Michael H. Arnold, Walter S. Scott, and * - * * the Regents of the University of California. * - * * Permission to use, copy, modify, and distribute this * - * * software and its documentation for any purpose and without * - * * fee is hereby granted, provided that the above copyright * - * * notice appear in all copies. The University of California * - * * makes no representations about the suitability of this * - * * software for any purpose. It is provided "as is" without * - * * express or implied warranty. Export of this software outside * - * * of the United States of America may require an export license. * + * * the Regents of the University of California. * + * * Permission to use, copy, modify, and distribute this * + * * software and its documentation for any purpose and without * + * * fee is hereby granted, provided that the above copyright * + * * notice appear in all copies. The University of California * + * * makes no representations about the suitability of this * + * * software for any purpose. It is provided "as is" without * + * * express or implied warranty. Export of this software outside * + * * of the United States of America may require an export license. * * ********************************************************************* * */ @@ -65,9 +65,9 @@ typedef struct char *sC_usage; /* command syntax */ } SubCmdTableE; -extern SubCmdTableE irSubcommands[]; +extern SubCmdTableE irSubcommands[]; + - /* * ---------------------------------------------------------------------------- * @@ -91,7 +91,7 @@ extern SubCmdTableE irSubcommands[]; * TxPrintf * * If file is (FILE *)1, parameter value is returned as a Tcl object - * + * * ---------------------------------------------------------------------------- */ @@ -113,7 +113,7 @@ irSetNoisyAutoInt(parm, valueS, file) "automatic", V_AUTOMATIC, 0 }; - + /* If value non-null set parm */ if(valueS!=NULL) { @@ -122,7 +122,7 @@ irSetNoisyAutoInt(parm, valueS, file) /* check if special value */ which = LookupStruct( valueS, - (char **) specialValues, + (char **) specialValues, sizeof specialValues[0]); if(which == -1) @@ -179,13 +179,13 @@ irSetNoisyAutoInt(parm, valueS, file) else { TxPrintf("%8d ",*parm); - } + } } return; } - + /* * ---------------------------------------------------------------------------- * @@ -200,7 +200,7 @@ irSetNoisyAutoInt(parm, valueS, file) * Call low level routine of appropriate type to set/display parameter. * Value of parm can be displayed either in Magic text window (file is * NULL) or to a file. - * + * * ---------------------------------------------------------------------------- */ @@ -257,7 +257,7 @@ irLSetHCost(rL,s,file) SetNoisyInt(&(rL->rl_hCost),s,file); return NULL; } - + /* irLSetVCost -- */ Tcl_Obj * irLSetVCost(rL,s,file) @@ -351,7 +351,7 @@ irLSetHCost(rL,s,file) { SetNoisyInt(&(rL->rl_hCost),s,file); } - + /* irLSetVCost -- */ void irLSetVCost(rL,s,file) @@ -372,7 +372,7 @@ irLSetJogCost(rL,s,file) SetNoisyInt(&(rL->rl_jogCost),s,file); } - + /* irLSetHintCost -- */ void irLSetHintCost(rL,s,file) @@ -395,7 +395,7 @@ irLSetOverCost(rL,s,file) #endif - + /* * ---------------------------------------------------------------------------- * @@ -410,10 +410,10 @@ irLSetOverCost(rL,s,file) * Call low level routine of appropriate type to set/display parameter. * Value of parm can be displayed either in Magic text window (file is * NULL) or to a file. - * + * * ---------------------------------------------------------------------------- */ - + #ifdef MAGIC_WRAPPER /* irCSetActive -- */ @@ -441,7 +441,7 @@ irCSetWidth(rC,s,file) SetNoisyInt(&(rC->rc_routeType.rt_width),s,file); return NULL; } - + /* irCSetLength-- */ Tcl_Obj * irCSetLength(rC,s,file) @@ -489,7 +489,7 @@ irCSetWidth(rC,s,file) { SetNoisyInt(&(rC->rc_routeType.rt_width),s,file); } - + /* irCSetLength -- */ void irCSetLength(rC,s,file) @@ -499,7 +499,7 @@ irCSetLength(rC,s,file) { SetNoisyInt(&(rC->rc_routeType.rt_length),s,file); } - + /* irCSetCost -- */ void irCSetCost(rC,s,file) @@ -513,7 +513,7 @@ irCSetCost(rC,s,file) #endif - + /* * ---------------------------------------------------------------------------- * @@ -528,11 +528,11 @@ irCSetCost(rC,s,file) * Call low level routine of appropriate type to set/display parameter. * Value of parm can be displayed either in Magic text window (file is * NULL) or to a file. - * + * * ---------------------------------------------------------------------------- */ - + /* irSrSetRate -- */ void irSrSetRate(s,file) @@ -551,7 +551,7 @@ irSrSetWidth(s,file) SetNoisyDI(&(irMazeParms->mp_wWidth),s,file); } - + /* * ---------------------------------------------------------------------------- * @@ -566,7 +566,7 @@ irSrSetWidth(s,file) * Call low level routine of appropriate type to set/display parameter. * Value of parm can be displayed either in Magic text window (file is * NULL) or to a file. - * + * * ---------------------------------------------------------------------------- */ @@ -627,7 +627,7 @@ irWzdSetPenalty(s, file) float value; if(sscanf(s,"%f",&value)==1) { - irMazeParms->mp_penalty.rf_mantissa = + irMazeParms->mp_penalty.rf_mantissa = (int) (value * (1<mp_penalty.rf_nExponent)); } else @@ -690,7 +690,7 @@ FILE *file; /* check if special arg */ which = LookupStruct( s, - (char **) specialArgs, + (char **) specialArgs, sizeof specialArgs[0]); if(which == -1) @@ -754,11 +754,11 @@ FILE *file; TxPrintf("%d",irRouteWid); } } - + return; } - + /* * ---------------------------------------------------------------------------- * @@ -771,7 +771,7 @@ FILE *file; * * Side effects: * Modify contact parameters and display them. - * + * * ---------------------------------------------------------------------------- */ @@ -822,11 +822,11 @@ irContactsCmd(w, cmd) #endif nV_i = argc - 1; - + /* Process by case */ if(argc == 2 || (argc == 3 && (strcmp(cmd->tx_argv[2],"*")==0)) || - (argc >= 4 && + (argc >= 4 && (strcmp(cmd->tx_argv[2],"*")==0) && (strcmp(cmd->tx_argv[3],"*")==0))) { @@ -891,9 +891,9 @@ irContactsCmd(w, cmd) /* PROCESS ALL PARMS ASSOCIATED WITH CONTACT */ /* convert layer string to tileType */ tileType = DBTechNameType(cmd->tx_argv[2]); - if(tileType<0) + if(tileType<0) { - TxError("Unrecognized layer (type): \"%.20s\"\n", + TxError("Unrecognized layer (type): \"%.20s\"\n", cmd->tx_argv[2]); return; } @@ -924,9 +924,9 @@ irContactsCmd(w, cmd) } TxPrintf("\n"); } - else + else { - TxError("Unrecognized route-contact: \"%.20s\"\n", + TxError("Unrecognized route-contact: \"%.20s\"\n", cmd->tx_argv[2]); return; } @@ -934,18 +934,18 @@ irContactsCmd(w, cmd) else if(argc>=4 && strcmp(cmd->tx_argv[2],"*")==0) { /* PROCESS A COLUMN (THE VALUES OF A PARAMETER FOR ALL CONTACTS) */ - + /* Lookup parameter name in contact parm table */ which = LookupStruct( - cmd->tx_argv[3], - (char **) cParms, + cmd->tx_argv[3], + (char **) cParms, sizeof cParms[0]); /* Process table lookup */ if (which == -1) { /* AMBIGUOUS PARAMETER */ - TxError("Ambiguous parameter: \"%s\"\n", + TxError("Ambiguous parameter: \"%s\"\n", cmd->tx_argv[3]); return; } @@ -960,7 +960,7 @@ irContactsCmd(w, cmd) return; } - else + else { /* CONTACT PARAMETER FOUND */ @@ -989,9 +989,9 @@ irContactsCmd(w, cmd) /* PROCESS PARAMETER ASSOCIATED WITH CONTACT */ /* convert layer string to tileType */ tileType = DBTechNameType(cmd->tx_argv[2]); - if(tileType<0) + if(tileType<0) { - TxError("Unrecognized layer (type): \"%.20s\"\n", + TxError("Unrecognized layer (type): \"%.20s\"\n", cmd->tx_argv[2]); return; } @@ -1000,14 +1000,14 @@ irContactsCmd(w, cmd) { /* Lookup contact parameter name in table */ which = LookupStruct( - cmd->tx_argv[3], - (char **) cParms, + cmd->tx_argv[3], + (char **) cParms, sizeof cParms[0]); /* Process result of lookup */ if (which >= 0) { - /* parameter found - call proc that processes it + /* parameter found - call proc that processes it * NULL second arg means display only */ (*cParms[which].cP_proc)(rC,NEXTVALUE,NULL); @@ -1016,7 +1016,7 @@ irContactsCmd(w, cmd) else if (which == -1) { /* ambiguous parameter - complain */ - TxError("Ambiguous parameter: \"%s\"\n", + TxError("Ambiguous parameter: \"%s\"\n", cmd->tx_argv[3]); return; } @@ -1031,9 +1031,9 @@ irContactsCmd(w, cmd) return; } } - else + else { - TxError("Unrecognized route-contact: \"%.20s\"\n", + TxError("Unrecognized route-contact: \"%.20s\"\n", cmd->tx_argv[2]); return; } @@ -1049,7 +1049,7 @@ irContactsCmd(w, cmd) return; } - + /* * ---------------------------------------------------------------------------- * @@ -1063,7 +1063,7 @@ irContactsCmd(w, cmd) * * Side effects: * Display requested help info. - * + * * ---------------------------------------------------------------------------- */ @@ -1093,8 +1093,8 @@ irHelpCmd(w, cmd) { /* Lookup subcommand in table, and printed associated help info */ which = LookupStruct( - cmd->tx_argv[2], - (char **) irSubcommands, + cmd->tx_argv[2], + (char **) irSubcommands, sizeof irSubcommands[0]); /* Process result of lookup */ @@ -1115,7 +1115,7 @@ irHelpCmd(w, cmd) else { /* unrecognized subcommand - complain */ - TxError("Unrecognized iroute subcommand: \"%s\"\n", + TxError("Unrecognized iroute subcommand: \"%s\"\n", cmd->tx_argv[2]); TxError("Valid iroute irSubcommands are: "); for (n = 0; irSubcommands[n].sC_name; n++) @@ -1127,7 +1127,7 @@ irHelpCmd(w, cmd) return; } - + /* * ---------------------------------------------------------------------------- * @@ -1140,7 +1140,7 @@ irHelpCmd(w, cmd) * * Side effects: * Modify contact parameters and display them. - * + * * ---------------------------------------------------------------------------- */ @@ -1172,7 +1172,7 @@ static struct (nV_i >= argc-1) ? cmd->tx_argv[nV_i=4] : cmd->tx_argv[++nV_i] \ ) - /*ARGSUSED*/ + /*ARGSUSED*/ void irLayersCmd(w, cmd) MagWindow *w; @@ -1196,11 +1196,11 @@ irLayersCmd(w, cmd) #endif nV_i = argc - 1; - + /* Process by case */ if(argc == 2 || (argc == 3 && (strcmp(cmd->tx_argv[2],"*")==0)) || - (argc >= 4 && + (argc >= 4 && (strcmp(cmd->tx_argv[2],"*")==0) && (strcmp(cmd->tx_argv[3],"*")==0))) { @@ -1249,7 +1249,7 @@ irLayersCmd(w, cmd) /* Process parms for each route layer */ for (rL=irRouteLayers; rL!= NULL; rL=rL->rl_next) { - TxPrintf("%-12.12s ", + TxPrintf("%-12.12s ", DBTypeLongNameTbl[rL->rl_routeType.rt_tileType]); for(n=0; lParms[n].lP_name; n++) { @@ -1265,9 +1265,9 @@ irLayersCmd(w, cmd) /* PROCESS ALL PARMS ASSOCIATED WITH ROUTE LAYER */ /* convert layer string to tileType */ tileType = DBTechNameType(cmd->tx_argv[2]); - if(tileType<0) + if(tileType<0) { - TxError("Unrecognized layer (type): \"%.20s\"\n", + TxError("Unrecognized layer (type): \"%.20s\"\n", cmd->tx_argv[2]); return; } @@ -1290,7 +1290,7 @@ irLayersCmd(w, cmd) TxPrintf("\n"); /* Process parms for route layer */ - TxPrintf("%-12.12s ", + TxPrintf("%-12.12s ", DBTypeLongNameTbl[rL->rl_routeType.rt_tileType]); for(n=0; lParms[n].lP_name; n++) { @@ -1298,9 +1298,9 @@ irLayersCmd(w, cmd) } TxPrintf("\n"); } - else + else { - TxError("Unrecognized route layer or contact: \"%.20s\"\n", + TxError("Unrecognized route layer or contact: \"%.20s\"\n", cmd->tx_argv[2]); return; } @@ -1308,18 +1308,18 @@ irLayersCmd(w, cmd) else if(argc>=4 && strcmp(cmd->tx_argv[2],"*")==0) { /* PROCESS A COLUMN (THE VALUES OF A PARAMETER FOR ALL LAYERS) */ - + /* Lookup parameter name in layer parm table */ which = LookupStruct( - cmd->tx_argv[3], - (char **) lParms, + cmd->tx_argv[3], + (char **) lParms, sizeof lParms[0]); /* Process table lookup */ if (which == -1) { /* AMBIGUOUS PARAMETER */ - TxError("Ambiguous parameter: \"%s\"\n", + TxError("Ambiguous parameter: \"%s\"\n", cmd->tx_argv[3]); return; } @@ -1345,14 +1345,14 @@ irLayersCmd(w, cmd) TxPrintf("\n"); TxPrintf("%-12.12s ", irRepeatChar(strlen("layer"),'-')); - TxPrintf("%8.8s ", + TxPrintf("%8.8s ", irRepeatChar(strlen(lParms[which].lP_name),'-')); TxPrintf("\n"); /* Process parm for each route layer */ for (rL=irRouteLayers; rL!= NULL; rL=rL->rl_next) { - TxPrintf("%-12.12s ", + TxPrintf("%-12.12s ", DBTypeLongNameTbl[rL->rl_routeType.rt_tileType]); (*lParms[which].lP_proc)(rL,NEXTVALUE,NULL); TxPrintf("\n"); @@ -1365,9 +1365,9 @@ irLayersCmd(w, cmd) /* PROCESS PARAMETER ASSOCIATED WITH ROUTE LAYER */ /* convert layer string to tileType */ tileType = DBTechNameType(cmd->tx_argv[2]); - if(tileType<0) + if(tileType<0) { - TxError("Unrecognized layer (type): \"%.20s\"\n", + TxError("Unrecognized layer (type): \"%.20s\"\n", cmd->tx_argv[2]); return; } @@ -1376,14 +1376,14 @@ irLayersCmd(w, cmd) { /* Lookup route layer parameter name in table */ which = LookupStruct( - cmd->tx_argv[3], - (char **) lParms, + cmd->tx_argv[3], + (char **) lParms, sizeof lParms[0]); /* Process result of lookup */ if (which >= 0) { - /* parameter found - call proc that processes it + /* parameter found - call proc that processes it * NULL second arg means display only */ (*lParms[which].lP_proc)(rL,NEXTVALUE,NULL); @@ -1392,7 +1392,7 @@ irLayersCmd(w, cmd) else if (which == -1) { /* ambiguous parameter - complain */ - TxError("Ambiguous parameter: \"%s\"\n", + TxError("Ambiguous parameter: \"%s\"\n", cmd->tx_argv[3]); return; } @@ -1407,9 +1407,9 @@ irLayersCmd(w, cmd) return; } } - else + else { - TxError("Unrecognized layer: \"%.20s\"\n", + TxError("Unrecognized layer: \"%.20s\"\n", cmd->tx_argv[2]); return; } @@ -1424,20 +1424,20 @@ irLayersCmd(w, cmd) return; } - + /* * ---------------------------------------------------------------------------- * * irRouteCmd -- * - * Irouter subcommand to actually do a route. + * Irouter subcommand to actually do a route. * * Results: * None. * * Side effects: * Compute a route and paint it into edit cell. - * + * * ---------------------------------------------------------------------------- */ @@ -1492,7 +1492,7 @@ irRouteCmd(w, cmd) while(itx_argc == 2) /* print values of all parms */ @@ -1766,7 +1766,7 @@ irSearchCmd(w, cmd) for(n=0; srParms[n].srP_name; n++) { - TxPrintf(" %s=", srParms[n].srP_name); + TxPrintf(" %s=", srParms[n].srP_name); (*srParms[n].srP_proc)(NULL,NULL); } TxPrintf("\n"); @@ -1778,15 +1778,15 @@ irSearchCmd(w, cmd) /* Lookup parameter name in contact parm table */ which = LookupStruct( - cmd->tx_argv[2], - (char **) srParms, + cmd->tx_argv[2], + (char **) srParms, sizeof srParms[0]); /* Process table lookup */ if (which == -1) /* parameter ambiguous */ { - TxError("Ambiguous parameter: \"%s\"\n", + TxError("Ambiguous parameter: \"%s\"\n", cmd->tx_argv[2]); return; } @@ -1802,7 +1802,7 @@ irSearchCmd(w, cmd) TxError("\n"); return; } - else + else /* parameter found - process it */ { char *arg; @@ -1818,7 +1818,7 @@ irSearchCmd(w, cmd) arg = cmd->tx_argv[3]; } - TxPrintf(" %s=", srParms[which].srP_name); + TxPrintf(" %s=", srParms[which].srP_name); (*srParms[which].srP_proc)(arg,NULL); TxPrintf("\n"); } @@ -1833,22 +1833,22 @@ irSearchCmd(w, cmd) return; } - + /* * ---------------------------------------------------------------------------- * * irSpacingsCmd -- * - * Irouter subcommand to set and display minimum spacings between - * routetypes. - * + * Irouter subcommand to set and display minimum spacings between + * routetypes. + * * * Results: * None. * * Side effects: - * Modify and display spacing parameters. - * + * Modify and display spacing parameters. + * * ---------------------------------------------------------------------------- */ @@ -1893,7 +1893,7 @@ irSpacingsCmd(w, cmd) /* Print spacings for each route type */ for (rT=irRouteTypes; rT!= NULL; rT=rT->rt_next) { - TxPrintf("%s: ", + TxPrintf("%s: ", DBTypeLongNameTbl[rT->rt_tileType]); for (i=0;irt_spacing[i]>=0) @@ -1921,9 +1921,9 @@ irSpacingsCmd(w, cmd) /* convert layer string to tileType */ tileType = DBTechNameType(cmd->tx_argv[2]); - if(tileType<0) + if(tileType<0) { - TxError("Unrecognized layer (type): \"%.20s\"\n", + TxError("Unrecognized layer (type): \"%.20s\"\n", cmd->tx_argv[2]); return; } @@ -1931,7 +1931,7 @@ irSpacingsCmd(w, cmd) if (rT=irFindRouteType(tileType)) { - TxPrintf("%s: ", + TxPrintf("%s: ", DBTypeLongNameTbl[rT->rt_tileType]); for (i=0;irt_spacing[i]>=0) @@ -1941,9 +1941,9 @@ irSpacingsCmd(w, cmd) TxPrintf("%s=%d ","SUBCELL",rT->rt_spacing[TT_SUBCELL]); TxPrintf("\n\n"); } - else + else { - TxError("Unrecognized route layer or contact: \"%.20s\"\n", + TxError("Unrecognized route layer or contact: \"%.20s\"\n", cmd->tx_argv[2]); return; } @@ -1952,26 +1952,26 @@ irSpacingsCmd(w, cmd) else if(cmd->tx_argc==4) { /* PRINT VALUE OF GIVEN SPACING */ - + /* convert layer string to tileType */ tileType = DBTechNameType(cmd->tx_argv[2]); - if(tileType<0) + if(tileType<0) { - TxError("Unrecognized layer (type): \"%.20s\"\n", + TxError("Unrecognized layer (type): \"%.20s\"\n", cmd->tx_argv[2]); return; } if ((rT=irFindRouteType(tileType))==NULL) { - TxError("Unrecognized route layer or contact: \"%.20s\"\n", + TxError("Unrecognized route layer or contact: \"%.20s\"\n", cmd->tx_argv[2]); return; } /* convert type-string spacing is "to" to tiletype */ tileType = DBTechNameType(cmd->tx_argv[3]); - if(tileType<0) + if(tileType<0) { /* if not a real type, check to see if "SUBCELL" */ which = LookupStruct( @@ -1981,9 +1981,9 @@ irSpacingsCmd(w, cmd) if ( which>= 0) tileType = TT_SUBCELL; } - if(tileType<0) + if(tileType<0) { - TxError("Unrecognized layer (type): \"%.20s\"\n", + TxError("Unrecognized layer (type): \"%.20s\"\n", cmd->tx_argv[3]); return; } @@ -2003,19 +2003,19 @@ irSpacingsCmd(w, cmd) else { /* SET SPACINGS */ - + /* convert layer string to tileType */ tileType = DBTechNameType(cmd->tx_argv[2]); - if(tileType<0) + if(tileType<0) { - TxError("Unrecognized layer (type): \"%.20s\"\n", + TxError("Unrecognized layer (type): \"%.20s\"\n", cmd->tx_argv[2]); return; } if ((rT=irFindRouteType(tileType))==NULL) { - TxError("Unrecognized route layer or contact: \"%.20s\"\n", + TxError("Unrecognized route layer or contact: \"%.20s\"\n", cmd->tx_argv[2]); return; } @@ -2028,7 +2028,7 @@ irSpacingsCmd(w, cmd) { /* convert type-string spacing is "to" to tiletype */ tileType = DBTechNameType(cmd->tx_argv[argI]); - if(tileType<0) + if(tileType<0) { /* if not a real type, check to see if "SUBCELL" */ which = LookupStruct( @@ -2038,9 +2038,9 @@ irSpacingsCmd(w, cmd) if ( which>= 0) tileType = TT_SUBCELL; } - if(tileType<0) + if(tileType<0) { - TxError("\nUnrecognized layer (type): \"%.20s\"\n", + TxError("\nUnrecognized layer (type): \"%.20s\"\n", cmd->tx_argv[argI]); continue; } @@ -2065,8 +2065,8 @@ irSpacingsCmd(w, cmd) { /* Lookup in special value table */ which = LookupStruct( - s, - (char **) sValue, + s, + (char **) sValue, sizeof sValue[0]); /* Process result of lookup */ @@ -2100,12 +2100,12 @@ irSpacingsCmd(w, cmd) /* Print new value */ if(rT->rt_spacing[tileType] != -1) TxPrintf(" %s=%d", - (tileType == TT_SUBCELL ? + (tileType == TT_SUBCELL ? "SUBCELL" : DBTypeLongNameTbl[tileType]), rT->rt_spacing[tileType]); else TxPrintf(" %s=NIL", - (tileType==TT_SUBCELL ? + (tileType==TT_SUBCELL ? "SUBCELL" : DBTypeLongNameTbl[tileType])); } TxPrintf("\n"); @@ -2114,7 +2114,7 @@ irSpacingsCmd(w, cmd) return; } - + /* * ---------------------------------------------------------------------------- * @@ -2127,7 +2127,7 @@ irSpacingsCmd(w, cmd) * * Side effects: * Sets verbosity parameter - * + * * ---------------------------------------------------------------------------- */ @@ -2141,7 +2141,7 @@ irVerbosityCmd(w, cmd) TxError("'iroute verbosity' only takes one arg!\n"); return; } - + if(cmd->tx_argc == 3) { int i; @@ -2165,21 +2165,21 @@ irVerbosityCmd(w, cmd) case 0: /* shhhhh! we're in silent mode */ break; - + case 1: TxPrintf("\t1 (Brief messages)\n"); break; - + default: ASSERT(irMazeParms->mp_verbosity>=2,"irVerbosityCmd"); TxPrintf("\t%d (Lots of statistics)\n", irMazeParms->mp_verbosity); } - + return; } - + /* * ---------------------------------------------------------------------------- * @@ -2192,7 +2192,7 @@ irVerbosityCmd(w, cmd) * * Side effects: * Displays version string. - * + * * ---------------------------------------------------------------------------- */ @@ -2215,7 +2215,7 @@ irVersionCmd(w, cmd) return; } - + /* * ---------------------------------------------------------------------------- * @@ -2228,7 +2228,7 @@ irVersionCmd(w, cmd) * * Side effects: * See above. - * + * * ---------------------------------------------------------------------------- */ @@ -2254,7 +2254,7 @@ irWizardCmd(w, cmd) MagWindow *w; TxCommand *cmd; { - + /* Process by case */ if(cmd->tx_argc == 2) /* print values of all parms */ @@ -2263,7 +2263,7 @@ irWizardCmd(w, cmd) for(n=0; wzdParms[n].wzdP_name; n++) { - TxPrintf(" %s=", wzdParms[n].wzdP_name); + TxPrintf(" %s=", wzdParms[n].wzdP_name); (*wzdParms[n].wzdP_proc)(NULL,NULL); TxPrintf("\n"); } @@ -2275,15 +2275,15 @@ irWizardCmd(w, cmd) /* Lookup parameter name in contact parm table */ which = LookupStruct( - cmd->tx_argv[2], - (char **) wzdParms, + cmd->tx_argv[2], + (char **) wzdParms, sizeof wzdParms[0]); /* Process table lookup */ if (which == -1) /* parameter ambiguous */ { - TxError("Ambiguous parameter: \"%s\"\n", + TxError("Ambiguous parameter: \"%s\"\n", cmd->tx_argv[2]); return; } @@ -2299,7 +2299,7 @@ irWizardCmd(w, cmd) TxError("\n"); return; } - else + else /* parameter found - process it */ { char *arg; @@ -2315,7 +2315,7 @@ irWizardCmd(w, cmd) arg = cmd->tx_argv[3]; } - TxPrintf(" %s=", wzdParms[which].wzdP_name); + TxPrintf(" %s=", wzdParms[which].wzdP_name); (*wzdParms[which].wzdP_proc)(arg,NULL); TxPrintf("\n"); } @@ -2344,10 +2344,10 @@ irWizardCmd(w, cmd) * * Side effects: * Write file of Magic commands to set parms. to current values. - * + * * NOTE: - * Note defined after all other commands, so it can make use of - * datastructures defined just in front of other commands, + * Note defined after all other commands, so it can make use of + * datastructures defined just in front of other commands, * such as the search parameter table. * ---------------------------------------------------------------------------- */ @@ -2373,7 +2373,7 @@ irSaveParametersCmd(w, cmd) /* open save file */ saveFile = fopen(cmd->tx_argv[2], "w"); - if (saveFile == NULL) + if (saveFile == NULL) { TxError("Could not open file '%s' for writing.\n", cmd->tx_argv[2]); return; @@ -2392,7 +2392,7 @@ irSaveParametersCmd(w, cmd) * gibberish when the file is sourced. */ fprintf(saveFile,":iroute verbosity 0\n"); - + /* save CONTACT parameters */ for (rC=irRouteContacts; rC!= NULL; rC=rC->rc_next) { @@ -2412,7 +2412,7 @@ irSaveParametersCmd(w, cmd) { int n; - fprintf(saveFile,":iroute layer %s * ", + fprintf(saveFile,":iroute layer %s * ", DBTypeLongNameTbl[rL->rl_routeType.rt_tileType]); for(n=0; lParms[n].lP_name; n++) { @@ -2427,8 +2427,8 @@ irSaveParametersCmd(w, cmd) for(n=0; srParms[n].srP_name; n++) { - fprintf(saveFile,":iroute search %s ", - srParms[n].srP_name); + fprintf(saveFile,":iroute search %s ", + srParms[n].srP_name); (*srParms[n].srP_proc)(NULL,saveFile); fprintf(saveFile,"\n"); } @@ -2444,12 +2444,12 @@ irSaveParametersCmd(w, cmd) { for (i=0;irt_spacing[i]>=0) - fprintf(saveFile,":iroute spacings %s %s %d\n", + fprintf(saveFile,":iroute spacings %s %s %d\n", DBTypeLongNameTbl[rT->rt_tileType], DBTypeLongNameTbl[i], rT->rt_spacing[i]); if(rT->rt_spacing[TT_SUBCELL]>=0) - fprintf(saveFile,":iroute spacings %s %s %d\n", + fprintf(saveFile,":iroute spacings %s %s %d\n", DBTypeLongNameTbl[rT->rt_tileType], "SUBCELL", rT->rt_spacing[TT_SUBCELL]); @@ -2462,8 +2462,8 @@ irSaveParametersCmd(w, cmd) for(n=0; wzdParms[n].wzdP_name; n++) { - fprintf(saveFile,":iroute wizard %s ", - wzdParms[n].wzdP_name); + fprintf(saveFile,":iroute wizard %s ", + wzdParms[n].wzdP_name); (*wzdParms[n].wzdP_proc)(NULL,saveFile); fprintf(saveFile,"\n"); } @@ -2472,12 +2472,12 @@ irSaveParametersCmd(w, cmd) /* save VERBOSITY parameter (done last so :source is silent) */ fprintf(saveFile,":iroute verbosity %d\n", irMazeParms->mp_verbosity); - + (void) fclose(saveFile); return; } - + /* * ---------------------------------------------------------------------------- * @@ -2497,7 +2497,7 @@ irSaveParametersCmd(w, cmd) * and call it to do the work of implementing the subcommand. Each * such procedure is of the following form: * - * int + * int * proc(argc, argv) * int argc; * char *argv[]; @@ -2603,7 +2603,7 @@ IRCommand(w, cmd) * NULL below. */ irResult = irRoute(w, ST_CURSOR, - (Point*)NULL, (char*)NULL, (List*)NULL, + (Point*)NULL, (char*)NULL, (List*)NULL, DT_BOX, (Point*)NULL, (char*)NULL, (List*)NULL); #ifdef MAGIC_WRAPPER @@ -2636,8 +2636,8 @@ IRCommand(w, cmd) { /* Lookup subcommand in table */ which = LookupStruct( - cmd->tx_argv[1], - (char **) irSubcommands, + cmd->tx_argv[1], + (char **) irSubcommands, sizeof irSubcommands[0]); /* Process result of lookup */ @@ -2655,7 +2655,7 @@ IRCommand(w, cmd) else { /* unrecognized subcommand - complain */ - TxError("Unrecognized iroute subcommand: \"%s\"\n", + TxError("Unrecognized iroute subcommand: \"%s\"\n", cmd->tx_argv[1]); TxError("Valid iroute irSubcommands are: "); for (n = 0; irSubcommands[n].sC_name; n++) diff --git a/irouter/irDebug.h b/irouter/irDebug.h index 564ce652..be66bb72 100644 --- a/irouter/irDebug.h +++ b/irouter/irDebug.h @@ -14,17 +14,17 @@ * * Flags can be examined or set by the user via the ":*iroute debug" command. * - * ********************************************************************* + * ********************************************************************* * * Copyright (C) 1987, 1990 Michael H. Arnold, Walter S. Scott, and * * * the Regents of the University of California. * - * * Permission to use, copy, modify, and distribute this * - * * software and its documentation for any purpose and without * - * * fee is hereby granted, provided that the above copyright * - * * notice appear in all copies. The University of California * - * * makes no representations about the suitability of this * - * * software for any purpose. It is provided "as is" without * - * * express or implied warranty. Export of this software outside * - * * of the United States of America may require an export license. * + * * Permission to use, copy, modify, and distribute this * + * * software and its documentation for any purpose and without * + * * fee is hereby granted, provided that the above copyright * + * * notice appear in all copies. The University of California * + * * makes no representations about the suitability of this * + * * software for any purpose. It is provided "as is" without * + * * express or implied warranty. Export of this software outside * + * * of the United States of America may require an export license. * * ********************************************************************* * * rcsid $Header: /usr/cvsroot/magic-8.0/irouter/irDebug.h,v 1.1.1.1 2008/02/03 20:43:50 tim Exp $ diff --git a/irouter/irInternal.h b/irouter/irInternal.h index edfd00a2..e26b8636 100644 --- a/irouter/irInternal.h +++ b/irouter/irInternal.h @@ -3,28 +3,28 @@ * * This file defines data structures and constants and declares * variables INTERNAL TO THE IROUTER - * but shared by two or more source files. - * + * but shared by two or more source files. + * * Structures etc. that are exported by the irouter are defined in * irouter.h. * - * Structures etc. that are local to a given source + * Structures etc. that are local to a given source * file are declared at the top of that source file. * - * Structures, etc., specific to a given function are usually defined at + * Structures, etc., specific to a given function are usually defined at * the head of that function. * - * ********************************************************************* + * ********************************************************************* * * Copyright (C) 1987, 1990 Michael H. Arnold, Walter S. Scott, and * * * the Regents of the University of California. * - * * Permission to use, copy, modify, and distribute this * - * * software and its documentation for any purpose and without * - * * fee is hereby granted, provided that the above copyright * - * * notice appear in all copies. The University of California * - * * makes no representations about the suitability of this * - * * software for any purpose. It is provided "as is" without * - * * express or implied warranty. Export of this software outside * - * * of the United States of America may require an export license. * + * * Permission to use, copy, modify, and distribute this * + * * software and its documentation for any purpose and without * + * * fee is hereby granted, provided that the above copyright * + * * notice appear in all copies. The University of California * + * * makes no representations about the suitability of this * + * * software for any purpose. It is provided "as is" without * + * * express or implied warranty. Export of this software outside * + * * of the United States of America may require an export license. * * ********************************************************************* * * rcsid $Header: /usr/cvsroot/magic-8.0/irouter/irInternal.h,v 1.1.1.1 2008/02/03 20:43:50 tim Exp $ @@ -55,7 +55,7 @@ extern MazeParameters *irMazeParms; /* irRouteLayer, Contact, and Type pointers should be identical to * corresponding fields in irMazeParms. They are referenced directly - * instead of through parms struc for historical reasons + * instead of through parms struc for historical reasons */ extern RouteLayer *irRouteLayers; extern RouteContact *irRouteContacts; diff --git a/irouter/irMain.c b/irouter/irMain.c index a36dfdee..8ccf636d 100644 --- a/irouter/irMain.c +++ b/irouter/irMain.c @@ -7,17 +7,17 @@ * `:iroute' command - IRCommand() in irCommand.c * `:*iroute' command - IRTest() in irTestCmd.c * - * ********************************************************************* + * ********************************************************************* * * Copyright (C) 1987, 1990 Michael H. Arnold, Walter S. Scott, and * * * the Regents of the University of California. * - * * Permission to use, copy, modify, and distribute this * - * * software and its documentation for any purpose and without * - * * fee is hereby granted, provided that the above copyright * - * * notice appear in all copies. The University of California * - * * makes no representations about the suitability of this * - * * software for any purpose. It is provided "as is" without * - * * express or implied warranty. Export of this software outside * - * * of the United States of America may require an export license. * + * * Permission to use, copy, modify, and distribute this * + * * software and its documentation for any purpose and without * + * * fee is hereby granted, provided that the above copyright * + * * notice appear in all copies. The University of California * + * * makes no representations about the suitability of this * + * * software for any purpose. It is provided "as is" without * + * * express or implied warranty. Export of this software outside * + * * of the United States of America may require an export license. * * ********************************************************************* */ @@ -66,18 +66,18 @@ MazeParameters *irMazeParms = NULL; /* parameter settings passed to maze router * corresponding fileds in irMazeParms. They exist for historical * reasons. */ -RouteLayer *irRouteLayers; +RouteLayer *irRouteLayers; RouteContact *irRouteContacts; RouteType *irRouteTypes; - + /* * ---------------------------------------------------------------------------- * * IRDebugInit -- * * This procedure is called when Magic starts up, and should not be - * called again. + * called again. * * Results: * None. @@ -85,7 +85,7 @@ RouteType *irRouteTypes; * Side effects: * Register ourselves with debug module * Setup some internal datastructures. - * + * * ---------------------------------------------------------------------------- */ @@ -128,7 +128,7 @@ IRDebugInit() * Side effects: * Register ourselves with debug module * Setup some internal datastructures. - * + * * ---------------------------------------------------------------------------- */ diff --git a/irouter/irRoute.c b/irouter/irRoute.c index b112869b..f9d752d4 100644 --- a/irouter/irRoute.c +++ b/irouter/irRoute.c @@ -3,17 +3,17 @@ * * Sets up route and calls maze router to do it. * - * ********************************************************************* + * ********************************************************************* * * Copyright (C) 1987, 1990 Michael H. Arnold, Walter S. Scott, and * * * the Regents of the University of California. * - * * Permission to use, copy, modify, and distribute this * - * * software and its documentation for any purpose and without * - * * fee is hereby granted, provided that the above copyright * - * * notice appear in all copies. The University of California * - * * makes no representations about the suitability of this * - * * software for any purpose. It is provided "as is" without * - * * express or implied warranty. Export of this software outside * - * * of the United States of America may require an export license. * + * * Permission to use, copy, modify, and distribute this * + * * software and its documentation for any purpose and without * + * * fee is hereby granted, provided that the above copyright * + * * notice appear in all copies. The University of California * + * * makes no representations about the suitability of this * + * * software for any purpose. It is provided "as is" without * + * * express or implied warranty. Export of this software outside * + * * of the United States of America may require an export license. * * ********************************************************************* */ @@ -48,7 +48,7 @@ static char rcsid[] __attribute__ ((unused)) = "$Header: /usr/cvsroot/magic-8.0/ #include "irouter/irouter.h" #include "irouter/irInternal.h" -/* --- Routines local to this file that are referenced before they are +/* --- Routines local to this file that are referenced before they are * defined --- */ List *irChooseEndPtLayers(); @@ -70,7 +70,7 @@ typedef struct labelSearchData #define LSR_NOTUNIQUE 20 #define LSR_FOUND 30 - + /* * ---------------------------------------------------------------------------- * @@ -89,7 +89,7 @@ typedef struct labelSearchData */ int -irRoute(cmdWindow, startType, argStartPt, argStartLabel, argStartLayers, +irRoute(cmdWindow, startType, argStartPt, argStartLabel, argStartLayers, destType, argDestRect, argDestLabel, argDestLayers) MagWindow *cmdWindow; /* window route command issued to */ int startType; /* how start is specified */ @@ -102,7 +102,7 @@ irRoute(cmdWindow, startType, argStartPt, argStartLabel, argStartLayers, List *argDestLayers; /* OK route layers to end route on */ { CellUse *routeUse; /* Toplevel cell visible during routing */ - int expansionMask; /* Subcell expansion modes to use during + int expansionMask; /* Subcell expansion modes to use during * routing */ Point startPt; /* start and dest terminals */ List *startLayers = NULL; @@ -140,25 +140,25 @@ irRoute(cmdWindow, startType, argStartPt, argStartLabel, argStartLayers, return mzResult; } - /* Set expansion mask to window route cmd issued to. Used + /* Set expansion mask to window route cmd issued to. Used * during searches. Subcells are treated as expanded if expanded in * window cmd issued to. */ expansionMask = ((DBWclientRec *)(window->w_clientData))->dbw_bitmask; - /* Set routeUse to rootuse of reference window - - * everything "visible" in + /* Set routeUse to rootuse of reference window - + * everything "visible" in * the reference window is visible - * during routing. + * during routing. * But resulting route * is painted into edit cell. This distinction is important only * in the case of a subedit. If the user subedits a cell, the - * context of the parent(s) will guide the route, but the route + * context of the parent(s) will guide the route, but the route * will be painted into the edit cell. */ routeUse = (CellUse *) (window->w_surfaceID); - /* make sure cmd issued from window in which edit cell + /* make sure cmd issued from window in which edit cell * is being edited */ if (!EditCellUse || EditRootDef != routeUse->cu_def) { @@ -174,8 +174,8 @@ irRoute(cmdWindow, startType, argStartPt, argStartLabel, argStartLayers, { Point irGetStartPoint(); - startPt = irGetStartPoint(startType, - argStartPt, + startPt = irGetStartPoint(startType, + argStartPt, argStartLabel, &startLayer, routeUse); @@ -197,19 +197,19 @@ irRoute(cmdWindow, startType, argStartPt, argStartLabel, argStartLayers, */ { RouteLayer *rL; - + for (rL = irRouteLayers; rL != NULL; rL = rL->rl_next) { if(rL->rl_routeType.rt_active) { - /* set dest area for each selected tile + /* set dest area for each selected tile * of type connecting to rL */ SelEnumPaint( &(DBConnectTbl[rL->rl_routeType.rt_tileType]), FALSE, /* TRUE = restricted to edit cell */ NULL, /* not used */ - irSelectedTileFunc, + irSelectedTileFunc, (ClientData *) rL /* type of destarea */ ); } @@ -226,14 +226,14 @@ irRoute(cmdWindow, startType, argStartPt, argStartLabel, argStartLayers, if(rL->rl_routeType.rt_active) { - /* set dest area for each selected tile + /* set dest area for each selected tile * of type connecting to rL */ SelEnumPaint( &(DBConnectTbl[rL->rl_routeType.rt_tileType]), FALSE, /* TRUE = restricted to edit cell */ NULL, /* not used */ - irSelectedTileFunc, + irSelectedTileFunc, (ClientData *) rL /* type of destarea */ ); } @@ -246,8 +246,8 @@ irRoute(cmdWindow, startType, argStartPt, argStartLabel, argStartLayers, Rect irGetDestRect(); TileType destLayer = TT_SPACE; - destRect = irGetDestRect(destType, - argDestRect, + destRect = irGetDestRect(destType, + argDestRect, argDestLabel, &destLayer, routeUse); @@ -279,7 +279,7 @@ irRoute(cmdWindow, startType, argStartPt, argStartLabel, argStartLayers, { /* no layer arg specified, permit all active route layers */ RouteLayer *rL; - + for (rL = irRouteLayers; rL != NULL; rL = rL->rl_next) { if(rL->rl_routeType.rt_active) @@ -292,18 +292,18 @@ irRoute(cmdWindow, startType, argStartPt, argStartLabel, argStartLayers, /* permit only layers that are both specified and active */ { List *l; - + for(l=argDestLayers; l!=NULL; l=LIST_TAIL(l)) { RouteLayer *rL = (RouteLayer *) LIST_FIRST(l); - + if(rL->rl_routeType.rt_active) { MZAddDest(&destRect,rL->rl_routeType.rt_tileType); - + } } - } + } } if (startLayer != TT_SPACE) @@ -331,8 +331,8 @@ irRoute(cmdWindow, startType, argStartPt, argStartLabel, argStartLayers, List *l; startLayers = irChooseEndPtLayers( - routeUse, - expansionMask, + routeUse, + expansionMask, &startPt, argStartLayers, "start"); @@ -378,9 +378,9 @@ irRoute(cmdWindow, startType, argStartPt, argStartLabel, argStartLayers, } /* paint route back into edit cell */ - if (path) + if (path) { - + RouteLayer *finalRL = path->rp_rLayer; CellUse *resultUse; @@ -432,7 +432,7 @@ irRoute(cmdWindow, startType, argStartPt, argStartLabel, argStartLayers, &DBAllButSpaceBits); } - /* Notify dbwind module (for redisplay), and DRC module + /* Notify dbwind module (for redisplay), and DRC module * of changed area */ { Rect changedArea; @@ -476,7 +476,7 @@ abort: return mzResult; } - + /* * --------------------------------------------------------------------- * @@ -496,7 +496,7 @@ abort: Point irGetStartPoint(startType, argStartPt, argStartLabel, startLayerPtr, routeUse) int startType; /* how start is specified */ - Point *argStartPt; /* location to route from + Point *argStartPt; /* location to route from * (in edit cell coords) */ char *argStartLabel; /* label to route from */ TileType *startLayerPtr; /* layer type (returned value) */ @@ -528,7 +528,7 @@ irGetStartPoint(startType, argStartPt, argStartLabel, startLayerPtr, routeUse) goto abort; } - if (routeUse->cu_def != + if (routeUse->cu_def != ((CellUse *)pointWindow->w_surfaceID)->cu_def) { TxError("Can not use cursor as start:"); @@ -540,7 +540,7 @@ irGetStartPoint(startType, argStartPt, argStartLabel, startLayerPtr, routeUse) case ST_LABEL: /* label name given */ - { + { int irSelLabelsFunc(); int irAllLabelsFunc(); LabelSearchData lSD; @@ -565,12 +565,12 @@ irGetStartPoint(startType, argStartPt, argStartLabel, startLayerPtr, routeUse) { (void) DBSrLabelLoc(routeUse, - argStartLabel, - irAllLabelsFunc, + argStartLabel, + irAllLabelsFunc, (ClientData) &lSD); if(SigInterruptPending) goto abort; - + if (lSD.lsd_result == LSR_NOTUNIQUE) { TxError("Warning: Start label '%s' not unique.\n", argStartLabel); @@ -604,7 +604,7 @@ abort: return startPt; } - + /* * --------------------------------------------------------------------- * @@ -624,7 +624,7 @@ abort: Rect irGetDestRect(destType, argDestRect, argDestLabel, destLayerPtr, routeUse) int destType; /* how dest is specified */ - Rect *argDestRect; /* location to route to + Rect *argDestRect; /* location to route to * (in edit cell coords) */ char *argDestLabel; /* label to route to */ TileType *destLayerPtr; /* layer type (returned value) */ @@ -644,7 +644,7 @@ irGetDestRect(destType, argDestRect, argDestLabel, destLayerPtr, routeUse) case DT_LABEL: /* dest rect given as label */ - { + { int irSelLabelsFunc(); int irAllLabelsFunc(); LabelSearchData lSD; @@ -667,8 +667,8 @@ irGetDestRect(destType, argDestRect, argDestLabel, destLayerPtr, routeUse) { /* No selected label matched, so search all labels */ (void) DBSrLabelLoc(routeUse, - argDestLabel, - irAllLabelsFunc, + argDestLabel, + irAllLabelsFunc, (ClientData) &lSD); if(SigInterruptPending) goto abort; @@ -730,7 +730,7 @@ abort: destRect.r_ytop = MINFINITY; return destRect; } - + /* * --------------------------------------------------------------------- * @@ -780,7 +780,7 @@ irSelLabelsFunc(label, cellUse, transform, clientData) } } - + /* * --------------------------------------------------------------------- * @@ -825,7 +825,7 @@ irAllLabelsFunc(rect, name, label, clientData) } } - + /* * --------------------------------------------------------------------- * @@ -851,22 +851,22 @@ irSelectedTileFunc(rect, type, c) { RouteLayer *rL = (RouteLayer *) c; MZAddDest(rect, rL->rl_routeType.rt_tileType); - + /* return 0 to continue search */ return 0; } - + /* * ---------------------------------------------------------------------------- * * LayerInTouchingContact -- * - * A Predicate. Checks whether the given routeLayer is a component of a + * A Predicate. Checks whether the given routeLayer is a component of a * contact type in touchingTypes. Used by irChooseEndPtLayers below. * * Results: - * TRUE if the RouteLayer is a component of a contact type in + * TRUE if the RouteLayer is a component of a contact type in * touchingTypes, else FALSE. * * Side effects: @@ -892,7 +892,7 @@ LayerInTouchingContact(rL,touchingTypes) return(FALSE); } - + /* * ---------------------------------------------------------------------------- * @@ -969,7 +969,7 @@ irChooseEndPtLayers(routeUse,expansionMask,endPt,argLayers,endPtName) { TileTypeBitMask touchingTypes; RouteContact *rC; - + touchingTypes = TouchingTypes(routeUse, expansionMask, endPt); /* Make list of present and active contacts */ @@ -996,9 +996,9 @@ irChooseEndPtLayers(routeUse,expansionMask,endPt,argLayers,endPtName) MZPrintRLListNames(presentContactLayers); } - + /* make list of present layers that are not constituents of contacts - * above. If a contact is touching the endpt but one of + * above. If a contact is touching the endpt but one of * its constituent layers in not active, the other constituent * layer is treated as a presentLayer. */ @@ -1046,11 +1046,11 @@ irChooseEndPtLayers(routeUse,expansionMask,endPt,argLayers,endPtName) ListDealloc(presentContacts); ListDealloc(presentContactLayers); - return(presentLayers); + return(presentLayers); } else if(numLayers == 0 && numContacts == 1) { - /* Just one active contact under endpoint, + /* Just one active contact under endpoint, * return layers connecting to that contact. */ List *l; @@ -1084,13 +1084,13 @@ irChooseEndPtLayers(routeUse,expansionMask,endPt,argLayers,endPtName) for(l=presentContacts; l!=NULL; l=LIST_TAIL(l)) { rC=(RouteContact *) LIST_FIRST(l); - TxPrintf(" %s", + TxPrintf(" %s", DBTypeLongNameTbl[rC->rc_routeType.rt_tileType]); } for(l=presentLayers; l!=NULL; l=LIST_TAIL(l)) { rL=(RouteLayer *) LIST_FIRST(l); - TxPrintf(" %s", + TxPrintf(" %s", DBTypeLongNameTbl[rL->rl_routeType.rt_tileType]); } TxPrintf("\n"); @@ -1108,7 +1108,7 @@ irChooseEndPtLayers(routeUse,expansionMask,endPt,argLayers,endPtName) /* ask user */ TxPrintf("Connect to %s? [yes] ", DBTypeLongNameTbl[rC->rc_routeType.rt_tileType]); - if (TxGetLine(answer, sizeof answer) == NULL || + if (TxGetLine(answer, sizeof answer) == NULL || answer[0] == '\0') (void) strcpy(answer,"yes"); @@ -1148,7 +1148,7 @@ irChooseEndPtLayers(routeUse,expansionMask,endPt,argLayers,endPtName) /* Ask user */ TxPrintf("Connect to %s? [yes] ", DBTypeLongNameTbl[rL->rl_routeType.rt_tileType]); - if (TxGetLine(answer, sizeof answer) == NULL || + if (TxGetLine(answer, sizeof answer) == NULL || answer[0] == '\0') (void) strcpy(answer,"yes"); diff --git a/irouter/irTestCmd.c b/irouter/irTestCmd.c index 39c5b472..468216b3 100644 --- a/irouter/irTestCmd.c +++ b/irouter/irTestCmd.c @@ -4,17 +4,17 @@ * Code to process the `*iroute' command. * `*iroute' is a wizard command for debugging and testing. * - * ********************************************************************* + * ********************************************************************* * * Copyright (C) 1987, 1990 Michael H. Arnold, Walter S. Scott, and * * * the Regents of the University of California. * - * * Permission to use, copy, modify, and distribute this * - * * software and its documentation for any purpose and without * - * * fee is hereby granted, provided that the above copyright * - * * notice appear in all copies. The University of California * - * * makes no representations about the suitability of this * - * * software for any purpose. It is provided "as is" without * - * * express or implied warranty. Export of this software outside * - * * of the United States of America may require an export license. * + * * Permission to use, copy, modify, and distribute this * + * * software and its documentation for any purpose and without * + * * fee is hereby granted, provided that the above copyright * + * * notice appear in all copies. The University of California * + * * makes no representations about the suitability of this * + * * software for any purpose. It is provided "as is" without * + * * express or implied warranty. Export of this software outside * + * * of the United States of America may require an export license. * * ********************************************************************* */ @@ -56,7 +56,7 @@ typedef struct } TestCmdTableE; extern TestCmdTableE irTestCommands[]; - + /* * ---------------------------------------------------------------------------- * @@ -69,7 +69,7 @@ extern TestCmdTableE irTestCommands[]; * * Side effects: * Modify debug flags. - * + * * ---------------------------------------------------------------------------- */ @@ -108,7 +108,7 @@ irDebugTstCmd(w, cmd) return; } - + /* * ---------------------------------------------------------------------------- * @@ -122,7 +122,7 @@ irDebugTstCmd(w, cmd) * * Side effects: * See above. - * + * * ---------------------------------------------------------------------------- */ @@ -150,8 +150,8 @@ irHelpTstCmd(w, cmd) { /* Lookup subcommand in table, and printed associated help info */ which = LookupStruct( - cmd->tx_argv[2], - (char **) irTestCommands, + cmd->tx_argv[2], + (char **) irTestCommands, sizeof irTestCommands[0]); /* Process result of lookup */ @@ -172,7 +172,7 @@ irHelpTstCmd(w, cmd) else { /* unrecognized subcommand - complain */ - TxError("Unrecognized iroute subcommand: \"%s\"\n", + TxError("Unrecognized iroute subcommand: \"%s\"\n", cmd->tx_argv[2]); TxError("Valid *iroute subcommands are: "); for (n = 0; irTestCommands[n].sC_name; n++) @@ -184,7 +184,7 @@ irHelpTstCmd(w, cmd) return; } - + /* * ---------------------------------------------------------------------------- * @@ -198,7 +198,7 @@ irHelpTstCmd(w, cmd) * * Side effects: * Dump routelayers and routecontacts. - * + * * ---------------------------------------------------------------------------- */ @@ -232,7 +232,7 @@ TestCmdTableE irTestCommands[] = { 0 }, *irTestCmdP; - + /* * ---------------------------------------------------------------------------- * @@ -280,8 +280,8 @@ IRTest(w, cmd) { /* Lookup subcommand in table */ which = LookupStruct( - cmd->tx_argv[1], - (char **) irTestCommands, + cmd->tx_argv[1], + (char **) irTestCommands, sizeof irTestCommands[0]); /* Process result of lookup */ diff --git a/irouter/irUtils.c b/irouter/irUtils.c index 9192f80d..6606a46e 100644 --- a/irouter/irUtils.c +++ b/irouter/irUtils.c @@ -4,17 +4,17 @@ * Misc. utility routines for irouter. * * - * ********************************************************************* + * ********************************************************************* * * Copyright (C) 1987, 1990 Michael H. Arnold, Walter S. Scott, and * * * the Regents of the University of California. * - * * Permission to use, copy, modify, and distribute this * - * * software and its documentation for any purpose and without * - * * fee is hereby granted, provided that the above copyright * - * * notice appear in all copies. The University of California * - * * makes no representations about the suitability of this * - * * software for any purpose. It is provided "as is" without * - * * express or implied warranty. Export of this software outside * - * * of the United States of America may require an export license. * + * * Permission to use, copy, modify, and distribute this * + * * software and its documentation for any purpose and without * + * * fee is hereby granted, provided that the above copyright * + * * notice appear in all copies. The University of California * + * * makes no representations about the suitability of this * + * * software for any purpose. It is provided "as is" without * + * * express or implied warranty. Export of this software outside * + * * of the United States of America may require an export license. * * ********************************************************************* */ @@ -34,7 +34,7 @@ static char rcsid[] __attribute__ ((unused)) = "$Header: /usr/cvsroot/magic-8.0/ #include "irouter/irouter.h" #include "irouter/irInternal.h" - + /* * ---------------------------------------------------------------------------- * @@ -56,8 +56,8 @@ irFindRouteType(type) RouteType *rT; /* Search list of routetypes for one with appropriate type */ - for (rT = irRouteTypes; - rT && rT->rt_tileType!=type; + for (rT = irRouteTypes; + rT && rT->rt_tileType!=type; rT=rT->rt_next) ; @@ -65,7 +65,7 @@ irFindRouteType(type) return(rT); } - + /* * ---------------------------------------------------------------------------- * @@ -86,8 +86,8 @@ irFindRouteLayer(type) RouteLayer *rL; /* Search list of routelayers for one with appropriate type */ - for (rL = irRouteLayers; - rL && rL->rl_routeType.rt_tileType!=type; + for (rL = irRouteLayers; + rL && rL->rl_routeType.rt_tileType!=type; rL=rL->rl_next) ; @@ -95,7 +95,7 @@ irFindRouteLayer(type) return(rL); } - + /* * ---------------------------------------------------------------------------- * @@ -116,8 +116,8 @@ irFindRouteContact(type) RouteContact *rC; /* Search list of routecontacts for one with appropriate type */ - for (rC = irRouteContacts; - rC && rC->rc_routeType.rt_tileType!=type; + for (rC = irRouteContacts; + rC && rC->rc_routeType.rt_tileType!=type; rC=rC->rc_next) ; @@ -125,7 +125,7 @@ irFindRouteContact(type) return(rC); } - + /* * ---------------------------------------------------------------------------- * @@ -137,7 +137,7 @@ irFindRouteContact(type) * Pointer to temporary string. * * Side effects: - * RepeatString set to desired string. + * RepeatString set to desired string. * * Note: * A call to this procedure destroys old strings previously built diff --git a/irouter/irouter.h b/irouter/irouter.h index 3705cc17..8ab6c16a 100644 --- a/irouter/irouter.h +++ b/irouter/irouter.h @@ -5,17 +5,17 @@ * module, which is the top-level module that controls interactive * routing. * - * ********************************************************************* + * ********************************************************************* * * Copyright (C) 1987, 1990 Michael H. Arnold, Walter S. Scott, and * * * the Regents of the University of California. * - * * Permission to use, copy, modify, and distribute this * - * * software and its documentation for any purpose and without * - * * fee is hereby granted, provided that the above copyright * - * * notice appear in all copies. The University of California * - * * makes no representations about the suitability of this * - * * software for any purpose. It is provided "as is" without * - * * express or implied warranty. Export of this software outside * - * * of the United States of America may require an export license. * + * * Permission to use, copy, modify, and distribute this * + * * software and its documentation for any purpose and without * + * * fee is hereby granted, provided that the above copyright * + * * notice appear in all copies. The University of California * + * * makes no representations about the suitability of this * + * * software for any purpose. It is provided "as is" without * + * * express or implied warranty. Export of this software outside * + * * of the United States of America may require an export license. * * ********************************************************************* * * rcsid $Header: /usr/cvsroot/magic-8.0/irouter/irouter.h,v 1.1.1.1 2008/02/03 20:43:50 tim Exp $ diff --git a/lef/defRead.c b/lef/defRead.c index c9acfcde..677843b9 100644 --- a/lef/defRead.c +++ b/lef/defRead.c @@ -1,5 +1,5 @@ /* - * defRead.c -- + * defRead.c -- * * This module incorporates the LEF/DEF format for standard-cell place and * route. @@ -9,7 +9,7 @@ */ #ifndef lint -static char rcsid[] __attribute__ ((unused)) = "$Header: /usr/cvsroot/magic-8.0/lef/defRead.c,v 1.2 2008/06/01 18:37:43 tim Exp $"; +static char rcsid[] __attribute__ ((unused)) = "$Header: /usr/cvsroot/magic-8.0/lef/defRead.c,v 1.2 2008/06/01 18:37:43 tim Exp $"; #endif /* not lint */ #include @@ -161,7 +161,7 @@ DefAddRoutes(rootDef, f, oscale, special, netname, defLayerMap) if (routeLayer < 0) { - LefError(DEF_ERROR, "Unknown layer type \"%s\" for NEW route\n", token); + LefError(DEF_ERROR, "Unknown layer type \"%s\" for NEW route\n", token); continue; } paintLayer = routeLayer; @@ -265,7 +265,7 @@ DefAddRoutes(rootDef, f, oscale, special, netname, defLayerMap) } else { - LefError(DEF_ERROR, "Cannot parse X coordinate in RECT.\n"); + LefError(DEF_ERROR, "Cannot parse X coordinate in RECT.\n"); goto endCoord; } @@ -276,7 +276,7 @@ DefAddRoutes(rootDef, f, oscale, special, netname, defLayerMap) } else { - LefError(DEF_ERROR, "Cannot parse Y coordinate in RECT.\n"); + LefError(DEF_ERROR, "Cannot parse Y coordinate in RECT.\n"); goto endCoord; } @@ -287,7 +287,7 @@ DefAddRoutes(rootDef, f, oscale, special, netname, defLayerMap) } else { - LefError(DEF_ERROR, "Cannot parse X coordinate in RECT.\n"); + LefError(DEF_ERROR, "Cannot parse X coordinate in RECT.\n"); goto endCoord; } token = LefNextToken(f, TRUE); /* read ury */ @@ -297,13 +297,13 @@ DefAddRoutes(rootDef, f, oscale, special, netname, defLayerMap) } else { - LefError(DEF_ERROR, "Cannot parse Y coordinate in RECT.\n"); + LefError(DEF_ERROR, "Cannot parse Y coordinate in RECT.\n"); goto endCoord; } token = LefNextToken(f, TRUE); /* read closing parens */ if (*token != ')') { - LefError(DEF_ERROR, "Bad coordinates in RECT.\n"); + LefError(DEF_ERROR, "Bad coordinates in RECT.\n"); goto endCoord; } GeoCanonicalRect(&locarea, &newRoute->r_r); @@ -364,7 +364,7 @@ DefAddRoutes(rootDef, f, oscale, special, netname, defLayerMap) addRoute->r_r.r_ybot >>= 1; addRoute->r_r.r_xtop >>= 1; addRoute->r_r.r_ytop >>= 1; - + if (routeTop) routeList->r_next = addRoute; else @@ -372,7 +372,7 @@ DefAddRoutes(rootDef, f, oscale, special, netname, defLayerMap) routeList = addRoute; } - + paintLayer = lefl->type; newRoute->r_r.r_xbot = refp.p_x + lefl->info.via.area.r_xbot; @@ -454,7 +454,7 @@ DefAddRoutes(rootDef, f, oscale, special, netname, defLayerMap) { if (valid == FALSE) { - LefError(DEF_ERROR, "No reference point for \"*\" wildcard\n"); + LefError(DEF_ERROR, "No reference point for \"*\" wildcard\n"); goto endCoord; } } @@ -464,7 +464,7 @@ DefAddRoutes(rootDef, f, oscale, special, netname, defLayerMap) } else { - LefError(DEF_ERROR, "Cannot parse X coordinate.\n"); + LefError(DEF_ERROR, "Cannot parse X coordinate.\n"); goto endCoord; } token = LefNextToken(f, TRUE); /* read Y */ @@ -472,7 +472,7 @@ DefAddRoutes(rootDef, f, oscale, special, netname, defLayerMap) { if (valid == FALSE) { - LefError(DEF_ERROR, "No reference point for \"*\" wildcard\n"); + LefError(DEF_ERROR, "No reference point for \"*\" wildcard\n"); freeMagic(newRoute); newRoute = NULL; goto endCoord; @@ -484,7 +484,7 @@ DefAddRoutes(rootDef, f, oscale, special, netname, defLayerMap) } else { - LefError(DEF_ERROR, "Cannot parse Y coordinate.\n"); + LefError(DEF_ERROR, "Cannot parse Y coordinate.\n"); goto endCoord; } @@ -683,7 +683,7 @@ DefReadNets(f, rootDef, sname, oscale, special, dolabels, total) NULL }; - defLayerMap = defMakeInverseLayerMap(); + defLayerMap = defMakeInverseLayerMap(); while ((token = LefNextToken(f, TRUE)) != NULL) { @@ -1013,7 +1013,7 @@ DefReadPins(f, rootDef, sname, oscale, total) /* Update the record of the number of pins */ /* processed and spit out a message for every 5% done. */ - + LefEstimate(processed++, total, "pins"); /* Get pin name */ @@ -1134,7 +1134,7 @@ DefReadPins(f, rootDef, sname, oscale, total) LefError(DEF_WARNING, "Number of pins read (%d) does not match " "the number declared (%d).\n", processed, total); } - + /* *------------------------------------------------------------ * @@ -1217,7 +1217,7 @@ DefReadVias(f, sname, oscale, total) /* Update the record of the number of vias */ /* processed and spit out a message for every 5% done. */ - + LefEstimate(processed++, total, "vias"); /* If not otherwise specified, rows and columns default to 1 */ @@ -1417,7 +1417,7 @@ DefReadVias(f, sname, oscale, total) LefError(DEF_WARNING, "Number of vias read (%d) does not match " "the number declared (%d).\n", processed, total); } - + /* *------------------------------------------------------------ * @@ -1497,7 +1497,7 @@ DefReadComponents(f, rootDef, sname, oscale, total) /* Update the record of the number of components */ /* processed and spit out a message for every 5% done. */ - + LefEstimate(processed++, total, "subcell instances"); /* Get use and macro names */ @@ -1520,7 +1520,7 @@ DefReadComponents(f, rootDef, sname, oscale, total) /* specific syntax [xlo:xsep:xhi][ylo:ysep:yhi] and */ /* is easy enough to distinguish. */ - /* + /* dptr = strchr(usename, '['); if (dptr != NULL) { *dptr = '_'; diff --git a/lef/defWrite.c b/lef/defWrite.c index b9353d5b..d1660248 100644 --- a/lef/defWrite.c +++ b/lef/defWrite.c @@ -1,5 +1,5 @@ /* - * defWrite.c -- + * defWrite.c -- * * This module incorporates the LEF/DEF format for standard-cell place and * route. @@ -11,7 +11,7 @@ */ #ifndef lint -static char rcsid[] __attribute__ ((unused)) = "$Header: /usr/cvsroot/magic-8.0/lef/defWrite.c,v 1.2 2008/02/10 19:30:21 tim Exp $"; +static char rcsid[] __attribute__ ((unused)) = "$Header: /usr/cvsroot/magic-8.0/lef/defWrite.c,v 1.2 2008/02/10 19:30:21 tim Exp $"; #endif /* not lint */ #include @@ -66,7 +66,7 @@ char *defGetType(); /* Forward declaration */ /*----------------------------------------------------------------------*/ - + /* * ---------------------------------------------------------------------------- * @@ -120,7 +120,7 @@ defWriteHeader(def, f, oscale, units) fprintf(f, " UNITS DISTANCE MICRONS %d ;\n", units); /* Die area, taken from the cell def bounding box. */ - fprintf(f, " DIEAREA ( %.10g %.10g ) ( %.10g %.10g ) ;\n", + fprintf(f, " DIEAREA ( %.10g %.10g ) ( %.10g %.10g ) ;\n", (float)def->cd_bbox.r_xbot * oscale, (float)def->cd_bbox.r_ybot * oscale, (float)def->cd_bbox.r_xtop * oscale, @@ -152,7 +152,7 @@ defTransPos(Transform *t) { static char *def_orient[] = { "N", "S", "E", "W", "FN", "FS", "FE", "FW" - }; + }; bool ew; /* east-or-west identifier */ bool sw; /* south-or-west identifier */ @@ -174,8 +174,8 @@ defTransPos(Transform *t) if (flip) pos += 4; if (ew) pos += 2; if (sw) pos += 1; - - return def_orient[pos]; + + return def_orient[pos]; } /* @@ -233,7 +233,7 @@ defCountNets(rootDef, allSpecial) EFDone(); total.has_nets = FALSE; } - + if (allSpecial) total.regular = 0; return total; } @@ -261,7 +261,7 @@ defnodeCount(node, res, cap, total) char *pwr; cp = hierName->hn_name; clast = *(cp + strlen(cp) - 1); - + /* Global nodes are marked as "special nets" */ if (clast == '!') node->efnode_flags |= EF_SPECIAL; @@ -318,7 +318,7 @@ defnodeCount(node, res, cap, total) else if (node->efnode_flags & EF_PORT) total->regular++; } - + return 0; /* Keep going. . . */ } @@ -338,7 +338,7 @@ defnodeCount(node, res, cap, total) * ---------------------------------------------------------------------------- */ -void +void defHNsprintf(str, hierName, divchar) char *str; HierName *hierName; @@ -358,7 +358,7 @@ defHNsprintf(str, hierName, divchar) /* magic name anyway), or dashes, asterisks, or percent signs */ /* (which are interpreted as wildcard characters by LEF/DEF). */ - cp = hierName->hn_name; + cp = hierName->hn_name; while (c = *cp++) { switch (c) @@ -416,7 +416,7 @@ nodeDefName(hname) EFNodeName *nn; HashEntry *he; EFNode *node; - static char nodeName[256]; + static char nodeName[256]; he = EFHNLook(hname, (char *) NULL, "nodeName"); if (he == NULL) @@ -445,7 +445,7 @@ nodeDefName(hname) * Output to DEF file; resets defdata->outcolumn * *------------------------------------------------------------ - */ + */ #define MAX_DEF_COLUMNS 70 @@ -767,7 +767,7 @@ defPortTileFunc(tile, cx) rport->r_xbot, rport->r_ybot, rport->r_xtop, rport->r_ytop); */ - + return 1; /* No need to check further */ } @@ -1026,7 +1026,7 @@ defNetGeometryFunc(tile, plane, defdata) r.r_ytop = r.r_ybot + 1; /* "sameroute" is true only if rectangles touch in the */ - /* direction of the route. */ + /* direction of the route. */ /* NOTE: We should compute this FIRST and use it to determine */ /* the current route direction! */ /* Another hack---for special nets, don't continue routes that */ @@ -1067,7 +1067,7 @@ defNetGeometryFunc(tile, plane, defdata) defdata->orient == GEO_CENTER) sameroute = FALSE; } - + /* Determine if we need to write a NEW (type) record. We do this */ /* if 1) this is the first tile visited (except that we don't */ @@ -1502,7 +1502,7 @@ defCountViaFunc(tile, cviadata) cviadata->total++; /* Increment the count of uses */ lefl = (lefLayer *)mallocMagic(sizeof(lefLayer)); lefl->type = ttype; - lefl->obsType = -1; + lefl->obsType = -1; lefl->lefClass = CLASS_VIA; lefl->info.via.area = r; lefl->info.via.cell = (CellDef *)NULL; @@ -1617,12 +1617,12 @@ defWriteVias(f, rootDef, oscale, lefMagicToLefLayer) continue; if (lefl->lefClass == CLASS_VIA) - { + { fprintf(f, " - %s", (char *)lefl->canonName); /* Generate squares for the area as determined */ /* by the cifoutput section of the tech file */ - + rMask = DBResidueMask(lefl->type); for (ttype = TT_TECHDEPBASE; ttype < DBNumUserLayers; ttype++) if (TTMaskHasType(rMask, ttype)) @@ -1666,7 +1666,7 @@ defWriteVias(f, rootDef, oscale, lefMagicToLefLayer) for (j = 0; j < nAc; j++) { square.r_xtop = square.r_xbot + size; - + fprintf(f, "\n + RECT %s ( %.10g %.10g )" " ( %.10g %.10g )", lefMagicToLefLayer[lefl->type].lefName, @@ -1690,7 +1690,7 @@ defWriteVias(f, rootDef, oscale, lefMagicToLefLayer) (float)(lefl->info.via.area.r_ybot) * oscale / 2, (float)(lefl->info.via.area.r_xtop) * oscale / 2, (float)(lefl->info.via.area.r_ytop) * oscale / 2); - } + } fprintf(f, " ;\n"); } } @@ -1714,7 +1714,7 @@ defWriteVias(f, rootDef, oscale, lefMagicToLefLayer) * *------------------------------------------------------------ */ - + int defCountComponents(rootDef) CellDef *rootDef; @@ -1971,14 +1971,14 @@ DefWriteCell(def, outName, allSpecial, units) /* Vias---magic contact areas are reported as vias. */ total = defCountVias(def, lefMagicToLefLayer, scale); - fprintf(f, "VIAS %d ;\n", total); + fprintf(f, "VIAS %d ;\n", total); if (total > 0) defWriteVias(f, def, scale, lefMagicToLefLayer); fprintf(f, "END VIAS\n\n"); /* Components (i.e., cell uses) */ total = defCountComponents(def); - fprintf(f, "COMPONENTS %d ;\n", total); + fprintf(f, "COMPONENTS %d ;\n", total); if (total > 0) defWriteComponents(f, def, scale); fprintf(f, "END COMPONENTS\n\n"); @@ -1991,14 +1991,14 @@ DefWriteCell(def, outName, allSpecial, units) /* "Special" nets---nets matching $GND, $VDD, or $globals(*) */ - fprintf(f, "SPECIALNETS %d ;\n", nets.special); + fprintf(f, "SPECIALNETS %d ;\n", nets.special); if (nets.special > 0) - defWriteNets(f, def, scale, lefMagicToLefLayer, (allSpecial) ? + defWriteNets(f, def, scale, lefMagicToLefLayer, (allSpecial) ? ALL_SPECIAL : DO_SPECIAL); fprintf(f, "END SPECIALNETS\n\n"); /* "Regular" nets */ - fprintf(f, "NETS %d ;\n", nets.regular); + fprintf(f, "NETS %d ;\n", nets.regular); if (nets.regular > 0) defWriteNets(f, def, scale, lefMagicToLefLayer, DO_REGULAR); fprintf(f, "END NETS\n\n"); diff --git a/lef/lefCmd.c b/lef/lefCmd.c index b5ba0b12..b1336bc5 100644 --- a/lef/lefCmd.c +++ b/lef/lefCmd.c @@ -25,7 +25,7 @@ static char rcsid[] __attribute__ ((unused)) = "$Header: /usr/cvsroot/magic-8.0/ #include "textio/txcommands.h" #include "commands/commands.h" - + /* * ---------------------------------------------------------------------------- * @@ -98,7 +98,7 @@ CmdLef(w, cmd) */ static char *cmdLefOption[] = - { + { "read [filename] read a LEF file filename[.lef]\n" " read [filename] -import read a LEF file; import cells from .mag files", "write [filename] [-tech] write LEF for current cell\n" @@ -112,7 +112,7 @@ CmdLef(w, cmd) }; static char *cmdDefOption[] = - { + { "read [filename] read a DEF file filename[.def]", "write [cell] [-allspecial] write DEF for current or indicated cell\n", "write -labels label every net in NETS with the net name", diff --git a/lef/lefRead.c b/lef/lefRead.c index a6f38410..36adb32e 100644 --- a/lef/lefRead.c +++ b/lef/lefRead.c @@ -1,5 +1,5 @@ /* - * lefRead.c -- + * lefRead.c -- * * This module incorporates the LEF/DEF format for standard-cell place and * route. @@ -14,7 +14,7 @@ */ #ifndef lint -static char rcsid[] __attribute__ ((unused)) = "$Header: /usr/cvsroot/magic-8.0/lef/lefRead.c,v 1.2 2008/12/17 18:40:04 tim Exp $"; +static char rcsid[] __attribute__ ((unused)) = "$Header: /usr/cvsroot/magic-8.0/lef/lefRead.c,v 1.2 2008/12/17 18:40:04 tim Exp $"; #endif /* not lint */ #include @@ -152,7 +152,7 @@ LefEstimate(processed, total, item_name) gettimeofday(&tv_start, &tz); last_time = 0.0; } - + if (processed > check_interval) { gettimeofday(&tv, &tz); @@ -300,7 +300,7 @@ LefNextToken(f, ignore_eol) void LefError(int type, char *fmt, ...) -{ +{ static int errors = 0, warnings = 0, messages = 0; va_list args; @@ -615,7 +615,7 @@ LefLower(token) * Results: * Pointer to a lefLayer, which may or may not be the * same one presented to the subroutine. - * + * * Side Effects: * May add an entry to the list of LEF layers. * @@ -924,7 +924,7 @@ LefReadRect(f, curlayer, oscale) { /* Scale coordinates (microns to magic internal units) */ /* Need to scale grid if necessary! */ - + lefrect.r_xbot = (int)roundf(llx / oscale); lefrect.r_ybot = (int)roundf(lly / oscale); lefrect.r_xtop = (int)roundf(urx / oscale); @@ -954,7 +954,7 @@ parse_error: * LefReadPolygon -- * * Read a LEF "POLYGON" record from the file, and - * return a linked point structure. + * return a linked point structure. * * Results: * Returns a pointer to a Rect containing the magic @@ -1034,8 +1034,8 @@ LefReadPolygon(f, curlayer, oscale, ppoints) freeMagic(lr); lpoints++; lr = lr->r_next; - } - return plist; + } + return plist; } /* @@ -1043,7 +1043,7 @@ LefReadPolygon(f, curlayer, oscale, ppoints) * LefPaintPolygon -- * * Paint a polygon into the CellDef indicated by lefMacro. - * + * *------------------------------------------------------------ */ @@ -1556,7 +1556,7 @@ LefReadMacro(f, mname, oscale, importForeign) FILE *f; /* LEF file being read */ char *mname; /* name of the macro */ float oscale; /* scale factor um->magic units */ - bool importForeign; /* Whether we should try to read + bool importForeign; /* Whether we should try to read * in a cell. */ { @@ -1854,8 +1854,8 @@ void LefGrowVia(curlayer, currect, lefl) contSize = CIFGetContactSize(curlayer, &edgeSize, NULL, NULL); /* All internal LEF via geometry values are doubled */ - contSize <<= 1; - edgeSize <<= 1; + contSize <<= 1; + edgeSize <<= 1; if (contSize % CIFCurStyle->cs_scaleFactor == 0) contSize /= CIFCurStyle->cs_scaleFactor; @@ -1982,7 +1982,7 @@ LefGenViaGeometry(f, lefl, sizex, sizey, spacex, spacey, lefl->info.via.lr = viaLR; viaLR->r_type = clayer; viaLR->r_r = rect; - + y += sizey + spacey; } x += sizex + spacex; @@ -2032,7 +2032,7 @@ LefAddViaGeometry(f, lefl, curlayer, oscale) lefl->info.via.area = *currect; lefl->type = curlayer; } - else + else { viaLR = (LinkedRect *)mallocMagic(sizeof(LinkedRect)); viaLR->r_next = lefl->info.via.lr; diff --git a/lef/lefTech.c b/lef/lefTech.c index 1dc68572..90b1d90f 100644 --- a/lef/lefTech.c +++ b/lef/lefTech.c @@ -1,5 +1,5 @@ /* - * lefTech.c -- + * lefTech.c -- * * This module incorporates the LEF/DEF format for standard-cell place and * route. Defines technology file layer mapping between LEF and magic layer @@ -132,7 +132,7 @@ LefTechInit() * * Side effects: * Memory freed in the hash table. - * + * *----------------------------------------------------------------------------- */ @@ -395,7 +395,7 @@ LefTechLine(sectionName, argc, argv) * LefTechScale -- * * Change parameters of the LEF section as required when - * redefining magic's internal grid relative to the technology lambda. + * redefining magic's internal grid relative to the technology lambda. * * ---------------------------------------------------------------------------- */ diff --git a/lef/lefWrite.c b/lef/lefWrite.c index 59ff6429..2c623365 100644 --- a/lef/lefWrite.c +++ b/lef/lefWrite.c @@ -152,7 +152,7 @@ lefFileOpen(def, file, suffix, mode, prealfile) return NULL; } - + /* * ---------------------------------------------------------------------------- * diff --git a/lisp/lisp.h b/lisp/lisp.h index 7c345adb..8ee5ad6d 100644 --- a/lisp/lisp.h +++ b/lisp/lisp.h @@ -1,6 +1,6 @@ /************************************************************************* * - * lisp.h -- + * lisp.h -- * * This module defines things that are exported by the * mini-scheme interpreter command line language to the rest diff --git a/lisp/lispA-Z.c b/lisp/lispA-Z.c index c30c2604..fd9f87e6 100644 --- a/lisp/lispA-Z.c +++ b/lisp/lispA-Z.c @@ -469,7 +469,7 @@ LispCdr (name,s,f) LispObj * LispCons (name,s,f) - char *name; + char *name; Sexp *s; Sexp *f; { @@ -729,7 +729,7 @@ LispLet (name,s,f) LispGCAddSexp (saved = s); LispGCAddSexp (f); LispGCAddSexp (frame); - + while (s) { if (LTYPE(CAR(s)) != S_LIST || LTYPE(CDR(s)) != S_LIST) { TxPrintf ("%s: binding must be a list\n", name); @@ -763,7 +763,7 @@ LispLet (name,s,f) LispGCRemoveSexp (saved); return body; -} +} @@ -830,13 +830,13 @@ LispLetRec (name,s,f) } body = LispEval (body, frame); - + LispGCRemoveSexp (frame); LispGCRemoveSexp (f); LispGCRemoveSexp (saved); return body; -} +} @@ -873,7 +873,7 @@ LispLetStar (name,s,f) body = ARG2(s); s = LLIST(ARG1(s)); frame = f; - + LispGCAddSexp (saved = s); LispGCAddSexp (f); LispGCAddSexp (frame); @@ -941,7 +941,7 @@ LispSetCarBang (name,s,f) Sexp *f; { LispObj *l; - + if (!ARG1P(s) || !ARG2P(s) || LTYPE(ARG1(s)) != S_LIST || !LLIST(ARG1(s)) || ARG3P(s)) { TxPrintf ("Usage: (%s pair obj)\n", name); RETURN; @@ -974,7 +974,7 @@ LispSetCdrBang (name,s,f) Sexp *f; { LispObj *l; - + if (!ARG1P(s) || !ARG2P(s) || LTYPE(ARG1(s)) != S_LIST || !LLIST(ARG1(s)) || ARG3P(s)) { TxPrintf ("Usage: (%s pair obj)\n", name); RETURN; @@ -1002,7 +1002,7 @@ LispSetCdrBang (name,s,f) * * Lispeval -- * - * Evaluate argument. + * Evaluate argument. * (eval object) * * Results: @@ -1092,7 +1092,7 @@ LispIf (name,s,f) Sexp *s; Sexp *f; { - if (!ARG1P(s) || !ARG2P(s) || !ARG3P(s) || LTYPE(ARG1(s)) != S_BOOL + if (!ARG1P(s) || !ARG2P(s) || !ARG3P(s) || LTYPE(ARG1(s)) != S_BOOL || ARG4P(s)) { TxPrintf ("Usage: (%s bool obj1 obj2)\n", name); RETURN; @@ -1102,7 +1102,7 @@ LispIf (name,s,f) if (LBOOL(ARG1(s))) return LispEval (ARG2(s), f); - else + else return LispEval (ARG3(s), f); } @@ -1132,7 +1132,7 @@ LispCond (name,s,f) LispObj *l; LispObj *m; Sexp *t, *saved; - + if (!ARG1P(s)) { TxPrintf ("Usage: (%s (bool val) ...)\n", name); RETURN; @@ -1415,7 +1415,7 @@ LispLambda (name,s,f) * * (display-object s) * Prints object out to screen. - * + * * * Results: * returns #t. @@ -1456,7 +1456,7 @@ LispDisplayObj (name,s,f) * * (print-object s) * Prints object out to screen, no newlines - * + * * * Results: * returns #t. diff --git a/lisp/lispA-Z.h b/lisp/lispA-Z.h index b933c19a..10ad4aa2 100644 --- a/lisp/lispA-Z.h +++ b/lisp/lispA-Z.h @@ -1,6 +1,6 @@ /************************************************************************* * - * lispA-Z.h -- + * lispA-Z.h -- * * Declarations for builtins. * diff --git a/lisp/lispArith.c b/lisp/lispArith.c index de626e69..5854bbf7 100644 --- a/lisp/lispArith.c +++ b/lisp/lispArith.c @@ -250,7 +250,7 @@ LispTruncate (name,s,f) } l = LispNewObj (); LTYPE(l) = S_INT; - if (LTYPE(ARG1(s)) == S_FLOAT) + if (LTYPE(ARG1(s)) == S_FLOAT) LINTEGER(l) = (int)LFLOAT(ARG1(s)); else LBOOL(l) = LINTEGER(ARG1(s)); @@ -287,7 +287,7 @@ LispZeroQ (name,s,f) } l = LispNewObj (); LTYPE(l) = S_BOOL; - if (LTYPE(ARG1(s)) == S_FLOAT) + if (LTYPE(ARG1(s)) == S_FLOAT) LBOOL(l) = LFLOAT(ARG1(s)) == 0 ? 1 : 0; else LBOOL(l) = LINTEGER(ARG1(s)) == 0 ? 1 : 0; @@ -324,7 +324,7 @@ LispPositiveQ (name,s,f) } l = LispNewObj (); LTYPE(l) = S_BOOL; - if (LTYPE(ARG1(s)) == S_FLOAT) + if (LTYPE(ARG1(s)) == S_FLOAT) LBOOL(l) = LFLOAT(ARG1(s)) > 0 ? 1 : 0; else LBOOL(l) = LINTEGER(ARG1(s)) > 0 ? 1 : 0; @@ -361,7 +361,7 @@ LispNegativeQ (name,s,f) } l = LispNewObj (); LTYPE(l) = S_BOOL; - if (LTYPE(ARG1(s)) == S_FLOAT) + if (LTYPE(ARG1(s)) == S_FLOAT) LBOOL(l) = LFLOAT(ARG1(s)) < 0 ? 1 : 0; else LBOOL(l) = LINTEGER(ARG1(s)) < 0 ? 1 : 0; diff --git a/lisp/lispEval.c b/lisp/lispEval.c index 9e4076f4..a65e924a 100644 --- a/lisp/lispEval.c +++ b/lisp/lispEval.c @@ -1,6 +1,6 @@ /************************************************************************* * - * lispEval.c -- + * lispEval.c -- * * This module contains the core of the mini-scheme interpreter. * @@ -133,7 +133,7 @@ static struct LispBuiltinFn FnTable[] = { { "let*", -1, 1, LispLetStar }, { "letrec", -1, 1, LispLetRec }, { "cond", -1, 1, LispCond }, - + { "begin", -1, 1, LispBegin }, /* define: evaluate only second argument */ @@ -275,7 +275,7 @@ LispMagicSend (name,s,f) char argstring[TX_MAX_CMDLEN]; int k = 0; int i, j; - + argc = 1; argv[0] = name; while (s) { @@ -419,7 +419,7 @@ LispApply (s,l,f) eval = LispEval (eval, f); return eval; } - + /*----------------------------------------------------------------------------- @@ -446,7 +446,7 @@ LispBuiltinApply (num,s,f) return FnTable[num].f(FnTable[num].name, s, f); } - + /*------------------------------------------------------------------------ * * evalList -- diff --git a/lisp/lispFrame.c b/lisp/lispFrame.c index 06207def..d9fc2aa7 100644 --- a/lisp/lispFrame.c +++ b/lisp/lispFrame.c @@ -1,6 +1,6 @@ /************************************************************************* * - * lispFrame.c -- + * lispFrame.c -- * * This module contains routines that muck around with frames. * @@ -175,12 +175,12 @@ LispFrameRevLookup (l,f) { Sexp *f1; f1 = revfindbinding (l,f); - if (!f1) + if (!f1) return NULL; else return LSYM(CAR(f1)); } - + /*------------------------------------------------------------------------ @@ -269,7 +269,7 @@ LispModifyBinding (name,val,f) return 0; } - + /*----------------------------------------------------------------------------- * * LispFramePush -- diff --git a/lisp/lispGC.c b/lisp/lispGC.c index f00587d0..4bb4306f 100644 --- a/lisp/lispGC.c +++ b/lisp/lispGC.c @@ -1,6 +1,6 @@ /************************************************************************* * - * lispGC.c -- + * lispGC.c -- * * This module contains the garbage collector. * (N.B. This is really inefficient!) @@ -234,16 +234,16 @@ LispCopySexp (s) * * * The garbage collector is rather interesting. It has two modes of - * operation. When evaluation has not executed any "define", "set!", + * operation. When evaluation has not executed any "define", "set!", * "set-car!", or "set-cdr!" commands (the only ones which have side-effects), * everything allocated during the last evaluation is collected without * running a marking algorithm. As a result, normal magic commands will * be executed with O(1) garbage collection overhead. Note that strings * are free'd when the object is reused. - * + * * Scheme functions without side-effects will also execute with O(1) * garbage collection overhead. - * + * * The full mark/collect algorithm is executed once every 50 times the * real garbage collector is called :P This "constant-factor" * speedup actually makes a big difference in practice. @@ -309,7 +309,7 @@ mark_sw (l) while (l != NULL) { GC_SWMARK(LispObj *, l->n, 1); GC_SWMARK(Sexp *, LLIST(l)->n, GC_MARKVAL (LLIST(l)->n)+1); - if (GC_MARKVAL(LLIST(l)->n) == 3 || + if (GC_MARKVAL(LLIST(l)->n) == 3 || (!NIL(CAR(LLIST(l))) && GC_MARKVAL(LLIST(CAR(LLIST(l)))->n) == 0)) { t0=l; t1=CAR(LLIST(l)); t2=CDR(LLIST(l)); t3=m; CAR(LLIST(l))=t2; CDR(LLIST(l))=t3; m=t0; l=t1; @@ -322,7 +322,7 @@ mark_sw (l) } } -static +static void collect_sw () { @@ -396,7 +396,7 @@ collect_sw () LispObjMainAllocQTail->n = NULL; LispObjAllocQ = NULL; } - + /*----------------------------------------------------------------------------- * @@ -420,7 +420,7 @@ LispGC (fl) LispObj *fl; { LispObj *l; - + if (LispCollectAllocQ) { /* * The last evaluation did not have any side-effects. @@ -504,7 +504,7 @@ LispCollectGarbage (name,s,f) { LispObj *l; extern LispObj *LispMainFrameObj; - + if (ARG1P(s)) { TxPrintf ("Usage: (%s)\n", name); RETURN; @@ -546,7 +546,7 @@ void LispGCAddSexp (s) LTYPE(CAR(t)) = S_LIST; LLIST(CAR(t)) = s; CDR(t) = LispMainFrameObj; - + LispMainFrameObj = LispNewObj (); LTYPE(LispMainFrameObj) = S_LIST; LLIST(LispMainFrameObj) = t; @@ -574,7 +574,7 @@ void LispGCRemoveSexp (s) { extern LispObj *LispMainFrameObj; LispObj *l; - + if (LLIST(CAR(LLIST(LispMainFrameObj))) != s) { TxError ("Fatal internal error. Proceed at your own risk!\n"); return; diff --git a/lisp/lispIO.c b/lisp/lispIO.c index 37a74716..d1128daa 100644 --- a/lisp/lispIO.c +++ b/lisp/lispIO.c @@ -38,7 +38,7 @@ * * ("load-scm" "filename") * Reads and evaluates file. - * + * * * Results: * #t => file was opened successfully. @@ -105,7 +105,7 @@ LispLoad (name,s,f) } if (val == ';') { /* skip to eol */ - while ((val = fgetc(fp)) != EOF && val != '\n') + while ((val = fgetc(fp)) != EOF && val != '\n') ; if (val == '\n') line++; continue; @@ -113,7 +113,7 @@ LispLoad (name,s,f) if (val == '\n') line++; if (val == '\t' || val == '\n') val = ' '; /* skip white space at nesting level zero */ - if (nest == 0 && isspace (val)) + if (nest == 0 && isspace (val)) continue; if (nest == 0 && val != '(') { TxPrintf ("Error reading file %s, line %d\n", LSTR(ARG1(s)), line); @@ -268,7 +268,7 @@ LispWrite (name,s,f) * * (spawn list-of-strings) * Reads and evaluates file. - * + * * * Results: * pid => the pid of the spawned process. @@ -316,7 +316,7 @@ LispSpawn (name,s,f) t = LLIST(CDR(t)); } argv[n] = NULL; - + FORK_f(pid); if (pid < 0) { TxPrintf ("Error: could not fork a process!\n"); @@ -369,7 +369,7 @@ LispWait (name,s,f) TxPrintf ("Usage: (%s pid)\n", name); RETURN; } - + if (WaitPid (LINTEGER(ARG1(s)), &stat) < 0) { TxPrintf ("%s: waiting for an invalid pid\n", name); RETURN; diff --git a/lisp/lispInt.h b/lisp/lispInt.h index c3aec926..4148ab93 100644 --- a/lisp/lispInt.h +++ b/lisp/lispInt.h @@ -1,6 +1,6 @@ /************************************************************************* * - * lispInt.h -- + * lispInt.h -- * * Internals of the lisp module. * @@ -98,14 +98,14 @@ typedef struct LispObj { char *s; } u; } LispObj; - + typedef struct Sexp { struct Sexp *n; LispObj *l[2]; } Sexp; /* - * Internal commands + * Internal commands */ extern void LispDispatch(); diff --git a/lisp/lispMagic.c b/lisp/lispMagic.c index 3eceb037..862a340d 100644 --- a/lisp/lispMagic.c +++ b/lisp/lispMagic.c @@ -185,10 +185,10 @@ lispprinttile (tile,cxp) return 0; TITORECT(tile, &targetRect); - + /* Transform to target coordinates */ GEOTRANSRECT(&scx->scx_trans, &targetRect, &sourceRect); - + /* Clip against the target area */ arg = (Rect *) cxp->tc_filter->tf_arg; @@ -197,7 +197,7 @@ lispprinttile (tile,cxp) /* go to edit coordinates from root coordinates */ GEOTRANSRECT (&RootToEditTransform, &sourceRect, &targetRect); - sprintf (getpaint_buf, "((\"%s\" %d %d %d %d))", + sprintf (getpaint_buf, "((\"%s\" %d %d %d %d))", DBTypeShortName (type), targetRect.r_xbot, targetRect.r_ybot, targetRect.r_xtop, targetRect.r_ytop); @@ -206,7 +206,7 @@ lispprinttile (tile,cxp) _internal_list = l; return 0; } - + LispObj * LispGetPaint (name,s,f) @@ -245,7 +245,7 @@ LispGetPaint (name,s,f) } } if (CmdParseLayers (LSTR(ARG1(s)), &mask)) { - if (TTMaskEqual (&mask, &DBSpaceBits)) + if (TTMaskEqual (&mask, &DBSpaceBits)) CmdParseLayers ("*,label", &mask); TTMaskClearType(&mask,TT_SPACE); } @@ -261,9 +261,9 @@ LispGetPaint (name,s,f) LTYPE(_internal_list) = S_LIST; LLIST(_internal_list) = NULL; - (void) DBTreeSrTiles(&scx, &mask, xMask, lispprinttile, + (void) DBTreeSrTiles(&scx, &mask, xMask, lispprinttile, (ClientData) &scx.scx_area); - + return _internal_list; } @@ -298,7 +298,7 @@ LispGetSelPaint (name,s,f) } bzero (&scx, sizeof(SearchContext)); if (CmdParseLayers (LSTR(ARG1(s)), &mask)) { - if (TTMaskEqual (&mask, &DBSpaceBits)) + if (TTMaskEqual (&mask, &DBSpaceBits)) CmdParseLayers ("*,label", &mask); TTMaskClearType(&mask,TT_SPACE); } @@ -317,7 +317,7 @@ LispGetSelPaint (name,s,f) _internal_list = LispNewObj (); LTYPE(_internal_list) = S_LIST; LLIST(_internal_list) = NULL; - (void) DBTreeSrTiles(&scx, &mask, 0, lispprinttile, + (void) DBTreeSrTiles(&scx, &mask, 0, lispprinttile, (ClientData) &scx.scx_area); return _internal_list; } @@ -375,7 +375,7 @@ lispprintlabel (scx, label, tpath, cdarg) /* go to edit coords from root coords */ GEOTRANSRECT (&RootToEditTransform, &sourceRect, &targetRect); - + sprintf (buf, "((\"%s\" \"%s\" %d %d %d %d))", nm, DBTypeShortName (label->lab_type), @@ -388,7 +388,7 @@ lispprintlabel (scx, label, tpath, cdarg) _internal_list = l; return 0; } - + LispObj * LispGetLabel (name,s,f) char *name; @@ -434,7 +434,7 @@ LispGetLabel (name,s,f) LTYPE(_internal_list) = S_LIST; LLIST(_internal_list) = NULL; - (void) DBSearchLabel (&scx, &mask, xMask, LSTR(ARG1(s)), + (void) DBSearchLabel (&scx, &mask, xMask, LSTR(ARG1(s)), lispprintlabel, (ClientData) &scx.scx_area); return _internal_list; @@ -485,7 +485,7 @@ LispGetSelLabel (name,s,f) LTYPE(_internal_list) = S_LIST; LLIST(_internal_list) = NULL; - (void) DBSearchLabel (&scx, &mask, 0, LSTR(ARG1(s)), + (void) DBSearchLabel (&scx, &mask, 0, LSTR(ARG1(s)), lispprintlabel, (ClientData) &scx.scx_area); return _internal_list; @@ -521,9 +521,9 @@ int lispprintcell (use,cdarg) use->cu_xlo, use->cu_xhi, use->cu_ylo, use->cu_yhi, use->cu_xsep, use->cu_ysep); - + l = LispParseString (cellbuffer); - + CDR(LLIST(l)) = _internal_list; _internal_list = l; return 0; @@ -538,19 +538,19 @@ LispGetCellNames (name,s,f) { static char cellbuffer[1024]; LispObj *l; - + if (ARG1P(s)) { TxPrintf ("Usage: (%s)\n", name); RETURN; } - + _internal_list = LispNewObj (); LTYPE(_internal_list) = S_LIST; LLIST(_internal_list) = NULL; (void) DBCellEnum (EditCellUse ? EditCellUse->cu_def : EditRootDef, lispprintcell, (ClientData) NULL); - + return _internal_list; } diff --git a/lisp/lispMain.c b/lisp/lispMain.c index 140ac280..beea7671 100644 --- a/lisp/lispMain.c +++ b/lisp/lispMain.c @@ -1,6 +1,6 @@ /************************************************************************* * - * lispMain.c -- + * lispMain.c -- * * This module contains the mini-scheme interpreter interface. * @@ -88,7 +88,7 @@ LispEvaluate (argc, argv, inFile) l = LispFrameLookup (LispNewString ("scm-echo-parser-input"), LispMainFrame); - if (l && LTYPE(l) == S_BOOL && LBOOL(l)) + if (l && LTYPE(l) == S_BOOL && LBOOL(l)) TxPrintf (" [ %s ]\n", output_buf); l = LispParseString (output_buf); res = LispFrameLookup (LispNewString ("scm-echo-parser-output"), diff --git a/lisp/lispParse.c b/lisp/lispParse.c index 414a5be2..16c7b15b 100644 --- a/lisp/lispParse.c +++ b/lisp/lispParse.c @@ -1,6 +1,6 @@ /************************************************************************* * - * lispParse.c -- + * lispParse.c -- * * This module contains the mini-scheme command-line parser (ugh). * @@ -52,7 +52,7 @@ *----------------------------------------------------------------------------- */ -/* +/* strip whitespace from left: returns new string pointer */ static char * @@ -71,7 +71,7 @@ HashTable Strings; /*----------------------------------------------------------------------------- - * + * * LispNewString -- * * Returns a unique string pointer corresponding to string "s" @@ -86,7 +86,7 @@ char *LispNewString (s) if (nstrings == 0) HashInit (&Strings, STRINGTAB, HT_STRINGKEYS); - + h = HashLookOnly (&Strings, s); if (h) i = (int) HashGetValue(h); @@ -167,7 +167,7 @@ LispAtomParse (pstr,quoted) return l; } if ((isdigit(*str) || *str == '.' || *str == '-' || *str == '+') && - (isdigit(str[1]) || str[1] == '.' || str[1] == '-' || str[1] == '+' + (isdigit(str[1]) || str[1] == '.' || str[1] == '-' || str[1] == '+' || ISEND(str[1]))) { /* eat leading sign */ q = str; @@ -226,7 +226,7 @@ LispAtomParse (pstr,quoted) *str = '\"'; str++; } - else if (!quoted && str[0] == '#' && (str[1] == 't'|| str[1] == 'f') && + else if (!quoted && str[0] == '#' && (str[1] == 't'|| str[1] == 'f') && ISEND(str[2])) { LTYPE(l) = S_BOOL; LBOOL(l) = (str[1] == 't') ? 1 : 0; diff --git a/lisp/lispPrint.c b/lisp/lispPrint.c index 5a218fd8..37fbc409 100644 --- a/lisp/lispPrint.c +++ b/lisp/lispPrint.c @@ -1,6 +1,6 @@ /************************************************************************* * - * lispPrint.c -- + * lispPrint.c -- * * Stuff that prints out the internals of lists. * diff --git a/lisp/lispString.c b/lisp/lispString.c index c20c0772..6ed552a7 100644 --- a/lisp/lispString.c +++ b/lisp/lispString.c @@ -427,7 +427,7 @@ LispSubString (name,s,f) l = LispNewObj (); LTYPE(l) = S_STRING; LSTR(l) = (char*) mallocMagic((unsigned) (LINTEGER(ARG3(s))-LINTEGER(ARG2(s))+1)); - strncpy (LSTR(l), LSTR(ARG1(s))+LINTEGER(ARG2(s)), + strncpy (LSTR(l), LSTR(ARG1(s))+LINTEGER(ARG2(s)), LINTEGER(ARG3(s))-LINTEGER(ARG2(s))); LSTR(l)[LINTEGER(ARG3(s))-LINTEGER(ARG2(s))] = '\0'; return l; diff --git a/lisp/lispTrace.c b/lisp/lispTrace.c index 47e66092..789fd8b4 100644 --- a/lisp/lispTrace.c +++ b/lisp/lispTrace.c @@ -1,6 +1,6 @@ /************************************************************************* * - * lispTrace.c -- + * lispTrace.c -- * * This module manipulates the stack trace information used for * error reporting. @@ -64,7 +64,7 @@ StackFree (t) t->n = freeQ; freeQ = t; } - + /*------------------------------------------------------------------------ * diff --git a/lisp/lispargs.h b/lisp/lispargs.h index a7fb9efd..2598d24a 100644 --- a/lisp/lispargs.h +++ b/lisp/lispargs.h @@ -1,6 +1,6 @@ /************************************************************************* * - * lispargs.h -- + * lispargs.h -- * * Macros for looking at various entries in a list. * diff --git a/magic/magicTop.c b/magic/magicTop.c index f81fa04d..c0829ed0 100644 --- a/magic/magicTop.c +++ b/magic/magicTop.c @@ -5,18 +5,18 @@ * This top level is purposely very short and is located directly in * the directory used to remake Magic. This is so that other * programs may use all of Magic as a library but still provide their - * own 'main' procedure. + * own 'main' procedure. * - * ********************************************************************* - * * Copyright (C) 1985, 1990 Regents of the University of California. * - * * Permission to use, copy, modify, and distribute this * - * * software and its documentation for any purpose and without * - * * fee is hereby granted, provided that the above copyright * - * * notice appear in all copies. The University of California * - * * makes no representations about the suitability of this * - * * software for any purpose. It is provided "as is" without * - * * express or implied warranty. Export of this software outside * - * * of the United States of America may require an export license. * + * ********************************************************************* + * * Copyright (C) 1985, 1990 Regents of the University of California. * + * * Permission to use, copy, modify, and distribute this * + * * software and its documentation for any purpose and without * + * * fee is hereby granted, provided that the above copyright * + * * notice appear in all copies. The University of California * + * * makes no representations about the suitability of this * + * * software for any purpose. It is provided "as is" without * + * * express or implied warranty. Export of this software outside * + * * of the United States of America may require an export license. * * ********************************************************************* */ @@ -36,7 +36,7 @@ static char rcsid[] __attribute__ ((unused)) = "$Header: /usr/cvsroot/magic-8.0/ * Top level of Magic. Do NOT add code to this routine, as all code * should go into `main.c' in the `main' directory. * - * Results: + * Results: * None. * * Side Effects: @@ -55,7 +55,7 @@ main(argc, argv) } /* String containing the version number of magic. Don't change the string - * here, nor its format. It is updated by the Makefile in this directory. + * here, nor its format. It is updated by the Makefile in this directory. * * The version string originates at the top of scripts/config. */ diff --git a/mzrouter/mzBlock.c b/mzrouter/mzBlock.c index c72f0d9f..7bbf2df2 100644 --- a/mzrouter/mzBlock.c +++ b/mzrouter/mzBlock.c @@ -3,24 +3,24 @@ * * Construction of blockage planes. * - * ********************************************************************* + * ********************************************************************* * * Copyright (C) 1988, 1990 Michael H. Arnold and the Regents of the * - * * University of California. * - * * Permission to use, copy, modify, and distribute this * - * * software and its documentation for any purpose and without * - * * fee is hereby granted, provided that the above copyright * - * * notice appear in all copies. The University of California * - * * makes no representations about the suitability of this * - * * software for any purpose. It is provided "as is" without * - * * express or implied warranty. Export of this software outside * - * * of the United States of America may require an export license. * + * * University of California. * + * * Permission to use, copy, modify, and distribute this * + * * software and its documentation for any purpose and without * + * * fee is hereby granted, provided that the above copyright * + * * notice appear in all copies. The University of California * + * * makes no representations about the suitability of this * + * * software for any purpose. It is provided "as is" without * + * * express or implied warranty. Export of this software outside * + * * of the United States of America may require an export license. * * ********************************************************************* * * A blockage plane is used to determine the legal areas for routing. * Each point on the interior of a space tile in a blockage plane is * a legal position to place the lower-left corner of a piece of wiring. * - * To build a blockage plane, each solid mask tile in the + * To build a blockage plane, each solid mask tile in the * layout is bloated in * all four directions and painted into the blockage plane. To the * top and right, it is only bloated by the minimum separation from @@ -57,11 +57,11 @@ * the areas in which a route's lower left corner can be placed that will * let the route terminate without DRC errors. This is the following: * - * w-1 w-1 + * w-1 w-1 * <-----> <----> * +-------------+-----+ ^ * |. . . . . . .|. . .| | w-1 - * | . . . . . . | . . | | + * | . . . . . . | . . | | * +-----+. . . . . . .+-----+ v * | | . . . . . . . . . | * | |. . .tile . . . . .| @@ -110,7 +110,7 @@ static char rcsid[] __attribute__ ((unused)) = "$Header: /usr/cvsroot/magic-8.0/ /* Forward declarations */ extern void mzPaintBlockType(); - + /* * ---------------------------------------------------------------------------- * @@ -118,20 +118,20 @@ extern void mzPaintBlockType(); * * Build blockage info from paint in buildArea. * - * The design rules are used + * The design rules are used * to build a map of blocked areas in blockage planes of RouteTypes. * This map will consist of TT_SPACE tiles, where a zero-width - * path will yield a + * path will yield a * legal route when flushed out to wire width paint, and various - * types of block tiles. Multiple block types are needed to handle route + * types of block tiles. Multiple block types are needed to handle route * termination at the destination node properly. * * TT_BLOCKED and TT_SAMENODE are generated from the mask data * (SAMENODE areas are only blocked by the destination node itself). * * In addition to blockage planes for route layers, there are - * blockage planes for contacts, assumed to connect two planes. - * Both planes of mask information + * blockage planes for contacts, assumed to connect two planes. + * Both planes of mask information * are effectively AND-ed together to form the blockage plane for * that type of contact. * @@ -180,17 +180,17 @@ mzBuildMaskDataBlocks(buildArea) scx.scx_use = mzRouteUse; (void) DBTreeSrTiles( - &scx, - &DBAllButSpaceAndDRCBits, + &scx, + &DBAllButSpaceAndDRCBits, mzCellExpansionMask, - mzBuildBlockFunc, + mzBuildBlockFunc, (ClientData) buildArea); } - /* Add blocks at unexpanded subcells on all blockage planes + /* Add blocks at unexpanded subcells on all blockage planes * - * NOTE: A 0 expansion mask is special cased since - * the mzrotuer interpets a 0 mask to mean all subcells are + * NOTE: A 0 expansion mask is special cased since + * the mzrotuer interpets a 0 mask to mean all subcells are * expanded, * while DBTreeSrCells() takes a 0 mask to mean all subcells are * unexpanded. @@ -213,7 +213,7 @@ mzBuildMaskDataBlocks(buildArea) } } - + /* * ---------------------------------------------------------------------------- * @@ -221,7 +221,7 @@ mzBuildMaskDataBlocks(buildArea) * * Filter function called via DBTreeSrTiles on behalf of mzBuildBlock() * above, for each solid tile in the area of interest. Paints TT_BLOCKED - * (TT_SAMENODE if the tile is marked) areas on each of the planes + * (TT_SAMENODE if the tile is marked) areas on each of the planes * affected by this tile. * * Results: @@ -252,14 +252,14 @@ mzBuildBlockFunc(tile, cxp) return (0); } - + /* * ---------------------------------------------------------------------------- * * mzBlockSubcellsFunc -- * * Filter function called via DBTreeSrTiles on behalf of mzBuildBlock() - * above, for each unexpanded subcell in the area of interest, + * above, for each unexpanded subcell in the area of interest, * a "blocked" area (TT_BLOCKED) is painted on each blockage plane for * the bounding box of the subcell, bloated by the maximum design rule * spacing on that plane. @@ -330,7 +330,7 @@ mzPaintSameNodeFunc(Tile *t, Rect *buildArea) return 0; } - + /* * ---------------------------------------------------------------------------- * @@ -427,7 +427,7 @@ mzPaintBlockType(r, type, buildArea, blockType) } else { - /* If the tile type is a contact of the same + /* If the tile type is a contact of the same * type as the route type, draw a block layer, not SAMENODE. * This prevents the maze router from attempting to place * a contact too close to an existing one, causing a DRC @@ -468,10 +468,10 @@ mzPaintBlockType(r, type, buildArea, blockType) GEOCLIP(&rblock, buildArea); if (!GEO_RECTNULL(&rblock)) { - DBPaintPlane(rT->rt_hBlock, &rblock, + DBPaintPlane(rT->rt_hBlock, &rblock, mzBlockPaintTbl[blockType], (PaintUndoInfo *) NULL); - DBPaintPlaneVert(rT->rt_vBlock, &rblock, + DBPaintPlaneVert(rT->rt_vBlock, &rblock, mzBlockPaintTbl[blockType], (PaintUndoInfo *) NULL); } @@ -490,10 +490,10 @@ mzPaintBlockType(r, type, buildArea, blockType) { /* and paint it */ - DBPaintPlane(rT->rt_hBlock, &rblock, + DBPaintPlane(rT->rt_hBlock, &rblock, mzBlockPaintTbl[locBlockType], (PaintUndoInfo *) NULL); - DBPaintPlaneVert(rT->rt_vBlock, &rblock, + DBPaintPlaneVert(rT->rt_vBlock, &rblock, mzBlockPaintTbl[locBlockType], (PaintUndoInfo *) NULL); } @@ -503,11 +503,11 @@ mzPaintBlockType(r, type, buildArea, blockType) return; } - + /* * ---------------------------------------------------------------------------- * - * mzBuildFenceBlocks -- + * mzBuildFenceBlocks -- * * Blocks regions of fence parity opposite of the destination-point. * (Fence boundaries can not be crossed). @@ -541,26 +541,26 @@ mzBuildFenceBlocks(buildArea) if(mzInsideFence) { DBSrPaintArea(NULL, /* no hint tile */ - mzHFencePlane, - &searchArea, + mzHFencePlane, + &searchArea, &DBSpaceBits, - mzBuildFenceBlocksFunc, + mzBuildFenceBlocksFunc, (ClientData) buildArea); } else { DBSrPaintArea(NULL, /* no hint tile */ - mzHFencePlane, - &searchArea, + mzHFencePlane, + &searchArea, &DBAllButSpaceBits, - mzBuildFenceBlocksFunc, + mzBuildFenceBlocksFunc, (ClientData) buildArea); } return; } - + /* * ---------------------------------------------------------------------------- * @@ -586,7 +586,7 @@ mzBuildFenceBlocksFunc(tile, buildArea) { RouteType *rT; int d; - Rect r, rAdjusted; + Rect r, rAdjusted; TileType tt = TiGetType(tile); /* Get boundary of tile */ @@ -611,21 +611,21 @@ mzBuildFenceBlocksFunc(tile, buildArea) GEOCLIP(&rAdjusted, buildArea); /* Paint into blockage planes */ - DBPaintPlane(rT->rt_hBlock, - &rAdjusted, - mzBlockPaintTbl[TT_BLOCKED], + DBPaintPlane(rT->rt_hBlock, + &rAdjusted, + mzBlockPaintTbl[TT_BLOCKED], (PaintUndoInfo *) NULL); - DBPaintPlaneVert(rT->rt_vBlock, - &rAdjusted, - mzBlockPaintTbl[TT_BLOCKED], + DBPaintPlaneVert(rT->rt_vBlock, + &rAdjusted, + mzBlockPaintTbl[TT_BLOCKED], (PaintUndoInfo *) NULL); } - + /* return 0 - to continue search */ return(0); } - + /* * ---------------------------------------------------------------------------- * @@ -654,7 +654,7 @@ mzExtendBlockBoundsR(rect) TileTypeBitMask genMask; /* Generate twice the required bounds increment, so we don't have * to regenerate as soon as we move from the center of the newly - * generated region. + * generated region. */ int genBoundsIncrement = mzBoundsIncrement * 2; int mzExtendBlockFunc(); @@ -669,31 +669,31 @@ mzExtendBlockBoundsR(rect) area.r_ytop = rect->r_ytop + genBoundsIncrement; - DBPaintPlane(mzHBoundsPlane, + DBPaintPlane(mzHBoundsPlane, &area, mzBoundsPaintTbl[TT_GENBLOCK], (PaintUndoInfo *) NULL); /* Generate blockage planes under each GENBLOCK tile = regions in - * new area where blockage planes not previously generated + * new area where blockage planes not previously generated */ TTMaskZero(&genMask); TTMaskSetType(&genMask,TT_GENBLOCK); - DBSrPaintArea(NULL, /* no hint tile */ + DBSrPaintArea(NULL, /* no hint tile */ mzHBoundsPlane, &area, &genMask, mzExtendBlockFunc, (ClientData) NULL); - /* Paint area INBOUNDS in both bounds planes - *(blockage planes now generated here) + /* Paint area INBOUNDS in both bounds planes + *(blockage planes now generated here) */ - DBPaintPlane(mzHBoundsPlane, + DBPaintPlane(mzHBoundsPlane, &area, mzBoundsPaintTbl[TT_INBOUNDS], (PaintUndoInfo *) NULL); - DBPaintPlaneVert(mzVBoundsPlane, + DBPaintPlaneVert(mzVBoundsPlane, &area, mzBoundsPaintTbl[TT_INBOUNDS], (PaintUndoInfo *) NULL); @@ -704,13 +704,13 @@ mzExtendBlockBoundsR(rect) #define RECT_AREA(r) \ ((double)(r.r_xtop - r.r_xbot)*(double)(r.r_ytop - r.r_ybot)) - + /* * ---------------------------------------------------------------------------- * * mzExtendBlockFunc -- * - * Called by DBSrPaintArea for rectangles where blockage info must be + * Called by DBSrPaintArea for rectangles where blockage info must be * generated. * * Results: @@ -761,7 +761,7 @@ mzExtendBlockFunc(tile, cdarg) return 0; } - + /* * ---------------------------------------------------------------------------- * @@ -787,7 +787,7 @@ mzExtendBlockBounds(point) Point *point; { Rect rect; - + rect.r_ll = *point; rect.r_ur = *point; @@ -796,7 +796,7 @@ mzExtendBlockBounds(point) return; } -/* +/* * This struc is used to store generated walks, since it is necessary * to defer painting walks until all are generated. */ @@ -810,7 +810,7 @@ typedef struct /* global used to store walks prior to painting them */ List *mzWalkList; - + /* * ---------------------------------------------------------------------------- * @@ -822,7 +822,7 @@ List *mzWalkList; * * TT_DEST_AREA and TT_*_WALK regions are generated from the special dest area * cell. Dest areas are regions to connect to and walks are regions blocked - * only by dest nodes and directly adjacent to a dest area. Walks are + * only by dest nodes and directly adjacent to a dest area. Walks are * routed through by special termination code. * * Results: @@ -851,33 +851,33 @@ mzBuildDestAreaBlocks() /* Compute bounding box for dest areas cell */ DBReComputeBbox(mzDestAreasUse->cu_def); - /* Process dest areas in dest area cell one by one. + /* Process dest areas in dest area cell one by one. * - generates normal blockage info. * - paints dest area into appropriate blockage planes. * - generates alignments. * - generates list of walks. - * - * Walks are not actually painted yet because existing + * + * Walks are not actually painted yet because existing * walks can interfere with the generation of new ones. */ scx.scx_area = mzBoundingRect; scx.scx_trans = GeoIdentityTransform; scx.scx_use = mzDestAreasUse; - + /* clip area to bounding box to avoid overflow during transforms */ GEOCLIP(&(scx.scx_area), &(mzDestAreasUse->cu_def->cd_bbox)); - (void) DBTreeSrTiles( &scx, &DBAllButSpaceAndDRCBits, + (void) DBTreeSrTiles( &scx, &DBAllButSpaceAndDRCBits, 0, mzDestAreaFunc, (ClientData) NULL); - (void) DBTreeSrTiles( &scx, &DBAllButSpaceAndDRCBits, + (void) DBTreeSrTiles( &scx, &DBAllButSpaceAndDRCBits, 0, mzDestWalksFunc, (ClientData) NULL); - (void) DBTreeSrTiles(&scx, &DBAllButSpaceAndDRCBits, + (void) DBTreeSrTiles(&scx, &DBAllButSpaceAndDRCBits, 0, mzUDCWalksFunc, (ClientData) NULL); - (void) DBTreeSrTiles(&scx, &DBAllButSpaceAndDRCBits, + (void) DBTreeSrTiles(&scx, &DBAllButSpaceAndDRCBits, 0, mzLRCWalksFunc, (ClientData) NULL); /* Paint walks into blockage planes (and dealloc walk list) */ @@ -895,13 +895,13 @@ mzBuildDestAreaBlocks() TxError("Fatal: Bad destination walk!\n"); continue; /* Try to go on anyway */ } - - DBPaintPlane(walk->w_rT->rt_hBlock, + + DBPaintPlane(walk->w_rT->rt_hBlock, &(walk->w_rect), mzBlockPaintTbl[walk->w_type], (PaintUndoInfo *) NULL); - DBPaintPlaneVert(walk->w_rT->rt_vBlock, + DBPaintPlaneVert(walk->w_rT->rt_vBlock, &(walk->w_rect), mzBlockPaintTbl[walk->w_type], (PaintUndoInfo *) NULL); @@ -912,7 +912,7 @@ mzBuildDestAreaBlocks() return; } - + /* * ---------------------------------------------------------------------------- * @@ -957,7 +957,7 @@ mzDestAreaFunc(tile, cxp) /* the gaRoute info. . . */ if (rT == NULL) return 1; - + /* Draw the routable destination area (see comments at top of file). */ r.r_xtop = rect.r_xtop - rT->rt_width; @@ -1039,7 +1039,7 @@ mzDestWalksFunc(tile, cxp) /* the gaRoute info. . . */ if (rT == NULL) return 1; - + /* Generate alignments and walks for dest areas. * * Since the above dest area may be partially blocked, the blockage @@ -1054,30 +1054,30 @@ mzDestWalksFunc(tile, cxp) TTMaskSetOnlyType(&destAreaMask, TT_DEST_AREA); DBSrPaintArea(NULL, /* no hint tile */ - rT->rt_hBlock, &rect, - &destAreaMask, mzHWalksFunc, + rT->rt_hBlock, &rect, + &destAreaMask, mzHWalksFunc, (ClientData) rT); DBSrPaintArea(NULL, /* no hint tile */ - rT->rt_vBlock, &rect, - &destAreaMask, mzVWalksFunc, + rT->rt_vBlock, &rect, + &destAreaMask, mzVWalksFunc, (ClientData) rT); DBSrPaintArea(NULL, /* no hint tile */ - rT->rt_hBlock, &rect, - &destAreaMask, mzLRCWalksFunc, + rT->rt_hBlock, &rect, + &destAreaMask, mzLRCWalksFunc, (ClientData) rT); DBSrPaintArea(NULL, /* no hint tile */ - rT->rt_vBlock, &rect, - &destAreaMask, mzUDCWalksFunc, + rT->rt_vBlock, &rect, + &destAreaMask, mzUDCWalksFunc, (ClientData) rT); /* continue with next dest area */ return 0; } - + /* * ---------------------------------------------------------------------------- * @@ -1112,14 +1112,14 @@ mzHWalksFunc(tile, cdarg) { Walk *walk; Tile *tLeft = BL(tile); - + /* Build walks for blocks to left of tile */ while(BOTTOM(tLeft)w_rT = rT; + walk->w_rT = rT; walk->w_type = TT_LEFT_WALK; walk->w_rect.r_ybot = MAX(BOTTOM(tile),BOTTOM(tLeft)); walk->w_rect.r_ytop = MIN(TOP(tile),TOP(tLeft)); @@ -1128,7 +1128,7 @@ mzHWalksFunc(tile, cdarg) RIGHT(tLeft)-mzMaxWalkLength); LIST_ADD(walk, mzWalkList); } - + /* move to next tile up */ tLeft = RT(tLeft); } @@ -1145,12 +1145,12 @@ mzHWalksFunc(tile, cdarg) if(TiGetType(tRight)==TT_SAMENODE) { walk = (Walk *) mallocMagic((unsigned) (sizeof(Walk))); - walk->w_rT = rT; + walk->w_rT = rT; walk->w_type = TT_RIGHT_WALK; walk->w_rect.r_ybot = MAX(BOTTOM(tile),BOTTOM(tRight)); walk->w_rect.r_ytop = MIN(TOP(tile),TOP(tRight)); walk->w_rect.r_xbot = LEFT(tRight); - walk->w_rect.r_xtop = MIN(RIGHT(tRight), + walk->w_rect.r_xtop = MIN(RIGHT(tRight), LEFT(tRight)+mzMaxWalkLength); LIST_ADD(walk, mzWalkList); } @@ -1159,13 +1159,13 @@ mzHWalksFunc(tile, cdarg) tRight = LB(tRight); } } - + /* return 0 - to continue search */ return(0); } - + /* * ---------------------------------------------------------------------------- * @@ -1200,7 +1200,7 @@ mzVWalksFunc(tile, cdarg) { Walk *walk; Tile *tBelow = LB(tile); - + /* Build walks for blocks to below tile */ while(LEFT(tBelow)LEFT(tile)) { @@ -1239,7 +1239,7 @@ mzVWalksFunc(tile, cdarg) walk->w_rect.r_xbot = MAX(LEFT(tile),LEFT(tAbove));; walk->w_rect.r_xtop = MIN(RIGHT(tile),RIGHT(tAbove)); walk->w_rect.r_ybot = BOTTOM(tAbove); - walk->w_rect.r_ytop = MIN(TOP(tAbove), + walk->w_rect.r_ytop = MIN(TOP(tAbove), BOTTOM(tAbove)+mzMaxWalkLength); LIST_ADD(walk, mzWalkList); } @@ -1248,12 +1248,12 @@ mzVWalksFunc(tile, cdarg) tAbove = BL(tAbove); } } - + /* return 0 - to continue search */ return(0); } -/* +/* * Structure to pass data between mzLRCWalksFunc, mzUDCWalksFunc, and mzCWalksFunc2 */ typedef struct walkContactFuncData @@ -1263,7 +1263,7 @@ typedef struct walkContactFuncData int wd_walk; /* TT_ABOVE_*_WALK or TT_BELOW_*_WALK */ } WalkContactFuncData; - + /* * ---------------------------------------------------------------------------- * @@ -1287,7 +1287,7 @@ mzLRCWalksFunc(tile, cdarg) ClientData cdarg; { RouteType *rT = (RouteType *) cdarg; /* RouteType of this dest area */ - RouteContact *rC; + RouteContact *rC; Rect rect; int walkType; @@ -1297,7 +1297,7 @@ mzLRCWalksFunc(tile, cdarg) /* process contact types that can connect to this dest area */ for (rC = mzRouteContacts; rC != NULL; rC = rC->rc_next) { - RouteLayer *rLOther = NULL; + RouteLayer *rLOther = NULL; /* skip inactive contact types */ if (!(rC->rc_routeType.rt_active)) continue; @@ -1314,7 +1314,7 @@ mzLRCWalksFunc(tile, cdarg) walkType = TT_BELOW_LR_WALK; } - /* If current contact type (RC) permits connection to dest area, + /* If current contact type (RC) permits connection to dest area, * insert CONTACT_WALK(s) into blockage planes for other layer. */ if (rLOther) @@ -1327,7 +1327,7 @@ mzLRCWalksFunc(tile, cdarg) TTMaskSetOnlyType(&contactOKMask, TT_SPACE); TTMaskSetType(&contactOKMask, TT_SAMENODE); - wD.wd_bounds = ▭ + wD.wd_bounds = ▭ wD.wd_rL = rLOther; wD.wd_walk = walkType; @@ -1336,13 +1336,13 @@ mzLRCWalksFunc(tile, cdarg) DBSrPaintArea(NULL, /* no hint tile */ rC->rc_routeType.rt_hBlock, - &rect, + &rect, &contactOKMask, - mzCWalksFunc2, + mzCWalksFunc2, (ClientData) &wD); } } - + /* return 0 - to continue search */ return(0); } @@ -1370,7 +1370,7 @@ mzUDCWalksFunc(tile, cdarg) ClientData cdarg; { RouteType *rT = (RouteType *) cdarg; /* RouteType of this dest area */ - RouteContact *rC; + RouteContact *rC; Rect rect; int walkType; @@ -1380,7 +1380,7 @@ mzUDCWalksFunc(tile, cdarg) /* process contact types that can connect to this dest area */ for (rC = mzRouteContacts; rC != NULL; rC = rC->rc_next) { - RouteLayer *rLOther = NULL; + RouteLayer *rLOther = NULL; /* skip inactive contact types */ if (!(rC->rc_routeType.rt_active)) continue; @@ -1397,7 +1397,7 @@ mzUDCWalksFunc(tile, cdarg) walkType = TT_BELOW_UD_WALK; } - /* If current contact type (RC) permits connection to dest area, + /* If current contact type (RC) permits connection to dest area, * insert CONTACT_WALK(s) into blockage planes for other layer. */ if (rLOther) @@ -1410,7 +1410,7 @@ mzUDCWalksFunc(tile, cdarg) TTMaskSetOnlyType(&contactOKMask, TT_SPACE); TTMaskSetType(&contactOKMask, TT_SAMENODE); - wD.wd_bounds = ▭ + wD.wd_bounds = ▭ wD.wd_rL = rLOther; wD.wd_walk = walkType; @@ -1419,18 +1419,18 @@ mzUDCWalksFunc(tile, cdarg) DBSrPaintArea(NULL, /* no hint tile */ rC->rc_routeType.rt_vBlock, - &rect, + &rect, &contactOKMask, - mzCWalksFunc2, + mzCWalksFunc2, (ClientData) &wD); } } - + /* return 0 - to continue search */ return(0); } - + /* * ---------------------------------------------------------------------------- * diff --git a/mzrouter/mzDebug.c b/mzrouter/mzDebug.c index eeb7ab7e..2b440a1f 100644 --- a/mzrouter/mzDebug.c +++ b/mzrouter/mzDebug.c @@ -3,17 +3,17 @@ * * Routines for debugging. * - * ********************************************************************* + * ********************************************************************* * * Copyright (C) 1988, 1990 Michael H. Arnold and the Regents of the * * * University of California. * - * * Permission to use, copy, modify, and distribute this * - * * software and its documentation for any purpose and without * - * * fee is hereby granted, provided that the above copyright * - * * notice appear in all copies. The University of California * - * * makes no representations about the suitability of this * - * * software for any purpose. It is provided "as is" without * - * * express or implied warranty. Export of this software outside * - * * of the United States of America may require an export license. * + * * Permission to use, copy, modify, and distribute this * + * * software and its documentation for any purpose and without * + * * fee is hereby granted, provided that the above copyright * + * * notice appear in all copies. The University of California * + * * makes no representations about the suitability of this * + * * software for any purpose. It is provided "as is" without * + * * express or implied warranty. Export of this software outside * + * * of the United States of America may require an export license. * * ********************************************************************* */ @@ -47,8 +47,8 @@ extern void mzPrintRT(); extern void mzPrintRC(); extern void mzPrintRP(); extern void mzPrintPathHead(); - - + + /* * ---------------------------------------------------------------------------- * @@ -82,7 +82,7 @@ MZPrintRCListNames(l) TxPrintf("\n"); return; } - + /* * ---------------------------------------------------------------------------- * @@ -116,7 +116,7 @@ MZPrintRLListNames(l) TxPrintf("\n"); return; } - + /* * ---------------------------------------------------------------------------- * @@ -147,7 +147,7 @@ MZPrintRLs(rL) return; } - + /* * ---------------------------------------------------------------------------- * @@ -171,14 +171,14 @@ mzPrintRL(rL) List *cL; TxPrintf("ROUTE LAYER:\n"); - mzPrintRT(&(rL->rl_routeType)); - TxPrintf("\tplaneNum = %d (%s)\n",rL->rl_planeNum, + mzPrintRT(&(rL->rl_routeType)); + TxPrintf("\tplaneNum = %d (%s)\n",rL->rl_planeNum, DBPlaneLongNameTbl[rL->rl_planeNum]); TxPrintf("\tcontactL = "); for (cL=rL->rl_contactL; cL!=NULL; cL=LIST_TAIL(cL)) { - TxPrintf("%s", + TxPrintf("%s", DBTypeLongNameTbl[ ((RouteContact*) LIST_FIRST(cL))-> rc_routeType.rt_tileType]); @@ -193,7 +193,7 @@ mzPrintRL(rL) rc_rLayer1->rl_routeType.rt_tileType]); } TxPrintf("\n"); - + TxPrintf("\thCost = %d\n", rL->rl_hCost); TxPrintf("\tvCost = %d\n", @@ -201,11 +201,11 @@ mzPrintRL(rL) TxPrintf("\tjogCost = %d\n", rL->rl_jogCost); TxPrintf("\thintCost = %d\n",rL->rl_hintCost); - + return; } - + /* * ---------------------------------------------------------------------------- * @@ -232,7 +232,7 @@ mzPrintRT(rT) TxPrintf("\t\ttileType = %s\n", DBTypeLongNameTbl[rT->rt_tileType]); TxPrintf("\t\tactive = %s\n", (rT->rt_active ? "TRUE" : "FALSE")); TxPrintf("\t\twidth = %d\n",rT->rt_width); - + TxPrintf("\t\tspacing = "); for (i=0;irt_spacing[i]>=0) @@ -257,13 +257,13 @@ mzPrintRT(rT) TxPrintf("%s(%d) ","SUBCELL",rT->rt_bloatTop[TT_SUBCELL]); TxPrintf("\n"); - TxPrintf("\t\tnext = %s\n", + TxPrintf("\t\tnext = %s\n", (rT->rt_next ? DBTypeLongNameTbl[rT->rt_next->rt_tileType] : "(nil)")); return; } - + /* * ---------------------------------------------------------------------------- * @@ -293,7 +293,7 @@ MZPrintRCs(rC) return; } - + /* * ---------------------------------------------------------------------------- * @@ -317,9 +317,9 @@ mzPrintRC(rC) TxPrintf("ROUTE CONTACT:\n"); mzPrintRT(&(rC->rc_routeType)); - TxPrintf("\trLayer1 = %s\n", + TxPrintf("\trLayer1 = %s\n", DBTypeLongNameTbl[rC->rc_rLayer1->rl_routeType.rt_tileType]); - TxPrintf("\trLayer2 = %s\n", + TxPrintf("\trLayer2 = %s\n", DBTypeLongNameTbl[rC->rc_rLayer2->rl_routeType.rt_tileType]); TxPrintf("\tcost = %d\n", @@ -329,7 +329,7 @@ mzPrintRC(rC) } - + /* * ---------------------------------------------------------------------------- * @@ -358,7 +358,7 @@ mzPrintRPs(path) return; } - + /* * ---------------------------------------------------------------------------- * @@ -383,7 +383,7 @@ mzPrintRP(path) TxPrintf(" layer = %s", DBTypeLongNameTbl[path->rp_rLayer->rl_routeType.rt_tileType]); TxPrintf(" entry = (%d, %d)", path->rp_entry.p_x, path->rp_entry.p_y); - TxPrintf(" cost = %.0f", + TxPrintf(" cost = %.0f", (double)(path->rp_cost)); TxPrintf(" extCode = { "); if (path->rp_extendCode & EC_RIGHT) @@ -413,7 +413,7 @@ mzPrintRP(path) } /* mzPrintPathHead -- */ -void +void mzPrintPathHead(path) RoutePath *path; { @@ -424,7 +424,7 @@ mzPrintPathHead(path) } else { - TxPrintf(" point=(%d,%d), layer=%s, orient = '%c'", + TxPrintf(" point=(%d,%d), layer=%s, orient = '%c'", path->rp_entry.p_x, path->rp_entry.p_y, DBTypeLongNameTbl[path->rp_rLayer->rl_routeType.rt_tileType], @@ -460,18 +460,18 @@ mzPrintPathHead(path) } return; } - + /* * ---------------------------------------------------------------------------- * - * mzDumpTags -- + * mzDumpTags -- * * Dump tags on data tiles (for debugging). * - * Results: + * Results: * None. * - * Side effects: + * Side effects: * info written to file or via TxPrintf() * * ---------------------------------------------------------------------------- @@ -496,18 +496,18 @@ mzDumpTags(area) scx.scx_area = *area; scx.scx_trans = GeoIdentityTransform; scx.scx_use = mzRouteUse; - + (void) DBTreeSrTiles( - &scx, - &DBAllTypeBits, + &scx, + &DBAllTypeBits, 0, /* look inside all subcells */ - mzDumpTagsFunc, + mzDumpTagsFunc, (ClientData) NULL); return; } - + /* * ---------------------------------------------------------------------------- * @@ -535,7 +535,7 @@ mzDumpTagsFunc(tile, cxp) /* if tile has no client data attached, skip it */ if (tile->ti_client == (ClientData)CLIENTDEFAULT) return 0; - + /* Get boundary of tile */ TITORECT(tile, &r); @@ -549,15 +549,15 @@ mzDumpTagsFunc(tile, cxp) for(l=(List *) (tile->ti_client); l!=NULL; l=LIST_TAIL(l)) { Rect *rTerm = (Rect *) LIST_FIRST(l); - + TxPrintf("\tattached dest area (x: %d to %d, y: %d to %d)\n", - rTerm->r_xbot, - rTerm->r_xtop, - rTerm->r_ybot, + rTerm->r_xbot, + rTerm->r_xtop, + rTerm->r_ybot, rTerm->r_ytop); } } - + /* continue search */ return 0; } diff --git a/mzrouter/mzDebug.h b/mzrouter/mzDebug.h index 2ad5cead..253ee3fe 100644 --- a/mzrouter/mzDebug.h +++ b/mzrouter/mzDebug.h @@ -13,17 +13,17 @@ * DebugIsSet(). * * - * ********************************************************************* + * ********************************************************************* * * Copyright (C) 1988, 1990 Michael H. Arnold and the Regents of the * * * University of California. * - * * Permission to use, copy, modify, and distribute this * - * * software and its documentation for any purpose and without * - * * fee is hereby granted, provided that the above copyright * - * * notice appear in all copies. The University of California * - * * makes no representations about the suitability of this * - * * software for any purpose. It is provided "as is" without * - * * express or implied warranty. Export of this software outside * - * * of the United States of America may require an export license. * + * * Permission to use, copy, modify, and distribute this * + * * software and its documentation for any purpose and without * + * * fee is hereby granted, provided that the above copyright * + * * notice appear in all copies. The University of California * + * * makes no representations about the suitability of this * + * * software for any purpose. It is provided "as is" without * + * * express or implied warranty. Export of this software outside * + * * of the United States of America may require an export license. * * ********************************************************************* * * rcsid $Header: /usr/cvsroot/magic-8.0/mzrouter/mzDebug.h,v 1.1.1.1 2008/02/03 20:43:50 tim Exp $ diff --git a/mzrouter/mzEstimate.c b/mzrouter/mzEstimate.c index d9675aee..2f014f44 100644 --- a/mzrouter/mzEstimate.c +++ b/mzrouter/mzEstimate.c @@ -6,31 +6,31 @@ * Contains code for building estimation plane (just prior to route), and * routine for computing estimates (using the estimation plane) during routing. * - * ********************************************************************* + * ********************************************************************* * * Copyright (C) 1988, 1990 Michael H. Arnold and the Regents of the * * * University of California. * - * * Permission to use, copy, modify, and distribute this * - * * software and its documentation for any purpose and without * - * * fee is hereby granted, provided that the above copyright * - * * notice appear in all copies. The University of California * - * * makes no representations about the suitability of this * - * * software for any purpose. It is provided "as is" without * - * * express or implied warranty. Export of this software outside * - * * of the United States of America may require an export license. * + * * Permission to use, copy, modify, and distribute this * + * * software and its documentation for any purpose and without * + * * fee is hereby granted, provided that the above copyright * + * * notice appear in all copies. The University of California * + * * makes no representations about the suitability of this * + * * software for any purpose. It is provided "as is" without * + * * express or implied warranty. Export of this software outside * + * * of the United States of America may require an export license. * * ********************************************************************* * * EXPLANATION OF ESTIMATION CODE: - * The purpose of the estimation code is to estimate cost to completion - * from any point to the destintation taking into account the need to + * The purpose of the estimation code is to estimate cost to completion + * from any point to the destintation taking into account the need to * detour around major obstactles such as subcells and fences. * * The estimation plane permits multiple destination area (routes are * made to what ever area is easiest to reach). The mzrouter also permits * multiple start points of course. - * + * * To achieve this purpose, prior to beginning the search for a route an * estimation plane is generated with info that allows quick estimation - * of cost to completion during routing. + * of cost to completion during routing. * * The estimation plane contains * ``solid'' tiles for major obstacles (subcells and fences) and space @@ -41,29 +41,29 @@ * * Estimators are generated for each tile in the estimation plane that allow * estimates to be made for points in that tile. An estimator consists - * of five numbers: - * (x0,y0,hcost,vcost,cost0) + * of five numbers: + * (x0,y0,hcost,vcost,cost0) * that are used in the following formula: * EstCost = (x - x0)*hcost + (y -y0)*vcost + cost0. * An estimator represents the approximate cost of a path beginning at any - * point (x,y) in the current tile and proceedings horizontally and then + * point (x,y) in the current tile and proceedings horizontally and then * vertically * (or vice versa) to the tile corner (x0,y0) and then following the cheapest - * path along tile-edges to a destination area. The cheapest path from + * path along tile-edges to a destination area. The cheapest path from * (x0,y0) is precomputed and has cost cost0. Currently only * tile corners (x0,y0) of the tile the estimator is attached to are used * for estimators. Estimators are also generated for paths from edges of * a tile straight across to the nearest dest area (with out jogs). These * "straight shot" estimators have zero hcost or vcost. * Several estimators are attached to each - * tile, and the least cost one is used for any given (x,y). + * tile, and the least cost one is used for any given (x,y). * * The estimation plane is generated in the following steps: * * 1. Generate solid tiles for unexpanded subcells (if subcells can not be routed across on any active layer) and fences. * - * 2. Split space tiles along extended edges of solid tiles and + * 2. Split space tiles along extended edges of solid tiles and * destination areas. * * 3. Assign a horizontal and vertical cost for routing in each tile. @@ -76,7 +76,7 @@ * hor edges is min hor cost of the two adjacent tiles, weight on * vertical edges is min of vert costs of adjacent tiles. Djikstra's * algor. computes least cost path along tile-edges to - * destination for all tile corners + * destination for all tile corners * (e.g. it generates all the cost0's for the estimators). * * 5. Build estimators for each tile - currently one estimator is built @@ -139,7 +139,7 @@ typedef struct vertex #define VX_L_RIGHT 4 #define VX_IN 8 -/* Estimators for estimating cost from point within tile, (x,y), along a +/* Estimators for estimating cost from point within tile, (x,y), along a * certain path to destination. * * EstCost = (x - x0) * hCost + (y - y0) * vCost + cost0 @@ -179,7 +179,7 @@ extern void mzSplitTiles(); extern void mzAssignVertexCosts(); extern void mzAddVertex(); - + /* * ---------------------------------------------------------------------------- * @@ -216,8 +216,8 @@ mzBuildEstimate() RouteLayer *rL; subcellsOpaque = TRUE; - for(rL = mzActiveRLs; - rL!=NULL && subcellsOpaque; + for(rL = mzActiveRLs; + rL!=NULL && subcellsOpaque; rL=rL->rl_nextActive) { if(rL->rl_routeType.rt_spacing[TT_SUBCELL] < 0) @@ -230,8 +230,8 @@ mzBuildEstimate() /* If over-the-cell routing is not possible, * add a tile to the estimation plane for each unexpanded subcell. * - * NOTE: A 0 expansion mask is special cased since - * the mzrouter interpets a 0 mask to mean all subcells are + * NOTE: A 0 expansion mask is special cased since + * the mzrouter interpets a 0 mask to mean all subcells are * expanded, * while DBTreeSrCells() takes a 0 mask to mean all subcells are * unexpanded. @@ -299,12 +299,12 @@ mzBuildEstimate() /* clip area to bounding box to avoid overflow during transforms */ GEOCLIP(&(scx.scx_area),&(mzDestAreasUse->cu_def->cd_bbox)); - + (void) DBTreeSrTiles( - &scx, - &DBAllButSpaceAndDRCBits, - 0, - mzProcessDestEstFunc, + &scx, + &DBAllButSpaceAndDRCBits, + 0, + mzProcessDestEstFunc, (ClientData) NULL); } @@ -314,7 +314,7 @@ mzBuildEstimate() List *solidsList = NULL; List *l; - /* Build list of all solid, + /* Build list of all solid, * i.e. nonspace, tiles on estimation plane. */ DBSrPaintArea(NULL, /* no hint tile */ mzEstimatePlane, @@ -327,7 +327,7 @@ mzBuildEstimate() for(l=solidsList; l!=NULL; l = LIST_TAIL(l)) { Tile *solid = (Tile *) LIST_FIRST(l); - Point p; + Point p; /* lower left corner */ mzSplitTiles(mzEstimatePlane,&(solid->ti_ll)); @@ -375,7 +375,7 @@ mzBuildEstimate() } } - /* visit all tiles in estimate plane attaching cost structures + /* visit all tiles in estimate plane attaching cost structures * (including vertices) to the client fields. Horizontal and * vertical costs are assigned. */ @@ -419,7 +419,7 @@ mzBuildEstimate() return; } - + /* * ---------------------------------------------------------------------------- * @@ -455,7 +455,7 @@ mzCleanEstimate() &TiPlaneRect, /* max paintable rect */ &DBAllTypeBits, mzReclaimTCFunc, - (ClientData) NULL); + (ClientData) NULL); DBClearPaintPlane(mzEstimatePlane); @@ -467,7 +467,7 @@ mzCleanEstimate() return; } - + /* * ---------------------------------------------------------------------------- * @@ -494,13 +494,13 @@ mzReclaimTCFunc(tile, notUsed) { TileCosts *tc = ((TileCosts *) (tile->ti_client)); Estimate *e; - + /* free estimates attached to tilecosts struc */ for(e=tc->tc_estimates; e!=NULL; e=e->e_next) { freeMagic((char *) e); } - + /* free tilecosts struc */ freeMagic((char *) (tile->ti_client)); @@ -512,7 +512,7 @@ mzReclaimTCFunc(tile, notUsed) return 0; } - + /* * ---------------------------------------------------------------------------- * @@ -568,7 +568,7 @@ mzProcessDestEstFunc(tile, cxp) { int mzDestTileEstFunc(); TileTypeBitMask destMask; - + TTMaskSetOnlyType(&destMask, TT_DEST_AREA); TTMaskSetType(&destMask, TT_LEFT_WALK); TTMaskSetType(&destMask, TT_RIGHT_WALK); @@ -577,9 +577,9 @@ mzProcessDestEstFunc(tile, cxp) DBSrPaintArea(NULL, /* no hint tile */ rT->rt_hBlock, - &rect, + &rect, &destMask, - mzDestTileEstFunc, + mzDestTileEstFunc, (ClientData) NULL); } @@ -587,7 +587,7 @@ mzProcessDestEstFunc(tile, cxp) } - + /* * ---------------------------------------------------------------------------- * @@ -617,7 +617,7 @@ mzDestTileEstFunc(tile, cdarg) if(TiGetType(tile)==TT_DEST_AREA) /* paint dest area into estimate plane */ { - DBPaintPlane(mzEstimatePlane, + DBPaintPlane(mzEstimatePlane, &rect, mzEstimatePaintTbl[TT_EST_DEST], (PaintUndoInfo *) NULL); @@ -625,7 +625,7 @@ mzDestTileEstFunc(tile, cdarg) else /* cut hole for walk in estimate plane */ { - DBPaintPlane(mzEstimatePlane, + DBPaintPlane(mzEstimatePlane, &rect, mzEstimatePaintTbl[TT_SPACE], (PaintUndoInfo *) NULL); @@ -634,14 +634,14 @@ mzDestTileEstFunc(tile, cdarg) return 0; } - + /* * ---------------------------------------------------------------------------- * * mzAddSubcellEstFunc -- * * Filter function called via DBTreeSrTiles on behalf of mzBuildEstimate() - * above, for each unexpanded subcell in the area of interest, + * above, for each unexpanded subcell in the area of interest, * a TT_EST_SUBCELL tile is painted on each estimate plane for * the bounding box of the subcell. * @@ -666,8 +666,8 @@ mzAddSubcellEstFunc(scx, cdarg) GEOTRANSRECT(&scx->scx_trans, &r, &rDest); /* paint subcell block onto estimate plane */ - DBPaintPlane(mzEstimatePlane, - &rDest, + DBPaintPlane(mzEstimatePlane, + &rDest, mzEstimatePaintTbl[TT_EST_SUBCELL], (PaintUndoInfo *) NULL); @@ -675,14 +675,14 @@ mzAddSubcellEstFunc(scx, cdarg) return (0); } - + /* * ---------------------------------------------------------------------------- * * mzAddFenceEstFunc -- * * Filter function called via DBSrPaintArea on behalf of mzBuildEstimate() - * above, for each fence tile in the area of interest, + * above, for each fence tile in the area of interest, * a TT_EST_FENCE tile is painted on the estimate plane for * each nonspace tile on the fence plane. * @@ -701,13 +701,13 @@ mzAddFenceEstFunc(tile, buildArea) Rect *buildArea; /* currently ignored */ { Rect r; - + /* Get boundary of tile */ TITORECT(tile, &r); /* paint fence into estimate plane */ - DBPaintPlane(mzEstimatePlane, - &r, + DBPaintPlane(mzEstimatePlane, + &r, mzEstimatePaintTbl[TT_EST_FENCE], (PaintUndoInfo *) NULL); @@ -715,7 +715,7 @@ mzAddFenceEstFunc(tile, buildArea) return (0); } - + /* * ---------------------------------------------------------------------------- * @@ -744,7 +744,7 @@ mzBuildSolidsListFunc(tile, listPtr) return(0); } - + /* * ---------------------------------------------------------------------------- * @@ -790,7 +790,7 @@ mzAssignCostsFunc(tile, spaceCosts) newCosts->tc_hCost = INT_MAX; newCosts->tc_vCost = INT_MAX; break; - + default: /* unrecognized tile type */ ASSERT(FALSE,"mzAssignCostsFunc"); @@ -813,7 +813,7 @@ mzAssignCostsFunc(tile, spaceCosts) v->vx_cost = COST_MAX; } else - { + { /* no 'T' */ newCosts->tc_vxLRight.vx_status = VX_NONE; } @@ -829,7 +829,7 @@ mzAssignCostsFunc(tile, spaceCosts) v->vx_cost = COST_MAX; } else - { + { /* no 'T' */ newCosts->tc_vxULeft.vx_status = VX_NONE; } @@ -841,7 +841,7 @@ mzAssignCostsFunc(tile, spaceCosts) return(0); } - + /* * ---------------------------------------------------------------------------- * @@ -879,14 +879,14 @@ mzDestInitialAssignFunc(tile, cdarg) return(0); } - + /* * ---------------------------------------------------------------------------- * * mzBuildEstimatesFunc -- * * Build path estimates for this tile. - * (For now builds + * (For now builds * + one estimate for each corner of the tile. * + one estimate for no jog path to destination in each direction where * this is possible.) @@ -913,7 +913,7 @@ mzBuildEstimatesFunc(tile, notUsed) return(0); } - + /* * ---------------------------------------------------------------------------- * @@ -935,12 +935,12 @@ mzBuildCornerEstimators(tile) Tile *tile; { TileCosts *tc = (TileCosts *) (tile->ti_client); - Vertex *vLLeft = NULL; - Vertex *vULeft = NULL; + Vertex *vLLeft = NULL; + Vertex *vULeft = NULL; Vertex *vLRight = NULL; Vertex *vURight = NULL; - /* find vertex strucs corresponding to four corners. + /* find vertex strucs corresponding to four corners. * (NULL, for corners at infinity) */ { @@ -984,7 +984,7 @@ mzBuildCornerEstimators(tile) vLRight = &(tc->tc_vxLRight); } else - { + { /* no 'T', stored with tRight */ vLRight = &(((TileCosts *)(tRight->ti_client))->tc_vxLLeft); } @@ -1005,7 +1005,7 @@ mzBuildCornerEstimators(tile) /* upper right at 'T' stored with tRT */ vURight = &(((TileCosts *)(tRT->ti_client))->tc_vxLRight); } - else + else { /* no 'T', stored in own tile */ NEXT_TILE_UP(tDiag, tTR, RIGHT(tile)); @@ -1019,7 +1019,7 @@ mzBuildCornerEstimators(tile) { Estimate *e; - /* Estimate for lower left corner */ + /* Estimate for lower left corner */ if (vLLeft) { e = (Estimate *) mallocMagic((unsigned) (sizeof(Estimate))); @@ -1031,7 +1031,7 @@ mzBuildCornerEstimators(tile) e->e_next = tc->tc_estimates; tc->tc_estimates = e; } - + /* Estimate for lower right corner */ if (vLRight) { @@ -1075,7 +1075,7 @@ mzBuildCornerEstimators(tile) return; } - + /* * ---------------------------------------------------------------------------- * @@ -1100,9 +1100,9 @@ mzBuildStraightShotEstimators(tile) /* straight right */ { Tile *tSolid = tile; - + /* get first solid tile to right */ - while(TiGetType(tSolid)==TT_SPACE && + while(TiGetType(tSolid)==TT_SPACE && tSolid!=mzEstimatePlane->pl_right) { tSolid = TR(tSolid); @@ -1130,9 +1130,9 @@ mzBuildStraightShotEstimators(tile) /* straight left */ { Tile *tSolid = tile; - + /* get first solid tile to left */ - while(TiGetType(tSolid)==TT_SPACE && + while(TiGetType(tSolid)==TT_SPACE && tSolid!=mzEstimatePlane->pl_left) { tSolid = BL(tSolid); @@ -1160,9 +1160,9 @@ mzBuildStraightShotEstimators(tile) /* straight up */ { Tile *tSolid = tile; - + /* get first solid tile above */ - while(TiGetType(tSolid)==TT_SPACE && + while(TiGetType(tSolid)==TT_SPACE && tSolid!=mzEstimatePlane->pl_top) { tSolid = RT(tSolid); @@ -1190,9 +1190,9 @@ mzBuildStraightShotEstimators(tile) /* straight down */ { Tile *tSolid = tile; - + /* get first solid tile below */ - while(TiGetType(tSolid)==TT_SPACE && + while(TiGetType(tSolid)==TT_SPACE && tSolid!=mzEstimatePlane->pl_bottom) { tSolid = LB(tSolid); @@ -1220,7 +1220,7 @@ mzBuildStraightShotEstimators(tile) return; } - + /* * ---------------------------------------------------------------------------- * @@ -1236,16 +1236,16 @@ mzBuildStraightShotEstimators(tile) * specifically sets floating origin coords. (Floating coords * are those with corresponding cost field of 0, hence * there value does not matter when computing estimates. They - * are set here as a convience, to permit uniform treatment of + * are set here as a convience, to permit uniform treatment of * all estimators within this function.) - * - * + * + * * * ---------------------------------------------------------------------------- */ bool -AlwaysAsGood(est1, est2, tile) +AlwaysAsGood(est1, est2, tile) Estimate *est1; Estimate *est2; Tile *tile; @@ -1255,13 +1255,13 @@ AlwaysAsGood(est1, est2, tile) return FALSE; } else - /* check if using est1 even from est2 origin + /* check if using est1 even from est2 origin * is cheaper than using est2 */ { /* If est2 x origin is floating, set to worst case */ if(est2->e_hCost == 0) { - est2->e_x0 = (ABS(LEFT(tile) - est1->e_x0) > + est2->e_x0 = (ABS(LEFT(tile) - est1->e_x0) > ABS(RIGHT(tile) - est1->e_x0)) ? LEFT(tile) : RIGHT(tile); } @@ -1269,7 +1269,7 @@ AlwaysAsGood(est1, est2, tile) /* If est2 y origin is floating, set to worst case */ if(est2->e_vCost == 0) { - est2->e_y0 = (ABS(BOTTOM(tile) - est1->e_y0) > + est2->e_y0 = (ABS(BOTTOM(tile) - est1->e_y0) > ABS(TOP(tile) - est1->e_y0)) ? BOTTOM(tile) : TOP(tile); } @@ -1285,8 +1285,8 @@ AlwaysAsGood(est1, est2, tile) hCost = (dlong) (est1->e_hCost * ABS(est2->e_x0 - est1->e_x0)); vCost = (dlong) (est1->e_vCost * - ABS(est2->e_y0 - est1->e_y0)); - + ABS(est2->e_y0 - est1->e_y0)); + cost = hCost + vCost; cost += est1->e_cost0; @@ -1295,7 +1295,7 @@ AlwaysAsGood(est1, est2, tile) } } - + /* * ---------------------------------------------------------------------------- * @@ -1372,7 +1372,7 @@ mzTrimEstimatesFunc(tile, notUsed) return(0); } - + /* * ---------------------------------------------------------------------------- * @@ -1410,7 +1410,7 @@ mzSplitTiles(plane, point) { /* init t to tile to right of pointTile */ NEXT_TILE_RIGHT(t,pointTile,y); - + while (TiGetType(t)==TT_SPACE && BOTTOM(t)!=y && t!=plane->pl_right) { /* split t */ @@ -1425,7 +1425,7 @@ mzSplitTiles(plane, point) { /* init t to tile above pointTile */ NEXT_TILE_UP(t,pointTile,x) - + while (TiGetType(t)==TT_SPACE && LEFT(t)!=x && t!=plane->pl_top) { /* split t */ @@ -1440,7 +1440,7 @@ mzSplitTiles(plane, point) { /* init t to tile to left of pointTile */ NEXT_TILE_LEFT(t,pointTile,y); - + while (TiGetType(t)==TT_SPACE && BOTTOM(t)!=y && t!=plane->pl_left) { /* split t */ @@ -1455,7 +1455,7 @@ mzSplitTiles(plane, point) { /* init t to tile below pointTile */ NEXT_TILE_DOWN(t,pointTile,x); - + while (TiGetType(t)==TT_SPACE && LEFT(t)!=x && t!=plane->pl_bottom) { /* split t */ @@ -1483,7 +1483,7 @@ mzSplitTiles(plane, point) return; } - + /* * ---------------------------------------------------------------------------- * @@ -1526,7 +1526,7 @@ mzAssignVertexCosts() TileTypeBitMask destOnly; TTMaskSetOnlyType(&destOnly, TT_EST_DEST); - + DBSrPaintArea(NULL, /* no hint tile */ mzEstimatePlane, &mzBoundingRect, @@ -1554,7 +1554,7 @@ mzAssignVertexCosts() return; } - + /* * ---------------------------------------------------------------------------- * @@ -1622,7 +1622,7 @@ mzAddVertex(vxThis, adjHeap) /* process adjacent vertex ABOVE */ { Vertex *vxAbove; - int yAbove; + int yAbove; /* Check for no edge above */ if(LEFT(tLoc)!=loc.p_x) @@ -1643,7 +1643,7 @@ mzAddVertex(vxThis, adjHeap) yAbove = BOTTOM(tAbove); } else - { + { /* T from bottom */ vxAbove = &(((TileCosts *)(tLoc->ti_client))->tc_vxULeft); yAbove = BOTTOM(tAbove); @@ -1700,7 +1700,7 @@ mzAddVertex(vxThis, adjHeap) xRight = LEFT(tRight); } else - { + { /* T from left */ vxRight = &(((TileCosts *)(tLoc->ti_client))->tc_vxLRight); xRight = LEFT(tRight); @@ -1856,16 +1856,16 @@ mzAddVertex(vxThis, adjHeap) noLeft:; } } - + /* * ---------------------------------------------------------------------------- * * mzEstimatedCost -- * - * Results: + * Results: * Estimated cost of route from point to destination. * - * Side effects: + * Side effects: * None. * * ---------------------------------------------------------------------------- @@ -1900,18 +1900,18 @@ mzEstimatedCost(point) return bestCost; } - + /* * ---------------------------------------------------------------------------- * - * mzDumpEstimates -- + * mzDumpEstimates -- * * Dump info in estimate plane (for debugging). * - * Results: + * Results: * None. * - * Side effects: + * Side effects: * info written to file or via TxPrintf() * * ---------------------------------------------------------------------------- @@ -1943,14 +1943,14 @@ mzDumpEstimates(area,fd) return; } - + /* * ---------------------------------------------------------------------------- * * mzDumpEstFunc -- * * Filter function called via DBSrPaintArea on behalf of mzDumpEstimates() - * above, for each estimate tile in the area of interest, + * above, for each estimate tile in the area of interest, * the info associated with each tile is dumped. * * Results: @@ -1969,7 +1969,7 @@ mzDumpEstFunc(tile, fd) { Rect r; TileCosts *tilec = (TileCosts *) tile->ti_client; - + /* Get boundary of tile */ TITORECT(tile, &r); @@ -1978,15 +1978,15 @@ mzDumpEstFunc(tile, fd) { fprintf(fd,"\ntile %p\t\t (x: %d to %d, y: %d to %d)\n", tile, r.r_xbot, r.r_xtop, r.r_ybot, r.r_ytop); - fprintf(fd,"\thcost = %d ", - tilec->tc_hCost); - fprintf(fd,"vcost = %d \n", + fprintf(fd,"\thcost = %d ", + tilec->tc_hCost); + fprintf(fd,"vcost = %d \n", tilec->tc_vCost); { char str[100]; Estimate *e; - fprintf(fd,"\tEstimates:\n"); + fprintf(fd,"\tEstimates:\n"); for(e=tilec->tc_estimates; e!=NULL; e=e->e_next) { @@ -1996,19 +1996,19 @@ mzDumpEstFunc(tile, fd) } } } - else + else { TxPrintf("\ntile %x\t\t (x: %d to %d, y: %d to %d)\n", (pointertype) tile, r.r_xbot, r.r_xtop, r.r_ybot, r.r_ytop); - TxPrintf("\thcost = %d, ", + TxPrintf("\thcost = %d, ", tilec->tc_hCost); - TxPrintf("vcost = %d \n", + TxPrintf("vcost = %d \n", tilec->tc_vCost); { char str[100]; Estimate *e; - TxPrintf("\tEstimates:\n"); + TxPrintf("\tEstimates:\n"); for(e=tilec->tc_estimates; e!=NULL; e=e->e_next) { @@ -2018,7 +2018,7 @@ mzDumpEstFunc(tile, fd) } } } - + /* continue search */ return (0); } diff --git a/mzrouter/mzHint.c b/mzrouter/mzHint.c index 13928474..0f3aca70 100644 --- a/mzrouter/mzHint.c +++ b/mzrouter/mzHint.c @@ -3,17 +3,17 @@ * * Builds global hint fence and rotate planes from hint info in mask data. * - * ********************************************************************* + * ********************************************************************* * * Copyright (C) 1988, 1990 Michael H. Arnold and the Regents of the * * * University of California. * - * * Permission to use, copy, modify, and distribute this * - * * software and its documentation for any purpose and without * - * * fee is hereby granted, provided that the above copyright * - * * notice appear in all copies. The University of California * - * * makes no representations about the suitability of this * - * * software for any purpose. It is provided "as is" without * - * * express or implied warranty. Export of this software outside * - * * of the United States of America may require an export license. * + * * Permission to use, copy, modify, and distribute this * + * * software and its documentation for any purpose and without * + * * fee is hereby granted, provided that the above copyright * + * * notice appear in all copies. The University of California * + * * makes no representations about the suitability of this * + * * software for any purpose. It is provided "as is" without * + * * express or implied warranty. Export of this software outside * + * * of the United States of America may require an export license. * * ********************************************************************* * * There are two global hint planes. One is merged into @@ -45,11 +45,11 @@ static char rcsid[] __attribute__ ((unused)) = "$Header: /usr/cvsroot/magic-8.0/ #include "mzrouter/mzrouter.h" #include "mzrouter/mzInternal.h" - + /* * ---------------------------------------------------------------------------- * - * mzBuildHFR -- + * mzBuildHFR -- * * Traverse cells in database, building global Hint, Fence and Rotate * planes. This serves two functions: @@ -80,8 +80,8 @@ mzBuildHFR(srcUse, area) DBClearPaintPlane(mzHHintPlane); DBClearPaintPlane(mzVHintPlane); - /* Clear Fence Plane - * (only one plane since this info is converted to info in blockage + /* Clear Fence Plane + * (only one plane since this info is converted to info in blockage * planes prior to maze routing) */ DBClearPaintPlane(mzHFencePlane); @@ -97,32 +97,32 @@ mzBuildHFR(srcUse, area) /* clip search area to bounding box to avoid overflow during transfroms */ GEOCLIP(&(scx.scx_area),&(srcUse->cu_def->cd_bbox)); - + if(mzTopHintsOnly) /* Search the TOP LEVEL cell ONLY, processing each tile on hint plane */ { - (void) DBNoTreeSrTiles(&scx, - &mzHintTypesMask, + (void) DBNoTreeSrTiles(&scx, + &mzHintTypesMask, mzCellExpansionMask, mzBuildHFRFunc, (ClientData) NULL); } else - /* Search the cell tree, processing each tile on hint plane + /* Search the cell tree, processing each tile on hint plane * in expanded cell. */ { - (void) DBTreeSrTiles(&scx, - &mzHintTypesMask, + (void) DBTreeSrTiles(&scx, + &mzHintTypesMask, mzCellExpansionMask, - mzBuildHFRFunc, + mzBuildHFRFunc, (ClientData) NULL); } return; } - + /* * ---------------------------------------------------------------------------- * @@ -157,11 +157,11 @@ mzBuildHFRFunc(tile, cxp) { /* Paint into global hint planes */ DBPaintPlane(mzHHintPlane, - &rDest, + &rDest, DBStdPaintTbl(TT_MAGNET, PL_M_HINT), (PaintUndoInfo *) NULL); DBPaintPlaneVert(mzVHintPlane, - &rDest, + &rDest, DBStdPaintTbl(TT_MAGNET, PL_M_HINT), (PaintUndoInfo *) NULL); } @@ -172,25 +172,25 @@ mzBuildHFRFunc(tile, cxp) * translated to blocks in blockage planes) */ DBPaintPlane(mzHFencePlane, - &rDest, + &rDest, DBStdPaintTbl(TT_FENCE, PL_F_HINT), (PaintUndoInfo *) NULL); } - else + else { ASSERT(TiGetType(tile)==TT_ROTATE,"mzBuildHFRFunc"); /* Paint into global rotate planes */ DBPaintPlane(mzHRotatePlane, - &rDest, + &rDest, DBStdPaintTbl(TT_ROTATE, PL_R_HINT), (PaintUndoInfo *) NULL); DBPaintPlaneVert(mzVRotatePlane, - &rDest, + &rDest, DBStdPaintTbl(TT_ROTATE, PL_R_HINT), (PaintUndoInfo *) NULL); } - + /* return 0 - to continue search */ return(0); } diff --git a/mzrouter/mzInit.c b/mzrouter/mzInit.c index 2c7489f8..7dce9c84 100644 --- a/mzrouter/mzInit.c +++ b/mzrouter/mzInit.c @@ -4,17 +4,17 @@ * Initialization code for maze router module. * Called after technology file readin. * - * ********************************************************************* + * ********************************************************************* * * Copyright (C) 1988, 1990 Michael H. Arnold and the Regents of the * * * University of California. * - * * Permission to use, copy, modify, and distribute this * - * * software and its documentation for any purpose and without * - * * fee is hereby granted, provided that the above copyright * - * * notice appear in all copies. The University of California * - * * makes no representations about the suitability of this * - * * software for any purpose. It is provided "as is" without * - * * express or implied warranty. Export of this software outside * - * * of the United States of America may require an export license. * + * * Permission to use, copy, modify, and distribute this * + * * software and its documentation for any purpose and without * + * * fee is hereby granted, provided that the above copyright * + * * notice appear in all copies. The University of California * + * * makes no representations about the suitability of this * + * * software for any purpose. It is provided "as is" without * + * * express or implied warranty. Export of this software outside * + * * of the United States of America may require an export license. * * ********************************************************************* */ @@ -81,13 +81,13 @@ CellUse *mzEstimateUse = (CellUse *) NULL; /* Forward declarations */ extern void mzBuildPlanes(); - + /* * ---------------------------------------------------------------------------- * * MZInit -- * - * This procedure is called when Magic starts up, after + * This procedure is called when Magic starts up, after * technology initialization. * * Results: @@ -96,7 +96,7 @@ extern void mzBuildPlanes(); * Side effects: * Register ourselves with debug module * Setup datastructures. - * + * * ---------------------------------------------------------------------------- */ @@ -170,7 +170,7 @@ MZAttachHintPlanes() mzVBoundsPlane = mzVBoundsDef->cd_planes[PL_M_HINT]; } - + /* * ---------------------------------------------------------------------------- * @@ -183,7 +183,7 @@ MZAttachHintPlanes() * * Side effects: * Internal cells allocated. - * + * * ---------------------------------------------------------------------------- */ @@ -202,9 +202,9 @@ mzBuildPlanes() /* (Blockage planes indicate where the router is allowed to route on * each route-type. 0-width routes are made and then flushed out * to design rule correct paths after routing completes). There are - * two blockage planes for each routing layer or and routing + * two blockage planes for each routing layer or and routing * contact - one organized into maximal vertical strips, and one into - * horizontal strips). + * horizontal strips). */ /* Setup paint table for blockage planes */ @@ -215,7 +215,7 @@ mzBuildPlanes() /* Blockage painting is governed by strict priority order: * you always get the higher numbered type, - * EXCEPT that painting space always gives space. + * EXCEPT that painting space always gives space. */ for (r = 0; r < TT_MAXROUTETYPES; r++) { @@ -233,7 +233,7 @@ mzBuildPlanes() } } - /* Create dummy cell for displaying blockage planes + /* Create dummy cell for displaying blockage planes * (see *mzroute showblock command in mzTest.c) */ DBNewYank("__BLOCK", &mzBlockUse,&mzBlockDef); @@ -266,8 +266,8 @@ mzBuildPlanes() /* Indices are "paint", "have". The entry value designates "result" */ - /* (Want TT_INBLOCK to persist when TT_GENBLOCK painted on top, - * so that + /* (Want TT_INBLOCK to persist when TT_GENBLOCK painted on top, + * so that * after painting TT_GENBLOCK over region to be expanded TT_GENBLOCK * tiles give subregions that haven't already been expanded. */ @@ -283,9 +283,9 @@ mzBuildPlanes() mzBoundsPaintTbl[r][TT_INBOUNDS] = TT_INBOUNDS; } - /* Create global bounds planes - + /* Create global bounds planes - * and attach to dummy cells for display during debugging */ - + DBNewYank("__HBOUNDS", &mzHBoundsUse,&mzHBoundsDef); DBNewYank("__VBOUNDS", &mzVBoundsUse,&mzVBoundsDef); @@ -311,7 +311,7 @@ mzBuildPlanes() /* Estimate painting is governed by priority order: * you always get the higher numbered type, - * EXCEPT that painting space always gives space + * EXCEPT that painting space always gives space */ for (r = 0; r < TT_MAXROUTETYPES; r++) { @@ -329,7 +329,7 @@ mzBuildPlanes() } } - /* Create global estimate plane + /* Create global estimate plane * and attach to dummy cells for display during debugging */ DBNewYank("__ESTIMATE", &mzEstimateUse,&mzEstimateDef); @@ -345,7 +345,7 @@ mzBuildPlanes() DBNewYank("__HHINT", &mzHHintUse,&mzHHintDef); DBNewYank("__VHINT", &mzVHintUse,&mzVHintDef); - /* --------------- Fence Plane ---------------------------------- + /* --------------- Fence Plane ---------------------------------- * (Global fence plane gives location of all fences visible to router - * unencumbered by cell structure and hint and rotate regions.)*/ @@ -354,12 +354,12 @@ mzBuildPlanes() DBNewYank("__HFENCE", &mzHFenceUse,&mzHFenceDef); - /* --------------- Rotate Planes ------------------------------- - * (Global rotate plane gives location of all rotate regions visible + /* --------------- Rotate Planes ------------------------------- + * (Global rotate plane gives location of all rotate regions visible * to router - * unencumbered by cell structure and hint and rotate regions.) */ - /* Create global rotate planes + /* Create global rotate planes * and attach to dummy cells for display during debugging */ DBNewYank("__HROTATE", &mzHRotateUse,&mzHRotateDef); diff --git a/mzrouter/mzInternal.h b/mzrouter/mzInternal.h index b1578410..b4fdfd27 100644 --- a/mzrouter/mzInternal.h +++ b/mzrouter/mzInternal.h @@ -6,17 +6,17 @@ * * * - * ********************************************************************* + * ********************************************************************* * * Copyright (C) 1988, 1990 Michael H. Arnold and the Regents of the * * * University of California. * - * * Permission to use, copy, modify, and distribute this * - * * software and its documentation for any purpose and without * - * * fee is hereby granted, provided that the above copyright * - * * notice appear in all copies. The University of California * - * * makes no representations about the suitability of this * - * * software for any purpose. It is provided "as is" without * - * * express or implied warranty. Export of this software outside * - * * of the United States of America may require an export license. * + * * Permission to use, copy, modify, and distribute this * + * * software and its documentation for any purpose and without * + * * fee is hereby granted, provided that the above copyright * + * * notice appear in all copies. The University of California * + * * makes no representations about the suitability of this * + * * software for any purpose. It is provided "as is" without * + * * express or implied warranty. Export of this software outside * + * * of the United States of America may require an export license. * * ********************************************************************* * * @@ -26,16 +26,16 @@ #ifndef _MZINTERNAL_H #define _MZINTERNAL_H -/* +/* * Structures etc. that are exported by the mzrouter are defined in * mzrouter.h. * - * Structures (etc.) defined here are shared between files in this module. + * Structures (etc.) defined here are shared between files in this module. * - * Structures local to a given source + * Structures local to a given source * file are defined at the top of that source file. * - * Structures specific to a given function are defined at + * Structures specific to a given function are defined at * the head of that function. */ @@ -49,15 +49,15 @@ /* ------------------------ Version String --------------------------- */ #define MZROUTER_VERSION "0.6" - + /* ------------------------ Debugging flags ----------------------------- */ extern ClientData mzDebugID; #include "mzDebug.h" /* ---------- Default Parameter Values ----------------------------------- */ -/* Penalty factor applied to cost estimate in excess of max window bound - * represented as mantissa / 2**nExponent +/* Penalty factor applied to cost estimate in excess of max window bound + * represented as mantissa / 2**nExponent */ /* (2048/2**1 = 1028) */ #define DEF_PENALTY_MANTISSA 2048 @@ -78,7 +78,7 @@ extern ClientData mzDebugID; */ #define DEF_BOUNDS_INCREMENT -1 -/* If reset, degenerate estimation plane used (just 4 tiles - one for each +/* If reset, degenerate estimation plane used (just 4 tiles - one for each * quadrant with respect to destination point). */ #define DEF_ESTIMATE 1 @@ -97,7 +97,7 @@ extern ClientData mzDebugID; /* Maximum distance route can penetrate blocked areas to reach destination. * Note only "same node" blockage will be penetrated, i.e. blocks steming from * spacing to unrelated nodes are always honored. - * + * * A value of -1 causes the max penetration to be recomputed prior to each * route based on the design rules for the active routetypes. */ @@ -112,8 +112,8 @@ extern ClientData mzDebugID; */ #define DEF_BLOOM_LIMIT 0 -/* This struc used to make list of named parameter sets for maze routing. - * Only the MazeParameters themselves are passed to the routines +/* This struc used to make list of named parameter sets for maze routing. + * Only the MazeParameters themselves are passed to the routines * in this module. */ typedef struct mazestyle @@ -121,10 +121,10 @@ typedef struct mazestyle char *ms_name; /* name of style */ List *ms_spacingL; /* used to store spacing during tech readin. */ MazeParameters ms_parms; /* parameter settings for this style */ - struct mazestyle *ms_next; + struct mazestyle *ms_next; } MazeStyle; - + /* ----- TileTypes, Paint Tables, and Paint Planes, and Internal Cells ---- */ /* RESULT CELL */ extern CellDef *mzResultDef; @@ -148,14 +148,14 @@ extern CellUse *mzResultUse; #define TT_ABOVE_LR_WALK (5 + TT_OFF) #define TT_BELOW_LR_WALK (6 + TT_OFF) /* Approach to dest area */ -#define TT_LEFT_WALK (7 + TT_OFF) +#define TT_LEFT_WALK (7 + TT_OFF) #define TT_RIGHT_WALK (8 + TT_OFF) #define TT_TOP_WALK (9 + TT_OFF) #define TT_BOTTOM_WALK (10 + TT_OFF) /* route destination area */ -#define TT_DEST_AREA (11 + TT_OFF) +#define TT_DEST_AREA (11 + TT_OFF) /* Can't route in this space */ -#define TT_BLOCKED (12 + TT_OFF) +#define TT_BLOCKED (12 + TT_OFF) #define TT_MAXROUTETYPES (1 + TT_BLOCKED) @@ -164,7 +164,7 @@ extern CellDef *mzBlockDef ; /* BOUNDS PLANE */ /* Blockage planes generated here */ -#define TT_INBOUNDS (1 + TT_OFF) +#define TT_INBOUNDS (1 + TT_OFF) #define TT_GENBLOCK (2 + TT_OFF) extern PaintResultType mzBoundsPaintTbl[TT_MAXROUTETYPES][TT_MAXROUTETYPES]; extern Plane *mzHBoundsPlane; @@ -198,7 +198,7 @@ typedef struct numberLine { int nl_sizeAlloced; /* Number of entries allocated */ int nl_sizeUsed; - int *nl_entries; + int *nl_entries; } NumberLine; /* @@ -247,7 +247,7 @@ typedef struct /* * The following hash table is used to index points - * so that redundant extension from points reached more than once + * so that redundant extension from points reached more than once * is avoided. * It is indexed by (x,y,routeLayer, orientation). Orientation is either * Horizontal, vertical, or original (point on layer). Horizontal and @@ -351,12 +351,12 @@ extern NumberLine mzXAlignNL; extern NumberLine mzYAlignNL; /* initial size of above number lines */ #define INITIAL_ALIGN_SIZE 100 - + /* Fence parity */ extern bool mzInsideFence; /* largest design rule distance - used during incremental blockage gen. */ -extern int mzContextRadius; +extern int mzContextRadius; /* Route types */ extern RouteLayer *mzRouteLayers; @@ -370,15 +370,15 @@ extern RouteType *mzActiveRTs; */ extern int mzBoundsIncrement; -/* If reset, degenerate estimation plane used (just 4 tiles - one for each +/* If reset, degenerate estimation plane used (just 4 tiles - one for each * quadrant with respect to destination point). */ extern int mzEstimate; -/* If set, routes may terminate at any geometry that is +/* If set, routes may terminate at any geometry that is * electrically connected to specified dest areas (default TRUE) */ extern int mzExpandDests; -/* If set, routes may start at any geometry that is +/* If set, routes may start at any geometry that is * electrically connected to specified start areas (default TRUE) */ extern int mzExpandStarts; @@ -387,7 +387,7 @@ extern int mzTopHintsOnly; /* Maximum distance route will extend into blocked area to connect to dest. */ extern int mzMaxWalkLength; /* limits area of route for performance, - * NOTE: IF NONNULL, USER MUST MAKE SURE ROUTE IS ACTUALLY LIMITED TO THIS + * NOTE: IF NONNULL, USER MUST MAKE SURE ROUTE IS ACTUALLY LIMITED TO THIS * AREA WITH FENCES, OTHERWISE THE RESULT IS UNPREDICTABLE. */ extern Rect *mzBoundsHint; @@ -412,18 +412,18 @@ extern int mzNumBlooms; extern int mzNumOutsideBlooms; /* num blooms from outside window */ extern int mzNumComplete; /* number of complete paths so far */ extern int mzBlockGenCalls; /* # of calls to blockage gen. code */ -extern double mzBlockGenArea; /* area over which blockage planes +extern double mzBlockGenArea; /* area over which blockage planes * have been gened. */ extern int mzNumPathsGened; /* number of partial paths added to heap */ extern int mzNumPaths; /* number of paths processed */ -extern int mzReportInterval; /* frequency that # of paths etc. +extern int mzReportInterval; /* frequency that # of paths etc. * is reported. */ extern int mzPathsTilReport; /* counts down to next path report */ /* Variables controlling search */ extern dlong mzWInitialMinToGo; extern dlong mzWInitialMaxToGo; -extern dlong mzBloomMaxCost; +extern dlong mzBloomMaxCost; /* Search status */ extern dlong mzWindowMinToGo; /* Window location */ @@ -434,7 +434,7 @@ extern List *mzMarkedCellsList; /* ------------ Interesting Point Macros -------------------------------- */ /* The following macros are used in the low-level routines for finding - * the NEXT interesting point to the Right, Left, Up and Down. + * the NEXT interesting point to the Right, Left, Up and Down. * * The macros are used to choose the first among 2 interesting points. */ diff --git a/mzrouter/mzMain.c b/mzrouter/mzMain.c index 0bdcd766..02fddb42 100644 --- a/mzrouter/mzMain.c +++ b/mzrouter/mzMain.c @@ -2,23 +2,23 @@ * mzMain.c -- * * Global Data Definitions and interface procedures for the Maze Router. - * + * * OTHER ENTRY POINTS (not in this file): * Technology readin - mzTech.c - * Initialization (after tech readin) - mzInit.c + * Initialization (after tech readin) - mzInit.c * Test command interface - TestCmd.c - * - * ********************************************************************* + * + * ********************************************************************* * * Copyright (C) 1988, 1990 Michael H. Arnold and the Regents of the * * * University of California. * - * * Permission to use, copy, modify, and distribute this * - * * software and its documentation for any purpose and without * - * * fee is hereby granted, provided that the above copyright * - * * notice appear in all copies. The University of California * - * * makes no representations about the suitability of this * - * * software for any purpose. It is provided "as is" without * - * * express or implied warranty. Export of this software outside * - * * of the United States of America may require an export license. * + * * Permission to use, copy, modify, and distribute this * + * * software and its documentation for any purpose and without * + * * fee is hereby granted, provided that the above copyright * + * * notice appear in all copies. The University of California * + * * makes no representations about the suitability of this * + * * software for any purpose. It is provided "as is" without * + * * express or implied warranty. Export of this software outside * + * * of the United States of America may require an export license. * * ********************************************************************* */ @@ -66,7 +66,7 @@ int mzDebStep; MazeStyle *mzStyles = NULL; /* Toplevel cell visible to the router */ -CellUse *mzRouteUse; +CellUse *mzRouteUse; /* Route types */ /* (Specifies what types are permitted during routing, and related design @@ -84,12 +84,12 @@ Rect mzBoundingRect; /* Expansion mask - defines which subcells to treat as expanded */ int mzCellExpansionMask; -/* If reset, degenerate estimation plane used (just 4 tiles - one for each +/* If reset, degenerate estimation plane used (just 4 tiles - one for each * quadrant with respect to destination point). */ int mzEstimate; -/* If set dest areas are expanded to include all electrically +/* If set dest areas are expanded to include all electrically * connected geometry. */ int mzExpandEndpoints; @@ -102,7 +102,7 @@ int mzTopHintsOnly; */ int mzMaxWalkLength; -/* if nonnull, limits area of search for performance. +/* if nonnull, limits area of search for performance. * (NOTE: USER MUST LIMIT ROUTE TO THIS AREA WITH FENCES - OTHERWISE * RESULT IS UNPREDICTABLE). */ @@ -113,7 +113,7 @@ int mzVerbosity; /* if positive, upper bound on number of blooms */ int mzBloomLimit; -/* maskdata unexpanded subcells, marked because they are part of +/* maskdata unexpanded subcells, marked because they are part of * dest. nodes. */ List *mzMarkedCellsList; @@ -128,7 +128,7 @@ CellUse *mzDestAreasUse = (CellUse *) NULL; bool mzInsideFence; /* largest design rule distance - used during incremental blockage gen. */ -int mzContextRadius; +int mzContextRadius; /* Internal cell for completed route */ CellDef *mzResultDef = (CellDef *) NULL; @@ -188,18 +188,18 @@ int mzNumBlooms; int mzNumOutsideBlooms; /* num blooms from outside window */ int mzNumComplete; /* number of complete paths so far */ int mzBlockGenCalls; /* # of calls to blockage gen. code */ -double mzBlockGenArea; /* area over which blockage planes +double mzBlockGenArea; /* area over which blockage planes have been gened. */ int mzNumPathsGened; /* number of partial paths added to heap */ int mzNumPaths; /* number of paths processed */ -int mzReportInterval; /* frequency that # of paths etc. +int mzReportInterval; /* frequency that # of paths etc. * is reported. */ int mzPathsTilReport; /* counts down to next path report */ /* Variables controlling search */ dlong mzWInitialMinToGo; dlong mzWInitialMaxToGo; -dlong mzBloomMaxCost; +dlong mzBloomMaxCost; /* Search status */ dlong mzWindowMinToGo; /* Window location */ @@ -249,7 +249,7 @@ if (TRUE) \ } \ } else - + /* * ---------------------------------------------------------------------------- * @@ -270,7 +270,7 @@ if (TRUE) \ MazeParameters * MZCopyParms(oldParms) MazeParameters *oldParms; /* Maze routing parameters */ -{ +{ MazeParameters *newParms; HashTable aT; /* Address translation hash table */ @@ -279,7 +279,7 @@ MZCopyParms(oldParms) { return NULL; } - + /* Initialize address translation table */ HashInit(&aT, 1000, HT_WORDKEYS); @@ -293,12 +293,12 @@ MZCopyParms(oldParms) { RouteLayer *rLOld; - for(rLOld = oldParms->mp_rLayers; - rLOld != NULL; + for(rLOld = oldParms->mp_rLayers; + rLOld != NULL; rLOld = rLOld->rl_next) { RouteLayer *rLNew; - + /* allocate and equivalence new rL and its rT */ { rLNew = (RouteLayer *) mallocMagic((unsigned)(sizeof(RouteLayer))); @@ -322,12 +322,12 @@ MZCopyParms(oldParms) { RouteContact *rCOld; - for(rCOld = oldParms->mp_rContacts; - rCOld != NULL; + for(rCOld = oldParms->mp_rContacts; + rCOld != NULL; rCOld = rCOld->rc_next) { RouteContact *rCNew; - + /* allocate and equivalence new rC and its rT */ { rCNew = (RouteContact *) mallocMagic((unsigned)(sizeof(RouteContact))); @@ -352,8 +352,8 @@ MZCopyParms(oldParms) { RouteLayer *rLOld; - for(rLOld = oldParms->mp_rLayers; - rLOld != NULL; + for(rLOld = oldParms->mp_rLayers; + rLOld != NULL; rLOld = rLOld->rl_next) { RouteLayer *rLNew = rLOld; @@ -361,7 +361,7 @@ MZCopyParms(oldParms) ADDR_TBL(RouteLayer *, rLNew->rl_next); ADDR_TBL(RouteType *, rLNew->rl_routeType.rt_next); - + /* translate RouteContact addresses in contact list */ { List *l; @@ -378,8 +378,8 @@ MZCopyParms(oldParms) { RouteContact *rCOld; - for(rCOld = oldParms->mp_rContacts; - rCOld != NULL; + for(rCOld = oldParms->mp_rContacts; + rCOld != NULL; rCOld = rCOld->rc_next) { RouteContact *rCNew =rCOld; @@ -391,12 +391,12 @@ MZCopyParms(oldParms) ADDR_TBL(RouteType *, rCNew->rc_routeType.rt_next); } } - + HashKill(&aT); return newParms; } - + /* * ---------------------------------------------------------------------------- * @@ -416,9 +416,9 @@ MZCopyParms(oldParms) MazeParameters * MZFindStyle(name) char *name; /* name of style we are looking for */ -{ +{ MazeStyle *style = mzStyles; - + while(style!=NULL && strcmp(name,style->ms_name)!=0) { style = style->ms_next; @@ -434,7 +434,7 @@ char *name; /* name of style we are looking for */ } } - + /* * ---------------------------------------------------------------------------- * @@ -450,7 +450,7 @@ char *name; /* name of style we are looking for */ * See above. * * NOTE: RouteUse supplied as parm to MZInitRoute is toplevel cell visible - * to router. However resulting route is painted to current edit cell. + * to router. However resulting route is painted to current edit cell. * * ---------------------------------------------------------------------------- */ @@ -463,7 +463,7 @@ MZInitRoute(parms, routeUse, expansionMask) * maze router interpets a 0 mask to mean * all cells are expanded */ -{ +{ /* Disable undo to avoid overhead on paint operations to internal planes */ UndoDisable(); @@ -520,7 +520,7 @@ MZInitRoute(parms, routeUse, expansionMask) mzRouteUse = routeUse; /* set expansion mask */ - mzCellExpansionMask = expansionMask; + mzCellExpansionMask = expansionMask; /* Build hint fence and rotate planes */ mzBuildHFR(mzRouteUse, &mzBoundingRect); @@ -529,7 +529,7 @@ MZInitRoute(parms, routeUse, expansionMask) { RouteType *rT; - /* Clear bounds planes = regions for which blockage + /* Clear bounds planes = regions for which blockage has been generated */ DBClearPaintPlane(mzHBoundsPlane); DBClearPaintPlane(mzVBoundsPlane); @@ -556,7 +556,7 @@ MZInitRoute(parms, routeUse, expansionMask) * MZAddStart -- * * Add a starting terminal for the maze router. - * + * * Results: * None. * @@ -648,8 +648,8 @@ MZAddStart(point, type) * * MZAddDest -- * - * Add a destination terminal. - * + * Add a destination terminal. + * * Results: * none. * @@ -657,10 +657,10 @@ MZAddStart(point, type) * Paints dest area into mzDestAreasDef. * * Marks mask data tiles connected to supplied dest area (rect and type - * passed to this func), also keeps list of marked tiles for cleanup. + * passed to this func), also keeps list of marked tiles for cleanup. * - * Tiles are marked with TRUE on the clientdata field. The default - * clientdata value of CLIENTDEFAULT should be restored by the router + * Tiles are marked with TRUE on the clientdata field. The default + * clientdata value of CLIENTDEFAULT should be restored by the router * before it returns. * * ---------------------------------------------------------------------------- @@ -708,13 +708,13 @@ MZAddDest(rect, type) * MZRoute -- * * Do the route. - * + * * Results: * Zero-width route path. NOTE: route path is allocated from temporary * storage that will be reused for next route. * * Side effects: - * + * * * ---------------------------------------------------------------------------- */ @@ -757,7 +757,7 @@ MZRoute(mzResult) goto abort; } - /* Build Estimate Plane. + /* Build Estimate Plane. * (allowing for end points in unexpanded subcells) */ mzBuildEstimate(); @@ -791,7 +791,7 @@ MZRoute(mzResult) HashInit(&mzPointHash, INITHASHSIZE, HashSize(sizeof (PointKey))); /* Build blockage planes at start points and create initial - * partial paths + * partial paths */ /* set bloom threshold to zero, so that initial points are placed @@ -806,7 +806,7 @@ MZRoute(mzResult) { term = (ColoredRect *) LIST_FIRST(terms); mzExtendBlockBounds(&(term->cr_rect.r_ll)); - + if (mzStart(term) == FALSE) { if (mzResult) *mzResult = MZ_ALREADY_ROUTED; @@ -828,7 +828,7 @@ MZRoute(mzResult) /* Do the route */ path = mzSearch(mzResult); /* On interruption mzSearch returns best complete path - * found prior to interruption + * found prior to interruption */ UndoEnable(); @@ -895,7 +895,7 @@ MZCleanupPath(pathList) ((n1path->rp_orient == 'H') && (path->rp_orient == 'H')))) { /* NOTE: Route paths are allocated by a special procedure; */ - /* DON'T use freeMagic() on them! */ + /* DON'T use freeMagic() on them! */ path->rp_back = n1path->rp_back; n1path = path->rp_back; } @@ -944,7 +944,7 @@ MZCleanupPath(pathList) spath->rp_orient = 'C'; else n1path->rp_orient = 'C'; - + break; } hdist += rC1->rc_routeType.rt_width; @@ -993,7 +993,7 @@ MZCleanupPath(pathList) rT = &(n1path->rp_rLayer->rl_routeType); rC = MZGetContact(n2path, n3path); ctype = rC->rc_routeType.rt_tileType; - + if (n1path->rp_orient == 'V') { if (n1path->rp_entry.p_y > n2path->rp_entry.p_y) @@ -1008,7 +1008,7 @@ MZCleanupPath(pathList) path->rp_entry.p_x, path->rp_entry.p_y, pathlength); } - } + } else { /* Case 3a.2: route up to contact */ @@ -1037,7 +1037,7 @@ MZCleanupPath(pathList) path->rp_entry.p_x, path->rp_entry.p_y, pathlength); } - } + } else { /* Case 3a.4: route right to contact */ @@ -1079,7 +1079,7 @@ MZCleanupPath(pathList) path->rp_entry.p_x, path->rp_entry.p_y, pathlength); } - } + } else { /* Case 3b.2: route up from contact */ @@ -1108,7 +1108,7 @@ MZCleanupPath(pathList) path->rp_entry.p_x, path->rp_entry.p_y, pathlength); } - } + } else { /* Case 3b.4: route right from contact */ @@ -1128,7 +1128,7 @@ MZCleanupPath(pathList) } } - + /* * ---------------------------------------------------------------------------- * @@ -1164,8 +1164,8 @@ MZPaintPath(pathList) * Each segment of the path contains no bends, so is * either horizontal, vertical, or a contact. */ - for (path = pathList; - (prev = path->rp_back)!= NULL && !SigInterruptPending; + for (path = pathList; + (prev = path->rp_back)!= NULL && !SigInterruptPending; path = prev) { RouteLayer *rL; @@ -1233,7 +1233,7 @@ MZPaintPath(pathList) } - + /* * ---------------------------------------------------------------------------- * @@ -1278,7 +1278,7 @@ MZClean() for(l=mzMarkedCellsList; l!=NULL; l=LIST_TAIL(l)) { CellUse *cu = (CellUse *) LIST_FIRST(l); - + /* Restore celluse client field to its "unmarked" value */ cu->cu_client = (ClientData) CLIENTDEFAULT; } @@ -1305,7 +1305,7 @@ MZClean() /* Reclaims route path entries */ mzFreeAllRPaths(); - + /* reset flag */ mzPathsDirty = FALSE; } diff --git a/mzrouter/mzNumLine.c b/mzrouter/mzNumLine.c index a4308391..c4851cfb 100644 --- a/mzrouter/mzNumLine.c +++ b/mzrouter/mzNumLine.c @@ -4,18 +4,18 @@ * Implements datastructure that permits division of line into intervals * (end points) are integers, and given any interger, allows (quick) access to * the interval containing that integer. - * - * ********************************************************************* + * + * ********************************************************************* * * Copyright (C) 1988, 1990 Michael H. Arnold and the Regents of the * * * University of California. * - * * Permission to use, copy, modify, and distribute this * - * * software and its documentation for any purpose and without * - * * fee is hereby granted, provided that the above copyright * - * * notice appear in all copies. The University of California * - * * makes no representations about the suitability of this * - * * software for any purpose. It is provided "as is" without * - * * express or implied warranty. Export of this software outside * - * * of the United States of America may require an export license. * + * * Permission to use, copy, modify, and distribute this * + * * software and its documentation for any purpose and without * + * * fee is hereby granted, provided that the above copyright * + * * notice appear in all copies. The University of California * + * * makes no representations about the suitability of this * + * * software for any purpose. It is provided "as is" without * + * * express or implied warranty. Export of this software outside * + * * of the United States of America may require an export license. * * ********************************************************************* */ @@ -45,7 +45,7 @@ static char rcsid[] __attribute__ ((unused)) = "$Header: /usr/cvsroot/magic-8.0/ #include "mzrouter/mzrouter.h" #include "mzrouter/mzInternal.h" - + /* * ---------------------------------------------------------------------------- * @@ -57,8 +57,8 @@ static char rcsid[] __attribute__ ((unused)) = "$Header: /usr/cvsroot/magic-8.0/ * None. * * Side effects: - * Allocs entires array and sets number line to the single interval - * from MINFINITY to INFINITY. + * Allocs entires array and sets number line to the single interval + * from MINFINITY to INFINITY. * * ---------------------------------------------------------------------------- */ @@ -83,7 +83,7 @@ mzNLInit(nL, size) return; } - + /* * ---------------------------------------------------------------------------- * @@ -118,7 +118,7 @@ mzNLInsert(nL,x) { int newI = lowI + (highI - lowI)/2; int newV = nL->nl_entries[newI]; - + if(newV <= x) { lowI = newI; @@ -129,7 +129,7 @@ mzNLInsert(nL,x) } } } - + /* if x is already an entry, just return */ if(lowI == highI) { @@ -170,7 +170,7 @@ mzNLInsert(nL,x) int * sentinel = &((nL->nl_entries)[lowI]); int * target = &((nL->nl_entries)[nL->nl_sizeUsed]); int * source = target-1; - + while(source!=sentinel) { *(target--) = *(source--); @@ -187,7 +187,7 @@ mzNLInsert(nL,x) return; } - + /* * ---------------------------------------------------------------------------- * @@ -221,7 +221,7 @@ mzNLGetContainingInterval(nL,x) { int newI = lowI + (highI - lowI)/2; int newV = nL->nl_entries[newI]; - + if(newV <= x) { lowI = newI; @@ -237,7 +237,7 @@ mzNLGetContainingInterval(nL,x) return &((nL->nl_entries)[lowI]); } - + /* * ---------------------------------------------------------------------------- * diff --git a/mzrouter/mzSearch.c b/mzrouter/mzSearch.c index 47b63868..8710af0a 100644 --- a/mzrouter/mzSearch.c +++ b/mzrouter/mzSearch.c @@ -2,20 +2,20 @@ * mzSearch.c -- * * Search strategy for maze router. - * Low level of Maze router (finding next interesting point) is done in - * mzSearchRight.c etc. + * Low level of Maze router (finding next interesting point) is done in + * mzSearchRight.c etc. * - * ********************************************************************* + * ********************************************************************* * * Copyright (C) 1988, 1990 Michael H. Arnold and the Regents of the * * * University of California. * - * * Permission to use, copy, modify, and distribute this * - * * software and its documentation for any purpose and without * - * * fee is hereby granted, provided that the above copyright * - * * notice appear in all copies. The University of California * - * * makes no representations about the suitability of this * - * * software for any purpose. It is provided "as is" without * - * * express or implied warranty. Export of this software outside * - * * of the United States of America may require an export license. * + * * Permission to use, copy, modify, and distribute this * + * * software and its documentation for any purpose and without * + * * fee is hereby granted, provided that the above copyright * + * * notice appear in all copies. The University of California * + * * makes no representations about the suitability of this * + * * software for any purpose. It is provided "as is" without * + * * express or implied warranty. Export of this software outside * + * * of the United States of America may require an export license. * * ********************************************************************* * * SEARCH STRATEGY: @@ -23,7 +23,7 @@ * Partial paths are expanded one interesting point at a time - that is a * path is expanded to the next interesting point left, right, up and down * and vias to neighboring layers are considered, then a new (though possibly - * one of the extensions just created) path is selected for expansion. + * one of the extensions just created) path is selected for expansion. * * The "search strategy" employed determines which partial-path is * chosen for exansion at each stage. @@ -33,7 +33,7 @@ * are divided into three groups: those farther from the goal than the * window, those within the window, and those nearer to the goal than the * window. The window begins at the start point and is slowly shifted - * toward the goal over time. Normally the partial-path of least + * toward the goal over time. Normally the partial-path of least * estimated-total-cost WITHIN * the window is chosen for expansion, although a further path (i.e. one * beyond the window) that has exceptionally low estimated-total-cost is @@ -55,39 +55,39 @@ * much better. * * The search strategy is implemented with three heaps and four stacks: - * + * * mzMaxToGoHeap - keeps partial paths NEARER the goal than the window. * these paths are not yet eligible for expansion. * Whenever the window is moved, the top elements of * this heap (i.e. those furthest from the goal) are * moved onto the mzMinCostHeap (i.e. into the window). * - * mzMinCostHeap - keeps partial paths inside the window. the top of this + * mzMinCostHeap - keeps partial paths inside the window. the top of this * heap, i.e. the least cost path inside * the window, is compared with the least (penalized) cost of * the paths beyond the window, and the lesser of these * two is chosen for expansion. * - * mzMinAdjCostHeap - keeps partial paths that are further from the goal - * than the + * mzMinAdjCostHeap - keeps partial paths that are further from the goal + * than the * window. These paths are sorted by adjusted cost. * Adjusted cost is estimated-total-cost plus a penalty * proportial to the distance of the path from the window. * The ordering of the paths is independent of the current * window position - so a "reference position" is used to - * avoid recomputing adjusted costs for these paths + * avoid recomputing adjusted costs for these paths * everytime the window moves. The adjusted cost of the * top (least cost) element is normalized to the current * window position before comparison with the least cost * path on the mzMinCostHeap. The idea behind the * mzMinAdjCostHeap is * to discourage searching of paths beyond the window, but - * to do so in a gentle and flexible way, so that + * to do so in a gentle and flexible way, so that * behaviour will degrade gracefully under unusual * circumstances rather than fail catastrophically. * For example, if the window moves too fast and all the * reasonable paths are left behind, the search will - * degenerate to a simple cost-based search biased towards + * degenerate to a simple cost-based search biased towards * paths nearer to completion - a startegy that is * adequate in many situations. * @@ -109,7 +109,7 @@ * expanded until the estimated cost increases. * * Next the straight stack is processed. The purpose of this stack is to - * consider straight extensions in all directions to some given minimum + * consider straight extensions in all directions to some given minimum * distance. * * Next the bloom stack itself is processed. All extensions derived from @@ -117,7 +117,7 @@ * is exceeded (in practice a small increment is used, thus the local focus * is only extended in straight lines, and then downhill). * - * If all the stacks are empty, a new focus is pickd from the heaps and + * If all the stacks are empty, a new focus is pickd from the heaps and * the bloom stack is initialized with it. * */ @@ -154,7 +154,7 @@ extern void mzBloomInit(); extern void mzMakeStatReport(); extern void mzExtendPath(RoutePath *); - + /* * ---------------------------------------------------------------------------- * @@ -202,7 +202,7 @@ mzSearch(mzResult) TxPrintf("\tmzBloomDeltaCost = %.0f\n", (double)(mzBloomDeltaCost)); } - while (morePartialPaths && + while (morePartialPaths && !windowSweepDoneAndCompletePathFound && !bloomLimitHit && !SigInterruptPending) @@ -220,18 +220,18 @@ mzSearch(mzResult) { mzPathSource = SOURCE_WALK; path = (RoutePath *) ListPop(&mzWalkStack); - + if (DebugIsSet(mzDebugID, mzDebMaze)) { TxPrintf("POPPING TOP OF WALK STACK for extension.\n"); mzPrintPathHead(path); } - } + } else if(mzDownHillStack != NULL) { mzPathSource = SOURCE_DOWNHILL; path = (RoutePath *) ListPop(&mzDownHillStack); - + if (DebugIsSet(mzDebugID, mzDebMaze)) { TxPrintf("POPPING TOP OF DOWNHILL STACK for extension.\n"); @@ -242,7 +242,7 @@ mzSearch(mzResult) { mzPathSource = SOURCE_STRAIGHT; path = (RoutePath *) ListPop(&mzStraightStack); - + if (DebugIsSet(mzDebugID, mzDebMaze)) { TxPrintf("POPPING TOP OF STRAIGHT STACK for extension.\n"); @@ -265,7 +265,7 @@ mzSearch(mzResult) if(path) { /* Check hashtable to see if path already obsolete, - * (i.e. cheaper path to its enpt found.) + * (i.e. cheaper path to its enpt found.) */ { HashEntry *he; @@ -290,8 +290,8 @@ mzSearch(mzResult) { TxPrintf("HASH LOOKUP reveals better path, REJECT path.\n"); } - - /* better path to this pt already exists, + + /* better path to this pt already exists, * skip to next path */ continue; @@ -336,7 +336,7 @@ mzSearch(mzResult) } } } - + /* DEBUG - if single-stepping, print data, show path end visually, * and pause. */ @@ -352,7 +352,7 @@ mzSearch(mzResult) /* path # */ TxPrintf("READY TO EXTEND PATH "); - TxPrintf("(blooms: %d, points-processed: %d):\n", + TxPrintf("(blooms: %d, points-processed: %d):\n", mzNumBlooms, mzNumPaths); mzPrintPathHead(path); @@ -363,7 +363,7 @@ mzSearch(mzResult) i++; TxPrintf(" (%d segments in path)\n", i); } - + /* move box to path end-point */ if(ToolGetBox(&boxDef,&box)) { @@ -397,7 +397,7 @@ mzSearch(mzResult) { HeapEntry maxToGoTopBuf, minCostTopBuf, buf; HeapEntry *maxToGoTop, *minCostTop, *minAdjCostTop; - + if (DebugIsSet(mzDebugID, mzDebMaze)) { TxPrintf("BLOOM STACK EMPTY. "); @@ -405,7 +405,7 @@ mzSearch(mzResult) } /* If the bloom limit has been exceeded, stop searching */ - if(mzBloomLimit >0 && + if(mzBloomLimit >0 && mzNumBlooms > mzBloomLimit) { if(mzVerbosity>=VERB_BRIEF) @@ -467,18 +467,18 @@ mzSearch(mzResult) continue; } - /* Move points that meet the minTogo threshold to window + /* Move points that meet the minTogo threshold to window * (Points are moved from the MaxToGo heap to the minCost heap) */ { if (DebugIsSet(mzDebugID, mzDebMaze)) { - TxPrintf("Moving paths into window "); + TxPrintf("Moving paths into window "); TxPrintf("(maxTogoHeap -> minCostHeap): \n"); } while((maxToGoTop=HeapRemoveTop(&mzMaxToGoHeap, - &maxToGoTopBuf)) != NULL && + &maxToGoTopBuf)) != NULL && (maxToGoTop->he_union.hu_dlong >= mzWindowMinToGo)) { if (DebugIsSet(mzDebugID, mzDebMaze)) @@ -486,14 +486,14 @@ mzSearch(mzResult) mzPrintPathHead((RoutePath*)(maxToGoTop->he_id)); } - HeapAddDLong(&mzMinCostHeap, - ((RoutePath *)(maxToGoTop->he_id))->rp_cost, + HeapAddDLong(&mzMinCostHeap, + ((RoutePath *)(maxToGoTop->he_id))->rp_cost, (char *) (maxToGoTop->he_id)); } if(maxToGoTop!=NULL) { HeapAddDLong(&mzMaxToGoHeap, - maxToGoTop->he_union.hu_dlong, + maxToGoTop->he_union.hu_dlong, (char *) (maxToGoTop->he_id)); } } @@ -536,19 +536,19 @@ mzSearch(mzResult) if(minCostTop!=NULL) { HeapAddDLong(&mzMinCostHeap, - minCostTop->he_union.hu_dlong, + minCostTop->he_union.hu_dlong, (char *) (minCostTop->he_id)); } } - /* Peek at tops of heaps + /* Peek at tops of heaps * (equal cost elements might have got shuffled above when * we placed the last poped element back on the heap.) */ minAdjCostTop = HeapLookAtTop(&mzMinAdjCostHeap); maxToGoTop = HeapLookAtTop(&mzMaxToGoHeap); minCostTop = HeapLookAtTop(&mzMinCostHeap); - + /* Print tops of maxToGo, minCost and minAdjCost heaps */ if (DebugIsSet(mzDebugID, mzDebMaze)) { @@ -573,7 +573,7 @@ mzSearch(mzResult) TxPrintf("Min adjcost top:\n"); if(minAdjCostTop) { - TxPrintf(" Heap-key adjCost: %.0f\n", + TxPrintf(" Heap-key adjCost: %.0f\n", (double)(minAdjCostTop->he_union.hu_dlong)); } else @@ -599,7 +599,7 @@ mzSearch(mzResult) adjCost = adjCost >> mzPenalty.rf_nExponent; adjCost += cost; if (DebugIsSet(mzDebugID, mzDebMaze)) - { + { TxPrintf("WINDOW-CORRECTED ADJCOST: %.0f\n", (double)(adjCost)); } @@ -649,7 +649,7 @@ mzSearch(mzResult) mzNumOutsideBlooms++; } else - /* minCost and minAdjCost heaps empty, + /* minCost and minAdjCost heaps empty, * bloom from top of TOGO heap */ { if(maxToGoTop) @@ -708,7 +708,7 @@ mzSearch(mzResult) } } - + /* * ---------------------------------------------------------------------------- * @@ -794,7 +794,7 @@ mzExtendPath(path) return; } - + /* * ---------------------------------------------------------------------------- * @@ -816,7 +816,7 @@ mzExtendViaLRContacts(path) RoutePath *path; { Point p = path->rp_entry, *lastCpos = NULL; - RouteLayer *rLayer = path->rp_rLayer; + RouteLayer *rLayer = path->rp_rLayer; RouteContact *rC; List *cL; RouteLayer *newRLayer; @@ -1013,7 +1013,7 @@ mzExtendViaUDContacts(path) RoutePath *path; { Point p = path->rp_entry, *lastCpos = NULL; - RouteLayer *rLayer = path->rp_rLayer; + RouteLayer *rLayer = path->rp_rLayer; RouteContact *rC; List *cL; RouteLayer *newRLayer; @@ -1188,13 +1188,13 @@ mzExtendViaUDContacts(path) return; } - + /* * ---------------------------------------------------------------------------- * * mzAddPoint -- * - * Process interesting point. If point within bounds and not redundant, + * Process interesting point. If point within bounds and not redundant, * link to previous path, update cost, and add to heap. * * @@ -1211,7 +1211,7 @@ mzAddPoint(path, p, rLayer, orient, extendCode, costptr) RoutePath *path; /* path that new point extends */ Point *p; /* new point */ RouteLayer *rLayer; /* Route Layer of new point */ - int orient; /* 'H' = endpt of hor seg, 'V' = endpt of vert seg, + int orient; /* 'H' = endpt of hor seg, 'V' = endpt of vert seg, * 'O' = LR contact, 'X' = UD contact, * 'B' = first point in path and blocked */ @@ -1253,7 +1253,7 @@ mzAddPoint(path, p, rLayer, orient, extendCode, costptr) /* Add jogcost if appropriate */ - if (path != NULL && + if (path != NULL && path->rp_rLayer == rLayer && path->rp_orient != 'O' && path->rp_orient != 'X' && path->rp_orient != orient) @@ -1261,7 +1261,7 @@ mzAddPoint(path, p, rLayer, orient, extendCode, costptr) cost += rLayer->rl_jogCost; } - /* Add estimated total cost prior to new point, + /* Add estimated total cost prior to new point, * (or cost so far in the case of initial paths). */ if (path != NULL) @@ -1286,7 +1286,7 @@ mzAddPoint(path, p, rLayer, orient, extendCode, costptr) pk.pk_orient = orient; #if SIZEOF_VOID_P == 8 pk.pk_buffer = 0; /* Otherwise the hash function screws up */ -#endif +#endif he = HashFind(&mzPointHash, (char *) &pk); hashedPath = (RoutePath *) HashGetValue(he); @@ -1338,13 +1338,13 @@ mzAddPoint(path, p, rLayer, orient, extendCode, costptr) TxPrintf("PATH COMPLETE (WALKED IN). Add to complete heap.\n"); } - HeapAddDLong(&mzMinCostCompleteHeap, newPath->rp_cost, + HeapAddDLong(&mzMinCostCompleteHeap, newPath->rp_cost, (char *) newPath); /* compute stats and make completed path report */ - { + { mzNumComplete++; - + if(mzVerbosity>=VERB_STATS) { dlong cost, excessCost; @@ -1353,7 +1353,7 @@ mzAddPoint(path, p, rLayer, orient, extendCode, costptr) mzMakeStatReport(); TxPrintf("PATH #%d ", mzNumComplete); - + cost = newPath->rp_cost; TxPrintf("cst:%.0f, ", (double)(newPath->rp_cost)); @@ -1366,7 +1366,7 @@ mzAddPoint(path, p, rLayer, orient, extendCode, costptr) excessCost = cost - mzInitialEstimate; excessPercent = 100.0 * (double)(excessCost)/ (double)(mzInitialEstimate); - + TxPrintf("overrun: %.0f%%", excessPercent); } @@ -1441,7 +1441,7 @@ mzAddPoint(path, p, rLayer, orient, extendCode, costptr) return; } - + /* * ---------------------------------------------------------------------------- * @@ -1490,7 +1490,7 @@ mzBloomInit(path) void mzMakeStatReport() { - + /* if we aren't being verbose, skip this */ if(mzVerbosityrl_nextActive) { @@ -111,7 +111,7 @@ mzStart(term) srect = term->cr_rect; srect.r_xbot--; srect.r_ybot--; - + /* Added by Tim 8/2/06---for start terminals on contact layers, */ /* run mzExtendInitPath for layer1 and set rL to layer2. */ @@ -182,13 +182,13 @@ mzStart(term) return returnCode; } - + /* * ---------------------------------------------------------------------------- * * mzExtendInitPath -- * - * Central routine for recursively building up initial path inside + * Central routine for recursively building up initial path inside * SAMENODE. Adds specified point to an initial path, if resulting * path end is outside block, mzAddPoint() is called to add init path * to appropriate queue. @@ -231,7 +231,7 @@ mzExtendInitPath(path, rL, point, cost, length, directions) if (path == NULL) returnCode = mzAddInitialContacts(rL, point); - /* If no SAMENODE block, call mzAddPoint() to and initial path to + /* If no SAMENODE block, call mzAddPoint() to and initial path to * appropriate queue. */ @@ -248,15 +248,15 @@ mzExtendInitPath(path, rL, point, cost, length, directions) case TT_LEFT_WALK: extendCode = EC_WALKRIGHT; break; - + case TT_RIGHT_WALK: extendCode = EC_WALKLEFT; break; - + case TT_TOP_WALK: extendCode = EC_WALKDOWN; break; - + case TT_BOTTOM_WALK: extendCode = EC_WALKUP; break; @@ -265,12 +265,12 @@ mzExtendInitPath(path, rL, point, cost, length, directions) case TT_BELOW_LR_WALK: extendCode = EC_WALKLRCONTACT; break; - + case TT_ABOVE_UD_WALK: case TT_BELOW_UD_WALK: extendCode = EC_WALKUDCONTACT; break; - + case TT_DEST_AREA: TxError("Zero length route!\n"); extendCode = EC_COMPLETE; @@ -293,7 +293,7 @@ mzExtendInitPath(path, rL, point, cost, length, directions) } else if (path->rp_entry.p_x == point.p_x) orient = 'V'; - else + else { ASSERT(path->rp_entry.p_y==point.p_y,"mzExtendInitPath"); orient = 'H'; @@ -374,9 +374,9 @@ mzAddInitialContacts(rL, point) initPath = NEWPATH(); initPath->rp_rLayer = rL; initPath->rp_entry = point; - initPath->rp_orient = 'O'; + initPath->rp_orient = 'O'; initPath->rp_cost = 0; - initPath->rp_back = NULL; + initPath->rp_back = NULL; /* Extend thru new point */ returnCode = mzExtendInitPath(initPath, newRLayer, point, @@ -403,9 +403,9 @@ mzAddInitialContacts(rL, point) initPath = NEWPATH(); initPath->rp_rLayer = rL; initPath->rp_entry = point; - initPath->rp_orient = 'X'; + initPath->rp_orient = 'X'; initPath->rp_cost = 0; - initPath->rp_back = NULL; + initPath->rp_back = NULL; /* Extend thru new point */ returnCode = mzExtendInitPath(initPath, newRLayer, point, conCost, diff --git a/mzrouter/mzSubrs.c b/mzrouter/mzSubrs.c index 55fbed64..c756000c 100644 --- a/mzrouter/mzSubrs.c +++ b/mzrouter/mzSubrs.c @@ -2,18 +2,18 @@ * mzSubrs.c -- * * Misc. surport routines for the Maze router. - * - * ********************************************************************* + * + * ********************************************************************* * * Copyright (C) 1988, 1990 Michael H. Arnold and the Regents of the * * * University of California. * - * * Permission to use, copy, modify, and distribute this * - * * software and its documentation for any purpose and without * - * * fee is hereby granted, provided that the above copyright * - * * notice appear in all copies. The University of California * - * * makes no representations about the suitability of this * - * * software for any purpose. It is provided "as is" without * - * * express or implied warranty. Export of this software outside * - * * of the United States of America may require an export license. * + * * Permission to use, copy, modify, and distribute this * + * * software and its documentation for any purpose and without * + * * fee is hereby granted, provided that the above copyright * + * * notice appear in all copies. The University of California * + * * makes no representations about the suitability of this * + * * software for any purpose. It is provided "as is" without * + * * express or implied warranty. Export of this software outside * + * * of the United States of America may require an export license. * * ********************************************************************* */ @@ -48,7 +48,7 @@ static char rcsid[] __attribute__ ((unused)) = "$Header: /usr/cvsroot/magic-8.0/ #include "mzrouter/mzInternal.h" - + /* * ---------------------------------------------------------------------------- * @@ -130,7 +130,7 @@ mzComputeDerivedParms() int i; rT->rt_effWidth = MAX(MAX(rT1->rt_width,rT2->rt_width),rT->rt_width); - + for(i=0;i<=TT_MAXTYPES;i++) { int bot, bot1, bot2; @@ -216,7 +216,7 @@ mzComputeDerivedParms() mzBoundsIncrement = 30*minPitch; } } - + /* Set up (global) bounding rect for route */ if(mzBoundsHint) /* Blockage gen will be confined to user supplied hint (+ 2 units) @@ -246,7 +246,7 @@ mzComputeDerivedParms() maxWidth = 0; maxSpacing = 0; for (rT = mzRouteTypes; rT!=NULL; rT=rT->rt_next) - { + { int i; maxWidth = MAX(maxWidth,rT->rt_width); @@ -260,9 +260,9 @@ mzComputeDerivedParms() mzBoundingRect.r_ybot += safeHalo; mzBoundingRect.r_ytop -= safeHalo; - ASSERT(mzBoundingRect.r_xbot < mzBoundingRect.r_xtop, + ASSERT(mzBoundingRect.r_xbot < mzBoundingRect.r_xtop, "mzComputeDerivedParms"); - ASSERT(mzBoundingRect.r_ybot < mzBoundingRect.r_ytop, + ASSERT(mzBoundingRect.r_ybot < mzBoundingRect.r_ytop, "mzComputeDerivedParms"); } } @@ -279,7 +279,7 @@ int mzMakeEndpoints; /* Set to MZ_EXPAND_START, MZ_EXPAND_DEST, or * Used to mark tiles that are part of start or dest nodes. * * If mzExpandEndpoints is set, also adds dest areas for connected tiles. - * + * * Results: * none. * @@ -296,7 +296,7 @@ mzMarkConnectedTiles(rect, type, expandType) int expandType; { List *expandList = NULL; /* areas remaining to be expanded from */ - + /* set global controlling the creation of dest areas for each connected * tile found. */ @@ -312,7 +312,7 @@ mzMarkConnectedTiles(rect, type, expandType) e->cr_rect = *rect; LIST_ADD(e, expandList); } - + /* repeatedly expand from top area on expandList */ while(expandList) { @@ -320,7 +320,7 @@ mzMarkConnectedTiles(rect, type, expandType) SearchContext scx; TileTypeBitMask typeMask; int mzConnectedTileFunc(); - + /* Restrict marking to route bounds */ if(GEO_OVERLAP(&mzBoundingRect, &(e->cr_rect))) { @@ -330,9 +330,9 @@ mzMarkConnectedTiles(rect, type, expandType) scx.scx_area = e->cr_rect; /* Grow search area by one unit in each direction so that in - * addition to overlapping + * addition to overlapping * tiles we also get those that just touch it. - */ + */ scx.scx_area.r_xbot -= 1; scx.scx_area.r_ybot -= 1; scx.scx_area.r_xtop += 1; @@ -342,21 +342,21 @@ mzMarkConnectedTiles(rect, type, expandType) TTMaskSetOnlyType(&typeMask, e->cr_type); /* search for connecting tiles, mark them, and add them to - * expandList (They are inserted + * expandList (They are inserted * AFTER the first (= current) element.) */ - (void) + (void) DBTreeSrTiles( - &scx, - &(DBConnectTbl[e->cr_type]), /* enumerate all - * tiles of connecting - * types */ + &scx, + &(DBConnectTbl[e->cr_type]), /* enumerate all + * tiles of connecting + * types */ mzCellExpansionMask, - mzConnectedTileFunc, + mzConnectedTileFunc, (ClientData) expandList); } - /* Done processing top element of expandList, toss it */ + /* Done processing top element of expandList, toss it */ e = (ColoredRect *) ListPop(&expandList); freeMagic((char *) e); } @@ -390,7 +390,7 @@ mzMarkConnectedTiles(rect, type, expandType) return; } - + /* * --------------------------------------------------------------------- * @@ -428,7 +428,7 @@ mzConnectedTileFunc(tile, cxp) SearchContext *scx = cxp->tc_scx; List *expandList = (List *) (cxp->tc_filter->tf_arg); Rect rRaw, r; - + /* Get bounding box of tile */ TITORECT(tile, &rRaw); GEOTRANSRECT(&scx->scx_trans, &rRaw, &r); @@ -458,15 +458,15 @@ mzConnectedTileFunc(tile, cxp) { RouteLayer *rL; TileType ttype = TiGetType(tile); - + for(rL=mzRouteLayers; rL!=NULL; rL=rL->rl_next) { - if (rL->rl_routeType.rt_active && + if (rL->rl_routeType.rt_active && TTMaskHasType(&(DBConnectTbl[ttype]), rL->rl_routeType.rt_tileType)) { DBPaint(mzDestAreasUse->cu_def, - &r, + &r, rL->rl_routeType.rt_tileType); } } @@ -492,7 +492,7 @@ mzConnectedTileFunc(tile, cxp) return 0; } - + /* * ---------------------------------------------------------------------------- * @@ -506,7 +506,7 @@ mzConnectedTileFunc(tile, cxp) * Always returns 0 (to continue search) * * Side effects: - * Mark client field in subcell use, and add use to list of marked + * Mark client field in subcell use, and add use to list of marked * subcells. * * ---------------------------------------------------------------------------- @@ -557,7 +557,7 @@ MZGetContact(path, prev) /* Find RouteContact connecting the route layers of path and prev. */ - for (cL = path->rp_rLayer->rl_contactL; cL != NULL && + for (cL = path->rp_rLayer->rl_contactL; cL != NULL && ((RouteContact*)LIST_FIRST(cL))->rc_rLayer1 != prev->rp_rLayer && ((RouteContact*)LIST_FIRST(cL))->rc_rLayer2 != prev->rp_rLayer; cL = LIST_TAIL(cL)); @@ -649,7 +649,7 @@ mzPaintContact(path, prev) return cWidth; } - + /* * ---------------------------------------------------------------------------- * @@ -694,7 +694,7 @@ RoutePage *mzFirstPage = NULL; RoutePage *mzLastPage = NULL; RoutePage *mzCurPage = NULL; - + /* * ---------------------------------------------------------------------------- * @@ -738,7 +738,7 @@ mzAllocRPath() return (&mzCurPage->rpp_array[mzCurPage->rpp_free++]); } - + /* * ---------------------------------------------------------------------------- * @@ -775,7 +775,7 @@ mzFreeAllRPaths() /* Start allocating again from the first page on the list */ mzCurPage = mzFirstPage; } - + /* * ---------------------------------------------------------------------------- * @@ -793,7 +793,7 @@ mzFreeAllRPaths() * ---------------------------------------------------------------------------- */ -bool +bool mzPresent(rL,touchingTypes) RouteLayer *rL; TileTypeBitMask *touchingTypes; @@ -812,6 +812,6 @@ mzPresent(rL,touchingTypes) (rC->rc_rLayer1==rL || rC->rc_rLayer2==rL)) return TRUE; } - + return FALSE; } diff --git a/mzrouter/mzTech.c b/mzrouter/mzTech.c index 24daf80c..3935eb98 100644 --- a/mzrouter/mzTech.c +++ b/mzrouter/mzTech.c @@ -5,17 +5,17 @@ * Processes mzrouter and drc sections of tech file to * set up maze routing parameter sets. * - * ********************************************************************* + * ********************************************************************* * * Copyright (C) 1988, 1990 Michael H. Arnold and the Regents of the * * * University of California. * - * * Permission to use, copy, modify, and distribute this * - * * software and its documentation for any purpose and without * - * * fee is hereby granted, provided that the above copyright * - * * notice appear in all copies. The University of California * - * * makes no representations about the suitability of this * - * * software for any purpose. It is provided "as is" without * - * * express or implied warranty. Export of this software outside * - * * of the United States of America may require an export license. * + * * Permission to use, copy, modify, and distribute this * + * * software and its documentation for any purpose and without * + * * fee is hereby granted, provided that the above copyright * + * * notice appear in all copies. The University of California * + * * makes no representations about the suitability of this * + * * software for any purpose. It is provided "as is" without * + * * express or implied warranty. Export of this software outside * + * * of the United States of America may require an export license. * * ********************************************************************* */ @@ -45,7 +45,7 @@ static char rcsid[] __attribute__ ((unused)) = "$Header: /usr/cvsroot/magic-8.0/ #include "mzrouter/mzrouter.h" #include "mzrouter/mzInternal.h" -/* Procedures referenced before they are defined +/* Procedures referenced before they are defined * (these procedures are local to this file) */ RouteType *mzFindRouteType(); @@ -53,7 +53,7 @@ RouteLayer *mzFindRouteLayer(); RouteContact *mzFindRouteContact(); /* Techspacing structure - - * + * * This structure is used to build a temporary list of spacings from * spacing lines in the mzrouter section of the technology file. Spacings are * copied to RouteTypes after technology readin completes. @@ -66,7 +66,7 @@ typedef struct techspacing struct techspacing *ts_next; } TechSpacing; TechSpacing *mzTechSpacingList = NULL; /* Temporary list of explicit spacings. - * Generated by spacing lines in + * Generated by spacing lines in * mzrouter * section. Used in mzTechFinal to * set spacings ispacings n RouteTypes @@ -132,7 +132,7 @@ MZFreeParameters(params) freeMagic(rC); } - + /* * ---------------------------------------------------------------------------- * @@ -166,14 +166,14 @@ MZTechInit() /* Initially no route types defined */ mzRTypesMask = DBZeroTypeBits; - + /* Initially no maze styles are defined */ mzStyles = NULL; return; } - + /* * ---------------------------------------------------------------------------- * @@ -200,7 +200,7 @@ MZTechFinal() return; } - + /* * ---------------------------------------------------------------------------- * @@ -247,7 +247,7 @@ MZAfterTech() { List *l; - /* add (non SUBCELL) spacings in spacingL to spacing + /* add (non SUBCELL) spacings in spacingL to spacing * arrays in RouteTypes */ for(l=style->ms_spacingL; l!=NULL; l=LIST_TAIL(l)) { @@ -270,7 +270,7 @@ MZAfterTech() rT->rt_spacing[TT_SUBCELL] = maxSpacing; } - /* add SUBCELL spacings in spacingL to spacing + /* add SUBCELL spacings in spacingL to spacing * arrays in RouteTypes */ for(l=style->ms_spacingL; l!=NULL; l=LIST_TAIL(l)) { @@ -288,7 +288,7 @@ MZAfterTech() } } - + /* * ---------------------------------------------------------------------------- * @@ -309,11 +309,11 @@ MZAfterTech() * the deferred spacing list for processing in mzTechFinal after * technology readin is completed. * - * Note: + * Note: * The mzrouter section of the technology file must preceed the drc * section. Thus the route layers and contacts are known prior * to design rule processsing. - * + * * ---------------------------------------------------------------------------- */ @@ -363,7 +363,7 @@ MZTechLine(sectionName, argc, argv) return (TRUE); } - + /* * ---------------------------------------------------------------------------- * @@ -401,7 +401,7 @@ mzTechStyle(argc, argv) { MazeStyle *new; new = (MazeStyle*) mallocMagic((unsigned)(sizeof (MazeStyle))); - + new->ms_name = StrDup(NULL, argv[1]); new->ms_spacingL = NULL; new->ms_next = mzStyles; @@ -417,15 +417,15 @@ mzTechStyle(argc, argv) mzRouteTypes = NULL; return; -} +} + - /* * ---------------------------------------------------------------------------- * * mzStyleEnd -- * - * Close out style. (Saves temporary lists in parms for style.) + * Close out style. (Saves temporary lists in parms for style.) * * Results: * None. @@ -486,7 +486,7 @@ mzStyleEnd() return; } - + /* * ---------------------------------------------------------------------------- * @@ -497,7 +497,7 @@ mzStyleEnd() * * Side effects: * Sets default parameter values. - * + * * ---------------------------------------------------------------------------- */ void @@ -527,14 +527,14 @@ mzSetParmDefaults(parms) /* If set, only hints in toplevel cell are recognized */ parms->mp_topHintsOnly = DEF_TOP_HINTS_ONLY; - + /* Maximum penetration into node (or subcell) blockage to reach * destination. */ parms->mp_maxWalkLength = DEF_MAX_WALK_LENGTH; - /* If nonnull, limits search area for performance - * NOTE: IF NONNULL, IT IS THE USERS RESPONSIBILITY TO CONFINE THE + /* If nonnull, limits search area for performance + * NOTE: IF NONNULL, IT IS THE USERS RESPONSIBILITY TO CONFINE THE * ROUTE TO WITHIN THIS AREA BY FENCES. */ parms->mp_boundsHint = NULL; @@ -548,7 +548,7 @@ mzSetParmDefaults(parms) return; } - + /* * ---------------------------------------------------------------------------- * @@ -597,8 +597,8 @@ mzTechLayer(argc, argv) if(DBTypePlaneTbl[rL->rl_routeType.rt_tileType] == DBTypePlaneTbl[tileType]) { - TechError("Attempt to define two route layers on same plane: %s and %s\n", - DBTypeLongNameTbl[tileType], + TechError("Attempt to define two route layers on same plane: %s and %s\n", + DBTypeLongNameTbl[tileType], DBTypeLongNameTbl[rL->rl_routeType.rt_tileType]); return; } @@ -708,7 +708,7 @@ mzTechLayer(argc, argv) return; } - + /* * ---------------------------------------------------------------------------- * @@ -771,7 +771,7 @@ mzTechNotActive(argc, argv) return; } - + /* * ---------------------------------------------------------------------------- * @@ -822,7 +822,7 @@ mzTechSpacing(argc, argv) if(argc <4 || ODD(argc)) { TechError("Bad form on mzroute spacing.\n"); - TechError("Usage: spacing routeType type1 spacing1 ... [typen spacingn]\n"); + TechError("Usage: spacing routeType type1 spacing1 ... [typen spacingn]\n"); return; } @@ -841,7 +841,7 @@ mzTechSpacing(argc, argv) { /* convert argI to type */ tileType = DBTechNameType(argv[argI]); - if(tileType<0) + if(tileType<0) { /* if not a real type, check to see if "SUBCELL" */ which = LookupStruct( @@ -851,9 +851,9 @@ mzTechSpacing(argc, argv) if ( which>= 0) tileType = TT_SUBCELL; } - if(tileType<0) + if(tileType<0) { - TechError("Unrecognized layer (type): \"%.20s\"\n", + TechError("Unrecognized layer (type): \"%.20s\"\n", argv[argI]); continue; } @@ -861,7 +861,7 @@ mzTechSpacing(argc, argv) /* convert argI+1 to value */ s = argv[argI+1]; value = -2; - if (StrIsInt(s)) + if (StrIsInt(s)) { value = atoi(s); if (value < 0) @@ -893,7 +893,7 @@ mzTechSpacing(argc, argv) return; } - + /* * ---------------------------------------------------------------------------- * @@ -901,7 +901,7 @@ mzTechSpacing(argc, argv) * * Process a "search" line from the "mzrouter" section of the tech file. * A search line sets several parameters controlling the search. - * It has the form: + * It has the form: * * search * @@ -932,7 +932,7 @@ mzTechSearch(argc, argv) } /* set WINDOW RATE */ - if (!StrIsInt(argv[1])) + if (!StrIsInt(argv[1])) { TechError("Bad rate: %s\n",argv[1]); TechError("Rate must be a positive integer.\n"); @@ -952,7 +952,7 @@ mzTechSearch(argc, argv) } /* set WINDOW WIDTH */ - if (!StrIsInt(argv[2])) + if (!StrIsInt(argv[2])) { TechError("Bad width: %s\n",argv[2]); TechError("Width must be a positive integer.\n"); @@ -989,7 +989,7 @@ mzTechSearch(argc, argv) } else { - mzStyles->ms_parms.mp_penalty.rf_mantissa + mzStyles->ms_parms.mp_penalty.rf_mantissa = (int) (value * (1<ms_parms.mp_penalty.rf_nExponent)); } @@ -999,7 +999,7 @@ mzTechSearch(argc, argv) return; } - + /* * ---------------------------------------------------------------------------- * @@ -1049,10 +1049,10 @@ mzTechWidth(argc, argv) argv[1]); return; } - + /* convert 2nd arg to int */ { - if (!StrIsInt(argv[2])) + if (!StrIsInt(argv[2])) { TechError("Bad width: %s\n",argv[2]); TechError("Width must be a positive integer.\n"); @@ -1072,9 +1072,9 @@ mzTechWidth(argc, argv) rT->rt_width = value; /* convert 3rd arg, if any, to int */ - if (argc == 4) + if (argc == 4) { - if (!StrIsInt(argv[3])) + if (!StrIsInt(argv[3])) { TechError("Bad minimum length: %s\n",argv[3]); TechError("Length must be a positive integer.\n"); @@ -1099,7 +1099,7 @@ mzTechWidth(argc, argv) return; } - + /* * ---------------------------------------------------------------------------- * @@ -1154,7 +1154,7 @@ mzTechContact(argc, argv) if (new->rc_rLayer1==NULL) { TechError("route layer must be declared before used in contact.\n"); - return; + return; } /* add this contact to contacts list of first route layer */ @@ -1193,7 +1193,7 @@ mzTechContact(argc, argv) return; } - + /* * ---------------------------------------------------------------------------- * @@ -1219,7 +1219,7 @@ mzInitRouteType(rT,tileType) int t; /* Get mask of all image types of routeType. - * RouteLayers will have one bit set in mask. RouteContacts will have + * RouteLayers will have one bit set in mask. RouteContacts will have * two bits set, one for the contact "home" type, and one for the contact * image type on the plane it connects to. */ @@ -1230,13 +1230,13 @@ mzInitRouteType(rT,tileType) /* initialize as active */ rT->rt_active = TRUE; - - /* initialize spacing array (gives spacing between - * RouteType and all tiletypes) + + /* initialize spacing array (gives spacing between + * RouteType and all tiletypes) */ for (t=0;t= 0 ) { if(TTMaskIntersect(&(DBPlaneTypes[DBTypePlaneTbl[t]]),imageTypeMask) @@ -1267,7 +1267,7 @@ mzInitRouteType(rT,tileType) return; } - + /* * ---------------------------------------------------------------------------- * @@ -1289,8 +1289,8 @@ mzFindRouteType(type) RouteType *rT; /* Search list of routetypes for one with appropriate type */ - for (rT = mzRouteTypes; - rT && rT->rt_tileType!=type; + for (rT = mzRouteTypes; + rT && rT->rt_tileType!=type; rT=rT->rt_next) ; @@ -1298,7 +1298,7 @@ mzFindRouteType(type) return(rT); } - + /* * ---------------------------------------------------------------------------- * @@ -1319,8 +1319,8 @@ mzFindRouteLayer(type) RouteLayer *rL; /* Search list of routelayers for one with appropriate type */ - for (rL = mzRouteLayers; - rL && rL->rl_routeType.rt_tileType!=type; + for (rL = mzRouteLayers; + rL && rL->rl_routeType.rt_tileType!=type; rL=rL->rl_next) ; @@ -1328,7 +1328,7 @@ mzFindRouteLayer(type) return(rL); } - + /* * ---------------------------------------------------------------------------- * @@ -1349,8 +1349,8 @@ mzFindRouteContact(type) RouteContact *rC; /* Search list of routecontacts for one with appropriate type */ - for (rC = mzRouteContacts; - rC && rC->rc_routeType.rt_tileType!=type; + for (rC = mzRouteContacts; + rC && rC->rc_routeType.rt_tileType!=type; rC=rC->rc_next) ; @@ -1358,7 +1358,7 @@ mzFindRouteContact(type) return(rC); } - + /* * ---------------------------------------------------------------------------- * @@ -1382,10 +1382,10 @@ mzUpdateSpacing(rType,tType,distance) TileType tType; /* spacing from this tiletype */ int distance; /* min spacing betweeen rType and tType */ { - rType->rt_spacing[tType] = + rType->rt_spacing[tType] = MAX(rType->rt_spacing[tType],distance); -#ifdef debugmha +#ifdef debugmha TxPrintf("UPDATESPACING:\n"); TxPrintf("\troute type = %s\n",DBTypeLongNameTbl[rType->rt_tileType]); TxPrintf("\tother type = %s\n",DBTypeLongNameTbl[tType]); diff --git a/mzrouter/mzTestCmd.c b/mzrouter/mzTestCmd.c index 02e79438..3804872f 100644 --- a/mzrouter/mzTestCmd.c +++ b/mzrouter/mzTestCmd.c @@ -4,17 +4,17 @@ * Code to process the `*mzroute' command. * `*mzroute' is a wizard command for debugging and testing the maze router. * - * ********************************************************************* + * ********************************************************************* * * Copyright (C) 1988, 1990 Michael H. Arnold and the Regents of the * * * University of California. * - * * Permission to use, copy, modify, and distribute this * - * * software and its documentation for any purpose and without * - * * fee is hereby granted, provided that the above copyright * - * * notice appear in all copies. The University of California * - * * makes no representations about the suitability of this * - * * software for any purpose. It is provided "as is" without * - * * express or implied warranty. Export of this software outside * - * * of the United States of America may require an export license. * + * * Permission to use, copy, modify, and distribute this * + * * software and its documentation for any purpose and without * + * * fee is hereby granted, provided that the above copyright * + * * notice appear in all copies. The University of California * + * * makes no representations about the suitability of this * + * * software for any purpose. It is provided "as is" without * + * * express or implied warranty. Export of this software outside * + * * of the United States of America may require an export license. * * ********************************************************************* */ @@ -51,14 +51,14 @@ static char rcsid[] __attribute__ ((unused)) = "$Header: /usr/cvsroot/magic-8.0/ typedef struct { char *sC_name; /* name of iroute subcommand */ - void (*sC_proc)(); /* Procedure implementing this + void (*sC_proc)(); /* Procedure implementing this subcommand */ char *sC_commentString; char *sC_usage; } TestCmdTableE; extern TestCmdTableE mzTestCommands[]; - + /* * ---------------------------------------------------------------------------- * @@ -71,7 +71,7 @@ extern TestCmdTableE mzTestCommands[]; * * Side effects: * Modify debug flags. - * + * * ---------------------------------------------------------------------------- */ @@ -111,13 +111,13 @@ mzDebugTstCmd(w, cmd) return; } - + /* * ---------------------------------------------------------------------------- * * mzDumpEstimatesTstCmd -- * - * mzrouter wizard command (`:*mzroute') to dump estimate plane info + * mzrouter wizard command (`:*mzroute') to dump estimate plane info * associated with tiles under the box. * * Results: @@ -125,7 +125,7 @@ mzDebugTstCmd(w, cmd) * * Side effects: * See above. - * + * * ---------------------------------------------------------------------------- */ @@ -158,13 +158,13 @@ mzDumpEstimatesTstCmd(w, cmd) return; } - + /* * ---------------------------------------------------------------------------- * * mzDumpTagsTstCmd -- * - * mzrouter wizard command (`:*mzroute') to dump tag info + * mzrouter wizard command (`:*mzroute') to dump tag info * associated with tiles under the box. * * Results: @@ -172,7 +172,7 @@ mzDumpEstimatesTstCmd(w, cmd) * * Side effects: * See above. - * + * * ---------------------------------------------------------------------------- */ @@ -205,7 +205,7 @@ mzDumpTagsTstCmd(w, cmd) return; } - + /* * ---------------------------------------------------------------------------- * @@ -219,7 +219,7 @@ mzDumpTagsTstCmd(w, cmd) * * Side effects: * See above. - * + * * ---------------------------------------------------------------------------- */ @@ -247,8 +247,8 @@ mzHelpTstCmd(w, cmd) { /* Lookup subcommand in table, and printed associated help info */ which = LookupStruct( - cmd->tx_argv[2], - (LookupTable *) mzTestCommands, + cmd->tx_argv[2], + (LookupTable *) mzTestCommands, sizeof mzTestCommands[0]); /* Process result of lookup */ @@ -264,13 +264,13 @@ mzHelpTstCmd(w, cmd) else if (which == -1) { /* ambiguous subcommand - complain */ - TxError("Ambiguous *mzroute subcommand: \"%s\"\n", + TxError("Ambiguous *mzroute subcommand: \"%s\"\n", cmd->tx_argv[2]); } else { /* unrecognized subcommand - complain */ - TxError("Unrecognized iroute subcommand: \"%s\"\n", + TxError("Unrecognized iroute subcommand: \"%s\"\n", cmd->tx_argv[2]); TxError("Valid *mzroute subcommands are: "); for (n = 0; mzTestCommands[n].sC_name; n++) @@ -282,7 +282,7 @@ mzHelpTstCmd(w, cmd) return; } - + /* * ---------------------------------------------------------------------------- * @@ -295,7 +295,7 @@ mzHelpTstCmd(w, cmd) * * Side effects: * fiddle with some number lines. - * + * * ---------------------------------------------------------------------------- */ @@ -306,7 +306,7 @@ mzNumberLineTstCmd(w, cmd) { NumberLine myLine; int *result; - + mzNLInit(&myLine, 2); TxPrintf("Inserting 10\n"); @@ -361,7 +361,7 @@ mzNumberLineTstCmd(w, cmd) return; } - + /* * ---------------------------------------------------------------------------- * @@ -374,7 +374,7 @@ mzNumberLineTstCmd(w, cmd) * * Side effects: * Dump routelayers and routecontacts. - * + * * ---------------------------------------------------------------------------- */ @@ -391,7 +391,7 @@ mzParmsTstCmd(w, cmd) return; } - + /* * ---------------------------------------------------------------------------- * @@ -405,7 +405,7 @@ mzParmsTstCmd(w, cmd) * * Side effects: * Dump routelayers and routecontacts. - * + * * ---------------------------------------------------------------------------- */ @@ -431,12 +431,12 @@ mzPlaneTstCmd(w, cmd) /* convert name to type */ t = DBTechNameType(layerName); - if(t == -1) + if(t == -1) { TxPrintf("`%s' is ambiguous\n",layerName); return; } - if(t == -2) + if(t == -2) { TxPrintf("`%s' type not recognized\n",layerName); return; @@ -453,10 +453,10 @@ mzPlaneTstCmd(w, cmd) /* Attach Blockage plane of routeType to "__BLOCK" cell for display */ mzBlockDef->cd_planes[PL_M_HINT] = rT->rt_hBlock; - + /* Display it */ - DBWAreaChanged(mzBlockDef, - &TiPlaneRect, + DBWAreaChanged(mzBlockDef, + &TiPlaneRect, DBW_ALLWINDOWS, &DBAllButSpaceBits); WindUpdate(); @@ -464,13 +464,13 @@ mzPlaneTstCmd(w, cmd) return; } - + /* * ---------------------------------------------------------------------------- * * mzVersionCmd -- * - * mzrouter wizard subcommand (`*mzroute version') to display mzrouter + * mzrouter wizard subcommand (`*mzroute version') to display mzrouter * version string. * * Results: @@ -478,7 +478,7 @@ mzPlaneTstCmd(w, cmd) * * Side effects: * Displays version string. - * + * * ---------------------------------------------------------------------------- */ @@ -501,7 +501,7 @@ mzVersionCmd(w, cmd) return; } - + /* * ---------------------------------------------------------------------------- @@ -521,7 +521,7 @@ mzVersionCmd(w, cmd) * and call it to do the work of implementing the rule. Each * such procedure is of the following form: * - * int + * int * proc(argc, argv) * int argc; * char *argv[]; @@ -588,8 +588,8 @@ MZTest(w, cmd) { /* Lookup subcommand in table */ which = LookupStruct( - cmd->tx_argv[1], - (LookupTable *) mzTestCommands, + cmd->tx_argv[1], + (LookupTable *) mzTestCommands, sizeof mzTestCommands[0]); /* Process result of lookup */ diff --git a/mzrouter/mzWalk.c b/mzrouter/mzWalk.c index 65dfd38d..2a6db28a 100644 --- a/mzrouter/mzWalk.c +++ b/mzrouter/mzWalk.c @@ -4,17 +4,17 @@ * Code for Completing final legs of route within the blocked areas ajacent to * dest areas. * - * ********************************************************************* + * ********************************************************************* * * Copyright (C) 1988, 1990 Michael H. Arnold and the Regents of the * * * University of California. * - * * Permission to use, copy, modify, and distribute this * - * * software and its documentation for any purpose and without * - * * fee is hereby granted, provided that the above copyright * - * * notice appear in all copies. The University of California * - * * makes no representations about the suitability of this * - * * software for any purpose. It is provided "as is" without * - * * express or implied warranty. Export of this software outside * - * * of the United States of America may require an export license. * + * * Permission to use, copy, modify, and distribute this * + * * software and its documentation for any purpose and without * + * * fee is hereby granted, provided that the above copyright * + * * notice appear in all copies. The University of California * + * * makes no representations about the suitability of this * + * * software for any purpose. It is provided "as is" without * + * * express or implied warranty. Export of this software outside * + * * of the United States of America may require an export license. * * ********************************************************************* */ #ifndef lint @@ -37,7 +37,7 @@ static char rcsid[] __attribute__ ((unused)) = "$Header:"; #include "mzrouter/mzrouter.h" #include "mzrouter/mzInternal.h" - + /* * ---------------------------------------------------------------------------- * @@ -123,7 +123,7 @@ mzWalkRight(path) lowPt.p_y - BOTTOM(tp) : -1; /* delta = distance to nearest hint */ - if (deltaUp < 0) + if (deltaUp < 0) { if (deltaDown < 0) delta = 0; @@ -155,7 +155,7 @@ mzWalkRight(path) return; } - + /* * ---------------------------------------------------------------------------- * @@ -244,7 +244,7 @@ mzWalkLeft(path) lowPt.p_y - BOTTOM(tp) : -1; /* delta = distance to nearest hint */ - if (deltaUp < 0) + if (deltaUp < 0) { if (deltaDown < 0) delta = 0; @@ -276,7 +276,7 @@ mzWalkLeft(path) return; } - + /* * ---------------------------------------------------------------------------- * @@ -362,7 +362,7 @@ mzWalkUp(path) lowPt.p_x - LEFT(tp) : -1; /* delta = distance to nearest hint */ - if (deltaRight < 0) + if (deltaRight < 0) { if (deltaLeft < 0) delta = 0; @@ -394,7 +394,7 @@ mzWalkUp(path) return; } - + /* * ---------------------------------------------------------------------------- * @@ -482,7 +482,7 @@ mzWalkDown(path) lowPt.p_x - LEFT(tp) : -1; /* delta = distance to nearest hint */ - if (deltaRight < 0) + if (deltaRight < 0) { if (deltaLeft < 0) delta = 0; @@ -514,7 +514,7 @@ mzWalkDown(path) return; } - + /* * ---------------------------------------------------------------------------- * @@ -537,7 +537,7 @@ mzWalkLRContact(path) Point pOrg; /* point to extend from */ int extendCode; /* Interesting directions to extend in */ RouteContact *rC; /* Route contact to make connection with */ - RouteLayer *newRL; /* Route layer of dest area */ + RouteLayer *newRL; /* Route layer of dest area */ dlong conCost; /* Cost of final contact */ int walkType; /* TT_ABOVE_LR_WALK or TT_BELOW_LR_WALK */ Tile *tpThis; /* Tile containing org point */ @@ -568,7 +568,7 @@ mzWalkLRContact(path) if((walkType == TT_ABOVE_LR_WALK) && (rC->rc_rLayer2 != path->rp_rLayer)) continue; - + /* if contact blocked, skip it */ tpCont = TiSrPointNoHint(rC->rc_routeType.rt_hBlock, &pOrg); if (TiGetType(tpCont) == TT_BLOCKED) @@ -624,7 +624,7 @@ mzWalkUDContact(path) Point pOrg; /* point to extend from */ int extendCode; /* Interesting directions to extend in */ RouteContact *rC; /* Route contact to make connection with */ - RouteLayer *newRL; /* Route layer of dest area */ + RouteLayer *newRL; /* Route layer of dest area */ dlong conCost; /* Cost of final contact */ int walkType; /* TT_ABOVE_UD_WALK or TT_BELOW_UD_WALK */ Tile *tpThis; /* Tile containing org point */ @@ -655,7 +655,7 @@ mzWalkUDContact(path) if((walkType == TT_ABOVE_UD_WALK) && (rC->rc_rLayer2 != path->rp_rLayer)) continue; - + /* if contact blocked, skip it */ tpCont = TiSrPointNoHint(rC->rc_routeType.rt_vBlock, &pOrg); if (TiGetType(tpCont) == TT_BLOCKED) diff --git a/mzrouter/mzXtndDown.c b/mzrouter/mzXtndDown.c index f67527dc..049c77bf 100644 --- a/mzrouter/mzXtndDown.c +++ b/mzrouter/mzXtndDown.c @@ -3,17 +3,17 @@ * * Code for finding next interesting point down. * - * ********************************************************************* + * ********************************************************************* * * Copyright (C) 1988, 1990 Michael H. Arnold and the Regents of the * * * University of California. * - * * Permission to use, copy, modify, and distribute this * - * * software and its documentation for any purpose and without * - * * fee is hereby granted, provided that the above copyright * - * * notice appear in all copies. The University of California * - * * makes no representations about the suitability of this * - * * software for any purpose. It is provided "as is" without * - * * express or implied warranty. Export of this software outside * - * * of the United States of America may require an export license. * + * * Permission to use, copy, modify, and distribute this * + * * software and its documentation for any purpose and without * + * * fee is hereby granted, provided that the above copyright * + * * notice appear in all copies. The University of California * + * * makes no representations about the suitability of this * + * * software for any purpose. It is provided "as is" without * + * * express or implied warranty. Export of this software outside * + * * of the United States of America may require an export license. * * ********************************************************************* */ #ifndef lint @@ -36,7 +36,7 @@ static char rcsid[] __attribute__ ((unused)) = "$Header: /usr/cvsroot/magic-8.0/ #include "mzrouter/mzrouter.h" #include "mzrouter/mzInternal.h" - + /* * ---------------------------------------------------------------------------- * @@ -94,11 +94,11 @@ mzExtendDown(path) } /* - * Initial pNew to next pt where there is a change in the amount of - * space on the BLOCKAGE plane in the direction perpendicular to the + * Initial pNew to next pt where there is a change in the amount of + * space on the BLOCKAGE plane in the direction perpendicular to the * extension. (A special case of this is a actual block * of the extension). Want to consider jogs at such points. - * + * */ { Tile *tpNext; @@ -113,7 +113,7 @@ mzExtendDown(path) Tile *tpBounds; /* get blockage plane tile under pOrg */ - tpThis = TiSrPointNoHint(path->rp_rLayer->rl_routeType.rt_hBlock, + tpThis = TiSrPointNoHint(path->rp_rLayer->rl_routeType.rt_hBlock, &pOrg); /* org point should not be blocked */ @@ -130,17 +130,17 @@ mzExtendDown(path) /* hit edge of bounds before jog found */ goto downEndJog; } - else if(RIGHT(tpBounds)<=RIGHT(tpThis) && + else if(RIGHT(tpBounds)<=RIGHT(tpThis) && RIGHT(tpBounds)<=mzRouteUse->cu_def->cd_bbox.r_xtop) { Point p; p.p_x = RIGHT(tpBounds); p.p_y = MIN(TOP(tpBounds), pOrg.p_y); - + mzExtendBlockBounds(&p); if(SigInterruptPending) return; - + covered = FALSE; } else if(LEFT(tpBounds)>=LEFT(tpThis) && @@ -149,10 +149,10 @@ mzExtendDown(path) Point p; p.p_x = LEFT(tpBounds); p.p_y = MIN(TOP(tpBounds), pOrg.p_y); - + mzExtendBlockBounds(&p); if(SigInterruptPending) return; - + covered = FALSE; } @@ -164,7 +164,7 @@ mzExtendDown(path) } } - /* also get next tile over */ + /* also get next tile over */ NEXT_TILE_DOWN(tpNext, tpThis, pOrg.p_x); ntype = TiGetType(tpNext); @@ -222,8 +222,8 @@ mzExtendDown(path) if((RIGHT(tpNext)LEFT(tpThis)) && BOTTOM(tpThis)rl_nextActive) { @@ -251,13 +251,13 @@ mzExtendDown(path) bool covered; /* skip current layer (already handled above) */ - if(rL == path->rp_rLayer) + if(rL == path->rp_rLayer) { continue; } /* get blockage plane tile under pOrg */ - tpThis = TiSrPointNoHint(rL->rl_routeType.rt_hBlock, + tpThis = TiSrPointNoHint(rL->rl_routeType.rt_hBlock, &pOrg); tpType = TiGetType(tpThis); @@ -287,7 +287,7 @@ mzExtendDown(path) /* org point should not be blocked */ ASSERT(TiGetType(tpThis)==TT_SPACE,"mzExtendDown, other"); - /* check to see if covered, + /* check to see if covered, if not extend bounds and start over */ covered = TRUE; tpBounds = TiSrPointNoHint(mzHBoundsPlane, &pOrg); @@ -299,7 +299,7 @@ mzExtendDown(path) /* hit edge of bounds before jog found */ goto downNextLayer; } - else if(RIGHT(tpBounds)<=RIGHT(tpThis) && + else if(RIGHT(tpBounds)<=RIGHT(tpThis) && RIGHT(tpBounds)<= mzRouteUse->cu_def->cd_bbox.r_xtop) { @@ -307,10 +307,10 @@ mzExtendDown(path) p.p_x = RIGHT(tpBounds); p.p_y = MIN(TOP(tpBounds), pOrg.p_y); - + mzExtendBlockBounds(&p); if(SigInterruptPending) return; - + covered = FALSE; } else if(LEFT(tpBounds)>=LEFT(tpThis) && @@ -319,10 +319,10 @@ mzExtendDown(path) Point p; p.p_x = LEFT(tpBounds); p.p_y = MIN(TOP(tpBounds), pOrg.p_y); - + mzExtendBlockBounds(&p); if(SigInterruptPending) return; - + covered = FALSE; } @@ -334,7 +334,7 @@ mzExtendDown(path) } } - /* get next tile over */ + /* get next tile over */ NEXT_TILE_DOWN(tpNext, tpThis, pOrg.p_x); ntype = TiGetType(tpNext); @@ -343,14 +343,14 @@ mzExtendDown(path) /* path blocked */ if(BOTTOM(tpThis)==pOrg.p_y) { - /* pOrg right up against obstacle, can't extend so + /* pOrg right up against obstacle, can't extend so go to next layer */ continue; } else { /* prune pNew to just this side of block */ - PRUNE_TO_MAX(pNew.p_y, + PRUNE_TO_MAX(pNew.p_y, BOTTOM(tpThis), reasons, RC_ALIGNOTHER); @@ -359,13 +359,13 @@ mzExtendDown(path) else { /* path not blocked */ - if((RIGHT(tpNext)LEFT(tpThis)) + if((RIGHT(tpNext)LEFT(tpThis)) && BOTTOM(tpThis)rc_routeType.rt_hBlock, + ((RouteContact*) LIST_FIRST(cL))->rc_routeType.rt_hBlock, &pStep); tpType = TiGetType(tp); if ((tpType == TT_SPACE) || (tpType == TT_SAMENODE)) { - /* SPACE TILE */ + /* SPACE TILE */ if(TOP(tp)-1 < pOrg.p_y) /* prune to beginning of tile */ PRUNE_TO_MAX(pNew.p_y, TOP(tp)-1, reasons, RC_CONTACT); @@ -529,7 +529,7 @@ mzExtendDown(path) { extendCode = EC_WALKLRCONTACT; } - else + else { extendCode = EC_COMPLETE; } @@ -600,7 +600,7 @@ mzExtendDown(path) lowPt.p_x - LEFT(tp) : -1; /* delta = distance to nearest hint */ - if (deltaRight < 0) + if (deltaRight < 0) { if (deltaLeft < 0) delta = 0; diff --git a/mzrouter/mzXtndLeft.c b/mzrouter/mzXtndLeft.c index ba5ed7ea..a64171a6 100644 --- a/mzrouter/mzXtndLeft.c +++ b/mzrouter/mzXtndLeft.c @@ -3,17 +3,17 @@ * * Code for finding next interesting point to left. * - * ********************************************************************* + * ********************************************************************* * * Copyright (C) 1988, 1990 Michael H. Arnold and the Regents of the * * * University of California. * - * * Permission to use, copy, modify, and distribute this * - * * software and its documentation for any purpose and without * - * * fee is hereby granted, provided that the above copyright * - * * notice appear in all copies. The University of California * - * * makes no representations about the suitability of this * - * * software for any purpose. It is provided "as is" without * - * * express or implied warranty. Export of this software outside * - * * of the United States of America may require an export license. * + * * Permission to use, copy, modify, and distribute this * + * * software and its documentation for any purpose and without * + * * fee is hereby granted, provided that the above copyright * + * * notice appear in all copies. The University of California * + * * makes no representations about the suitability of this * + * * software for any purpose. It is provided "as is" without * + * * express or implied warranty. Export of this software outside * + * * of the United States of America may require an export license. * * ********************************************************************* */ #ifndef lint @@ -36,7 +36,7 @@ static char rcsid[] __attribute__ ((unused)) = "$Header: /usr/cvsroot/magic-8.0/ #include "mzrouter/mzrouter.h" #include "mzrouter/mzInternal.h" - + /* * ---------------------------------------------------------------------------- * @@ -95,11 +95,11 @@ mzExtendLeft(path) } /* - * Initial pNew to next pt where there is a change in the amount of - * space on the BLOCKAGE plane in the direction perpendicular to the + * Initial pNew to next pt where there is a change in the amount of + * space on the BLOCKAGE plane in the direction perpendicular to the * extension. (A special case of this is an actual block * of the extension). Want to consider jogs at such points. - * + * */ { Tile *tpNext; @@ -114,7 +114,7 @@ mzExtendLeft(path) Tile *tpBounds; /* get blockage plane tile under pOrg */ - tpThis = TiSrPointNoHint(path->rp_rLayer->rl_routeType.rt_vBlock, + tpThis = TiSrPointNoHint(path->rp_rLayer->rl_routeType.rt_vBlock, &pOrg); /* org point should not be blocked */ @@ -132,17 +132,17 @@ mzExtendLeft(path) /* hit edge of bounds before jog found */ goto leftEndJog; } - else if(TOP(tpBounds)<=TOP(tpThis) && + else if(TOP(tpBounds)<=TOP(tpThis) && TOP(tpBounds)<=mzRouteUse->cu_def->cd_bbox.r_ytop) { Point p; p.p_x = MIN(RIGHT(tpBounds), pOrg.p_x); p.p_y = TOP(tpBounds); - + mzExtendBlockBounds(&p); if(SigInterruptPending) return; - + covered = FALSE; } else if(BOTTOM(tpBounds)>=BOTTOM(tpThis) && @@ -151,10 +151,10 @@ mzExtendLeft(path) Point p; p.p_x = MIN(RIGHT(tpBounds), pOrg.p_x); p.p_y = BOTTOM(tpBounds); - + mzExtendBlockBounds(&p); if(SigInterruptPending) return; - + covered = FALSE; } @@ -166,7 +166,7 @@ mzExtendLeft(path) } } - /* also get next tile over */ + /* also get next tile over */ NEXT_TILE_LEFT(tpNext, tpThis, pOrg.p_y); ntype = TiGetType(tpNext); @@ -224,8 +224,8 @@ mzExtendLeft(path) if((TOP(tpNext)BOTTOM(tpThis)) && LEFT(tpThis)rl_nextActive) { @@ -253,18 +253,18 @@ mzExtendLeft(path) bool covered; /* skip current layer (already handled above) */ - if(rL == path->rp_rLayer) + if(rL == path->rp_rLayer) { continue; } /* get blockage plane tile under pOrg */ - tpThis = TiSrPointNoHint(rL->rl_routeType.rt_vBlock, + tpThis = TiSrPointNoHint(rL->rl_routeType.rt_vBlock, &pOrg); tpType = TiGetType(tpThis); - if ((tpType != TT_SPACE) && (tpType != TT_SAMENODE)) + if ((tpType != TT_SPACE) && (tpType != TT_SAMENODE)) { /* ORG POINT BLOCKED */ /* this case handled by contact code below, so skip to next layer*/ @@ -284,14 +284,14 @@ mzExtendLeft(path) Tile *tpBounds; /* get blockage plane tile under pOrg */ - tpThis = TiSrPointNoHint(rL->rl_routeType.rt_vBlock, + tpThis = TiSrPointNoHint(rL->rl_routeType.rt_vBlock, &pOrg); /* org point should not be blocked */ ASSERT(TiGetType(tpThis)==TT_SPACE, "mzExtendLeft, others"); - /* check to see if covered, + /* check to see if covered, if not extend bounds and start over */ covered = TRUE; tpBounds = TiSrPointNoHint(mzVBoundsPlane, &pOrg); @@ -303,17 +303,17 @@ mzExtendLeft(path) /* hit edge of bounds before jog found */ goto leftNextLayer; } - else if(TOP(tpBounds)<=TOP(tpThis) && + else if(TOP(tpBounds)<=TOP(tpThis) && TOP(tpBounds)<=mzRouteUse->cu_def->cd_bbox.r_ytop) { Point p; p.p_x = MIN(RIGHT(tpBounds), pOrg.p_x); p.p_y = TOP(tpBounds); - + mzExtendBlockBounds(&p); if(SigInterruptPending) return; - + covered = FALSE; } else if(BOTTOM(tpBounds)>=BOTTOM(tpThis) && @@ -323,10 +323,10 @@ mzExtendLeft(path) Point p; p.p_x = MIN(RIGHT(tpBounds), pOrg.p_x); p.p_y = BOTTOM(tpBounds); - + mzExtendBlockBounds(&p); if(SigInterruptPending) return; - + covered = FALSE; } @@ -338,7 +338,7 @@ mzExtendLeft(path) } } - /* get next tile over */ + /* get next tile over */ NEXT_TILE_LEFT(tpNext, tpThis, pOrg.p_y); ntype = TiGetType(tpNext); @@ -347,14 +347,14 @@ mzExtendLeft(path) /* path blocked */ if(LEFT(tpThis)==pOrg.p_x) { - /* pOrg right up against obstacle, can't extend so + /* pOrg right up against obstacle, can't extend so go to next layer */ continue; } else { /* prune pNew to just this side of block */ - PRUNE_TO_MAX(pNew.p_x, + PRUNE_TO_MAX(pNew.p_x, LEFT(tpThis), reasons, RC_ALIGNOTHER); @@ -363,13 +363,13 @@ mzExtendLeft(path) else { /* path not blocked */ - if((TOP(tpNext)BOTTOM(tpThis)) + if((TOP(tpNext)BOTTOM(tpThis)) && LEFT(tpThis)rc_routeType.rt_hBlock, + ((RouteContact*) LIST_FIRST(cL))->rc_routeType.rt_hBlock, &pStep); tpType = TiGetType(tp); if ((tpType == TT_SPACE) || (tpType == TT_SAMENODE)) { - /* SPACE TILE */ + /* SPACE TILE */ if(RIGHT(tp)-1 < pOrg.p_x) /* prune to beginning of tile */ PRUNE_TO_MAX(pNew.p_x, RIGHT(tp)-1, reasons, RC_CONTACT); @@ -606,7 +606,7 @@ mzExtendLeft(path) lowPt.p_y - BOTTOM(tp) : -1; /* delta = distance to nearest hint */ - if (deltaUp < 0) + if (deltaUp < 0) { if (deltaDown < 0) delta = 0; diff --git a/mzrouter/mzXtndRght.c b/mzrouter/mzXtndRght.c index df35929b..4b5bca1a 100644 --- a/mzrouter/mzXtndRght.c +++ b/mzrouter/mzXtndRght.c @@ -3,17 +3,17 @@ * * Code for finding next interesting point to the right. * - * ********************************************************************* + * ********************************************************************* * * Copyright (C) 1988, 1990 Michael H. Arnold and the Regents of the * * * University of California. * - * * Permission to use, copy, modify, and distribute this * - * * software and its documentation for any purpose and without * - * * fee is hereby granted, provided that the above copyright * - * * notice appear in all copies. The University of California * - * * makes no representations about the suitability of this * - * * software for any purpose. It is provided "as is" without * - * * express or implied warranty. Export of this software outside * - * * of the United States of America may require an export license. * + * * Permission to use, copy, modify, and distribute this * + * * software and its documentation for any purpose and without * + * * fee is hereby granted, provided that the above copyright * + * * notice appear in all copies. The University of California * + * * makes no representations about the suitability of this * + * * software for any purpose. It is provided "as is" without * + * * express or implied warranty. Export of this software outside * + * * of the United States of America may require an export license. * * ********************************************************************* */ #ifndef lint @@ -36,7 +36,7 @@ static char rcsid[] __attribute__ ((unused)) = "$Header: /usr/cvsroot/magic-8.0/ #include "mzrouter/mzrouter.h" #include "mzrouter/mzInternal.h" - + /* * ---------------------------------------------------------------------------- * @@ -96,11 +96,11 @@ RoutePath *path; } /* - * Initial pNew to next pt where there is a change in the amount of - * space on the BLOCKAGE plane in the direction perpendicular to the + * Initial pNew to next pt where there is a change in the amount of + * space on the BLOCKAGE plane in the direction perpendicular to the * extension. (A special case of this is a actual block * of the extension). Want to consider jogs at such points. - * + * */ { Tile *tpNext; @@ -115,7 +115,7 @@ RoutePath *path; Tile *tpBounds; /* get blockage plane tile under pOrg */ - tpThis = TiSrPointNoHint(path->rp_rLayer->rl_routeType.rt_vBlock, + tpThis = TiSrPointNoHint(path->rp_rLayer->rl_routeType.rt_vBlock, &pOrg); /* org point should not be blocked */ @@ -133,17 +133,17 @@ RoutePath *path; /* hit edge of bounds before jog found */ goto rightEndJog; } - else if(TOP(tpBounds)<=TOP(tpThis) && + else if(TOP(tpBounds)<=TOP(tpThis) && TOP(tpBounds)<=mzRouteUse->cu_def->cd_bbox.r_ytop) { Point p; p.p_x = MAX(LEFT(tpBounds), pOrg.p_x); p.p_y = TOP(tpBounds); - + mzExtendBlockBounds(&p); if(SigInterruptPending) return; - + covered = FALSE; } else if(BOTTOM(tpBounds)>=BOTTOM(tpThis) && @@ -152,10 +152,10 @@ RoutePath *path; Point p; p.p_x = MAX(LEFT(tpBounds), pOrg.p_x); p.p_y = BOTTOM(tpBounds); - + mzExtendBlockBounds(&p); if(SigInterruptPending) return; - + covered = FALSE; } @@ -167,7 +167,7 @@ RoutePath *path; } } - /* also get next tile over */ + /* also get next tile over */ NEXT_TILE_RIGHT(tpNext, tpThis, pOrg.p_y); ntype = TiGetType(tpNext); @@ -225,8 +225,8 @@ RoutePath *path; if((TOP(tpNext)BOTTOM(tpThis)) && RIGHT(tpThis)-1>pOrg.p_x) { - /* space is constricting, prune pNew to far - * end of this tile + /* space is constricting, prune pNew to far + * end of this tile */ PRUNE_TO_MIN(pNew.p_x, LEFT(tpNext)-1, reasons, RC_JOG); } @@ -240,12 +240,12 @@ RoutePath *path; } /* - * Prune pNew to next pt where there is a change in the amount of - * space on other active BLOCKAGE planes in the direction perpendicular - * to the + * Prune pNew to next pt where there is a change in the amount of + * space on other active BLOCKAGE planes in the direction perpendicular + * to the * extension. (A special case of this is a actual block * of the extension). Want to consider jogs at such points. - * + * */ for(rL=mzActiveRLs; rL!=NULL; rL=rL->rl_nextActive) { @@ -254,13 +254,13 @@ RoutePath *path; bool covered; /* skip current layer (already handled above) */ - if(rL == path->rp_rLayer) + if(rL == path->rp_rLayer) { continue; } /* get blockage plane tile under pOrg */ - tpThis = TiSrPointNoHint(rL->rl_routeType.rt_vBlock, + tpThis = TiSrPointNoHint(rL->rl_routeType.rt_vBlock, &pOrg); tpType = TiGetType(tpThis); @@ -284,14 +284,14 @@ RoutePath *path; Tile *tpBounds; /* get blockage plane tile under pOrg */ - tpThis = TiSrPointNoHint(rL->rl_routeType.rt_vBlock, + tpThis = TiSrPointNoHint(rL->rl_routeType.rt_vBlock, &pOrg); /* org point should not be blocked */ ASSERT(TiGetType(tpThis)==TT_SPACE, "mzExtendRight, others"); - /* check to see if covered, + /* check to see if covered, if not extend bounds and start over */ covered = TRUE; tpBounds = TiSrPointNoHint(mzVBoundsPlane, &pOrg); @@ -303,17 +303,17 @@ RoutePath *path; /* hit edge of bounds before jog found */ goto rightNextLayer; } - else if(TOP(tpBounds)<=TOP(tpThis) && + else if(TOP(tpBounds)<=TOP(tpThis) && TOP(tpBounds)<=mzRouteUse->cu_def->cd_bbox.r_ytop) { Point p; p.p_x = MAX(LEFT(tpBounds), pOrg.p_x); p.p_y = TOP(tpBounds); - + mzExtendBlockBounds(&p); if(SigInterruptPending) return; - + covered = FALSE; } else if(BOTTOM(tpBounds)>=BOTTOM(tpThis) && @@ -323,10 +323,10 @@ RoutePath *path; Point p; p.p_x = MAX(LEFT(tpBounds), pOrg.p_x); p.p_y = BOTTOM(tpBounds); - + mzExtendBlockBounds(&p); if(SigInterruptPending) return; - + covered = FALSE; } @@ -338,7 +338,7 @@ RoutePath *path; } } - /* get next tile over */ + /* get next tile over */ NEXT_TILE_RIGHT(tpNext, tpThis, pOrg.p_y); ntype = TiGetType(tpNext); @@ -347,39 +347,39 @@ RoutePath *path; /* path blocked */ if(LEFT(tpNext)==pStep.p_x) { - /* pOrg right up against obstacle, can't extend so + /* pOrg right up against obstacle, can't extend so go to next layer */ continue; } else { /* prune pNew to just this side of block */ - PRUNE_TO_MIN(pNew.p_x, - LEFT(tpNext)-1, - reasons, + PRUNE_TO_MIN(pNew.p_x, + LEFT(tpNext)-1, + reasons, RC_ALIGNOTHER); } } else { /* path not blocked */ - if((TOP(tpNext)BOTTOM(tpThis)) + if((TOP(tpNext)BOTTOM(tpThis)) && RIGHT(tpThis)-1>pOrg.p_x) { - /* space is constricting, prune pNew to far - * end of this tile + /* space is constricting, prune pNew to far + * end of this tile */ - PRUNE_TO_MIN(pNew.p_x, - LEFT(tpNext)-1, - reasons, + PRUNE_TO_MIN(pNew.p_x, + LEFT(tpNext)-1, + reasons, RC_ALIGNOTHER); } else { /* prune pNew to just inside next tile */ - PRUNE_TO_MIN(pNew.p_x, - LEFT(tpNext), - reasons, + PRUNE_TO_MIN(pNew.p_x, + LEFT(tpNext), + reasons, RC_ALIGNOTHER); } } @@ -404,7 +404,7 @@ RoutePath *path; /* Prune pNew to either side of tile edges on ROTATE plane (organized * into maximum strips in perpendicular direction). Jogging * at such points can effect cost. - * NOTE: Also must have intermediate path points at boundaries between + * NOTE: Also must have intermediate path points at boundaries between * rotate and non-rotate since edge cost different in these regions. */ { @@ -433,13 +433,13 @@ RoutePath *path; { /* find tile in contact blockage plane under pOrg */ tp = TiSrPointNoHint( - ((RouteContact*) LIST_FIRST(cL))->rc_routeType.rt_hBlock, + ((RouteContact*) LIST_FIRST(cL))->rc_routeType.rt_hBlock, &pStep); tpType = TiGetType(tp); if ((tpType == TT_SPACE) || (tpType == TT_SAMENODE)) { - /* SPACE TILE */ + /* SPACE TILE */ if(LEFT(tp) > pOrg.p_x) /* prune to beginning of tile */ PRUNE_TO_MIN(pNew.p_x, LEFT(tp), reasons, RC_CONTACT); @@ -601,7 +601,7 @@ RoutePath *path; lowPt.p_y - BOTTOM(tp) : -1; /* delta = distance to nearest hint */ - if (deltaUp < 0) + if (deltaUp < 0) { if (deltaDown < 0) delta = 0; diff --git a/mzrouter/mzXtndUp.c b/mzrouter/mzXtndUp.c index a57b2268..b5fa8935 100644 --- a/mzrouter/mzXtndUp.c +++ b/mzrouter/mzXtndUp.c @@ -3,17 +3,17 @@ * * Code for finding next interesting point up. * - * ********************************************************************* + * ********************************************************************* * * Copyright (C) 1988, 1990 Michael H. Arnold and the Regents of the * * * University of California. * - * * Permission to use, copy, modify, and distribute this * - * * software and its documentation for any purpose and without * - * * fee is hereby granted, provided that the above copyright * - * * notice appear in all copies. The University of California * - * * makes no representations about the suitability of this * - * * software for any purpose. It is provided "as is" without * - * * express or implied warranty. Export of this software outside * - * * of the United States of America may require an export license. * + * * Permission to use, copy, modify, and distribute this * + * * software and its documentation for any purpose and without * + * * fee is hereby granted, provided that the above copyright * + * * notice appear in all copies. The University of California * + * * makes no representations about the suitability of this * + * * software for any purpose. It is provided "as is" without * + * * express or implied warranty. Export of this software outside * + * * of the United States of America may require an export license. * * ********************************************************************* */ #ifndef lint @@ -36,7 +36,7 @@ static char rcsid[] __attribute__ ((unused)) = "$Header: /usr/cvsroot/magic-8.0/ #include "mzrouter/mzrouter.h" #include "mzrouter/mzInternal.h" - + /* * ---------------------------------------------------------------------------- * @@ -94,11 +94,11 @@ mzExtendUp(path) } /* - * Initial pNew to next pt where there is a change in the amount of - * space on the BLOCKAGE plane in the direction perpendicular to the + * Initial pNew to next pt where there is a change in the amount of + * space on the BLOCKAGE plane in the direction perpendicular to the * extension. (A special case of this is a actual block * of the extension). Want to consider jogs at such points. - * + * */ { Tile *tpNext; @@ -113,7 +113,7 @@ mzExtendUp(path) Tile *tpBounds; /* get blockage plane tile under pOrg */ - tpThis = TiSrPointNoHint(path->rp_rLayer->rl_routeType.rt_hBlock, + tpThis = TiSrPointNoHint(path->rp_rLayer->rl_routeType.rt_hBlock, &pOrg); /* org point should not be blocked */ @@ -130,17 +130,17 @@ mzExtendUp(path) /* hit edge of bounds before jog found */ goto upEndJog; } - else if(RIGHT(tpBounds)<=RIGHT(tpThis) && + else if(RIGHT(tpBounds)<=RIGHT(tpThis) && RIGHT(tpBounds)<=mzRouteUse->cu_def->cd_bbox.r_xtop) { Point p; p.p_x = RIGHT(tpBounds); p.p_y = MAX(BOTTOM(tpBounds), pOrg.p_y); - + mzExtendBlockBounds(&p); if(SigInterruptPending) return; - + covered = FALSE; } else if(LEFT(tpBounds)>=LEFT(tpThis) && @@ -149,10 +149,10 @@ mzExtendUp(path) Point p; p.p_x = LEFT(tpBounds); p.p_y = MAX(BOTTOM(tpBounds), pOrg.p_y); - + mzExtendBlockBounds(&p); if(SigInterruptPending) return; - + covered = FALSE; } @@ -164,7 +164,7 @@ mzExtendUp(path) } } - /* also get next tile over */ + /* also get next tile over */ NEXT_TILE_UP(tpNext, tpThis, pOrg.p_x); ntype = TiGetType(tpNext); @@ -219,12 +219,12 @@ mzExtendUp(path) else { /* path not blocked */ - if((RIGHT(tpNext)LEFT(tpThis)) && TOP(tpThis)-1>pOrg.p_y) { - /* space is constricting, prune pNew to far - * end of this tile + /* space is constricting, prune pNew to far + * end of this tile */ PRUNE_TO_MIN(pNew.p_y, BOTTOM(tpNext)-1, reasons, RC_JOG); } @@ -239,12 +239,12 @@ mzExtendUp(path) } /* - * Prune pNew to next pt where there is a change in the amount of - * space on other active BLOCKAGE planes in the direction perpendicular - * to the + * Prune pNew to next pt where there is a change in the amount of + * space on other active BLOCKAGE planes in the direction perpendicular + * to the * extension. (A special case of this is a actual block * of the extension). Want to consider jogs at such points. - * + * */ for(rL=mzActiveRLs; rL!=NULL; rL=rL->rl_nextActive) { @@ -253,13 +253,13 @@ mzExtendUp(path) bool covered; /* skip current layer (already handled above) */ - if(rL == path->rp_rLayer) + if(rL == path->rp_rLayer) { continue; } /* get blockage plane tile under pOrg */ - tpThis = TiSrPointNoHint(rL->rl_routeType.rt_hBlock, + tpThis = TiSrPointNoHint(rL->rl_routeType.rt_hBlock, &pOrg); tpType = TiGetType(tpThis); @@ -288,7 +288,7 @@ mzExtendUp(path) /* org point should not be blocked */ ASSERT(TiGetType(tpThis)==TT_SPACE,"mzExtendUp, other"); - /* check to see if covered, + /* check to see if covered, if not extend bounds and start over */ covered = TRUE; tpBounds = TiSrPointNoHint(mzHBoundsPlane, &pOrg); @@ -300,7 +300,7 @@ mzExtendUp(path) /* hit edge of bounds before jog found */ goto upNextLayer; } - else if(RIGHT(tpBounds)<=RIGHT(tpThis) && + else if(RIGHT(tpBounds)<=RIGHT(tpThis) && RIGHT(tpBounds)<= mzRouteUse->cu_def->cd_bbox.r_xtop) { @@ -308,10 +308,10 @@ mzExtendUp(path) p.p_x = RIGHT(tpBounds); p.p_y = MAX(BOTTOM(tpBounds), pOrg.p_y); - + mzExtendBlockBounds(&p); if(SigInterruptPending) return; - + covered = FALSE; } else if(LEFT(tpBounds)>=LEFT(tpThis) && @@ -320,10 +320,10 @@ mzExtendUp(path) Point p; p.p_x = LEFT(tpBounds); p.p_y = MAX(BOTTOM(tpBounds), pOrg.p_y); - + mzExtendBlockBounds(&p); if(SigInterruptPending) return; - + covered = FALSE; } @@ -335,7 +335,7 @@ mzExtendUp(path) } } - /* get next tile over */ + /* get next tile over */ NEXT_TILE_UP(tpNext, tpThis, pOrg.p_x); ntype = TiGetType(tpNext); @@ -344,14 +344,14 @@ mzExtendUp(path) /* path blocked */ if(BOTTOM(tpNext)==pStep.p_y) { - /* pOrg right up against obstacle, can't extend so + /* pOrg right up against obstacle, can't extend so go to next layer */ continue; } else { /* prune pNew to just this side of block */ - PRUNE_TO_MIN(pNew.p_y, + PRUNE_TO_MIN(pNew.p_y, BOTTOM(tpNext)-1, reasons, RC_ALIGNOTHER); @@ -360,14 +360,14 @@ mzExtendUp(path) else { /* path not blocked */ - if((RIGHT(tpNext)LEFT(tpThis)) && TOP(tpThis)-1>pOrg.p_y) { - /* space is constricting, prune pNew to far - * end of this tile + /* space is constricting, prune pNew to far + * end of this tile */ - PRUNE_TO_MIN(pNew.p_y, + PRUNE_TO_MIN(pNew.p_y, BOTTOM(tpNext)-1, reasons, RC_ALIGNOTHER); @@ -375,7 +375,7 @@ mzExtendUp(path) else { /* prune pNew to just inside next tile */ - PRUNE_TO_MIN(pNew.p_y, + PRUNE_TO_MIN(pNew.p_y, BOTTOM(tpNext), reasons, RC_ALIGNOTHER); @@ -402,7 +402,7 @@ mzExtendUp(path) /* Prune pNew to either side of tile edges on ROTATE plane (organized * into maximum strips in perpendicular direction). Jogging * at such points can effect cost. - * NOTE: Also must have intermediate path points at boundaries between + * NOTE: Also must have intermediate path points at boundaries between * rotate and non-rotate since edge cost different in these regions. */ { @@ -431,13 +431,13 @@ mzExtendUp(path) { /* find tile in contact blockage plane under pOrg */ tp = TiSrPointNoHint( - ((RouteContact*) LIST_FIRST(cL))->rc_routeType.rt_hBlock, + ((RouteContact*) LIST_FIRST(cL))->rc_routeType.rt_hBlock, &pStep); tpType = TiGetType(tp); if ((tpType == TT_SPACE) || (tpType == TT_SAMENODE)) { - /* SPACE TILE */ + /* SPACE TILE */ if(BOTTOM(tp) > pOrg.p_y) /* prune to beginning of tile */ PRUNE_TO_MIN(pNew.p_y, BOTTOM(tp), reasons, RC_CONTACT); @@ -599,7 +599,7 @@ mzExtendUp(path) lowPt.p_x - LEFT(tp) : -1; /* delta = distance to nearest hint */ - if (deltaRight < 0) + if (deltaRight < 0) { if (deltaLeft < 0) delta = 0; diff --git a/mzrouter/mzrouter.h b/mzrouter/mzrouter.h index 1a9633e0..35b5a815 100644 --- a/mzrouter/mzrouter.h +++ b/mzrouter/mzrouter.h @@ -4,17 +4,17 @@ * This file defines the interface provided by the maze router * module to the rest of Magic. * - * ********************************************************************* + * ********************************************************************* * * Copyright (C) 1988, 1990 Michael H. Arnold and the Regents of the * * * University of California. * - * * Permission to use, copy, modify, and distribute this * - * * software and its documentation for any purpose and without * - * * fee is hereby granted, provided that the above copyright * - * * notice appear in all copies. The University of California * - * * makes no representations about the suitability of this * - * * software for any purpose. It is provided "as is" without * - * * express or implied warranty. Export of this software outside * - * * of the United States of America may require an export license. * + * * Permission to use, copy, modify, and distribute this * + * * software and its documentation for any purpose and without * + * * fee is hereby granted, provided that the above copyright * + * * notice appear in all copies. The University of California * + * * makes no representations about the suitability of this * + * * software for any purpose. It is provided "as is" without * + * * express or implied warranty. Export of this software outside * + * * of the United States of America may require an export license. * * ********************************************************************* * * rcsid $Header: /usr/cvsroot/magic-8.0/mzrouter/mzrouter.h,v 1.1.1.1 2008/02/03 20:43:50 tim Exp $ @@ -31,7 +31,7 @@ * by other modules (such as the irouter and the garouter) via procedure * calls. * - * NOTE: a wizard command interface (`*mzroute') IS provided for testing. + * NOTE: a wizard command interface (`*mzroute') IS provided for testing. * (see mzTestCmd.c) */ @@ -49,7 +49,7 @@ * */ -typedef struct +typedef struct routetype { /* IDENTIFICATION */ @@ -64,7 +64,7 @@ routetype int rt_length; /* Length of contact or minimum */ /* length of a path to satisfy */ /* minimum area requirements */ - int rt_spacing[TT_MAXTYPES + 1]; /* spacings to various types + int rt_spacing[TT_MAXTYPES + 1]; /* spacings to various types last entry is SUBCELL spacing */ /* DERIVATIVE DESIGN RULES - computed from DESIGN RULES above. @@ -75,11 +75,11 @@ routetype * bloatTop = spacing * bloatBot = spacing + width - 1 */ - int rt_effWidth; /* *DERIVED* - for contact, + int rt_effWidth; /* *DERIVED* - for contact, * max of component width */ - int rt_bloatBot[TT_MAXTYPES + 1]; /* *DERIVED* - bloat distance + int rt_bloatBot[TT_MAXTYPES + 1]; /* *DERIVED* - bloat distance * to bottom and left */ - int rt_bloatTop[TT_MAXTYPES + 1]; /* *DERIVED* - bloat distance to + int rt_bloatTop[TT_MAXTYPES + 1]; /* *DERIVED* - bloat distance to * top and right */ /* BLOCKAGE PLANES */ @@ -88,13 +88,13 @@ routetype Plane *rt_vBlock; /* Blockage plane for layer organized into maximal vertical strips */ - struct routetype *rt_next; /* For convenience, all route types are + struct routetype *rt_next; /* For convenience, all route types are * threaded * together. (This threading is in addition - * to the routeLayers list and the + * to the routeLayers list and the * routeContacts list. */ - struct routetype *rt_nextActive; /* *DERIVED* - This list built in + struct routetype *rt_nextActive; /* *DERIVED* - This list built in * MZInitRoute() */ } RouteType; @@ -130,12 +130,12 @@ typedef struct routelayer /* NEXT ROUTE LAYER */ struct routelayer *rl_next; - struct routelayer *rl_nextActive; /* *DERIVED* - Only accurate after + struct routelayer *rl_nextActive; /* *DERIVED* - Only accurate after * MZInitRoute() */ } RouteLayer; /*---------------------------- RouteContact ------------------------------*/ -/* +/* * This sturcture describes a type of contact to be used during routing. * Contacts connect two route layers. */ @@ -160,12 +160,12 @@ typedef struct routecontact /* ----------------------------- Paths ----------------------------------- */ -/* +/* * Zero-width path segment structure. Paths and partial-paths built from - * these structures during search. + * these structures during search. * * Can be flushed out to paint via MZPaintPath(). - * + * */ typedef struct rpath { @@ -201,10 +201,10 @@ typedef struct rpath /*----------------------- Soft Floating Point ----------------------------- */ /* (Floating Point Format for our own software-implemented floating-point. - * Used for the penalty factor for costs outside the window.) + * Used for the penalty factor for costs outside the window.) */ -/* Note: nExponent must be >=0 +/* Note: nExponent must be >=0 * To multiply dlong by routeFloat, first multiply by mantissa, then * shift right nExponent number of bits. */ @@ -216,7 +216,7 @@ typedef struct routeFloat /*---------------------------- MazeParameters ------------------------------*/ -/* +/* * This sturcture contains all maze router parameters, including design rules. */ typedef struct mazeparameters @@ -263,24 +263,24 @@ typedef struct mazeparameters * area. * NOTE: IF SET IT IS THE USERS RESPONSIBILITY * TO CONTAIN THE ROUTE WITHIN THIS AREA - * VIA FENCES - ELSE BIZARRE BEHAVIOUR + * VIA FENCES - ELSE BIZARRE BEHAVIOUR * IS POSSIBLE. */ int mp_verbosity; /* amount of messages printed: * 0 = errors and warnings only, - * 1 = brief + * 1 = brief * 2 = lots of statistics. */ int mp_bloomLimit; /* if positive, puts upper limit on number of * blooms in maze search before router * terminates. - * + * * If negative or 0, no limit is imposed. */ } MazeParameters; -#define VERB_WARNONLY 0 +#define VERB_WARNONLY 0 #define VERB_BRIEF 1 #define VERB_STATS 2 @@ -312,7 +312,7 @@ extern MazeParameters *MZCopyParms(); /* Create new MazeParameters */ extern void MZInitRoute(); /* Initialize route */ extern void MZAddStart(); /* After MzInitRoute, to add start points */ extern void MZAddDest(); /* After MZInitRoute, to add dest area */ -extern RoutePath *MZRoute(); /* After MZAddStart, and MZAddDest +extern RoutePath *MZRoute(); /* After MZAddStart, and MZAddDest * to do search */ extern CellUse *MZPaintPath(); /* Turns path into actual paint */ extern void MZClean(); /* Reclaim storage */ diff --git a/net2ir/net2ir.c b/net2ir/net2ir.c index 69fa0e87..758e3324 100644 --- a/net2ir/net2ir.c +++ b/net2ir/net2ir.c @@ -2,7 +2,7 @@ * net2ir -- * * Given a feedback file produced by the Magic :find command (from - * the netlist menu) followed by :feed save, giving label locations and + * the netlist menu) followed by :feed save, giving label locations and * layers, and a netlist * file, produce a set of irouter commands to route the two-point * nets in the order in which they appear in the netlist file. @@ -138,15 +138,15 @@ getfirst: if(nterms == 0) { printf(":iroute route -slayers %s -sPoint %d %d ", - li->li_layer, - li->li_area.r_xbot, + li->li_layer, + li->li_area.r_xbot, li->li_area.r_ybot); } else { printf("-dlayers %s -dRect %d %d %d %d\n", - li->li_layer, - li->li_area.r_xbot, + li->li_layer, + li->li_area.r_xbot, li->li_area.r_ybot, li->li_area.r_xtop, li->li_area.r_ytop); diff --git a/netmenu/NMbutton.c b/netmenu/NMbutton.c index 3ff58b3b..723a6c4b 100644 --- a/netmenu/NMbutton.c +++ b/netmenu/NMbutton.c @@ -3,16 +3,16 @@ * This file contains routines that respond to button pushes * in database windows when the netlist button handler is active. * - * ********************************************************************* - * * Copyright (C) 1985, 1990 Regents of the University of California. * - * * Permission to use, copy, modify, and distribute this * - * * software and its documentation for any purpose and without * - * * fee is hereby granted, provided that the above copyright * - * * notice appear in all copies. The University of California * - * * makes no representations about the suitability of this * - * * software for any purpose. It is provided "as is" without * - * * express or implied warranty. Export of this software outside * - * * of the United States of America may require an export license. * + * ********************************************************************* + * * Copyright (C) 1985, 1990 Regents of the University of California. * + * * Permission to use, copy, modify, and distribute this * + * * software and its documentation for any purpose and without * + * * fee is hereby granted, provided that the above copyright * + * * notice appear in all copies. The University of California * + * * makes no representations about the suitability of this * + * * software for any purpose. It is provided "as is" without * + * * express or implied warranty. Export of this software outside * + * * of the United States of America may require an export license. * * ********************************************************************* */ @@ -45,7 +45,7 @@ char *NMCurNetName = NULL; /* Maximimum amount of storage to hold terminal name: */ #define MAXTERMLENGTH 200 - + /* * ---------------------------------------------------------------------------- * @@ -84,7 +84,7 @@ NMButtonNetList(window, cmd, nmButton, point) NMNewNetlist(newName); } } - + /* * ---------------------------------------------------------------------------- * @@ -161,7 +161,7 @@ nmButtonSetup() } return termName; } - + /* * ---------------------------------------------------------------------------- * @@ -200,14 +200,14 @@ NMButtonRight(w, cmd) } /* See if this terminal is already in the current net. */ - + if (NMEnumTerms(name, nmButCheckFunc, (ClientData) NMCurNetName)) { /* In the net already. Delete it from the net. But first, * find another terminal in the net to use as a reference * for the current net. If not, then null out the current net. */ - + if (strcmp(name, NMCurNetName) == 0) { NMSelectNet((char *) NULL); @@ -225,7 +225,7 @@ NMButtonRight(w, cmd) * the terminal is already in a net. If it is, then remove * it from that net. */ - + if (NMTermInList(name) != NULL) { char *netName = name; @@ -324,7 +324,7 @@ nmNewRefFunc(name, oldRef) } return 0; } - + /* * ---------------------------------------------------------------------------- * @@ -382,7 +382,7 @@ nmSelNetFunc(name) if (!exists) TxPrintf("%s: not in circuit!\n", name); return 0; } - + /* * ---------------------------------------------------------------------------- * @@ -420,7 +420,7 @@ NMButtonLeft(w, cmd) if (NMTermInList(name) == NULL) (void) NMAddTerm(name, name); NMSelectNet(name); } - + /* * ---------------------------------------------------------------------------- * @@ -461,14 +461,14 @@ NMButtonMiddle(w, cmd) * join the nets. Note: if the terminal isn't in any net * at all, make a new terminal. */ - + if (NMTermInList(name) == NULL) (void) NMAddTerm(name, name); (void) NMEnumTerms(name, nmSelNetFunc, (ClientData) NULL); NMJoinNets(name, NMCurNetName); TxPrintf("Merging net \"%s\" into current net.\n", name); } - + /* * ---------------------------------------------------------------------------- * diff --git a/netmenu/NMcmdAK.c b/netmenu/NMcmdAK.c index 165ca305..5e0a82c7 100644 --- a/netmenu/NMcmdAK.c +++ b/netmenu/NMcmdAK.c @@ -3,16 +3,16 @@ * This file contains routines to interpret commands typed inside * netlist windows. * - * ********************************************************************* - * * Copyright (C) 1985, 1990 Regents of the University of California. * - * * Permission to use, copy, modify, and distribute this * - * * software and its documentation for any purpose and without * - * * fee is hereby granted, provided that the above copyright * - * * notice appear in all copies. The University of California * - * * makes no representations about the suitability of this * - * * software for any purpose. It is provided "as is" without * - * * express or implied warranty. Export of this software outside * - * * of the United States of America may require an export license. * + * ********************************************************************* + * * Copyright (C) 1985, 1990 Regents of the University of California. * + * * Permission to use, copy, modify, and distribute this * + * * software and its documentation for any purpose and without * + * * fee is hereby granted, provided that the above copyright * + * * notice appear in all copies. The University of California * + * * makes no representations about the suitability of this * + * * software for any purpose. It is provided "as is" without * + * * express or implied warranty. Export of this software outside * + * * of the United States of America may require an export license. * * ********************************************************************* */ @@ -34,7 +34,7 @@ static char rcsid[] __attribute__ ((unused)) = "$Header: /usr/cvsroot/magic-8.0/ #include "utils/main.h" #include "textio/textio.h" #include "utils/malloc.h" - + /* * ---------------------------------------------------------------------------- * @@ -73,7 +73,7 @@ NMCmdAdd(w, cmd) } (void) NMAddTerm(cmd->tx_argv[1], cmd->tx_argv[2]); } - + /* * ---------------------------------------------------------------------------- * @@ -156,7 +156,7 @@ NMCmdCleanup(w, cmd) * netlist, and that is a dangerous thing to do while a search * is in progress. */ - + for (p = nmCleanupList; p != NULL; p = p->nmcl_next) { char answer[30]; @@ -273,7 +273,7 @@ nmCleanupNet() nmCleanupList = p; } } - + /* * ---------------------------------------------------------------------------- * @@ -312,7 +312,7 @@ NMCmdCull(w, cmd) } NMCull(); } - + /* * ---------------------------------------------------------------------------- * @@ -367,7 +367,7 @@ NMCmdDnet(w, cmd) } } } - + /* * ---------------------------------------------------------------------------- * @@ -415,7 +415,7 @@ NMCmdDterm(w, cmd) } } } - + /* * ---------------------------------------------------------------------------- * @@ -458,7 +458,7 @@ NMCmdExtract(w, cmd) */ NMExtract(); } - + /* * ---------------------------------------------------------------------------- * @@ -502,7 +502,7 @@ NMCmdFindLabels(w, cmd) } NMShowLabel(pattern, pMask); } - + /* * ---------------------------------------------------------------------------- * @@ -548,7 +548,7 @@ NMCmdFlush(w, cmd) NMFlushNetlist(name); } - + /* * ---------------------------------------------------------------------------- * diff --git a/netmenu/NMcmdLZ.c b/netmenu/NMcmdLZ.c index 5522968a..b9dcef42 100644 --- a/netmenu/NMcmdLZ.c +++ b/netmenu/NMcmdLZ.c @@ -3,16 +3,16 @@ * This file contains routines to interpret commands typed inside * netlist windows. * - * ********************************************************************* - * * Copyright (C) 1985, 1990 Regents of the University of California. * - * * Permission to use, copy, modify, and distribute this * - * * software and its documentation for any purpose and without * - * * fee is hereby granted, provided that the above copyright * - * * notice appear in all copies. The University of California * - * * makes no representations about the suitability of this * - * * software for any purpose. It is provided "as is" without * - * * express or implied warranty. Export of this software outside * - * * of the United States of America may require an export license. * + * ********************************************************************* + * * Copyright (C) 1985, 1990 Regents of the University of California. * + * * Permission to use, copy, modify, and distribute this * + * * software and its documentation for any purpose and without * + * * fee is hereby granted, provided that the above copyright * + * * notice appear in all copies. The University of California * + * * makes no representations about the suitability of this * + * * software for any purpose. It is provided "as is" without * + * * express or implied warranty. Export of this software outside * + * * of the United States of America may require an export license. * * ********************************************************************* */ @@ -36,7 +36,7 @@ static char rcsid[] __attribute__ ((unused)) = "$Header: /usr/cvsroot/magic-8.0/ #include "utils/styles.h" #include "utils/main.h" #include "textio/textio.h" - + #ifdef ROUTE_MODULE @@ -101,7 +101,7 @@ NMCmdMeasure(w, cmd) #endif - + /* * ---------------------------------------------------------------------------- * @@ -139,7 +139,7 @@ NMCmdNetlist(w, cmd) NMNewNetlist(EditCellUse->cu_def->cd_name); else NMNewNetlist(cmd->tx_argv[1]); } - + /* * ---------------------------------------------------------------------------- * @@ -344,7 +344,7 @@ NMCmdSavenetlist(w, cmd) NMWriteNetlist((char *) NULL); else NMWriteNetlist(cmd->tx_argv[1]); } - + /* * ---------------------------------------------------------------------------- * @@ -380,7 +380,7 @@ NMCmdShownet(w, cmd) } NMShowUnderBox(); } - + /* * ---------------------------------------------------------------------------- * @@ -459,7 +459,7 @@ nmShowtermsFunc2(rect, name, label, cdarg) 1, STYLE_PALEHIGHLIGHTS); return 0; } - + /* * ---------------------------------------------------------------------------- * @@ -495,7 +495,7 @@ NMCmdTrace(w, cmd) NMShowRoutedNet((char *) NULL); else NMShowRoutedNet(cmd->tx_argv[1]); } - + /* * ---------------------------------------------------------------------------- * @@ -535,7 +535,7 @@ NMCmdVerify(w, cmd) } NMVerify(); } - + /* * ---------------------------------------------------------------------------- * diff --git a/netmenu/NMlabel.c b/netmenu/NMlabel.c index 167b16e6..c17e834f 100644 --- a/netmenu/NMlabel.c +++ b/netmenu/NMlabel.c @@ -6,16 +6,16 @@ * re-orienting label text, and incrementing numbers inside * of labels. * - * ********************************************************************* - * * Copyright (C) 1985, 1990 Regents of the University of California. * - * * Permission to use, copy, modify, and distribute this * - * * software and its documentation for any purpose and without * - * * fee is hereby granted, provided that the above copyright * - * * notice appear in all copies. The University of California * - * * makes no representations about the suitability of this * - * * software for any purpose. It is provided "as is" without * - * * express or implied warranty. Export of this software outside * - * * of the United States of America may require an export license. * + * ********************************************************************* + * * Copyright (C) 1985, 1990 Regents of the University of California. * + * * Permission to use, copy, modify, and distribute this * + * * software and its documentation for any purpose and without * + * * fee is hereby granted, provided that the above copyright * + * * notice appear in all copies. The University of California * + * * makes no representations about the suitability of this * + * * software for any purpose. It is provided "as is" without * + * * express or implied warranty. Export of this software outside * + * * of the United States of America may require an export license. * * ********************************************************************* */ @@ -61,7 +61,7 @@ int nmNum2 = -1; char nmNum1String[12]; /* String equivalents of nmNum1 and nmNum2. */ char nmNum2String[12]; - + /* * ---------------------------------------------------------------------------- * @@ -115,7 +115,7 @@ nmGetNums(string, num1, num2) if (*p == 0) return; } } - + /* * ---------------------------------------------------------------------------- * @@ -159,7 +159,7 @@ nmPutNums(src, num1, num2) * result area if there isn't enough space. The space computation * is a bit conservative, but simpler that way. */ - + (void) sprintf(num1String, "%d", num1); (void) sprintf(num2String, "%d", num2); spaceNeeded = strlen(num1String) + strlen(num2String) + strlen(src) + 1; @@ -173,7 +173,7 @@ nmPutNums(src, num1, num2) /* Now scan through the source string. Copy everything up * to the first number into the result. */ - + pSrc = src; pResult = result; while (!isdigit(*pSrc)) @@ -183,7 +183,7 @@ nmPutNums(src, num1, num2) * the original string. Or, if num1 is less than zero, * then just copy the number from src. */ - + if (num1 < 0) { while (isdigit(*pSrc)) *pResult++ = *pSrc++; @@ -199,7 +199,7 @@ nmPutNums(src, num1, num2) while (!isdigit(*pSrc)) if ((*pResult++ = *pSrc++) == 0) return result; - + /* Copy the second number. */ if (num2 < 0) @@ -218,7 +218,7 @@ nmPutNums(src, num1, num2) while (TRUE) if ((*pResult++ = *pSrc++) == 0) return result; } - + /* * ---------------------------------------------------------------------------- * @@ -248,7 +248,7 @@ nmSetCurrentLabel() /* Set up the menu buttons to refer to this information, and * redisplay relevant stuff. */ - + NMLabelButton.nmb_text = nmLabelArray[nmCurLabel]; NMNum1Button.nmb_text = nmNum1String; NMNum2Button.nmb_text = nmNum2String; @@ -259,7 +259,7 @@ nmSetCurrentLabel() (void) NMredisplay(NMWindow, &NMNum2Button.nmb_area, (Rect *) NULL); } } - + /* * ---------------------------------------------------------------------------- * @@ -295,7 +295,7 @@ NMGetLabels() /* All done. If we got any labels at all, null out all * the remaining old labels. */ - + if (i == 0) { TxPrintf("No new labels given, so I'll keep the old ones.\n"); @@ -313,7 +313,7 @@ NMGetLabels() nmCurLabel = 0; nmSetCurrentLabel(); } - + /* * ---------------------------------------------------------------------------- * @@ -362,7 +362,7 @@ NMPrevLabel() else nmCurLabel -= 1; nmSetCurrentLabel(); } - + /* * ---------------------------------------------------------------------------- * @@ -422,7 +422,7 @@ NMChangeNum(window,cmd, nmButton, point) nmPutNums(nmLabelArray[nmCurLabel], nmNum1, nmNum2)); nmSetCurrentLabel(); } - + /* * ---------------------------------------------------------------------------- * @@ -461,7 +461,7 @@ nmGetPos(button, point) /* Divide the button area into thirds in x and y, and figure out * which sector contains the point. */ - + tmp = (button->nmb_area.r_xtop - button->nmb_area.r_xbot + 1)/3; if (point->p_x <= button->nmb_area.r_xbot + tmp) x = 0; else if (point->p_x >= button->nmb_area.r_xtop - tmp) x = 2; @@ -473,7 +473,7 @@ nmGetPos(button, point) return GeoTransPos(&RootToEditTransform, pos[3*y + x]); } - + /* * ---------------------------------------------------------------------------- * @@ -515,7 +515,7 @@ NMPutLabel(window, cmd, nmButton, point) pos = nmGetPos(nmButton, point); CmdLabelProc(text, -1, 1, 0, 0, 0, pos, 0, (TileType)-1); } - + /* * ---------------------------------------------------------------------------- * @@ -551,7 +551,7 @@ NMReOrientLabel(window, cmd, nmButton, point) pos = nmGetPos(nmButton, point); DBReOrientLabel(EditCellUse->cu_def, &editArea, pos); } - + /* * ---------------------------------------------------------------------------- * @@ -582,7 +582,7 @@ NMFindLabel() } NMShowLabel(pattern, (TileTypeBitMask *) NULL); } - + /* * ---------------------------------------------------------------------------- * diff --git a/netmenu/NMmain.c b/netmenu/NMmain.c index b9bb6a42..6c23b816 100644 --- a/netmenu/NMmain.c +++ b/netmenu/NMmain.c @@ -7,16 +7,16 @@ * redisplay, and for top-level command interpretation. * All the REAL work of commands goes on in other files. * - * ********************************************************************* - * * Copyright (C) 1985, 1990 Regents of the University of California. * - * * Permission to use, copy, modify, and distribute this * - * * software and its documentation for any purpose and without * - * * fee is hereby granted, provided that the above copyright * - * * notice appear in all copies. The University of California * - * * makes no representations about the suitability of this * - * * software for any purpose. It is provided "as is" without * - * * express or implied warranty. Export of this software outside * - * * of the United States of America may require an export license. * + * ********************************************************************* + * * Copyright (C) 1985, 1990 Regents of the University of California. * + * * Permission to use, copy, modify, and distribute this * + * * software and its documentation for any purpose and without * + * * fee is hereby granted, provided that the above copyright * + * * notice appear in all copies. The University of California * + * * makes no representations about the suitability of this * + * * software for any purpose. It is provided "as is" without * + * * express or implied warranty. Export of this software outside * + * * of the United States of America may require an export license. * * ********************************************************************* */ @@ -48,7 +48,7 @@ global WindClient NMClientID; extern void nmNotDefined(); - + /* The declarations below define the layout of the netlist * window. Everything is defined in "surface" coordinates, * not screen coordinates. Within each of the three categories, @@ -113,7 +113,7 @@ Rect nmScreenArea = {0, 0, 140, 190}; MagWindow *NMWindow = NULL; - + /* * ---------------------------------------------------------------------------- * @@ -154,7 +154,7 @@ NMcreate(window, argc, argv) WindMove(window, &nmSurfaceArea); return TRUE; } - + /* * ---------------------------------------------------------------------------- * @@ -183,7 +183,7 @@ NMdelete(window) NMClearPoints(); return TRUE; } - + /* * ---------------------------------------------------------------------------- * @@ -219,7 +219,7 @@ NMreposition(window, newScreenArea, final) if (final) WindMove(window, &nmSurfaceArea); return 0; } - + /* * ---------------------------------------------------------------------------- * @@ -256,7 +256,7 @@ NMredisplay(w, rootArea, clipArea) /* Make sure that there's really a netlist window! (This procedure * can be called before the window exists). */ - + if (NMWindow == (MagWindow *) NULL) return 0; GrLock(w, TRUE); @@ -296,7 +296,7 @@ NMredisplay(w, rootArea, clipArea) screenR.r_ybot += 1; screenR.r_xtop -= 1; screenR.r_ytop -= 1; - GrClipTo(&GrScreenRect); + GrClipTo(&GrScreenRect); GrPutText(nb->nmb_text, STYLE_BBOX, &screenP, GEO_CENTER, GR_TEXT_MEDIUM, TRUE, &screenR, (Rect *) NULL); GrClipTo(&clip); @@ -306,7 +306,7 @@ NMredisplay(w, rootArea, clipArea) /* Redisplay each of the decorative labels. */ - GrClipTo(&GrScreenRect); + GrClipTo(&GrScreenRect); for (nl = nmLabels; nl->nml_style >= 0; nl++) { if (GEO_TOUCH(&nl->nml_area, rootArea)) @@ -338,7 +338,7 @@ NMredisplay(w, rootArea, clipArea) GrUnlock(w); return 0; } - + /* * ---------------------------------------------------------------------------- * @@ -382,7 +382,7 @@ NMcommand(w, cmd) * response to buttons and in response to typed commands, * fake the presence of a single command keyword. */ - + cmd->tx_argc = 1; cmd->tx_argv[0] = ""; @@ -436,8 +436,8 @@ NMcommand(w, cmd) UndoNext(); return 0; } - - + + /* * ---------------------------------------------------------------------------- * @@ -548,7 +548,7 @@ NMinit() NMCmdWriteall, FALSE); } - + /* * ---------------------------------------------------------------------------- * diff --git a/netmenu/NMnetlist.c b/netmenu/NMnetlist.c index 91e3e7b1..0cd505a5 100644 --- a/netmenu/NMnetlist.c +++ b/netmenu/NMnetlist.c @@ -4,16 +4,16 @@ * package. It reads and writes netlists, and provides * routines to modify the nets. * - * ********************************************************************* - * * Copyright (C) 1985, 1990 Regents of the University of California. * - * * Permission to use, copy, modify, and distribute this * - * * software and its documentation for any purpose and without * - * * fee is hereby granted, provided that the above copyright * - * * notice appear in all copies. The University of California * - * * makes no representations about the suitability of this * - * * software for any purpose. It is provided "as is" without * - * * express or implied warranty. Export of this software outside * - * * of the United States of America may require an export license. * + * ********************************************************************* + * * Copyright (C) 1985, 1990 Regents of the University of California. * + * * Permission to use, copy, modify, and distribute this * + * * software and its documentation for any purpose and without * + * * fee is hereby granted, provided that the above copyright * + * * notice appear in all copies. The University of California * + * * makes no representations about the suitability of this * + * * software for any purpose. It is provided "as is" without * + * * express or implied warranty. Export of this software outside * + * * of the United States of America may require an export license. * * ********************************************************************* */ @@ -109,7 +109,7 @@ Netlist *nmListHead = NULL; /* The first netlist in the linked static char *(yesno[]) = {"no", "yes", NULL}; - + /* * ---------------------------------------------------------------------------- * @@ -148,7 +148,7 @@ NMAddTerm(new, other) if ((nmCurrentNetlist == NULL) || (new == NULL) || (other == NULL)) return NULL; - + nmCurrentNetlist->nl_flags |= NL_MODIFIED; hNew = HashFind(&nmCurrentNetlist->nl_table, new); newEntry = (NetEntry *) HashGetValue(hNew); @@ -173,7 +173,7 @@ NMAddTerm(new, other) /* Now lookup the (supposedly pre-existing) terminal. If it * doesn't have an entry in the hash table, make a new one. */ - + hOther = HashFind(&nmCurrentNetlist->nl_table, other); otherEntry = (NetEntry *) HashGetValue(hOther); if (otherEntry == 0) @@ -198,7 +198,7 @@ NMAddTerm(new, other) NMUndo(new, other, NMUE_ADD); return otherEntry->ne_name; } - + /* * ---------------------------------------------------------------------------- * @@ -236,7 +236,7 @@ NMDeleteTerm(name) entry->ne_prev->ne_next = entry->ne_next; freeMagic((char *) entry); } - + /* * ---------------------------------------------------------------------------- * @@ -270,7 +270,7 @@ NMJoinNets(termA, termB) /* Lookup the two nets, and make sure that they both exist * and aren't already the same. */ - + ha = HashFind(&nmCurrentNetlist->nl_table, termA); netA = (NetEntry *) HashGetValue(ha); hb = HashFind(&nmCurrentNetlist->nl_table, termB); @@ -309,7 +309,7 @@ NMJoinNets(termA, termB) tmp->ne_next = netB; netB->ne_prev = tmp; } - + /* * ---------------------------------------------------------------------------- * @@ -358,7 +358,7 @@ NMDeleteNet(net) next = next->ne_next; } } - + /* * ---------------------------------------------------------------------------- * @@ -432,7 +432,7 @@ NMNewNetlist(name) * or doesn't have a proper header line, issue a warning message, * then just start a new list. */ - + file = PaOpen(name, "r", ".net", Path, CellLibPath, &fullName); if (file == NULL) { @@ -459,7 +459,7 @@ NMNewNetlist(name) * character. Lines starting with "#" are treated as comments. * None of this gets recorded for undo-ing. */ - + UndoDisable(); currentTerm = NULL; while (fgets(line, MAXLINESIZE, file) != NULL) @@ -495,7 +495,7 @@ NMNewNetlist(name) nmCurrentNetlist->nl_flags &= ~NL_MODIFIED; (void) fclose(file); } - + /* * ---------------------------------------------------------------------------- * @@ -520,7 +520,7 @@ NMNetlistName() else return ((char *) NULL); } - + /* * ---------------------------------------------------------------------------- * @@ -611,7 +611,7 @@ int NMEnumNets(func, clientData) } return result; } - + /* * ---------------------------------------------------------------------------- * @@ -666,7 +666,7 @@ NMEnumTerms(name, func, clientData) } return 0; } - + /* * ---------------------------------------------------------------------------- * @@ -689,7 +689,7 @@ NMHasList() { return(nmCurrentNetlist != NULL); } - + /* * ---------------------------------------------------------------------------- * @@ -724,7 +724,7 @@ NMTermInList(name) if (entry == NULL) return NULL; return entry->ne_name; } - + /* * ---------------------------------------------------------------------------- * @@ -805,7 +805,7 @@ nmWriteNetsFunc(name, firstInNet, file) fprintf(file, "%s\n", name); return 0; } - + /* * ---------------------------------------------------------------------------- * @@ -858,7 +858,7 @@ NMCheckWritten() } while (indx < 0); return indx; } - + /* * ---------------------------------------------------------------------------- * @@ -913,7 +913,7 @@ NMWriteAll() nmCurrentNetlist = saveCurrent; return; } - + /* * ---------------------------------------------------------------------------- * @@ -942,7 +942,7 @@ NMFlushNetlist(name) HashEntry *h; /* Find the netlist in question. */ - + list = NULL; for (prev = &nmListHead; *prev != NULL; prev = &(*prev)->nl_next) { @@ -961,7 +961,7 @@ NMFlushNetlist(name) /* If the netlist has been modified, give the user a chance to * skip this. */ - + if (list->nl_flags & NL_MODIFIED) { char answer[10]; @@ -986,7 +986,7 @@ NMFlushNetlist(name) /* Unlink the netlist from the list of netlists, and free up * everything in it. */ - + *prev = list->nl_next; HashStartSearch(&hs); while (TRUE) @@ -1001,7 +1001,7 @@ NMFlushNetlist(name) /* If the netlist was the current netlist, read it in again from * disk. */ - + if (list == nmCurrentNetlist) NMNewNetlist(name); } diff --git a/netmenu/NMshowcell.c b/netmenu/NMshowcell.c index aab56daf..72ad7fb2 100644 --- a/netmenu/NMshowcell.c +++ b/netmenu/NMshowcell.c @@ -5,16 +5,16 @@ * is used for things like displaying all the wiring in a net, * or for displaying splotches around labels with a given name. * - * ********************************************************************* - * * Copyright (C) 1985, 1990 Regents of the University of California. * - * * Permission to use, copy, modify, and distribute this * - * * software and its documentation for any purpose and without * - * * fee is hereby granted, provided that the above copyright * - * * notice appear in all copies. The University of California * - * * makes no representations about the suitability of this * - * * software for any purpose. It is provided "as is" without * - * * express or implied warranty. Export of this software outside * - * * of the United States of America may require an export license. * + * ********************************************************************* + * * Copyright (C) 1985, 1990 Regents of the University of California. * + * * Permission to use, copy, modify, and distribute this * + * * software and its documentation for any purpose and without * + * * fee is hereby granted, provided that the above copyright * + * * notice appear in all copies. The University of California * + * * makes no representations about the suitability of this * + * * software for any purpose. It is provided "as is" without * + * * express or implied warranty. Export of this software outside * + * * of the United States of America may require an export license. * * ********************************************************************* */ @@ -54,7 +54,7 @@ static CellDef *nmscRootDef = NULL; /* NULL means no cell currently static CellUse *nmscShowUse = NULL; static CellDef *nmscShowDef = NULL; - + /* * ---------------------------------------------------------------------------- * @@ -99,10 +99,10 @@ NMRedrawCell(window, plane) * is at a reasonably high magnification, then use a paler stipple * so that the material type is easy to see through the highlighting. */ - + if (window->w_scale > SUBPIXEL) GrSetStuff(STYLE_PALEHIGHLIGHTS); - else + else GrSetStuff(STYLE_SOLIDHIGHLIGHTS); /* Find all paint on all layers in the area where we may have to @@ -142,7 +142,7 @@ nmscAlways1() { return 1; } - + /* * ---------------------------------------------------------------------------- * @@ -171,7 +171,7 @@ NMUnsetCell() nmscRootDef = NULL; DBWHLRedraw(oldDef, &nmscUse->cu_def->cd_bbox, TRUE); } - + /* * ---------------------------------------------------------------------------- * @@ -209,7 +209,7 @@ NMShowCell(use, rootDef) nmscUse = use; DBWHLRedraw(nmscRootDef, &nmscUse->cu_def->cd_bbox, FALSE); } - + /* * ---------------------------------------------------------------------------- * @@ -244,7 +244,7 @@ nmGetShowCell() DBSetTrans(nmscShowUse, &GeoIdentityTransform); nmscShowUse->cu_expandMask = CU_DESCEND_SPECIAL; } - + /* * ---------------------------------------------------------------------------- * @@ -286,7 +286,7 @@ NMShowUnderBox() /* Expand the box area by one so we'll get everything that even * touches it. */ - + GEO_EXPAND(&scx.scx_area, 1, &scx.scx_area); rootDef = scx.scx_use->cu_def; @@ -299,7 +299,7 @@ NMShowUnderBox() &DBAllButSpaceBits); NMShowCell(nmscShowUse, rootDef); } - + /* * ---------------------------------------------------------------------------- * @@ -354,7 +354,7 @@ NMShowRoutedNet(netName) NMShowCell(nmscShowUse, EditCellUse->cu_def); return 0; } - + /* * ---------------------------------------------------------------------------- * @@ -380,7 +380,7 @@ nmShowRoutedNetFunc(name, clientData) (void) DBSrLabelLoc((CellUse *) clientData, name, nmSRNFunc, clientData); return(0); } - + /* * ---------------------------------------------------------------------------- * @@ -407,11 +407,11 @@ nmSRNFunc(rect, name, label, cdarg) ClientData cdarg; { SearchContext scx; - + /* Expand the box area by one so we'll get everything that even * touches it. Search on layers connected to the layer of the label. */ - + scx.scx_area = *rect; GEO_EXPAND(&scx.scx_area, 1, &scx.scx_area); scx.scx_use = (CellUse *) cdarg; diff --git a/netmenu/NMshowpt.c b/netmenu/NMshowpt.c index eb539001..4a34bc74 100644 --- a/netmenu/NMshowpt.c +++ b/netmenu/NMshowpt.c @@ -4,16 +4,16 @@ * to display information about particular points. Currently, * this is used to highlight selected terminals in nets. * - * ********************************************************************* - * * Copyright (C) 1985, 1990 Regents of the University of California. * - * * Permission to use, copy, modify, and distribute this * - * * software and its documentation for any purpose and without * - * * fee is hereby granted, provided that the above copyright * - * * notice appear in all copies. The University of California * - * * makes no representations about the suitability of this * - * * software for any purpose. It is provided "as is" without * - * * express or implied warranty. Export of this software outside * - * * of the United States of America may require an export license. * + * ********************************************************************* + * * Copyright (C) 1985, 1990 Regents of the University of California. * + * * Permission to use, copy, modify, and distribute this * + * * software and its documentation for any purpose and without * + * * fee is hereby granted, provided that the above copyright * + * * notice appear in all copies. The University of California * + * * makes no representations about the suitability of this * + * * software for any purpose. It is provided "as is" without * + * * express or implied warranty. Export of this software outside * + * * of the United States of America may require an export license. * * ********************************************************************* */ @@ -52,7 +52,7 @@ static int nmspArrayUsed = 0; /* Number of entries actually used. */ #define MAXPIXELS 14 #define THICKNESS 3 - + /* * ---------------------------------------------------------------------------- * @@ -120,7 +120,7 @@ NMRedrawPoints(window, plane) * solid. Otherwise, draw it with a hollow center (i.e. as * four boxes). */ - + if (((screen.r_xtop - screen.r_xbot) < 2*THICKNESS) || ((screen.r_ytop - screen.r_ybot) < 2*THICKNESS)) { @@ -151,7 +151,7 @@ nmspAlways1() { return 1; } - + /* * ---------------------------------------------------------------------------- * @@ -192,7 +192,7 @@ NMAddPoint(point) /* Make sure there's enough space in the array. Make it * bigger if necessary. */ - + if (nmspArrayUsed == nmspArraySize) { nmspArraySize *= 2; @@ -217,7 +217,7 @@ NMAddPoint(point) area.r_ytop = point->p_y + MAXLAMBDAS/2; DBWHLRedraw(EditRootDef, &area, FALSE); } - + /* * ---------------------------------------------------------------------------- * @@ -266,7 +266,7 @@ NMDeletePoint(point) area.r_ytop = area.r_ybot + MAXLAMBDAS; DBWHLRedraw(EditRootDef, &area, TRUE); } - + /* * ---------------------------------------------------------------------------- * diff --git a/netmenu/NMundo.c b/netmenu/NMundo.c index 60d6bd26..97789226 100644 --- a/netmenu/NMundo.c +++ b/netmenu/NMundo.c @@ -3,16 +3,16 @@ * Provides procedures and data structures to make net-list * modifications undo-able. * - * ********************************************************************* - * * Copyright (C) 1985, 1990 Regents of the University of California. * - * * Permission to use, copy, modify, and distribute this * - * * software and its documentation for any purpose and without * - * * fee is hereby granted, provided that the above copyright * - * * notice appear in all copies. The University of California * - * * makes no representations about the suitability of this * - * * software for any purpose. It is provided "as is" without * - * * express or implied warranty. Export of this software outside * - * * of the United States of America may require an export license. * + * ********************************************************************* + * * Copyright (C) 1985, 1990 Regents of the University of California. * + * * Permission to use, copy, modify, and distribute this * + * * software and its documentation for any purpose and without * + * * fee is hereby granted, provided that the above copyright * + * * notice appear in all copies. The University of California * + * * makes no representations about the suitability of this * + * * software for any purpose. It is provided "as is" without * + * * express or implied warranty. Export of this software outside * + * * of the United States of America may require an export license. * * ********************************************************************* */ @@ -57,7 +57,7 @@ typedef struct */ bool nmUndoCalled = FALSE; - + /* * ---------------------------------------------------------------------------- * @@ -115,7 +115,7 @@ NMUndo(term, curNet, type) } else u->nmue_curNet = NULL; } - + /* * ---------------------------------------------------------------------------- * @@ -176,7 +176,7 @@ nmUndoBack(u) break; } } - + /* * ---------------------------------------------------------------------------- * @@ -206,7 +206,7 @@ nmUndoDone() } nmUndoCalled = FALSE; } - + /* * ---------------------------------------------------------------------------- * diff --git a/netmenu/NMwiring.c b/netmenu/NMwiring.c index 296da010..cfc381cc 100644 --- a/netmenu/NMwiring.c +++ b/netmenu/NMwiring.c @@ -6,16 +6,16 @@ * verify that all the connections in a netlist actually * exist in the circuit. * - * ********************************************************************* - * * Copyright (C) 1985, 1990 Regents of the University of California. * - * * Permission to use, copy, modify, and distribute this * - * * software and its documentation for any purpose and without * - * * fee is hereby granted, provided that the above copyright * - * * notice appear in all copies. The University of California * - * * makes no representations about the suitability of this * - * * software for any purpose. It is provided "as is" without * - * * express or implied warranty. Export of this software outside * - * * of the United States of America may require an export license. * + * ********************************************************************* + * * Copyright (C) 1985, 1990 Regents of the University of California. * + * * Permission to use, copy, modify, and distribute this * + * * software and its documentation for any purpose and without * + * * fee is hereby granted, provided that the above copyright * + * * notice appear in all copies. The University of California * + * * makes no representations about the suitability of this * + * * software for any purpose. It is provided "as is" without * + * * express or implied warranty. Export of this software outside * + * * of the United States of America may require an export license. * * ********************************************************************* */ @@ -80,7 +80,7 @@ static bool nmwVerifyNetHasErrors; /* TRUE means an error has already */ static bool nmwNetFound = FALSE; /* TRUE means a net has been found and * we should skip the rest of the - * terminals in that net + * terminals in that net */ /* The nmMeasureTiles array (which grows dynamically as needed) records * all tiles found on the current net. @@ -98,7 +98,7 @@ static int nmVCount= 0; #define TERMLENGTH 200 - + /* * ---------------------------------------------------------------------------- * @@ -134,7 +134,7 @@ nmwRipTileFunc(tile, plane, listHead) *listHead = new; return 0; } - + /* * ---------------------------------------------------------------------------- * @@ -171,11 +171,11 @@ NMRipup() (void) DBSrConnect(EditCellUse->cu_def, &area, &DBAllButSpaceAndDRCBits, DBConnectTbl, &TiPlaneRect, nmwRipTileFunc, (ClientData) &list); - + /* Now go through the list one item at a time and delete * the attached paint. */ - + TTMaskZero(&maskBits); while (list != NULL) { @@ -192,7 +192,7 @@ NMRipup() DBReComputeBbox(EditCellUse->cu_def); return 0; } - + /* * ---------------------------------------------------------------------------- * @@ -249,7 +249,7 @@ nmRipLocFunc(rect, name, label, area) } return 0; } - + /* * ---------------------------------------------------------------------------- * @@ -281,7 +281,7 @@ nmRipNameFunc(name, firstInNet, area) (void) DBSrLabelLoc(EditCellUse, name, nmRipLocFunc, (ClientData) area); return 0; } - + /* * ---------------------------------------------------------------------------- * @@ -311,7 +311,7 @@ NMRipupList() * rectangle that accumlates the total area of the edit cell that * was modified. */ - + area = GeoNullRect; (void) NMEnumNets(nmRipNameFunc, (ClientData) &area); DBReComputeBbox(EditCellUse->cu_def); @@ -320,7 +320,7 @@ NMRipupList() DRCCheckThis(EditCellUse->cu_def, TT_CHECKPAINT, &area); return 0; } - + /* * ---------------------------------------------------------------------------- * @@ -346,7 +346,7 @@ nmwNetCellFunc(scx) scx->scx_use->cu_id); return 2; } - + /* * ---------------------------------------------------------------------------- * @@ -373,7 +373,7 @@ nmwCheckFunc(name, otherName) if (strcmp(name, otherName) == 0) return 1; return 0; } - + /* * ---------------------------------------------------------------------------- * @@ -405,7 +405,7 @@ nmwNetTermFunc(scx, label, tpath, netPtr) char **netPtr; /* Pointer to a terminal in current net. */ { char *p, *p2; - + if (strchr(tpath->tp_first, '/') == 0) return 0; /* Add the label name onto the end of the terminal path name. */ @@ -444,7 +444,7 @@ nmwNetTermFunc(scx, label, tpath, netPtr) } return 0; } - + /* * ---------------------------------------------------------------------------- * @@ -484,7 +484,7 @@ nmwNetTileFunc(tile, plane, netPtr) * have to blow up the tile's area by one for searching, * so that we get anything that even touches it. */ - + TiToRect(tile, &scx.scx_area); scx.scx_area.r_xbot -= 1; scx.scx_area.r_xtop += 1; @@ -506,14 +506,14 @@ nmwNetTileFunc(tile, plane, netPtr) /* If no new terminal was added, then make sure there aren't any * subcells underneath the current tile. */ - + if (!nmwGotTerm) { (void) DBCellSrArea(&scx, nmwNetCellFunc, (ClientData) NULL); } return 0; } - + /* * ---------------------------------------------------------------------------- * @@ -557,7 +557,7 @@ NMExtract() NMSelectNet(net); return 0; } - + /* * ---------------------------------------------------------------------------- * @@ -578,7 +578,7 @@ NMExtract() * * ---------------------------------------------------------------------------- */ - + int nmwVerifyLabelFunc2(scx, label, tpath, cd) SearchContext *scx; /* Describes state of search. */ @@ -604,7 +604,7 @@ nmwVerifyLabelFunc2(scx, label, tpath, cd) name = NMTermInList(tpath->tp_first); /*if (name == NULL) return 0;*/ - if (name == NULL) + if (name == NULL) { /* ** make sure there is enough space in the array to hold this @@ -645,7 +645,7 @@ nmwVerifyLabelFunc2(scx, label, tpath, cd) * terminal. If not, then allocate a new array and copy the old * to the new. */ - + if (nmwVerifyCount == nmwVerifySize) { char ** newNames; @@ -675,7 +675,7 @@ nmwVerifyLabelFunc2(scx, label, tpath, cd) * netlist table, since its address is permanent and can be * compared later to see if we got all the terminals in the net. */ - + nmwVerifyNames[nmwVerifyCount] = name; GeoTransRect(&scx->scx_trans, &label->lab_rect, &nmwVerifyAreas[nmwVerifyCount]); @@ -684,12 +684,12 @@ nmwVerifyLabelFunc2(scx, label, tpath, cd) /* See if there are any other labels with the same name as this * one. If so, trace out the wiring that connects to them. */ - + (void) DBSrLabelLoc(EditCellUse, name, nmwVerifyLabelFunc, cd); return 0; } - + /* * ---------------------------------------------------------------------------- * @@ -733,7 +733,7 @@ nmwVerifyTileFunc(tile, plane, func) 0, &tpath, TF_LABEL_ATTACH, nmwVerifyLabelFunc2, (ClientData) func); return 0; } - + /* * ---------------------------------------------------------------------------- * @@ -781,11 +781,11 @@ nmwVerifyLabelFunc(rect, name, label, cd) && (strcmp(name, nmwVerifyNames[i]) == 0)) return 0; } - + /* Trace out all wiring in the edit cell that's attached to this * label (to accumulate information about what's actually wired). */ - + if (label->lab_type == TT_SPACE) mask = &DBAllButSpaceAndDRCBits; else mask = &DBConnectTbl[label->lab_type]; @@ -797,7 +797,7 @@ nmwVerifyLabelFunc(rect, name, label, cd) return 0; } - + /* * ---------------------------------------------------------------------------- * @@ -831,14 +831,14 @@ nmwVErrorLabelFunc(rect, name, label) /* Make the feedback area larger than the label; otherwise point labels * won't be visible at all. */ - + GEO_EXPAND(rect, 1, &biggerArea); DBWFeedbackAdd(&biggerArea, msg, EditCellUse->cu_def, 1, STYLE_PALEHIGHLIGHTS); nmwVerifyErrors += 1; return 1; } - + /* * ---------------------------------------------------------------------------- * @@ -894,7 +894,7 @@ nmwVerifyTermFunc(name, report) } return 0; } - + /* * ---------------------------------------------------------------------------- * @@ -935,12 +935,12 @@ nmwVerifyNetFunc(name, first) * off by enumerating all instances of the first terminal. Lower- * level procedures do the rest. */ - + nmwVerifyCount=0; nmwNonTerminalCount=0; (void) DBSrLabelLoc(EditCellUse, name, nmwVerifyLabelFunc, (ClientData) NULL); - + /* Check whether the label was found, if not report an error. */ if (nmwVerifyCount == 0) @@ -956,7 +956,7 @@ nmwVerifyNetFunc(name, first) * care of errors and NULLs out entries that it found terminals * for. */ - + nmwVerifyNetHasErrors = FALSE; (void) NMEnumTerms(name, nmwVerifyTermFunc, (ClientData) 1); @@ -964,7 +964,7 @@ nmwVerifyNetFunc(name, first) * they represent shorts between this net and other nets. Print * errors for them. */ - + for (i = 0; i < nmwVerifyCount; i++) { if (nmwVerifyNames[i] != NULL) @@ -1000,7 +1000,7 @@ nmwVerifyNetFunc(name, first) return 0; } - + /* * ---------------------------------------------------------------------------- * @@ -1028,7 +1028,7 @@ NMVerify() /* Enumerate all the nets and let the search function do the * real work. */ - + nmwVerifyErrors = 0; (void) NMEnumNets(nmwVerifyNetFunc, (ClientData) NULL); @@ -1052,7 +1052,7 @@ NMVerify() TxPrintf("%d feedback areas generated.\n", nmwVerifyErrors); return 0; } - + /* * ---------------------------------------------------------------------------- * @@ -1091,7 +1091,7 @@ NMCull() nmwCullDone); return 0; } - + /* * ---------------------------------------------------------------------------- * @@ -1171,7 +1171,7 @@ nmwCullNetFunc(name, first) return 0; } - + #ifdef ROUTE_MODULE @@ -1229,7 +1229,7 @@ nmMeasureFunc(r, type, clientData) nmVCount++; return 0; } - + /* * ---------------------------------------------------------------------------- * @@ -1301,7 +1301,7 @@ nmAllFunc(name, firstInNet, fp) return 0; } - + /* * ---------------------------------------------------------------------------- * @@ -1371,7 +1371,7 @@ nmwMeasureTileFunc(tile) if (nmMeasureSize != 0) freeMagic((char *) nmMeasureTiles); - + nmMeasureTiles = newTiles; nmMeasureSize = newSize; } diff --git a/netmenu/netmenu.h b/netmenu/netmenu.h index c3b7d196..6a39a9e9 100644 --- a/netmenu/netmenu.h +++ b/netmenu/netmenu.h @@ -5,16 +5,16 @@ * This module implements a menu-based system for editing * labels and netlists. * - * ********************************************************************* - * * Copyright (C) 1985, 1990 Regents of the University of California. * - * * Permission to use, copy, modify, and distribute this * - * * software and its documentation for any purpose and without * - * * fee is hereby granted, provided that the above copyright * - * * notice appear in all copies. The University of California * - * * makes no representations about the suitability of this * - * * software for any purpose. It is provided "as is" without * - * * express or implied warranty. Export of this software outside * - * * of the United States of America may require an export license. * + * ********************************************************************* + * * Copyright (C) 1985, 1990 Regents of the University of California. * + * * Permission to use, copy, modify, and distribute this * + * * software and its documentation for any purpose and without * + * * fee is hereby granted, provided that the above copyright * + * * notice appear in all copies. The University of California * + * * makes no representations about the suitability of this * + * * software for any purpose. It is provided "as is" without * + * * express or implied warranty. Export of this software outside * + * * of the United States of America may require an export license. * * ********************************************************************* * * diff --git a/netmenu/nmInt.h b/netmenu/nmInt.h index 02edaf80..85b25967 100644 --- a/netmenu/nmInt.h +++ b/netmenu/nmInt.h @@ -4,16 +4,16 @@ * Defines things needed inside the netmenu module, but * not needed outside the module. * - * ********************************************************************* - * * Copyright (C) 1985, 1990 Regents of the University of California. * - * * Permission to use, copy, modify, and distribute this * - * * software and its documentation for any purpose and without * - * * fee is hereby granted, provided that the above copyright * - * * notice appear in all copies. The University of California * - * * makes no representations about the suitability of this * - * * software for any purpose. It is provided "as is" without * - * * express or implied warranty. Export of this software outside * - * * of the United States of America may require an export license. * + * ********************************************************************* + * * Copyright (C) 1985, 1990 Regents of the University of California. * + * * Permission to use, copy, modify, and distribute this * + * * software and its documentation for any purpose and without * + * * fee is hereby granted, provided that the above copyright * + * * notice appear in all copies. The University of California * + * * makes no representations about the suitability of this * + * * software for any purpose. It is provided "as is" without * + * * express or implied warranty. Export of this software outside * + * * of the United States of America may require an export license. * * ********************************************************************* * * diff --git a/oa/magicInit.cpp b/oa/magicInit.cpp index dfd2e002..2530d7af 100644 --- a/oa/magicInit.cpp +++ b/oa/magicInit.cpp @@ -27,7 +27,7 @@ int boundingBoxInfo(const char *instName, const char *defName, int llx, int lly, int urx, int ury, const char *curName, ClientData *cdarg) { - cout << " callback func boundingBoxInfo : result - " + cout << " callback func boundingBoxInfo : result - " << curName << "\n bounding box " << llx << " " << lly << " " << urx << " " << ury << endl; return 0; @@ -42,12 +42,12 @@ int __Tcl_Rtn_Error(const char *function,const char *file,unsigned int line, chars1 = snprintf(NULL,0,"Error in %s at %s:%d: ",function,file,line); chars2 = vsnprintf(NULL,0,fmt,msg); - + buf = (char *)malloc(chars1 + chars2 + 1); sprintf(buf,"Error in %s at %s:%d: ",function,file,line); vsprintf(buf+chars1,fmt,msg); - + fputs(buf,stderr); fputc('\n',stderr); @@ -60,13 +60,13 @@ int REX_Tcl_Error(const char *fmt, ...) { int chars; va_list msg; va_start(msg,fmt); - + chars = vsnprintf(NULL,0,fmt,msg); - + buf = (char *)malloc(chars+1); - + vsprintf(buf,fmt,msg); - + Tcl_SetResult(REX_interp, buf,(Tcl_FreeProc *) free); return TCL_OK; } @@ -77,21 +77,21 @@ int REX_Tcl_Eval(char *fmt, ...) { int nchars, rtn; va_list msg; va_start(msg,fmt); - + nchars = vsnprintf(ptr2,256,fmt,msg); if(nchars >= 256) { ptr2 = (char *)malloc(nchars+1); vsprintf(ptr2,fmt,msg); } - + if(REX_debug_file) { fputs(ptr2,REX_debug_file); fputc('\n',REX_debug_file); fflush(REX_debug_file); } - + rtn = Tcl_Eval(REX_interp, (char *)ptr2); - + if(nchars >= 256) free(ptr2); return rtn; @@ -107,7 +107,7 @@ TCLFUNC(print_tech_info) { if(objc != 2) TCL_RTN_ERROR("Usage: %s tech",getArgString(0)); - + try { getTechInfo(getArgString(1)); } CATCH @@ -120,7 +120,7 @@ TCLFUNC(get_user_unit) { if(objc != 2) TCL_RTN_ERROR("Usage: %s tech",getArgString(0)); - + try { getUserUnit(getArgString(1), uUnit, NULL, techUserUnit); Tcl_Obj *strResult = Tcl_NewStringObj(uUnit, strlen(uUnit)); @@ -136,7 +136,7 @@ TCLFUNC(get_db_units_per_user_unit) { if(objc != 2) TCL_RTN_ERROR("Usage: %s tech",getArgString(0)); - + try { getDBUnitsPerUserUnit(getArgString(1), dbUPerUU, NULL, techDBUPerUU); Tcl_Obj *intResult = Tcl_NewIntObj(dbUPerUU); @@ -218,7 +218,7 @@ TCLFUNC(get_bounding_box) { inststring = getArgString(1); try { - getBoundingBox(NULL, inststring, defstring, + getBoundingBox(NULL, inststring, defstring, boundingBoxInfo, NULL, callback); } CATCH return TCL_OK; @@ -262,7 +262,7 @@ static const struct tclCmd tclCmds[] = { void helpPrint() { - printf ("help \n"); + printf ("help \n"); printf ("where cmd is one of \n"); for(unsigned int i = 1; i < tclCmdsNum ; i++) { printf(" %-24s", tclCmds[i].name); @@ -294,7 +294,7 @@ int Magicoa_Init(Tcl_Interp *interp) { TCLENTRY(); Tcl_PkgProvide(interp, "magicOA", "0.1"); - + #ifdef USE_TCL_STUBS if(Tcl_InitStubs(interp, (char *)"8.5",0) == NULL) return TCL_ERROR; @@ -303,7 +303,7 @@ int Magicoa_Init(Tcl_Interp *interp) { int args=1; char *argv[] = {"tclsh"}; oaDBInit(&args, argv); - + } CATCH for(unsigned int i = 0; i < tclCmdsNum ; i++) { diff --git a/oa/magicOA.cpp b/oa/magicOA.cpp index 51920fc5..e317acd6 100644 --- a/oa/magicOA.cpp +++ b/oa/magicOA.cpp @@ -36,17 +36,17 @@ getTechInfo (const char *techName) routeSpec->getLayerSpecs(routeLayerSpecArray); oaString routeLayerName; - cout <<"Route layer specs" << endl; + cout <<"Route layer specs" << endl; for (int i = 0; i < routeLayerSpecArray.getNumValues(); i++) { oaRouteLayerSpec routeLayerSpec = routeLayerSpecArray[i]; oaPhysicalLayer *routeLayer = routeLayerSpec.layer(); routeLayer->getName(routeLayerName); - cout << "Route layer name: " << routeLayerName << endl; - cout << " width - " + cout << "Route layer name: " << routeLayerName << endl; + cout << " width - " << routeLayerSpec.width() << "\n" << " spacing - " << routeLayerSpec.spacing() << "\n" - << " diag width - " + << " diag width - " << routeLayerSpec.diagWidth() << "\n" << " diag spacing - " << routeLayerSpec.diagSpacing() << "\n" @@ -64,18 +64,18 @@ getTechInfo (const char *techName) oaString layerName; oaString purposeName; layer->getName(layerName); - cout << "Layer name: " << layerName + cout << "Layer name: " << layerName << ", layer number: " << layer->getNumber() << endl; - if (oaPhysicalLayer *phyLayer = + if (oaPhysicalLayer *phyLayer = oaPhysicalLayer::find(chipTech, layer->getNumber())) { - cout << "Physical layer name:\n" - << " routing grid pitch - " + cout << "Physical layer name:\n" + << " routing grid pitch - " << phyLayer->getRouteGridPitch() << "\n" - << " routing grid offset - " + << " routing grid offset - " << phyLayer->getRouteGridOffset() << "\n" - << " preferred routing dir - " + << " preferred routing dir - " << (phyLayer->getPrefRoutingDir()).getName() << "\n" - << " manufacturing grid - " + << " manufacturing grid - " << phyLayer->getManufacturingGrid() << "\n" << endl; } @@ -95,8 +95,8 @@ getTechInfo (const char *techName) } int -getUserUnit(const char *techName, char *userUnit, ClientData *cdarg, - int (*magicFunc)(const char *techName, char *userUnit, +getUserUnit(const char *techName, char *userUnit, ClientData *cdarg, + int (*magicFunc)(const char *techName, char *userUnit, ClientData *cdarg), oaCellViewType viewType) { @@ -145,9 +145,9 @@ getUserUnit(const char *techName, char *userUnit, ClientData *cdarg, } int -getDBUnitsPerUserUnit(const char *techName, int &dbUPerUU, - ClientData *cdarg, int (*magicFunc) - (const char *techName, int &dbUPerUU, +getDBUnitsPerUserUnit(const char *techName, int &dbUPerUU, + ClientData *cdarg, int (*magicFunc) + (const char *techName, int &dbUPerUU, ClientData *cdarg), oaCellViewType viewType) { @@ -254,7 +254,7 @@ closeAll() { while (oaCellView *cellView = cellViewIter.getNext()) { cellView->close(); } - + curCellView = NULL; return 0; } @@ -263,7 +263,7 @@ int getBoundingBox (oaInst *instPtr, const char *instanceName, const char *defName, int (*magicFunc)(const char *instName, const char *defName, int llx, int lly, int urx, int ury, - const char *curName, ClientData *cdarg), + const char *curName, ClientData *cdarg), ClientData *cdarg, int callBack) { oaNativeNS ns; @@ -285,12 +285,12 @@ getBoundingBox (oaInst *instPtr, const char *instanceName, const char *defName, cout << "No cellview open" << endl; return 1; } - + topBlock = cellView->getTopBlock(); topBlock->getBBox(bBox); - cout << "Layout size " << bBox.left() << "," << bBox.bottom() + cout << "Layout size " << bBox.left() << "," << bBox.bottom() << " - " << bBox.right() << "," << bBox.top() << endl; - + } else { oaBox bBox; @@ -319,7 +319,7 @@ getBoundingBox (oaInst *instPtr, const char *instanceName, const char *defName, } topBlock->getBBox(bBox); //call magic function -// magicFunc (instanceName, defName, +// magicFunc (instanceName, defName, // bBox.left() + instOrigin.x(), bBox.bottom() + instOrigin.y(), // bBox.right() + instOrigin.x(), bBox.top() + instOrigin.y(), // instName, cdarg); diff --git a/oa/magicOA.h b/oa/magicOA.h index ebe09857..61576e6f 100644 --- a/oa/magicOA.h +++ b/oa/magicOA.h @@ -6,13 +6,13 @@ // Functions implemented for OA DB access and query int getTechInfo(const char *techName); -int getUserUnit(const char *techName, char *userUnit, ClientData *cdarg, +int getUserUnit(const char *techName, char *userUnit, ClientData *cdarg, int (*magicFunc) (const char *techName, char *userUnit, - ClientData *cdarg) = NULL, + ClientData *cdarg) = NULL, oaCellViewType viewType=oacMaskLayout); -int getDBUnitsPerUserUnit(const char *techName, int &dbUPerUU, - ClientData *cdarg, int (*magicFunc) - (const char *techName, int &dbUPerUU, +int getDBUnitsPerUserUnit(const char *techName, int &dbUPerUU, + ClientData *cdarg, int (*magicFunc) + (const char *techName, int &dbUPerUU, ClientData *cdarg) = NULL, oaCellViewType viewType=oacMaskLayout); int openDesign(const char *libName, const char *cellName, @@ -21,11 +21,11 @@ int closeDesign(const char *libName, const char *cellName, const char *viewName); int closeDesign(); int closeAll(); -int getBoundingBox (oaInst *instPtr, const char *instanceName, - const char *defName, int (*magicFunc) +int getBoundingBox (oaInst *instPtr, const char *instanceName, + const char *defName, int (*magicFunc) (const char *instName, const char *defName, - int llx, int lly, int urx, int ury, - const char *curName, ClientData *cdarg), + int llx, int lly, int urx, int ury, + const char *curName, ClientData *cdarg), ClientData *cdarg, int callBack); #endif diff --git a/oa/oa.c b/oa/oa.c index 618307e3..70e65c70 100644 --- a/oa/oa.c +++ b/oa/oa.c @@ -105,7 +105,7 @@ OACellSearch(scx, xMask, func, cdarg) /* Get the name of the instance, which should have been set by */ /* rexlite when the OpenAccess database was opened under magic. */ - + instname = scx->scx_use->cu_id; /* Query the OpenAccess database. For each cell overlapping the diff --git a/plot/plot.h b/plot/plot.h index ce5de492..38ddaafb 100644 --- a/plot/plot.h +++ b/plot/plot.h @@ -4,16 +4,16 @@ * Contains definitions for things that are exported by the * plot module. * - * ********************************************************************* - * * Copyright (C) 1985, 1990 Regents of the University of California. * - * * Permission to use, copy, modify, and distribute this * - * * software and its documentation for any purpose and without * - * * fee is hereby granted, provided that the above copyright * - * * notice appear in all copies. The University of California * - * * makes no representations about the suitability of this * - * * software for any purpose. It is provided "as is" without * - * * express or implied warranty. Export of this software outside * - * * of the United States of America may require an export license. * + * ********************************************************************* + * * Copyright (C) 1985, 1990 Regents of the University of California. * + * * Permission to use, copy, modify, and distribute this * + * * software and its documentation for any purpose and without * + * * fee is hereby granted, provided that the above copyright * + * * notice appear in all copies. The University of California * + * * makes no representations about the suitability of this * + * * software for any purpose. It is provided "as is" without * + * * express or implied warranty. Export of this software outside * + * * of the United States of America may require an export license. * * ********************************************************************* * * rcsid $Header: /usr/cvsroot/magic-8.0/plot/plot.h,v 1.1.1.1 2008/02/03 20:43:50 tim Exp $ diff --git a/plot/plotCmd.c b/plot/plotCmd.c index 4baa8cb9..aa710ad0 100644 --- a/plot/plotCmd.c +++ b/plot/plotCmd.c @@ -3,16 +3,16 @@ * * Commands for the plot module only. * - * ********************************************************************* - * * Copyright (C) 1985, 1990 Regents of the University of California. * - * * Permission to use, copy, modify, and distribute this * - * * software and its documentation for any purpose and without * - * * fee is hereby granted, provided that the above copyright * - * * notice appear in all copies. The University of California * - * * makes no representations about the suitability of this * - * * software for any purpose. It is provided "as is" without * - * * express or implied warranty. Export of this software outside * - * * of the United States of America may require an export license. * + * ********************************************************************* + * * Copyright (C) 1985, 1990 Regents of the University of California. * + * * Permission to use, copy, modify, and distribute this * + * * software and its documentation for any purpose and without * + * * fee is hereby granted, provided that the above copyright * + * * notice appear in all copies. The University of California * + * * makes no representations about the suitability of this * + * * software for any purpose. It is provided "as is" without * + * * express or implied warranty. Export of this software outside * + * * of the United States of America may require an export license. * * ********************************************************************* */ @@ -41,7 +41,7 @@ static char rcsid[] __attribute__ ((unused)) = "$Header: /usr/cvsroot/magic-8.0/ #include "commands/commands.h" #include "plot/plotInt.h" - + /* * ---------------------------------------------------------------------------- * @@ -102,9 +102,9 @@ CmdPlot(w, cmd) #endif static char *cmdPlotOption[] = - { + { "postscript file [layers] generate PostScript file for what's\n\ - underneath the box", + underneath the box", "pnm file [width [layers]] generate PNM file for what's\n\ underneath the box", #ifdef HAVE_LIBCAIRO @@ -167,7 +167,7 @@ CmdPlot(w, cmd) if ((window == (MagWindow *) NULL) || (window->w_client != DBWclientID)) { TxError("The cursor must be over a layout window to plot.\n"); - return; + return; } } crec = (DBWclientRec *) window->w_clientData; @@ -222,7 +222,7 @@ CmdPlot(w, cmd) PlotGremlin(cmd->tx_argv[2], &scx, &mask, crec->dbw_bitmask); return; #endif /* GREMLIN */ - + case HELP: TxPrintf("The \"plot\" commands are:\n"); for (msg = &(cmdPlotOption[0]); *msg != NULL; msg++) @@ -230,7 +230,7 @@ CmdPlot(w, cmd) TxPrintf(" plot %s\n", *msg); } return; - + case PARAMETERS: if (cmd->tx_argc == 2) PlotPrintParams(); @@ -242,7 +242,7 @@ CmdPlot(w, cmd) cmdPlotOption[PARAMETERS]); } return; - + #ifdef VERSATEC case STYLE_VERSATEC: if (cmd->tx_argc > 4) @@ -274,7 +274,7 @@ CmdPlot(w, cmd) GrTCairoPlotSVG(cmd->tx_argv[2], window); return; #endif - + case PLOTPNM: if (cmd->tx_argc > 5) { @@ -315,7 +315,7 @@ CmdPlot(w, cmd) return; } #endif - else + else iwidth = 1000; /* Default value */ if (cmd->tx_argc == 5) @@ -324,7 +324,7 @@ CmdPlot(w, cmd) PlotPNM(cmd->tx_argv[2], &scx, &mask, crec->dbw_bitmask, iwidth); return; - + #ifdef LLNL case PIXELS: if (cmd->tx_argc > 4) diff --git a/plot/plotGremln.c b/plot/plotGremln.c index 3f4a92c6..b05f6929 100644 --- a/plot/plotGremln.c +++ b/plot/plotGremln.c @@ -4,16 +4,16 @@ * This file contains procedures that generate Gremlin-format files * to describe a section of layout. * - * ********************************************************************* - * * Copyright (C) 1985, 1990 Regents of the University of California. * - * * Permission to use, copy, modify, and distribute this * - * * software and its documentation for any purpose and without * - * * fee is hereby granted, provided that the above copyright * - * * notice appear in all copies. The University of California * - * * makes no representations about the suitability of this * - * * software for any purpose. It is provided "as is" without * - * * express or implied warranty. Export of this software outside * - * * of the United States of America may require an export license. * + * ********************************************************************* + * * Copyright (C) 1985, 1990 Regents of the University of California. * + * * Permission to use, copy, modify, and distribute this * + * * software and its documentation for any purpose and without * + * * fee is hereby granted, provided that the above copyright * + * * notice appear in all copies. The University of California * + * * makes no representations about the suitability of this * + * * software for any purpose. It is provided "as is" without * + * * express or implied warranty. Export of this software outside * + * * of the United States of America may require an export license. * * ********************************************************************* */ @@ -98,7 +98,7 @@ static Rect bbox; /* Bounding box, in root coordinates, of */ #endif /* GREMLIN */ - + /* * ---------------------------------------------------------------------------- * PlotGremlinTechInit -- @@ -135,7 +135,7 @@ PlotGremlinTechInit() {} #endif /* GREMLIN */ - + /* * ---------------------------------------------------------------------------- * PlotGremlinTechLine -- @@ -307,7 +307,7 @@ plotGremlinLine(p1, p2, lineStyle) fprintf(file, "%.3f %.3f\n%.3f %.3f\n", x1, y1, x2, y2); fprintf(file, "*\n%d 0\n0 \n", lineStyle); } - + /* * ---------------------------------------------------------------------------- * @@ -341,7 +341,7 @@ plotGremlinRect(rect, lineStyle) plotGremlinLine(&rect->r_ur, &p, lineStyle); plotGremlinLine(&p, &rect->r_ll, lineStyle); } - + /* * ---------------------------------------------------------------------------- * @@ -371,7 +371,7 @@ plotGremlinPaint(tile, cxp) Tile *neighbor; /* First transform tile coords to root coords */ - + TiToRect(tile, &tileArea); GeoTransRect(&cxp->tc_scx->scx_trans, &tileArea, &rootArea); @@ -419,7 +419,7 @@ plotGremlinPaint(tile, cxp) * have the wrong types. First, search the tile's bottom border * (unless it is at infinity). */ - + if (tileArea.r_ybot > TiPlaneRect.r_ybot) { edge.r_ybot = edge.r_ytop = tileArea.r_ybot; @@ -493,7 +493,7 @@ plotGremlinPaint(tile, cxp) } return 0; } - + /* * ---------------------------------------------------------------------------- * @@ -569,7 +569,7 @@ plotGremlinLabel(scx, label) case GEO_EAST: y = (rootArea.r_ytop + rootArea.r_ybot - 2*bbox.r_ybot)*scale/2; break; - + case GEO_SOUTH: case GEO_SOUTHEAST: case GEO_SOUTHWEST: @@ -585,13 +585,13 @@ plotGremlinLabel(scx, label) x = (rootArea.r_xbot - bbox.r_xbot) * scale; x -= delta; break; - + case GEO_CENTER: case GEO_NORTH: case GEO_SOUTH: x = (rootArea.r_xtop + rootArea.r_xbot - 2*bbox.r_xbot)*scale/2; break; - + case GEO_EAST: case GEO_NORTHEAST: case GEO_SOUTHEAST: @@ -604,7 +604,7 @@ plotGremlinLabel(scx, label) * of the area we're plotting (a large label could overlap a * bit of the area but stick out way off-screen too). */ - + if ((x >= -delta) && (y >= -delta) && (x <= ((bbox.r_xtop - bbox.r_xbot) * scale) + delta) && (y <= ((bbox.r_ytop - bbox.r_ybot) * scale) + delta)) @@ -619,7 +619,7 @@ plotGremlinLabel(scx, label) * done depending on whether the label is a point, a line, or an * area. */ - + if ((rootArea.r_xbot == rootArea.r_xtop) && (rootArea.r_ybot == rootArea.r_ytop)) { @@ -653,7 +653,7 @@ plotGremlinLabel(scx, label) } return 0; } - + /* * ---------------------------------------------------------------------------- * @@ -675,7 +675,7 @@ int plotGremlinCell(scx) SearchContext *scx; /* Describes cell whose bbox is to * be plotted. - */ + */ { extern bool PlotShowCellNames; char idName[100]; @@ -726,7 +726,7 @@ plotGremlinCell(scx) return 0; } - + /* * ---------------------------------------------------------------------------- * @@ -774,7 +774,7 @@ PlotGremlin(fileName, scx, layers, xMask) * coordinates. Pick an even power of two that will make all * the Gremlin units fall between 0 and 512. */ - + GeoTransRect(&scx->scx_trans, &scx->scx_area, &bbox); size = bbox.r_xtop - bbox.r_xbot; tmp = bbox.r_ytop - bbox.r_ybot; @@ -782,7 +782,7 @@ PlotGremlin(fileName, scx, layers, xMask) scale = 64.0; while (scale*size > 512) scale /= 2.0; - + /* Open the Gremlin file and output header information. */ file = PaOpen(fileName, "w", (char *) NULL, ".", (char *) NULL, @@ -798,7 +798,7 @@ PlotGremlin(fileName, scx, layers, xMask) /* For each Gremlin style, find all the paint layers that belong * to that style and put plot information into the file. */ - + for (curStyle = plotGremlinStyles; curStyle != NULL; curStyle = curStyle->grs_next) { diff --git a/plot/plotHP.c b/plot/plotHP.c index 1609309f..d668e523 100644 --- a/plot/plotHP.c +++ b/plot/plotHP.c @@ -44,7 +44,7 @@ PlotHPRTLHeader(width, height, density, hpfile) fprintf(hpfile, "\033*b2M"); /* Mode 2 row compression */ fprintf(hpfile, "\033*t%dR", density); /* Plotting density in DPI. */ fprintf(hpfile, "\033*r0A"); /* Start raster data. */ -} +} /* * ---------------------------------------------------------------------------- @@ -56,7 +56,7 @@ PlotHPRTLHeader(width, height, density, hpfile) * ---------------------------------------------------------------------------- */ -#define LABEL_SPACER 200 /* Height of the label area, in pixels */ +#define LABEL_SPACER 200 /* Height of the label area, in pixels */ #define IN_TO_HPGL 1016 /* HPGL2 coordinates are in 0.025mm units */ #define THIN_MARGIN 40 /* thin spacer (1mm) in HPGL2 coordinates */ @@ -167,22 +167,22 @@ PlotHPGL2Trailer(hpfile) * packbits for me. I was sorely disappointed to find a large (225 lines) * routine that will do this, but replys heavily on the internal data * structures used by the rest of the libtiff library. - * + * * So, I wrote my own. Here is a much simpler pair of routines to do the same * thing. These were tested on both the PaintJet-300XL and DesignJet 650C, * having been compiled using an HP9000s800. If anyone is actually interested * in the driver program that converts a PPM image for use on these printers, I * could probably post that as well. - * + * * Noel (ngorelic@speclab.cr.usgs.gov) *----------------------------------------------------------------------- */ -/* +/* *----------------------------------------------------------------------- * * PlotRTLCompress -- - * + * * This routine encodes a string using the TIFF packbits encoding * scheme. This encoding method is used by several HP peripherals to * reduce the size of incoming raster images. Both routines convert s1 @@ -196,7 +196,7 @@ PlotHPGL2Trailer(hpfile) * * Side effects: * Output data placed in s2, which must be large enough to hold it. - * + * *----------------------------------------------------------------------- */ @@ -304,7 +304,7 @@ PlotDumpHPRTL(hpfile, kRaster, cRaster, mRaster, yRaster) ipl = kRaster->ras_intsPerLine; bpl = kRaster->ras_bytesPerLine; - + c = cRaster->ras_bits; m = mRaster->ras_bits; y = yRaster->ras_bits; diff --git a/plot/plotInt.h b/plot/plotInt.h index 0dfc441f..f0e0134b 100644 --- a/plot/plotInt.h +++ b/plot/plotInt.h @@ -4,16 +4,16 @@ * Contains definitions for things that are used internally by the * plot module but not exported. * - * ********************************************************************* - * * Copyright (C) 1985, 1990 Regents of the University of California. * - * * Permission to use, copy, modify, and distribute this * - * * software and its documentation for any purpose and without * - * * fee is hereby granted, provided that the above copyright * - * * notice appear in all copies. The University of California * - * * makes no representations about the suitability of this * - * * software for any purpose. It is provided "as is" without * - * * express or implied warranty. Export of this software outside * - * * of the United States of America may require an export license. * + * ********************************************************************* + * * Copyright (C) 1985, 1990 Regents of the University of California. * + * * Permission to use, copy, modify, and distribute this * + * * software and its documentation for any purpose and without * + * * fee is hereby granted, provided that the above copyright * + * * notice appear in all copies. The University of California * + * * makes no representations about the suitability of this * + * * software for any purpose. It is provided "as is" without * + * * express or implied warranty. Export of this software outside * + * * of the United States of America may require an export license. * * ********************************************************************* * * rcsid $Header: /usr/cvsroot/magic-8.0/plot/plotInt.h,v 1.2 2010/03/08 13:33:33 tim Exp $ @@ -63,7 +63,7 @@ typedef struct */ int ras_intsPerLine; /* How much to add to the address of an * integer containing a pixel to find the - * address of the integer containing the + * address of the integer containing the * pixel just underneath it. */ int ras_height; /* Raster height (y-dimension). For proper @@ -83,8 +83,8 @@ typedef struct /* This structure is also used for raster output, but to "deep" * devices such as frame buffers and Dicomend cameras. It defines a - * rectangular raster area in which to fill bits for printing. Each byte - * of the pix_pixels array holds one pixel; for an RGB image, three + * rectangular raster area in which to fill bits for printing. Each byte + * of the pix_pixels array holds one pixel; for an RGB image, three * PixRasters will be needed. */ diff --git a/plot/plotMain.c b/plot/plotMain.c index 23073ec5..cce614c8 100644 --- a/plot/plotMain.c +++ b/plot/plotMain.c @@ -5,16 +5,16 @@ * that define the various styles of plotting that are available, and * also contains central technology-file reading routines. * - * ********************************************************************* - * * Copyright (C) 1985, 1990 Regents of the University of California. * - * * Permission to use, copy, modify, and distribute this * - * * software and its documentation for any purpose and without * - * * fee is hereby granted, provided that the above copyright * - * * notice appear in all copies. The University of California * - * * makes no representations about the suitability of this * - * * software for any purpose. It is provided "as is" without * - * * express or implied warranty. Export of this software outside * - * * of the United States of America may require an export license. * + * ********************************************************************* + * * Copyright (C) 1985, 1990 Regents of the University of California. * + * * Permission to use, copy, modify, and distribute this * + * * software and its documentation for any purpose and without * + * * fee is hereby granted, provided that the above copyright * + * * notice appear in all copies. The University of California * + * * makes no representations about the suitability of this * + * * software for any purpose. It is provided "as is" without * + * * express or implied warranty. Export of this software outside * + * * of the United States of America may require an export license. * * ********************************************************************* */ @@ -126,7 +126,7 @@ bool PlotShowCellNames = TRUE; /* TRUE if cell names and use-ids * drawn. */ - + /* * ---------------------------------------------------------------------------- * PlotTechInit -- @@ -157,7 +157,7 @@ PlotTechInit() (*(plotInitProcs[i]))(); } } - + /* * ---------------------------------------------------------------------------- * PlotTechLine -- @@ -216,7 +216,7 @@ PlotTechLine(sectionName, argc, argv) /* Not a new style. Just farm out this line to the handler for the * current style. */ - + if (plotCurStyle == -1) { TechError("Must declare a plot style before anything else.\n"); @@ -225,12 +225,12 @@ PlotTechLine(sectionName, argc, argv) } else if (plotCurStyle == -2) return TRUE; - + if (plotLineProcs[plotCurStyle] == NULL) return TRUE; return (*(plotLineProcs[plotCurStyle]))(sectionName, argc, argv); } - + /* * ---------------------------------------------------------------------------- * PlotTechFinal -- @@ -258,7 +258,7 @@ PlotTechFinal() (*(plotFinalProcs[i]))(); } } - + /* * ---------------------------------------------------------------------------- * @@ -325,7 +325,7 @@ PlotPrintParams() TxPrintf(" pixwidth: %d\n", PlotPixWidth); #endif /* LLNL */ } - + /* * ---------------------------------------------------------------------------- * diff --git a/plot/plotPNM.c b/plot/plotPNM.c index de5a95e8..862efc3a 100644 --- a/plot/plotPNM.c +++ b/plot/plotPNM.c @@ -4,16 +4,16 @@ * This file contains procedures that generate PNM format files * to describe a section of layout. * - * ********************************************************************* + * ********************************************************************* * * Copyright (C) 2000 Cornell University * - * * Permission to use, copy, modify, and distribute this * - * * software and its documentation for any purpose and without * - * * fee is hereby granted, provided that the above copyright * - * * notice appear in all copies. Cornell University * - * * makes no representations about the suitability of this * - * * software for any purpose. It is provided "as is" without * - * * express or implied warranty. Export of this software outside * - * * of the United States of America may require an export license. * + * * Permission to use, copy, modify, and distribute this * + * * software and its documentation for any purpose and without * + * * fee is hereby granted, provided that the above copyright * + * * notice appear in all copies. Cornell University * + * * makes no representations about the suitability of this * + * * software for any purpose. It is provided "as is" without * + * * express or implied warranty. Export of this software outside * + * * of the United States of America may require an export license. * * ********************************************************************* * * R. Timothy Edwards @@ -64,7 +64,7 @@ static char rcsid[] __attribute__ ((unused)) = "$Header: /usr/cvsroot/magic-8.0/ typedef struct _pnmcolor { unsigned char r, g, b; -} pnmcolor; +} pnmcolor; pnmcolor *PNMcolors = NULL; static int ncolors = 0; @@ -207,7 +207,7 @@ pnmRenderRegion(scale, scale_over_2, normal, temp, func, arg) pnmcolor *color; float r, g, b; unsigned char *linebuffer, *lineptr; - + jmax = MIN(y_pixels, im_yoffset + 1); ds_over_2 = scale_over_2 >> PlotPNMdownsample; @@ -290,7 +290,7 @@ pnmRenderRegion(scale, scale_over_2, normal, temp, func, arg) } - + /* * ---------------------------------------------------------------------------- * @@ -320,10 +320,10 @@ pnmBBOX (tile,cxp) if (!IsSplit(tile)) if ((type = TiGetType(tile)) == TT_SPACE) return 0; - + /* grab rectangle from tile */ TITORECT(tile, &targetRect); - + /* coordinate transform */ GEOTRANSRECT(&scx->scx_trans, &targetRect, &sourceRect); @@ -381,10 +381,10 @@ pnmTile (tile, cxp) /* undefined type; paint nothing */ if (!IsSplit(tile)) if (PaintStyles[type].wmask == 0) return 0; - + /* grab rectangle from tile */ TITORECT(tile, &targetRect); - + /* coordinate transform */ GEOTRANSRECT(&scx->scx_trans, &targetRect, &sourceRect); @@ -611,7 +611,7 @@ PlotPNM(fileName, scx, layers, xMask, width) } /* image: - * ----- + * ----- * | xxx | * | xxx | * | xxx | @@ -624,10 +624,10 @@ PlotPNM(fileName, scx, layers, xMask, width) /* Rendering Tile: * * 0.. bbox size + 2 * scale_over_2. - * + * * To sample, pixel (i,j) will be at: * (scale_over_2 + scale*i, scale_over_2 + scale*j) - * + * * Given an initial pixel position at (i,j), we sample from * -scale_over_2 to scale_over_2 */ @@ -669,7 +669,7 @@ PlotPNM(fileName, scx, layers, xMask, width) return; } - /* + /* * Compute memory requirements; a single pixel line needs a tile * that has size "xsize" by "scale." To keep inter-tile overlap low, * we insist that a single tile must have at least 3*scale pixels in @@ -686,13 +686,13 @@ PlotPNM(fileName, scx, layers, xMask, width) { TxPrintf ("%dX downsampling forced by memory size requirements.\n", PlotPNMdownsample); - TxPrintf ("Current: %d KB; Required for non-downsampled image: %d KB\n", + TxPrintf ("Current: %d KB; Required for non-downsampled image: %d KB\n", PlotPNMmaxmem, (int) (1023 + ((3 * scale + 2 * scale_over_2) * PIXELSZ * tile_xsize) / 1024) / (1 << (save_ds * 2))); TxPrintf ("Use \"plot parameter pnmmaxmem\" to increase allocation.\n"); } - /* + /* * Compute the maximum y size for a tile. */ @@ -810,7 +810,7 @@ PlotPNM(fileName, scx, layers, xMask, width) TxError ("Could not open file `%s' for writing\n", fileName); goto done; } - + fprintf (fp, "P6\n"); fprintf (fp, "%d %d\n", im_x, im_y); fprintf (fp, "255\n"); @@ -938,7 +938,7 @@ done: * lanczos_kernel -- * * Compute the value of the lanczos kernel at the given position. - * + * * * Results: * Returns kernel value at arg x. @@ -984,11 +984,11 @@ PNMColorBlend(c_have, c_put) pnmcolor loccolor; short r, g, b; - /* "127" is half the background color (which should be derived) */ + /* "127" is half the background color (which should be derived) */ r = (short)c_put->r - 127 + (short)c_have->r / 2; g = (short)c_put->g - 127 + (short)c_have->g / 2; - b = (short)c_put->b - 127 + (short)c_have->b / 2; + b = (short)c_put->b - 127 + (short)c_have->b / 2; loccolor.r = (r < 0) ? 0 : (unsigned char)r; loccolor.g = (g < 0) ? 0 : (unsigned char)g; @@ -1021,7 +1021,7 @@ PNMColorIndexAndBlend(c_have, cidx) b = (short)ib; } - /* "127" is half the background color (which should be derived) */ + /* "127" is half the background color (which should be derived) */ r += (short)c_have->r / 2 - 127; g += (short)c_have->g / 2 - 127; @@ -1040,7 +1040,7 @@ PNMColorIndexAndBlend(c_have, cidx) * PlotPNMTechInit -- * * Called when magic starts up. - * + * * * Results: * None. @@ -1069,7 +1069,7 @@ PlotPNMTechInit() PaintStyles[i].color.g = 0xff; PaintStyles[i].color.b = 0xff; } - + Init_Error = 0; /* Initialize Lanczos kernel */ @@ -1078,7 +1078,7 @@ PlotPNMTechInit() } - + /* * ---------------------------------------------------------------------------- * diff --git a/plot/plotPS.c b/plot/plotPS.c index a3c7bdfb..9e8c829b 100644 --- a/plot/plotPS.c +++ b/plot/plotPS.c @@ -4,16 +4,16 @@ * This file contains procedures that generate PS-format files * to describe a section of layout. * - * ********************************************************************* - * * Copyright (C) 1985, 1990 Regents of the University of California. * - * * Permission to use, copy, modify, and distribute this * - * * software and its documentation for any purpose and without * - * * fee is hereby granted, provided that the above copyright * - * * notice appear in all copies. The University of California * - * * makes no representations about the suitability of this * - * * software for any purpose. It is provided "as is" without * - * * express or implied warranty. Export of this software outside * - * * of the United States of America may require an export license. * + * ********************************************************************* + * * Copyright (C) 1985, 1990 Regents of the University of California. * + * * Permission to use, copy, modify, and distribute this * + * * software and its documentation for any purpose and without * + * * fee is hereby granted, provided that the above copyright * + * * notice appear in all copies. The University of California * + * * makes no representations about the suitability of this * + * * software for any purpose. It is provided "as is" without * + * * express or implied warranty. Export of this software outside * + * * of the United States of America may require an export license. * * ********************************************************************* */ @@ -152,7 +152,7 @@ PSReset() curx1 = curx2 = cury1 = cury2 = -2; } - + /* * ---------------------------------------------------------------------------- * PlotPSTechInit -- @@ -203,7 +203,7 @@ PlotPSTechInit() if (!PlotPSLabelFont) StrDup(&PlotPSLabelFont, defaultFont); } - + /* * ---------------------------------------------------------------------------- * PlotPSTechLine -- @@ -231,7 +231,7 @@ PlotPSTechLine(sectionName, argc, argv) PSColor *newcolor; PSPattern *newpattern; int i, color, stipple; - + if (argc != 9 && argc != 5 && argc != 3) { TechError("\"ps\" lines must have either 9, 5, or 3 arguments.\n"); @@ -356,7 +356,7 @@ plotPSFlushLine() fprintf(file, "%d %d %d %d ml\n", curx1, cury1, curx2, cury2); } - + /* * ---------------------------------------------------------------------------- * @@ -419,7 +419,7 @@ plotPSLine(p1, p2) if (((x1 == x2) && (x1 == curx1) && (x2 == curx2) && ((tmptf = (y1 == cury2)) || (y2 == cury1)))) { - if (tmptf) cury2 = y2; + if (tmptf) cury2 = y2; else cury1 = y1; } else if (((y1 == y2) && (y1 == cury1) && (y2 == cury2) @@ -437,7 +437,7 @@ plotPSLine(p1, p2) cury2 = y2; } } - + /* * ---------------------------------------------------------------------------- @@ -477,7 +477,7 @@ plotPSRect(rect, style) (style == SOLID) ? 's' : 'r'); } - + /* * ---------------------------------------------------------------------------- * @@ -510,7 +510,7 @@ plotPSPaint(tile, cxp) TileType ntype; /* First transform tile coords to root coords */ - + TiToRect(tile, &tileArea); GeoTransRect(&scx->scx_trans, &tileArea, &rootArea); @@ -602,9 +602,9 @@ plotPSPaint(tile, cxp) + curheight)) || (ybot + height == curybot))) { curheight += height; - if (!tmptf) curybot = ybot; + if (!tmptf) curybot = ybot; } - else if ((height == curheight) && (ybot == curybot) && ((tmptf = (xbot + else if ((height == curheight) && (ybot == curybot) && ((tmptf = (xbot == curxbot + curwidth)) || (xbot + width == curxbot))) { curwidth += width; @@ -635,7 +635,7 @@ plotPSPaint(tile, cxp) * * (This code is essentially a duplicate of selRedisplayFunc()) */ - + if (IsSplit(tile) && (!(SplitSide(tile) ^ SplitDirection(tile)))) goto searchleft; /* nothing on bottom of split */ @@ -729,7 +729,7 @@ searchright: return 0; } - + /* * ---------------------------------------------------------------------------- @@ -785,7 +785,7 @@ plotPSLabelPosition(scx, label, x, y, p) case GEO_EAST: *y = (rootArea.r_ytop + rootArea.r_ybot) / 2 - bbox.r_ybot; break; - + case GEO_SOUTH: case GEO_SOUTHEAST: case GEO_SOUTHWEST: @@ -801,13 +801,13 @@ plotPSLabelPosition(scx, label, x, y, p) *x = (rootArea.r_xbot - bbox.r_xbot); *x -= delta; break; - + case GEO_CENTER: case GEO_NORTH: case GEO_SOUTH: *x = (rootArea.r_xtop + rootArea.r_xbot) / 2 - bbox.r_xbot; break; - + case GEO_EAST: case GEO_NORTHEAST: case GEO_SOUTHEAST: @@ -855,7 +855,7 @@ plotPSLabelBounds(scx, label) llx = (int)((float)(bbox.r_xbot - llx) / fscale); lly = (int)((float)(bbox.r_ybot - lly) / fscale); ls = strlen(label->lab_text); - + psxsize = ls * (int)((float)PlotPSLabelSize * AVGCHARWIDTH); psysize = (int)((float)PlotPSLabelSize * CHARHEIGHT); @@ -903,7 +903,7 @@ plotPSLabelBounds(scx, label) llx += psxsize / 2; break; } - + if (xpmargin < urx) xpmargin = urx; if (ypmargin < ury) ypmargin = ury; if (xnmargin < llx) xnmargin = llx; @@ -938,7 +938,7 @@ plotPSLabelBox(scx, label) * done depending on whether the label is a point, a line, or an * area. */ - + if (curLineWidth != PS_MEDIUM) { fprintf(file, "l2\n"); curLineWidth = PS_MEDIUM; @@ -1003,7 +1003,7 @@ plotPSLabel(scx, label) * of the area we're plotting (a large label could overlap a * bit of the area but stick out way off-screen too). */ - + if ((x >= -delta) && (y >= -delta) && (x <= (bbox.r_xtop - bbox.r_xbot) + delta) && (y <= (bbox.r_ytop - bbox.r_ybot) + delta)) @@ -1012,7 +1012,7 @@ plotPSLabel(scx, label) } return 0; } - + /* * ---------------------------------------------------------------------------- * @@ -1034,7 +1034,7 @@ int plotPSCell(scx) SearchContext *scx; /* Describes cell whose bbox is to * be plotted. - */ + */ { extern bool PlotShowCellNames; char idName[100]; @@ -1088,7 +1088,7 @@ plotPSCell(scx) return 0; } - + /* * ---------------------------------------------------------------------------- * @@ -1143,7 +1143,7 @@ PlotPS(fileName, scx, layers, xMask) /* Compute a scale factor between our coordinates and PS * coordinates. */ - + GeoTransRect(&scx->scx_trans, &scx->scx_area, &bbox); xsize = bbox.r_xtop - bbox.r_xbot; ysize = bbox.r_ytop - bbox.r_ybot; @@ -1257,7 +1257,7 @@ PlotPS(fileName, scx, layers, xMask) /* For each PS style, find all the paint layers that belong * to that style and put plot information into the file. */ - + for (curStyle = plotPSStyles; curStyle != NULL; curStyle = curStyle->grs_next) { diff --git a/plot/plotPixels.c b/plot/plotPixels.c index 7a46aaf3..3ee0063c 100644 --- a/plot/plotPixels.c +++ b/plot/plotPixels.c @@ -6,16 +6,16 @@ * green and blue value between 0 and 255 for a pixel. Pixels go across left * to right, and down the image. * - * ********************************************************************* - * * Copyright (C) 1985, 1990 Regents of the University of California. * - * * Permission to use, copy, modify, and distribute this * - * * software and its documentation for any purpose and without * - * * fee is hereby granted, provided that the above copyright * - * * notice appear in all copies. The University of California * - * * makes no representations about the suitability of this * - * * software for any purpose. It is provided "as is" without * - * * express or implied warranty. Export of this software outside * - * * of the United States of America may require an export license. * + * ********************************************************************* + * * Copyright (C) 1985, 1990 Regents of the University of California. * + * * Permission to use, copy, modify, and distribute this * + * * software and its documentation for any purpose and without * + * * fee is hereby granted, provided that the above copyright * + * * notice appear in all copies. The University of California * + * * makes no representations about the suitability of this * + * * software for any purpose. It is provided "as is" without * + * * express or implied warranty. Export of this software outside * + * * of the United States of America may require an export license. * * ********************************************************************* */ @@ -44,9 +44,9 @@ static char rcsid[] __attribute__ ((unused)) = "$Header: /usr/cvsroot/magic-8.0/ #include "utils/tech.h" #include "utils/signals.h" #include "utils/styles.h" -#include "graphics/graphics.h" +#include "graphics/graphics.h" #include "dbwind/dbwind.h" - + #ifdef LLNL /* forward declarations */ @@ -129,7 +129,7 @@ static RasterFont *cellIdPixFont; /* Font to use when rendering cell ids. */ #endif /* LLNL */ - + /* * ---------------------------------------------------------------------------- * PlotPixTechInit -- @@ -152,7 +152,7 @@ PlotPixTechInit() * plot directory, default font names, etc. */ } - + /* * ---------------------------------------------------------------------------- * PlotPixTechLine -- @@ -182,7 +182,7 @@ PlotPixTechLine(sectionName, argc, argv) #ifdef LLNL - + /* * ---------------------------------------------------------------------------- * @@ -215,11 +215,11 @@ PlotPixPoint(raster, x, y, style) if ((y < 0) || (y >= raster->pix_height)) return; rp = raster->pix_pixels + x + y*raster->pix_width; - *rp = (*rp & ~(GrStyleTable[style].mask)) | + *rp = (*rp & ~(GrStyleTable[style].mask)) | (GrStyleTable[style].color & GrStyleTable[style].mask); } - + /* * ---------------------------------------------------------------------------- * @@ -317,7 +317,7 @@ PlotPixArbLine(raster, src, dst, style) } PlotPixPoint(raster, x, y, style); } - + /* * ---------------------------------------------------------------------------- * @@ -362,11 +362,11 @@ plotPixLine(area, widen, style) plotFillPixRaster(pixRasterSwath, &swathArea,style, GR_STSOLID); } else - PlotPixFatLine(pixRasterSwath, - &swathArea.r_ll, &swathArea.r_ur, + PlotPixFatLine(pixRasterSwath, + &swathArea.r_ll, &swathArea.r_ur, widen, curStyle); } - + /* * ---------------------------------------------------------------------------- * @@ -438,7 +438,7 @@ PlotPixFatLine(raster, src, dst, widen, style) PlotPixArbLine(raster, &newSrc, &newDst, style); } } - + /* * ---------------------------------------------------------------------------- * @@ -506,7 +506,7 @@ plotPixRect(area, widen, style) } } } - + /* * ---------------------------------------------------------------------------- * @@ -560,13 +560,13 @@ plotPixTile(tile, cxp) /* if the current style's fill-mode is GR_STOUTLINE or GR_STCROSS * we cannot let plotFillPixRaster render the tile, since we get - * extra horizontal lines at swath boundaries. Too bad, it was a - * neat idea, but we cannot force the user to render the entire + * extra horizontal lines at swath boundaries. Too bad, it was a + * neat idea, but we cannot force the user to render the entire * image at once (*sigh*) */ if((GrStyleTable[curStyle].fill == GR_STOUTLINE) || - (GrStyleTable[curStyle].fill == GR_STCROSS)) + (GrStyleTable[curStyle].fill == GR_STCROSS)) { /* draw the outline */ plotPixRect(&tileArea, 1, curStyle); } @@ -584,7 +584,7 @@ plotPixTile(tile, cxp) plotFillPixRaster(pixRasterSwath, &swathArea, curStyle, -1); return 0; } - + /* * ---------------------------------------------------------------------------- * @@ -713,12 +713,12 @@ plotPixLabel(scx, label) labelSize.r_xtop += point.p_x + 1; labelSize.r_ybot += point.p_y - 1; labelSize.r_ytop += point.p_y + 1; - PlotPixRasterText(pixRasterSwath, &swathClip, + PlotPixRasterText(pixRasterSwath, &swathClip, labelPixFont, label->lab_text, &point, STYLE_LABEL); return 0; } - + /* * ---------------------------------------------------------------------------- * @@ -765,7 +765,7 @@ plotPixCell(scx) point.p_x -= (textSize.r_xtop + textSize.r_xbot)/2; point.p_y = (2*swathArea.r_ytop + swathArea.r_ybot)/3; point.p_y -= (textSize.r_ytop + textSize.r_ybot)/2; - PlotPixRasterText(pixRasterSwath, &swathClip, + PlotPixRasterText(pixRasterSwath, &swathClip, cellNamePixFont, def->cd_name, &point, STYLE_BBOX); (void) DBPrintUseId(scx, idName, 100, TRUE); @@ -774,12 +774,12 @@ plotPixCell(scx) point.p_x -= (textSize.r_xtop + textSize.r_xbot)/2; point.p_y = (swathArea.r_ytop + 2*swathArea.r_ybot)/3; point.p_y -= (textSize.r_ytop + textSize.r_ybot)/2; - PlotPixRasterText(pixRasterSwath, &swathClip, + PlotPixRasterText(pixRasterSwath, &swathClip, cellIdPixFont, idName, &point, STYLE_BBOX); return 0; } - + /* * ---------------------------------------------------------------------------- * @@ -976,7 +976,7 @@ PlotPixels(scx, layers, xMask, width) swathY = swathsDown * PlotPixHeight; PlotClearPixRaster(pixRasterSwath, (Rect *) NULL); - + /* Compute the area of the swath that overlaps the portion of * the layout we're plotting. */ @@ -1072,7 +1072,7 @@ PlotPixels(scx, layers, xMask, width) } - + /* * ---------------------------------------------------------------------------- * @@ -1102,7 +1102,7 @@ PlotNewPixRaster(height, width) new->pix_pixels = (char *) mallocMagic((unsigned) (height * width)); return new; } - + /* * ---------------------------------------------------------------------------- * @@ -1129,7 +1129,7 @@ PixRaster *pr; /* PixRaster whose memory is to be freed. freeMagic((char *) pr->pix_pixels); freeMagic((char *) pr); } - + /* * ---------------------------------------------------------------------------- * @@ -1186,14 +1186,14 @@ Rect *area; /* Area to be cleared, in PixRaster right += pr->pix_width; } } - + /* * ---------------------------------------------------------------------------- * * plotFillPixRaster -- * * Given a PixRaster and an area, this procedure renders the given area - * of the PixRaster with a particular stipple pattern or other + * of the PixRaster with a particular stipple pattern or other * appropriate style. * * Results: @@ -1223,7 +1223,7 @@ PixRaster *pr; /* Pointer to PixRaster whose bits are int line; char *right; int curStipple, curColor, curMask; /* local copies so we don't have to - * continually indirect through + * continually indirect through * GrStyleTable */ Rect r; /* for passing to plotPixLine */ @@ -1257,12 +1257,12 @@ PixRaster *pr; /* Pointer to PixRaster whose bits are /* * now select the appropriate rendering style * and render the area. If we were passed a non-negative fill argument, - * let it override the fill mode from GrStyleTable. Otherwise, use the + * let it override the fill mode from GrStyleTable. Otherwise, use the * mode from the table. This is so we can make solid areas in STYLE_LABEL, * for example, instead of getting the arms of the crosses hollow. */ - if (fill < 0) + if (fill < 0) fill = GrStyleTable[style].fill; switch (fill) @@ -1285,7 +1285,7 @@ PixRaster *pr; /* Pointer to PixRaster whose bits are /* select "line" of stipple pattern and AND it with the bitmask * for the bit in the line - * x&07 == x % 8 and is faster + * x&07 == x % 8 and is faster */ if(GrStippleTable[curStipple][line&07] & @@ -1319,7 +1319,7 @@ PixRaster *pr; /* Pointer to PixRaster whose bits are break; } } - + /* * ---------------------------------------------------------------------------- * @@ -1372,7 +1372,7 @@ PlotDumpPixRaster(pr, file) } return 0; } - + /* * ---------------------------------------------------------------------------- * @@ -1406,13 +1406,13 @@ PlotPixRasterText(raster, clip, font, string, point, style) * the raster, but only raster points inside * the area will be modified. */ - int style; /* style for the text to be rendered in -- + int style; /* style for the text to be rendered in -- * used only for the correct color. */ { int xOrig; /* X-origin for current character. */ int color; - + color = GrStyleTable[style].color; /* Outer loop: process each character. */ @@ -1434,7 +1434,7 @@ PlotPixRasterText(raster, clip, font, string, point, style) * time, from top to bottom. Skip rows that are outside the * area of the raster. */ - + d = &font->fo_chars[*string]; cBytesPerLine = (d->left + d->right + 7) >> 3; for (i = 0; i < d->up + d->down; i++) @@ -1451,7 +1451,7 @@ PlotPixRasterText(raster, clip, font, string, point, style) * to skip areas that fall outside the raster to the * left or right. */ - + for (j = -d->left, charBitPtr = font->fo_bits + d->addr + i*cBytesPerLine; j < d->right; diff --git a/plot/plotRutils.c b/plot/plotRutils.c index 64e72de9..821567a5 100644 --- a/plot/plotRutils.c +++ b/plot/plotRutils.c @@ -7,16 +7,16 @@ * the procedures draw stippled areas and raster-ize text strings * using fonts. * - * ********************************************************************* - * * Copyright (C) 1985, 1990 Regents of the University of California. * - * * Permission to use, copy, modify, and distribute this * - * * software and its documentation for any purpose and without * - * * fee is hereby granted, provided that the above copyright * - * * notice appear in all copies. The University of California * - * * makes no representations about the suitability of this * - * * software for any purpose. It is provided "as is" without * - * * express or implied warranty. Export of this software outside * - * * of the United States of America may require an export license. * + * ********************************************************************* + * * Copyright (C) 1985, 1990 Regents of the University of California. * + * * Permission to use, copy, modify, and distribute this * + * * software and its documentation for any purpose and without * + * * fee is hereby granted, provided that the above copyright * + * * notice appear in all copies. The University of California * + * * makes no representations about the suitability of this * + * * software for any purpose. It is provided "as is" without * + * * express or implied warranty. Export of this software outside * + * * of the United States of America may require an export license. * * ********************************************************************* */ @@ -103,7 +103,7 @@ static unsigned int singleBit[32] = RasterFont *PlotFontList; /* Linked list of all fonts that have * been read in so far. */ - + /* * ---------------------------------------------------------------------------- * @@ -135,7 +135,7 @@ PlotRastInit() } #endif /* WORDS_BIGENDIAN */ } - + /* * ---------------------------------------------------------------------------- * @@ -173,7 +173,7 @@ PlotNewRaster(height, width) return new; } - + /* * ---------------------------------------------------------------------------- * @@ -200,7 +200,7 @@ PlotFreeRaster(raster) freeMagic((char *) raster->ras_bits); freeMagic((char *) raster); } - + /* * ---------------------------------------------------------------------------- * @@ -239,7 +239,7 @@ PlotClearRaster(raster, area) * to be cleared, and the rightmost word in the topmost line to * be cleared. */ - + left = raster->ras_bits + ((raster->ras_height-1) - area->r_ytop)*raster->ras_intsPerLine; right = left + area->r_xtop/32; @@ -253,12 +253,12 @@ PlotClearRaster(raster, area) * words will be cleared. There's a special case when the left * and right ends are in the same word. */ - + leftMask = rightBits[area->r_xbot&037]; rightMask = leftBits[area->r_xtop&037]; if (left == right) leftMask &= rightMask; - + /* Clear the area one raster line at a time, top to bottom. */ for (line = area->r_ytop; line >= area->r_ybot; line -= 1) @@ -273,7 +273,7 @@ PlotClearRaster(raster, area) for (cur = left+1; cur < right; cur += 1) *cur = 0; - + /* Clear the rightmost word on this line. */ *cur &= ~rightMask; @@ -332,7 +332,7 @@ PlotPolyRaster(raster, tileArea, clipArea, dinfo, stipple) /* Ensure that we have not been clipped out of existence */ if (area.r_xbot > area.r_xtop) return; if (area.r_ybot >= area.r_ytop) return; - + rasleft = raster->ras_bits + ((raster->ras_height-1) - area.r_ytop)*raster->ras_intsPerLine; width = tileArea->r_xtop - tileArea->r_xbot; @@ -368,7 +368,7 @@ PlotPolyRaster(raster, tileArea, clipArea, dinfo, stipple) { if (dinfo & TT_DIRECTION) locright = tileArea->r_xbot + (((tileArea->r_ytop - line) * width) - / height); + / height); else locright = tileArea->r_xbot + (((line - tileArea->r_ybot) * width) / height); @@ -381,7 +381,7 @@ PlotPolyRaster(raster, tileArea, clipArea, dinfo, stipple) rightMask = leftBits[locright & 037]; if (left == right) leftMask &= rightMask; - + curStipple = stipple[(-line)&017]; /* Fill the leftmost word on this line. */ @@ -394,7 +394,7 @@ PlotPolyRaster(raster, tileArea, clipArea, dinfo, stipple) for (cur = left+1; cur < right; cur += 1) *cur |= curStipple; - + /* Fill the rightmost word on this line. */ *cur |= curStipple & rightMask; @@ -445,7 +445,7 @@ PlotFillRaster(raster, area, stipple) * to be filled, and the rightmost word in the topmost line to * be filled. */ - + left = raster->ras_bits + ((raster->ras_height-1) - area->r_ytop)*raster->ras_intsPerLine; right = left + area->r_xtop/32; @@ -459,12 +459,12 @@ PlotFillRaster(raster, area, stipple) * words will be modified. There's a special case when the left * and right ends are in the same word. */ - + leftMask = rightBits[area->r_xbot&037]; rightMask = leftBits[area->r_xtop&037]; if (left == right) leftMask &= rightMask; - + /* Process the stippled area one raster line at a time, top to bottom. */ for (line = area->r_ytop; line >= area->r_ybot; line -= 1) @@ -481,7 +481,7 @@ PlotFillRaster(raster, area, stipple) for (cur = left+1; cur < right; cur += 1) *cur |= curStipple; - + /* Fill the rightmost word on this line. */ *cur |= curStipple & rightMask; @@ -491,7 +491,7 @@ PlotFillRaster(raster, area, stipple) right += raster->ras_intsPerLine; } } - + /* * ---------------------------------------------------------------------------- * @@ -529,7 +529,7 @@ PlotDumpRaster(raster, file) rasFileByteCount += count; return 0; } - + /* * ---------------------------------------------------------------------------- * @@ -595,7 +595,7 @@ PlotLoadFont(name) new->fo_hdr.maxx = (PlotSwapShort(new->fo_hdr.maxx)); new->fo_hdr.maxy = (PlotSwapShort(new->fo_hdr.maxy)); new->fo_hdr.xtend = (PlotSwapShort(new->fo_hdr.xtend)); - } + } else if (new->fo_hdr.magic != 0436) { TxError("Bad magic number in font file \"%s\".\n", name); @@ -644,7 +644,7 @@ PlotLoadFont(name) TxError("Character 'd' in font '%s' is at addr 0x%x, bytes %d, width %d\n", new->fo_name, d->addr, d->nbytes, d->width); count = 0; - for (fontcp = new->fo_bits + d->addr; + for (fontcp = new->fo_bits + d->addr; fontcp < new->fo_bits + d->addr + d->nbytes; fontcp++) { int i; @@ -673,7 +673,7 @@ PlotLoadFont(name) PlotFontList = new; return new; } - + /* * ---------------------------------------------------------------------------- * @@ -705,7 +705,7 @@ PlotTextSize(font, string, area) area->r_xbot = area->r_xtop = 0; area->r_ybot = area->r_ytop = 0; x = 0; - + for ( ; *string != 0; string ++) { if ((*string == ' ') || (*string == '\t')) @@ -724,7 +724,7 @@ PlotTextSize(font, string, area) } area->r_ybot = -area->r_ybot; } - + /* * ---------------------------------------------------------------------------- * @@ -761,7 +761,7 @@ PlotRasterText(raster, clip, font, string, point) { int xOrig; /* X-origin for current character. */ - + /* Outer loop: process each character. */ xOrig = point->p_x; @@ -782,7 +782,7 @@ PlotRasterText(raster, clip, font, string, point) * time, from top to bottom. Skip rows that are outside the * area of the raster. */ - + d = &font->fo_chars[*string]; cBytesPerLine = (d->left + d->right + 7) >> 3; for (i = 0; i < d->up + d->down; i++) @@ -799,7 +799,7 @@ PlotRasterText(raster, clip, font, string, point) * to skip areas that fall outside the raster to the * left or right. */ - + for (j = -d->left, charBitPtr = font->fo_bits + d->addr + i*cBytesPerLine; j < d->right; @@ -823,7 +823,7 @@ PlotRasterText(raster, clip, font, string, point) * may be off the edge of the raster, in which case * it must be skipped. */ - + if (x >= 0) *rPtr |= charBits >> (x & 0x7); rPtr += 1; @@ -838,7 +838,7 @@ PlotRasterText(raster, clip, font, string, point) xOrig += d->width; } } - + /* * ---------------------------------------------------------------------------- * @@ -871,7 +871,7 @@ PlotRastPoint(raster, x, y) raster->ras_bits[((y*raster->ras_intsPerLine) + (x>>5))] |= singleBit[x&037]; } - + /* * ---------------------------------------------------------------------------- * @@ -968,7 +968,7 @@ PlotRastLine(raster, src, dst) } PlotRastPoint(raster, x, y); } - + /* * ---------------------------------------------------------------------------- * @@ -1039,7 +1039,7 @@ PlotRastFatLine(raster, src, dst, widen) PlotRastLine(raster, &newSrc, &newDst); } } - + /* * ---------------------------------------------------------------------------- * @@ -1096,7 +1096,7 @@ PlotSwapShort(value) } - + /* * ---------------------------------------------------------------------------- * @@ -1105,13 +1105,13 @@ PlotSwapShort(value) * Dump a color preamble in vdmpc format for the color Versatec. See * the vdmpc(5) man page for details on the format. * - * Format: + * Format: * preamble is a 1K block * first word is 0xA5CF4DFB (a magic number) * second word gives the number of scan lines * third word gives width of the plot in pixels (must be multiple of 8) * rest of the words are zero - * + * * ---------------------------------------------------------------------------- */ @@ -1121,7 +1121,7 @@ unsigned int VersHeader[VERSATEC_BLOCK/sizeof(unsigned int)] = {VERSATEC_MAGIC_W int PlotDumpColorPreamble(color, file, lines, columns) - VersatecColor color; /* The color that the following raster will + VersatecColor color; /* The color that the following raster will * be printed in. */ FILE *file; /* file in which to place header */ diff --git a/plot/plotVers.c b/plot/plotVers.c index 8b797552..1892b198 100644 --- a/plot/plotVers.c +++ b/plot/plotVers.c @@ -4,16 +4,16 @@ * This file contains the procedures that generate plots on * Versatec-style black-and-white printers. * - * ********************************************************************* - * * Copyright (C) 1985, 1990 Regents of the University of California. * - * * Permission to use, copy, modify, and distribute this * - * * software and its documentation for any purpose and without * - * * fee is hereby granted, provided that the above copyright * - * * notice appear in all copies. The University of California * - * * makes no representations about the suitability of this * - * * software for any purpose. It is provided "as is" without * - * * express or implied warranty. Export of this software outside * - * * of the United States of America may require an export license. * + * ********************************************************************* + * * Copyright (C) 1985, 1990 Regents of the University of California. * + * * Permission to use, copy, modify, and distribute this * + * * software and its documentation for any purpose and without * + * * fee is hereby granted, provided that the above copyright * + * * notice appear in all copies. The University of California * + * * makes no representations about the suitability of this * + * * software for any purpose. It is provided "as is" without * + * * express or implied warranty. Export of this software outside * + * * of the United States of America may require an export license. * * ********************************************************************* */ @@ -45,8 +45,8 @@ static char rcsid[] __attribute__ ((unused)) = "$Header: /usr/cvsroot/magic-8.0/ /* Library imports: */ -extern int rasFileByteCount; - +extern int rasFileByteCount; + /* Records of the following type are used to describe how to generate * output for the mask layers. Each style describes a particular * stipple pattern. @@ -186,7 +186,7 @@ static RasterFont *cellNameFont; /* Font to use when rendering cell names. */ static RasterFont *cellIdFont; /* Font to use when rendering cell ids. */ #endif /* VERSATEC */ - + /* * ---------------------------------------------------------------------------- * PlotVersTechInit -- @@ -237,7 +237,7 @@ PlotVersTechInit() #endif /* VERSATEC */ - + /* * ---------------------------------------------------------------------------- * PlotColorVersTechInit -- @@ -288,7 +288,7 @@ PlotColorVersTechInit() #endif /* VERSATEC */ - + /* * ---------------------------------------------------------------------------- * PlotVersTechLine -- @@ -516,7 +516,7 @@ plotTransToSwath(src, dst) dst->r_ybot = (((src->r_ybot - plotLL.p_y)*scale) >> scaleShift) - swathY; dst->r_ytop = (((src->r_ytop - plotLL.p_y)*scale) >> scaleShift) - swathY; } - + /* * ---------------------------------------------------------------------------- * @@ -563,7 +563,7 @@ plotVersLine(area, widen, raster) else PlotRastFatLine(raster, &swathArea.r_ll, &swathArea.r_ur, widen); } - + /* * ---------------------------------------------------------------------------- * @@ -632,7 +632,7 @@ plotVersRect(area, widen, raster) } } } - + /* * ---------------------------------------------------------------------------- * @@ -662,13 +662,13 @@ plotVersTile(tile, cxp) Raster *raster = (Raster *)cxp->tc_filter->tf_arg; /* Transform tile coords to root coords and then to swath coords. */ - + TITORECT(tile, &tileArea); GEOTRANSRECT(trans, &tileArea, &rootArea); plotTransToSwath(&rootArea, &swathArea); /* Handle X'ed things specially. */ - + if (curStyle->vs_flags & VS_CROSS) { if (!IsSplit(tile)) @@ -726,7 +726,7 @@ plotVersTile(tile, cxp) * have the wrong types. First, search the tile's bottom border * (unless it is at infinity). */ - + if (IsSplit(tile) && (!(SplitSide(tile) ^ SplitDirection(tile)))) goto searchleft; /* nothing on bottom of split */ @@ -819,7 +819,7 @@ searchright: } return 0; } - + /* * ---------------------------------------------------------------------------- * @@ -874,7 +874,7 @@ plotVersLabel(scx, label, tpath, raster) point.p_y = (swathArea.r_ytop + swathArea.r_ybot)/2; point.p_y -= (labelSize.r_ytop + labelSize.r_ybot)/2; break; - + case GEO_SOUTH: case GEO_SOUTHEAST: case GEO_SOUTHWEST: @@ -888,14 +888,14 @@ plotVersLabel(scx, label, tpath, raster) case GEO_SOUTHWEST: point.p_x = swathArea.r_xbot - crossSize - 2 - labelSize.r_xtop; break; - + case GEO_CENTER: case GEO_NORTH: case GEO_SOUTH: point.p_x = (swathArea.r_xtop + swathArea.r_xbot)/2; point.p_x -= (labelSize.r_xtop + labelSize.r_xbot)/2; break; - + case GEO_EAST: case GEO_NORTHEAST: case GEO_SOUTHEAST: @@ -907,7 +907,7 @@ plotVersLabel(scx, label, tpath, raster) * done depending on whether the label is a point, a line, or an * area. */ - + if ((rootArea.r_xbot == rootArea.r_xtop) && (rootArea.r_ybot == rootArea.r_ytop)) { @@ -954,7 +954,7 @@ plotVersLabel(scx, label, tpath, raster) return 0; } - + /* * ---------------------------------------------------------------------------- * @@ -976,7 +976,7 @@ int plotVersCell(scx, raster) SearchContext *scx; /* Describes cell whose bbox is to * be plotted. - */ + */ Raster *raster; /* Raster to write to */ { char idName[100]; @@ -1019,7 +1019,7 @@ plotVersCell(scx, raster) } return 0; } - + /* * ---------------------------------------------------------------------------- * @@ -1033,7 +1033,7 @@ plotVersCell(scx, raster) * versatec color plot file in straight color raster format. * * If PlotVersPlotType is HPGL2 or HPRTL, it will generate - * an HPRTL file for the supported HP plotters. + * an HPRTL file for the supported HP plotters. * * Results: * None. @@ -1071,7 +1071,7 @@ PlotVersatec(scx, layers, xMask, user_scale) static char *yesNo[] = {"no", "yes", NULL}; int dotsAcross, dotsDown, swathsDown, scaleDown; int mag_width; /* lambda */ - float width; /* inches */ + float width; /* inches */ char fileName[200], command[300], answer[32]; float length, mBytes; Transform tinv; @@ -1093,7 +1093,7 @@ PlotVersatec(scx, layers, xMask, user_scale) /* Get conversion factor (internal units to inches) */ oscale = CIFGetOutputScale(1000); /* convert to microns */ oscale *= 3.937e-5; /* convert to inches */ - + /* Compute plot width from scalefactor */ mag_width = rootClip.r_xtop - rootClip.r_xbot; maxScale = ((float)PlotVersWidth / (float)PlotVersDotsPerInch) @@ -1146,7 +1146,7 @@ PlotVersatec(scx, layers, xMask, user_scale) length = dotsDown; length /= PlotVersDotsPerInch; TxPrintf("Plot will be %.1f inches wide by %.1f inches long.\n", width, length); - TxPrintf("It will take %.2f Megabytes in \"%s\".\n", + TxPrintf("It will take %.2f Megabytes in \"%s\".\n", (PlotVersPlotType == HPRTL || PlotVersPlotType == HPGL2) ? 4.0 * mBytes : mBytes, PlotTempDirectory); TxPrintf("Lambda: %.3f (um) Requested scale: %dX Actual scale: %dX " @@ -1167,7 +1167,7 @@ PlotVersatec(scx, layers, xMask, user_scale) * we don't already have one. If the swath size has changed, * recycle the raster for a new one. */ - + if ((raster != NULL) && ((raster->ras_width != PlotVersWidth) || (raster->ras_height != PlotVersSwathHeight))) { @@ -1196,7 +1196,7 @@ PlotVersatec(scx, layers, xMask, user_scale) /* Load font information for the plot, if it isn't already * loaded. */ - + labelFont = PlotLoadFont(PlotVersLabelFont); cellNameFont = PlotLoadFont(PlotVersNameFont); cellIdFont = PlotLoadFont(PlotVersIdFont); @@ -1239,7 +1239,7 @@ PlotVersatec(scx, layers, xMask, user_scale) /* Step down the page one swath at a time, rasterizing everything * that overlaps the current swath, then outputting the swath. */ - + GeoInvertTrans(&scx->scx_trans, &tinv); for (color = BLACK; color <= YELLOW; color++) { @@ -1257,7 +1257,7 @@ PlotVersatec(scx, layers, xMask, user_scale) case HPGL2: PlotHPGL2Header(PlotVersWidth, dotsDown, PlotVersDotsPerInch, usedScale, file); - break; + break; case VERSATEC_COLOR: if (PlotDumpColorPreamble(color, file, dotsDown, PlotVersWidth) != 0) goto error; @@ -1268,8 +1268,8 @@ PlotVersatec(scx, layers, xMask, user_scale) TxFlush(); break; } - for (swathsDownThisColor -= 1; - swathsDownThisColor >= 0; + for (swathsDownThisColor -= 1; + swathsDownThisColor >= 0; swathsDownThisColor -= 1) { SearchContext scx2; @@ -1288,7 +1288,7 @@ PlotVersatec(scx, layers, xMask, user_scale) /* Compute the area of the swath that overlaps the portion of * the layout we're plotting. */ - + plotTransToSwath(&rootClip, &swathClip); if (swathClip.r_xbot < 0) swathClip.r_xbot = 0; if (swathClip.r_ybot < 0) swathClip.r_ybot = 0; @@ -1307,7 +1307,7 @@ PlotVersatec(scx, layers, xMask, user_scale) * non-label stuff has to be expanded slightly, because lines * are drawn more than 1 pixel thick. */ - + scx2 = *scx; root.r_xbot = (scaleDown*swathClip.r_xbot)/scale + plotLL.p_x; root.r_xtop = (scaleDown*swathClip.r_xtop)/scale + plotLL.p_x; @@ -1331,7 +1331,7 @@ PlotVersatec(scx, layers, xMask, user_scale) } /* For each Versatec style, output stippled areas for all - * the tiles requested by the style. + * the tiles requested by the style. */ switch (PlotVersPlotType) @@ -1340,7 +1340,7 @@ PlotVersatec(scx, layers, xMask, user_scale) curStyle = plotVersStyles; break; case HPGL2: case HPRTL: - curStyle = plotColorVersStyles; + curStyle = plotColorVersStyles; if (curStyle == NULL) { TxError("Warning: No color versatec styles are defined" @@ -1349,13 +1349,13 @@ PlotVersatec(scx, layers, xMask, user_scale) } break; default: - curStyle = plotColorVersStyles; + curStyle = plotColorVersStyles; if (!haveColorMessage) { TxError("Warning: No color versatec styles are defined" " in the technology file!\nPlot will be" " monochrome.\n"); - haveColorMessage = TRUE; + haveColorMessage = TRUE; curStyle = plotVersStyles; } } diff --git a/plow/PlowCmd.c b/plow/PlowCmd.c index cc33ef38..4f1e7804 100644 --- a/plow/PlowCmd.c +++ b/plow/PlowCmd.c @@ -3,16 +3,16 @@ * * Commands for the plow module only. * - * ********************************************************************* - * * Copyright (C) 1985, 1990 Regents of the University of California. * - * * Permission to use, copy, modify, and distribute this * - * * software and its documentation for any purpose and without * - * * fee is hereby granted, provided that the above copyright * - * * notice appear in all copies. The University of California * - * * makes no representations about the suitability of this * - * * software for any purpose. It is provided "as is" without * - * * express or implied warranty. Export of this software outside * - * * of the United States of America may require an export license. * + * ********************************************************************* + * * Copyright (C) 1985, 1990 Regents of the University of California. * + * * Permission to use, copy, modify, and distribute this * + * * software and its documentation for any purpose and without * + * * fee is hereby granted, provided that the above copyright * + * * notice appear in all copies. The University of California * + * * makes no representations about the suitability of this * + * * software for any purpose. It is provided "as is" without * + * * express or implied warranty. Export of this software outside * + * * of the United States of America may require an export license. * * ********************************************************************* */ @@ -90,7 +90,7 @@ CmdPlow(w, cmd) MagWindow *window; Transform t; static char *cmdPlowOption[] = - { + { "boundary set boundary around area plowing may affect", "help print this help information", "horizon n set the horizon for jog introduction to n lambda", diff --git a/plow/PlowJogs.c b/plow/PlowJogs.c index a41ac351..3b85457a 100644 --- a/plow/PlowJogs.c +++ b/plow/PlowJogs.c @@ -3,16 +3,16 @@ * * Jog cleanup. * - * ********************************************************************* - * * Copyright (C) 1985, 1990 Regents of the University of California. * - * * Permission to use, copy, modify, and distribute this * - * * software and its documentation for any purpose and without * - * * fee is hereby granted, provided that the above copyright * - * * notice appear in all copies. The University of California * - * * makes no representations about the suitability of this * - * * software for any purpose. It is provided "as is" without * - * * express or implied warranty. Export of this software outside * - * * of the United States of America may require an export license. * + * ********************************************************************* + * * Copyright (C) 1985, 1990 Regents of the University of California. * + * * Permission to use, copy, modify, and distribute this * + * * software and its documentation for any purpose and without * + * * fee is hereby granted, provided that the above copyright * + * * notice appear in all copies. The University of California * + * * makes no representations about the suitability of this * + * * software for any purpose. It is provided "as is" without * + * * express or implied warranty. Export of this software outside * + * * of the United States of America may require an export license. * * ********************************************************************* */ @@ -75,7 +75,7 @@ int plowJogBotProc(); extern void plowProcessJog(); - + /* * ---------------------------------------------------------------------------- * @@ -139,7 +139,7 @@ plowCleanupJogs(area, changedArea) plowQueueDone(); *changedArea = plowJogChangedArea; } - + /* * ---------------------------------------------------------------------------- * @@ -197,7 +197,7 @@ plowProcessJog(edge, area) (void) plowSrShadowBack(edge->e_pNum, &r, DBAllButSpaceBits, plowJogPropagateLeft, (ClientData) NULL); } - + /* * ---------------------------------------------------------------------------- * @@ -229,7 +229,7 @@ plowJogPropagateLeft(edge) (void) plowQueueAdd(edge); return (0); } - + /* * ---------------------------------------------------------------------------- * @@ -397,7 +397,7 @@ plowProcessJogFunc(edge, area) plowJogEraseList = (LinkedRect *) NULL; return (ret); } - + /* * ---------------------------------------------------------------------------- * @@ -511,7 +511,7 @@ plowJogBotProc(outline) return (0); } - + /* * ---------------------------------------------------------------------------- * @@ -562,7 +562,7 @@ plowJogDragLHS(edge, newx) /* Keep going */ return (0); } - + /* * ---------------------------------------------------------------------------- * diff --git a/plow/PlowMain.c b/plow/PlowMain.c index 2a8b1105..e560c0ea 100644 --- a/plow/PlowMain.c +++ b/plow/PlowMain.c @@ -5,16 +5,16 @@ * Main loop: set everything up, and then repeatedly remove an * edge from the queue of pending edges and process it. * - * ********************************************************************* - * * Copyright (C) 1985, 1990 Regents of the University of California. * - * * Permission to use, copy, modify, and distribute this * - * * software and its documentation for any purpose and without * - * * fee is hereby granted, provided that the above copyright * - * * notice appear in all copies. The University of California * - * * makes no representations about the suitability of this * - * * software for any purpose. It is provided "as is" without * - * * express or implied warranty. Export of this software outside * - * * of the United States of America may require an export license. * + * ********************************************************************* + * * Copyright (C) 1985, 1990 Regents of the University of California. * + * * Permission to use, copy, modify, and distribute this * + * * software and its documentation for any purpose and without * + * * fee is hereby granted, provided that the above copyright * + * * notice appear in all copies. The University of California * + * * makes no representations about the suitability of this * + * * software for any purpose. It is provided "as is" without * + * * express or implied warranty. Export of this software outside * + * * of the United States of America may require an export license. * * ********************************************************************* */ @@ -165,7 +165,7 @@ extern void plowMoveEdge(); extern void plowMergeTop(); extern void plowYankCreate(); - + /* * ---------------------------------------------------------------------------- * @@ -211,7 +211,7 @@ PlowSetBound(def, area, rootDef, rootArea) /* Redisplay the highlight we just added */ DBWHLRedraw(rootDef, rootArea, FALSE); } - + /* * ---------------------------------------------------------------------------- * @@ -242,7 +242,7 @@ PlowClearBound() freeMagic((char *) pb); } } - + /* * ---------------------------------------------------------------------------- * @@ -304,7 +304,7 @@ plowBoundAlways1() { return 1; } - + /* * ---------------------------------------------------------------------------- * @@ -409,7 +409,7 @@ PlowStraighten(def, area, direction) DBWAreaChanged(def, &changedUserArea, DBW_ALLWINDOWS, &DBAllButSpaceBits); DRCCheckThis(def, TT_CHECKPAINT, &changedUserArea); } - + /* * ---------------------------------------------------------------------------- * @@ -462,7 +462,7 @@ PlowSelection(def, pdistance, direction) return (firstTime); } - + /* * ---------------------------------------------------------------------------- * @@ -531,7 +531,7 @@ Plow(def, userRect, layers, direction) #endif /* COUNTWIDTHCALLS */ return (firstTime); } - + /* * ---------------------------------------------------------------------------- * @@ -622,7 +622,7 @@ done: if (PlowDoStraighten && !SigInterruptPending) PlowStraighten(def, &changedUserArea, direction); } - + /* * ---------------------------------------------------------------------------- * @@ -788,7 +788,7 @@ plowPropagateRect(def, userRect, lc, changedArea) /* Successful plow */ return (FALSE); } - + /* * ---------------------------------------------------------------------------- * @@ -958,7 +958,7 @@ plowPropagateSel(def, pdistance, changedArea) /* Successful plow */ return (FALSE); } - + /* * ---------------------------------------------------------------------------- * @@ -1003,7 +1003,7 @@ plowSelCellBox(selUse, realUse, transform, pSelBox) GeoInclude(&realUse->cu_bbox, pSelBox); return (0); } - + /* * ---------------------------------------------------------------------------- * @@ -1070,7 +1070,7 @@ plowSelPaintAdd(edge) edge->e_flags = saveFlags; return (0); } - + /* * ---------------------------------------------------------------------------- * @@ -1131,7 +1131,7 @@ plowFindSelCell(yankUse, editUse) (void) plowQueueAdd(&edge); return (1); } - + /* * ---------------------------------------------------------------------------- * @@ -1292,7 +1292,7 @@ restartbot: (void) plowAtomize(edge->e_pNum, &r, plowQueueAdd, (ClientData) NULL); } } - + /* * ---------------------------------------------------------------------------- * @@ -1333,7 +1333,7 @@ plowSetTrans(direction) } GeoInvertTrans(&plowYankTrans, &plowInverseTrans); } - + /* * ---------------------------------------------------------------------------- * @@ -1396,7 +1396,7 @@ plowPastBoundary(def, edge, pmove) return (ret); } - + /* * ---------------------------------------------------------------------------- * @@ -1424,7 +1424,7 @@ plowInitialPaint(edge, xnew) (void) plowQueueAdd(edge); return (0); } - + /* * ---------------------------------------------------------------------------- * @@ -1477,7 +1477,7 @@ plowInitialCell(use, plowRect) return 0; } - + /* * ---------------------------------------------------------------------------- * @@ -1622,7 +1622,7 @@ worktodo: /* Update edge position */ plowMoveEdge(edge); } - + /* * ---------------------------------------------------------------------------- * @@ -1704,7 +1704,7 @@ plowApplySearchRules(edge) } return 0; } - + /* * ---------------------------------------------------------------------------- * @@ -1783,7 +1783,7 @@ retry: return (widthRuleList); } - + /* * ---------------------------------------------------------------------------- * @@ -1916,7 +1916,7 @@ plowMoveEdge(edge) if (DebugIsSet(plowDebugID, plowDebMove)) plowDebugEdge(edge, (RuleTableEntry *) NULL, "move"); } - + /* * ---------------------------------------------------------------------------- * @@ -1949,7 +1949,7 @@ plowSplitY(tp, y) return (newTile); } - + /* * ---------------------------------------------------------------------------- * @@ -2004,7 +2004,7 @@ plowMergeBottom(tp, plane) } } - + /* * ---------------------------------------------------------------------------- * @@ -2217,7 +2217,7 @@ plowInitRule(rtePtr, rteEnd, whichRules, proc, name, ltypes, rtypes) rtePtr->rte_ltypes = ltypes; rtePtr->rte_rtypes = rtypes; } - + /* * ---------------------------------------------------------------------------- * diff --git a/plow/PlowQueue.c b/plow/PlowQueue.c index 4e38dada..8af79a12 100644 --- a/plow/PlowQueue.c +++ b/plow/PlowQueue.c @@ -4,16 +4,16 @@ * Plowing. * Queue of edges to move. * - * ********************************************************************* - * * Copyright (C) 1985, 1990 Regents of the University of California. * - * * Permission to use, copy, modify, and distribute this * - * * software and its documentation for any purpose and without * - * * fee is hereby granted, provided that the above copyright * - * * notice appear in all copies. The University of California * - * * makes no representations about the suitability of this * - * * software for any purpose. It is provided "as is" without * - * * express or implied warranty. Export of this software outside * - * * of the United States of America may require an export license. * + * ********************************************************************* + * * Copyright (C) 1985, 1990 Regents of the University of California. * + * * Permission to use, copy, modify, and distribute this * + * * software and its documentation for any purpose and without * + * * fee is hereby granted, provided that the above copyright * + * * notice appear in all copies. The University of California * + * * makes no representations about the suitability of this * + * * software for any purpose. It is provided "as is" without * + * * express or implied warranty. Export of this software outside * + * * of the United States of America may require an export license. * * ********************************************************************* */ @@ -52,7 +52,7 @@ Edge **plowLastBin[NP]; /* Last bin that has any edges in it */ /* Debugging */ int plowTooFar; /* # times we reduced plow size */ - + /* * ---------------------------------------------------------------------------- * @@ -102,7 +102,7 @@ plowQueueInit(bbox, dist) *pptr++ = (Edge *) NULL; } } - + /* * ---------------------------------------------------------------------------- * @@ -130,7 +130,7 @@ plowQueueDone() freeMagic((char *) plowBinArray[pNum]); } } - + /* * ---------------------------------------------------------------------------- * @@ -436,7 +436,7 @@ prepend: done: return (0); } - + /* * ---------------------------------------------------------------------------- * @@ -511,7 +511,7 @@ plowQueueLeftmost(edge) freeMagic((char *) enew); return (TRUE); } - + /* * ---------------------------------------------------------------------------- * diff --git a/plow/PlowRandom.c b/plow/PlowRandom.c index cac28466..ccf2922d 100644 --- a/plow/PlowRandom.c +++ b/plow/PlowRandom.c @@ -7,16 +7,16 @@ * result that has the same extracted circuit (minus the * parasitics) as the initial cell. * - * ********************************************************************* - * * Copyright (C) 1985, 1990 Regents of the University of California. * - * * Permission to use, copy, modify, and distribute this * - * * software and its documentation for any purpose and without * - * * fee is hereby granted, provided that the above copyright * - * * notice appear in all copies. The University of California * - * * makes no representations about the suitability of this * - * * software for any purpose. It is provided "as is" without * - * * express or implied warranty. Export of this software outside * - * * of the United States of America may require an export license. * + * ********************************************************************* + * * Copyright (C) 1985, 1990 Regents of the University of California. * + * * Permission to use, copy, modify, and distribute this * + * * software and its documentation for any purpose and without * + * * fee is hereby granted, provided that the above copyright * + * * notice appear in all copies. The University of California * + * * makes no representations about the suitability of this * + * * software for any purpose. It is provided "as is" without * + * * express or implied warranty. Export of this software outside * + * * of the United States of America may require an export license. * * ********************************************************************* */ @@ -51,7 +51,7 @@ extern CellDef *plowYankDef; int plowFindFirstError(); void plowGenRect(); - + /* * ---------------------------------------------------------------------------- * @@ -161,7 +161,7 @@ PlowRandomTest(def) (void) unlink(tempExt); #endif /* notdef */ } - + /* * ---------------------------------------------------------------------------- * @@ -185,7 +185,7 @@ plowFindFirstError() { return (1); } - + /* * ---------------------------------------------------------------------------- * @@ -232,7 +232,7 @@ plowGenRect(bbox, r) r->r_ybot = temp; } } - + /* * ---------------------------------------------------------------------------- * @@ -263,7 +263,7 @@ plowGenRandom(lo, hi) return ((r % range) + lo); } - + /* * ---------------------------------------------------------------------------- * diff --git a/plow/PlowRules1.c b/plow/PlowRules1.c index 6ec045fe..4e0ba98c 100644 --- a/plow/PlowRules1.c +++ b/plow/PlowRules1.c @@ -4,16 +4,16 @@ * Plowing rules. * These are applied by plowProcessEdge() for each edge that is to be moved. * - * ********************************************************************* - * * Copyright (C) 1985, 1990 Regents of the University of California. * - * * Permission to use, copy, modify, and distribute this * - * * software and its documentation for any purpose and without * - * * fee is hereby granted, provided that the above copyright * - * * notice appear in all copies. The University of California * - * * makes no representations about the suitability of this * - * * software for any purpose. It is provided "as is" without * - * * express or implied warranty. Export of this software outside * - * * of the United States of America may require an export license. * + * ********************************************************************* + * * Copyright (C) 1985, 1990 Regents of the University of California. * + * * Permission to use, copy, modify, and distribute this * + * * software and its documentation for any purpose and without * + * * fee is hereby granted, provided that the above copyright * + * * notice appear in all copies. The University of California * + * * makes no representations about the suitability of this * + * * software for any purpose. It is provided "as is" without * + * * express or implied warranty. Export of this software outside * + * * of the United States of America may require an export license. * * ********************************************************************* */ @@ -41,7 +41,7 @@ int plowSliverBotExtent(), plowSliverBotMove(); int plowApplyRule(); int plowPenumbraRule(); bool plowSliverApplyRules(); - + /* * ---------------------------------------------------------------------------- * @@ -89,7 +89,7 @@ prClearUmbra(edge) (void) plowSrShadow(edge->e_pNum, &edge->e_rect, rhsTypes, plowApplyRule, (ClientData) &ar); } - + /* * ---------------------------------------------------------------------------- * @@ -141,7 +141,7 @@ prUmbra(edge, rules) pr->pr_oktypes, plowApplyRule, (ClientData) &ar); } } - + /* * ---------------------------------------------------------------------------- * @@ -262,7 +262,7 @@ prPenumbraBot(edge, rules) } return 0; } - + /* * ---------------------------------------------------------------------------- * @@ -456,7 +456,7 @@ plowPenumbraRule(impactedEdge, ar) return (0); } - + /* * ---------------------------------------------------------------------------- * @@ -586,7 +586,7 @@ prSliverBot(edge, rules) } return 0; } - + /* * ---------------------------------------------------------------------------- * @@ -681,7 +681,7 @@ plowSliverBotMove(outline, ar) /* Keep going */ return (0); } - + /* * ---------------------------------------------------------------------------- * @@ -922,7 +922,7 @@ plowSliverBotExtent(outline, ar) ar->ar_mustmove = xmove; return (ret); } - + /* * ---------------------------------------------------------------------------- * @@ -973,7 +973,7 @@ plowSliverApplyRules(ar, far, farDist) return (TRUE); return (FALSE); } - + /* * ---------------------------------------------------------------------------- * diff --git a/plow/PlowRules2.c b/plow/PlowRules2.c index 2748ae96..0a172d81 100644 --- a/plow/PlowRules2.c +++ b/plow/PlowRules2.c @@ -4,16 +4,16 @@ * Plowing rules. * These are applied by plowProcessEdge() for each edge that is to be moved. * - * ********************************************************************* - * * Copyright (C) 1985, 1990 Regents of the University of California. * - * * Permission to use, copy, modify, and distribute this * - * * software and its documentation for any purpose and without * - * * fee is hereby granted, provided that the above copyright * - * * notice appear in all copies. The University of California * - * * makes no representations about the suitability of this * - * * software for any purpose. It is provided "as is" without * - * * express or implied warranty. Export of this software outside * - * * of the United States of America may require an export license. * + * ********************************************************************* + * * Copyright (C) 1985, 1990 Regents of the University of California. * + * * Permission to use, copy, modify, and distribute this * + * * software and its documentation for any purpose and without * + * * fee is hereby granted, provided that the above copyright * + * * notice appear in all copies. The University of California * + * * makes no representations about the suitability of this * + * * software for any purpose. It is provided "as is" without * + * * express or implied warranty. Export of this software outside * + * * of the United States of America may require an export license. * * ********************************************************************* */ @@ -42,7 +42,7 @@ int plowCellDragPaint(), plowCellPushPaint(); int plowCoverTopProc(), plowCoverBotProc(); int plowIllegalTopProc(), plowIllegalBotProc(); int plowDragEdgeProc(); - + /* * ---------------------------------------------------------------------------- * @@ -170,7 +170,7 @@ restart: } return 0; } - + /* * ---------------------------------------------------------------------------- * @@ -266,7 +266,7 @@ prFixedPenumbraBot(edge) } return 0; } - + /* * ---------------------------------------------------------------------------- * @@ -322,7 +322,7 @@ restart: plowDragEdgeProc, (ClientData) edge); } } - + /* * ---------------------------------------------------------------------------- * @@ -391,7 +391,7 @@ plowDragEdgeProc(lhsEdge, movingEdge) return (0); } - + /* * ---------------------------------------------------------------------------- * @@ -445,7 +445,7 @@ prContactRHS(edge) plowPropagateProcPtr, (ClientData) NULL); return 0; } - + /* * ---------------------------------------------------------------------------- * @@ -542,7 +542,7 @@ prCoverBot(edge) } return 0; } - + /* * ---------------------------------------------------------------------------- * @@ -619,7 +619,7 @@ prIllegalBot(edge) plowCoverBotProc, (ClientData) &ar); return 0; } - + /* * ---------------------------------------------------------------------------- * @@ -712,7 +712,7 @@ plowCoverBotProc(outline, ar) return (ret); } - + /* * ---------------------------------------------------------------------------- * @@ -834,7 +834,7 @@ found_bad: ar->ar_clip.p_y = movingEdge->e_ybot - width; return (1); } - + /* * ---------------------------------------------------------------------------- * @@ -869,7 +869,7 @@ prFindCells(edge) (void) DBSrCellPlaneArea(cellPlane, &searchArea, plowFoundCell, (ClientData) &ar); } - + /* * ---------------------------------------------------------------------------- * @@ -939,7 +939,7 @@ prCell(edge) &cellArea, plowFoundCell, (ClientData) &ar); } - + /* * ---------------------------------------------------------------------------- * @@ -993,7 +993,7 @@ plowCellDragPaint(tile, ar) return (0); } - + /* * ---------------------------------------------------------------------------- * @@ -1035,7 +1035,7 @@ plowCellPushPaint(impactedEdge, ar) return (0); } - + /* * ---------------------------------------------------------------------------- * diff --git a/plow/PlowRules3.c b/plow/PlowRules3.c index 657a6c67..0001171a 100644 --- a/plow/PlowRules3.c +++ b/plow/PlowRules3.c @@ -4,16 +4,16 @@ * Plowing rules: new sliver-avoidance rules. * These are applied by plowProcessEdge() for each edge that is to be moved. * - * ********************************************************************* - * * Copyright (C) 1985, 1990 Regents of the University of California. * - * * Permission to use, copy, modify, and distribute this * - * * software and its documentation for any purpose and without * - * * fee is hereby granted, provided that the above copyright * - * * notice appear in all copies. The University of California * - * * makes no representations about the suitability of this * - * * software for any purpose. It is provided "as is" without * - * * express or implied warranty. Export of this software outside * - * * of the United States of America may require an export license. * + * ********************************************************************* + * * Copyright (C) 1985, 1990 Regents of the University of California. * + * * Permission to use, copy, modify, and distribute this * + * * software and its documentation for any purpose and without * + * * fee is hereby granted, provided that the above copyright * + * * notice appear in all copies. The University of California * + * * makes no representations about the suitability of this * + * * software for any purpose. It is provided "as is" without * + * * express or implied warranty. Export of this software outside * + * * of the United States of America may require an export license. * * ********************************************************************* */ @@ -54,7 +54,7 @@ struct inarg int ina_incursion; /* Height of biggest DRC error */ bool ina_cantMove; /* TRUE if couldn't fix some error */ }; - + /* * ---------------------------------------------------------------------------- * diff --git a/plow/PlowSearch.c b/plow/PlowSearch.c index c4897e32..af4b6e85 100644 --- a/plow/PlowSearch.c +++ b/plow/PlowSearch.c @@ -4,16 +4,16 @@ * Plowing. * Shadow and other searches. * - * ********************************************************************* - * * Copyright (C) 1985, 1990 Regents of the University of California. * - * * Permission to use, copy, modify, and distribute this * - * * software and its documentation for any purpose and without * - * * fee is hereby granted, provided that the above copyright * - * * notice appear in all copies. The University of California * - * * makes no representations about the suitability of this * - * * software for any purpose. It is provided "as is" without * - * * express or implied warranty. Export of this software outside * - * * of the United States of America may require an export license. * + * ********************************************************************* + * * Copyright (C) 1985, 1990 Regents of the University of California. * + * * Permission to use, copy, modify, and distribute this * + * * software and its documentation for any purpose and without * + * * fee is hereby granted, provided that the above copyright * + * * notice appear in all copies. The University of California * + * * makes no representations about the suitability of this * + * * software for any purpose. It is provided "as is" without * + * * express or implied warranty. Export of this software outside * + * * of the United States of America may require an export license. * * ********************************************************************* */ @@ -162,7 +162,7 @@ switch ((o)->o_nextDir) \ break; \ } \ } - + /* * ---------------------------------------------------------------------------- * @@ -256,7 +256,7 @@ plowSrShadow(pNum, area, okTypes, proc, cdata) plane->pl_hint = tp; return (ret); } - + /* * ---------------------------------------------------------------------------- * @@ -333,7 +333,7 @@ plowShadowRHS(tp, s, bottomLeft) return (0); } - + /* * ---------------------------------------------------------------------------- * @@ -409,7 +409,7 @@ plowSrShadowInitial(pNum, area, okTypes, proc, cdata) plane->pl_hint = tp; return (ret); } - + /* * ---------------------------------------------------------------------------- * @@ -489,7 +489,7 @@ plowShadowInitialRHS(tp, s, bottomLeft) return (0); } - + /* * ---------------------------------------------------------------------------- * @@ -566,7 +566,7 @@ plowSrShadowBack(pNum, area, okTypes, proc, cdata) if (!ret) plane->pl_hint = tp; return (ret); } - + /* * ---------------------------------------------------------------------------- * @@ -643,7 +643,7 @@ plowShadowLHS(tp, s, topRight) return (0); } - + /* * ---------------------------------------------------------------------------- * @@ -729,7 +729,7 @@ plowAtomize(pNum, rect, proc, cdata) return (0); } - + /* * ---------------------------------------------------------------------------- * @@ -856,7 +856,7 @@ plowSrOutline(pNum, startPoint, insideTypes, initialDir, dirMask, proc, cdata) while (STACKPOP(plowOutlineStack) != (ClientData) NULL) /* Nothing */; } - + /* * ---------------------------------------------------------------------------- * @@ -1028,7 +1028,7 @@ plowSrOutlineInit(outline) STACKOUTLINE(outline); } - + /* * ---------------------------------------------------------------------------- * diff --git a/plow/PlowTech.c b/plow/PlowTech.c index a3e98046..79c8d8d9 100644 --- a/plow/PlowTech.c +++ b/plow/PlowTech.c @@ -5,16 +5,16 @@ * Read the "drc" section of the technology file and construct the * design rules used by plowing. * - * ********************************************************************* - * * Copyright (C) 1985, 1990 Regents of the University of California. * - * * Permission to use, copy, modify, and distribute this * - * * software and its documentation for any purpose and without * - * * fee is hereby granted, provided that the above copyright * - * * notice appear in all copies. The University of California * - * * makes no representations about the suitability of this * - * * software for any purpose. It is provided "as is" without * - * * express or implied warranty. Export of this software outside * - * * of the United States of America may require an export license. * + * ********************************************************************* + * * Copyright (C) 1985, 1990 Regents of the University of California. * + * * Permission to use, copy, modify, and distribute this * + * * software and its documentation for any purpose and without * + * * fee is hereby granted, provided that the above copyright * + * * notice appear in all copies. The University of California * + * * makes no representations about the suitability of this * + * * software for any purpose. It is provided "as is" without * + * * express or implied warranty. Export of this software outside * + * * of the United States of America may require an export license. * * ********************************************************************* */ @@ -125,7 +125,7 @@ PlowDRCInit() { for (pr = plowWidthRulesTbl[i][j]; pr; pr = pr->pr_next) freeMagic((char *)pr); - + for (pr = plowSpacingRulesTbl[i][j]; pr; pr = pr->pr_next) freeMagic((char *)pr); @@ -134,7 +134,7 @@ PlowDRCInit() } } } - + /* * ---------------------------------------------------------------------------- * @@ -199,7 +199,7 @@ PlowDRCLine(sectionName, argc, argv) return (TRUE); } - + /* * ---------------------------------------------------------------------------- * @@ -274,7 +274,7 @@ plowWidthRule(argc, argv) } return 0; } - + /* * ---------------------------------------------------------------------------- * @@ -409,7 +409,7 @@ plowSpacingRule(argc, argv) } return 0; } - + /* * ---------------------------------------------------------------------------- * @@ -603,7 +603,7 @@ plowEdgeRule(argc, argv) } return 0; } - + /* * ---------------------------------------------------------------------------- * @@ -733,7 +733,7 @@ next: ; return (ruleList); } - + /* * ---------------------------------------------------------------------------- * @@ -762,7 +762,7 @@ PlowTechInit() PlowDragTypes = DBZeroTypeBits; } - + /* * ---------------------------------------------------------------------------- * @@ -840,7 +840,7 @@ PlowTechLine(sectionName, argc, argv) } return (TRUE); } - + /* * ---------------------------------------------------------------------------- * @@ -874,7 +874,7 @@ PlowTechFinal() /* * ---------------------------------------------------------------------------- - * + * * plowScaleUp --- * * Scale all plow distances according to the current DRC scale factor. @@ -898,7 +898,7 @@ void plowScaleUp(PlowRule *pr, int scalefactor) /* * ---------------------------------------------------------------------------- - * + * * plowScaleDown --- * * Scale all plow distances according to the current DRC scale factor. @@ -962,7 +962,7 @@ DRCPlowScale(int scaled, int scalen, bool adjustmax) } } - + /* * ---------------------------------------------------------------------------- * diff --git a/plow/PlowTest.c b/plow/PlowTest.c index c02e94c2..9da0b126 100644 --- a/plow/PlowTest.c +++ b/plow/PlowTest.c @@ -4,16 +4,16 @@ * Plowing. * Debugging and testing. * - * ********************************************************************* - * * Copyright (C) 1985, 1990 Regents of the University of California. * - * * Permission to use, copy, modify, and distribute this * - * * software and its documentation for any purpose and without * - * * fee is hereby granted, provided that the above copyright * - * * notice appear in all copies. The University of California * - * * makes no representations about the suitability of this * - * * software for any purpose. It is provided "as is" without * - * * express or implied warranty. Export of this software outside * - * * of the United States of America may require an export license. * + * ********************************************************************* + * * Copyright (C) 1985, 1990 Regents of the University of California. * + * * Permission to use, copy, modify, and distribute this * + * * software and its documentation for any purpose and without * + * * fee is hereby granted, provided that the above copyright * + * * notice appear in all copies. The University of California * + * * makes no representations about the suitability of this * + * * software for any purpose. It is provided "as is" without * + * * express or implied warranty. Export of this software outside * + * * of the United States of America may require an export license. * * ********************************************************************* */ @@ -70,7 +70,7 @@ Point plowWhenTopPoint, plowWhenBotPoint; /* Imports */ extern CellDef *plowSpareDef; - + /* * ---------------------------------------------------------------------------- * @@ -389,7 +389,7 @@ PlowTest(w, cmd) break; } } - + /* * ---------------------------------------------------------------------------- * @@ -431,7 +431,7 @@ plowGetCommand(cmd) return (plowCmds[plowIndex].p_cmd); } - + /* * ---------------------------------------------------------------------------- * @@ -472,7 +472,7 @@ plowDebugInit() for (n = 0; debug[n].di_name; n++) *(debug[n].di_id) = DebugAddFlag(plowDebugID, debug[n].di_name); } - + /* * ---------------------------------------------------------------------------- * @@ -508,7 +508,7 @@ plowShowShadow(edge, def) edgeArea.r_ytop = edge->e_ytop * scaleFactor; DBWFeedbackAdd(&edgeArea, mesg, def, scaleFactor, STYLE_SOLIDHIGHLIGHTS); } - + /* * ---------------------------------------------------------------------------- * @@ -582,7 +582,7 @@ plowTestJog(def, area) DBWAreaChanged(def, area, DBW_ALLWINDOWS, &DBAllButSpaceBits); DRCCheckThis(def, TT_CHECKPAINT, area); } - + /* * ---------------------------------------------------------------------------- * @@ -657,7 +657,7 @@ plowDebugEdge(edge, rtePtr, mesg) DBWFeedbackClear(NULL); WindUpdate(); } - + /* * ---------------------------------------------------------------------------- * @@ -693,7 +693,7 @@ again: goto again; } } - + /* * ---------------------------------------------------------------------------- * @@ -789,7 +789,7 @@ plowShowOutline(outline, clipArea) return (0); } - + /* * ---------------------------------------------------------------------------- * diff --git a/plow/PlowWidth.c b/plow/PlowWidth.c index bbc2c398..99e98c5e 100644 --- a/plow/PlowWidth.c +++ b/plow/PlowWidth.c @@ -4,16 +4,16 @@ * Plowing. * Determine the true minimum width of a piece of geometry. * - * ********************************************************************* - * * Copyright (C) 1985, 1990 Regents of the University of California. * - * * Permission to use, copy, modify, and distribute this * - * * software and its documentation for any purpose and without * - * * fee is hereby granted, provided that the above copyright * - * * notice appear in all copies. The University of California * - * * makes no representations about the suitability of this * - * * software for any purpose. It is provided "as is" without * - * * express or implied warranty. Export of this software outside * - * * of the United States of America may require an export license. * + * ********************************************************************* + * * Copyright (C) 1985, 1990 Regents of the University of California. * + * * Permission to use, copy, modify, and distribute this * + * * software and its documentation for any purpose and without * + * * fee is hereby granted, provided that the above copyright * + * * notice appear in all copies. The University of California * + * * makes no representations about the suitability of this * + * * software for any purpose. It is provided "as is" without * + * * express or implied warranty. Export of this software outside * + * * of the United States of America may require an export license. * * ********************************************************************* */ @@ -43,7 +43,7 @@ int plowInitWidthBackFunc(), plowWidthBackFunc(); int plowWidthNumCalls = 0; int plowWidthNumChoices = 0; #endif /* COUNTWIDTHCALLS */ - + /* * ---------------------------------------------------------------------------- * @@ -140,7 +140,7 @@ plowFindWidth(edge, types, bbox, prect) #endif /* DEBUGWIDTH */ return (MIN(x, y)); } - + /* * ---------------------------------------------------------------------------- * @@ -188,7 +188,7 @@ plowInitWidthFunc(tile, wc) return (1); } - + /* * ---------------------------------------------------------------------------- * @@ -300,7 +300,7 @@ clipright: wc->wc_area.r_xtop = wc->wc_area.r_xbot + yw; return (1); } - + /* * ---------------------------------------------------------------------------- * @@ -395,7 +395,7 @@ plowFindWidthBack(edge, types, bbox, prect) #endif /* DEBUGWIDTH */ return (MIN(x, y)); } - + /* * ---------------------------------------------------------------------------- * @@ -443,7 +443,7 @@ plowInitWidthBackFunc(tile, wc) return (1); } - + /* * ---------------------------------------------------------------------------- * diff --git a/plow/PlowYank.c b/plow/PlowYank.c index 08d24276..9b7776ea 100644 --- a/plow/PlowYank.c +++ b/plow/PlowYank.c @@ -5,16 +5,16 @@ * Incremental yanking, and painting the results back into the * original cell when done. * - * ********************************************************************* - * * Copyright (C) 1985, 1990 Regents of the University of California. * - * * Permission to use, copy, modify, and distribute this * - * * software and its documentation for any purpose and without * - * * fee is hereby granted, provided that the above copyright * - * * notice appear in all copies. The University of California * - * * makes no representations about the suitability of this * - * * software for any purpose. It is provided "as is" without * - * * express or implied warranty. Export of this software outside * - * * of the United States of America may require an export license. * + * ********************************************************************* + * * Copyright (C) 1985, 1990 Regents of the University of California. * + * * Permission to use, copy, modify, and distribute this * + * * software and its documentation for any purpose and without * + * * fee is hereby granted, provided that the above copyright * + * * notice appear in all copies. The University of California * + * * makes no representations about the suitability of this * + * * software for any purpose. It is provided "as is" without * + * * express or implied warranty. Export of this software outside * + * * of the United States of America may require an export license. * * ********************************************************************* */ @@ -72,7 +72,7 @@ extern CellUse *plowDummyUse; int plowYankUpdateCell(); int plowYankUpdatePaint(); int plowCheckLabel(); - + /* * ---------------------------------------------------------------------------- * @@ -156,7 +156,7 @@ plowYankMore(area, halo, back) * * Run without undo since we're mucking with yank cells. */ - + /* Yank the larger area into the spare cell */ UndoDisable(); scx.scx_use = plowDummyUse; @@ -199,7 +199,7 @@ plowYankMore(area, halo, back) return (TRUE); } - + /* * ---------------------------------------------------------------------------- * @@ -257,7 +257,7 @@ plowYankUpdateCell(yankChildUse) TxError("Couldn't find use %s in spare yank buffer\n", yankChildUse->cu_id); return (0); } - + /* * ---------------------------------------------------------------------------- * @@ -322,7 +322,7 @@ plowYankUpdatePaint(yankTp, pNum) return (0); } - + /* * ---------------------------------------------------------------------------- * @@ -420,7 +420,7 @@ plowCheckLabel(tile, lu) return (0); } - + /* * ---------------------------------------------------------------------------- * @@ -509,7 +509,7 @@ plowUpdateCell(use, origDef) DBW_ALLWINDOWS, (TileTypeBitMask *) NULL); return (0); } - + /* * ---------------------------------------------------------------------------- * @@ -557,6 +557,6 @@ plowUpdatePaintTile(tile, ui) &rtrans, DBWriteResultTbl[type], ui); } } - + return (0); } diff --git a/plow/plow.h b/plow/plow.h index ba8e6586..edac4ef0 100644 --- a/plow/plow.h +++ b/plow/plow.h @@ -3,16 +3,16 @@ * * Exported definitions for the plow module. * - * ********************************************************************* - * * Copyright (C) 1985, 1990 Regents of the University of California. * - * * Permission to use, copy, modify, and distribute this * - * * software and its documentation for any purpose and without * - * * fee is hereby granted, provided that the above copyright * - * * notice appear in all copies. The University of California * - * * makes no representations about the suitability of this * - * * software for any purpose. It is provided "as is" without * - * * express or implied warranty. Export of this software outside * - * * of the United States of America may require an export license. * + * ********************************************************************* + * * Copyright (C) 1985, 1990 Regents of the University of California. * + * * Permission to use, copy, modify, and distribute this * + * * software and its documentation for any purpose and without * + * * fee is hereby granted, provided that the above copyright * + * * notice appear in all copies. The University of California * + * * makes no representations about the suitability of this * + * * software for any purpose. It is provided "as is" without * + * * express or implied warranty. Export of this software outside * + * * of the United States of America may require an export license. * * ********************************************************************* * * rcsid $Header: /usr/cvsroot/magic-8.0/plow/plow.h,v 1.1.1.1 2008/02/03 20:43:50 tim Exp $ diff --git a/plow/plowDebugInt.h b/plow/plowDebugInt.h index f6c5885c..87472363 100644 --- a/plow/plowDebugInt.h +++ b/plow/plowDebugInt.h @@ -6,16 +6,16 @@ * can be added to it without forcing recompilation of the * entire plow module. * - * ********************************************************************* - * * Copyright (C) 1985, 1990 Regents of the University of California. * - * * Permission to use, copy, modify, and distribute this * - * * software and its documentation for any purpose and without * - * * fee is hereby granted, provided that the above copyright * - * * notice appear in all copies. The University of California * - * * makes no representations about the suitability of this * - * * software for any purpose. It is provided "as is" without * - * * express or implied warranty. Export of this software outside * - * * of the United States of America may require an export license. * + * ********************************************************************* + * * Copyright (C) 1985, 1990 Regents of the University of California. * + * * Permission to use, copy, modify, and distribute this * + * * software and its documentation for any purpose and without * + * * fee is hereby granted, provided that the above copyright * + * * notice appear in all copies. The University of California * + * * makes no representations about the suitability of this * + * * software for any purpose. It is provided "as is" without * + * * express or implied warranty. Export of this software outside * + * * of the United States of America may require an export license. * * ********************************************************************* * * rcsid $Header: /usr/cvsroot/magic-8.0/plow/plowDebugInt.h,v 1.1.1.1 2008/02/03 20:43:50 tim Exp $ diff --git a/plow/plowInt.h b/plow/plowInt.h index 5cc51aee..a1bd7b35 100644 --- a/plow/plowInt.h +++ b/plow/plowInt.h @@ -3,16 +3,16 @@ * * Internal definitions for the plow module. * - * ********************************************************************* - * * Copyright (C) 1985, 1990 Regents of the University of California. * - * * Permission to use, copy, modify, and distribute this * - * * software and its documentation for any purpose and without * - * * fee is hereby granted, provided that the above copyright * - * * notice appear in all copies. The University of California * - * * makes no representations about the suitability of this * - * * software for any purpose. It is provided "as is" without * - * * express or implied warranty. Export of this software outside * - * * of the United States of America may require an export license. * + * ********************************************************************* + * * Copyright (C) 1985, 1990 Regents of the University of California. * + * * Permission to use, copy, modify, and distribute this * + * * software and its documentation for any purpose and without * + * * fee is hereby granted, provided that the above copyright * + * * notice appear in all copies. The University of California * + * * makes no representations about the suitability of this * + * * software for any purpose. It is provided "as is" without * + * * express or implied warranty. Export of this software outside * + * * of the United States of America may require an export license. * * ********************************************************************* * * Needs to include: magic.h, geometry.h, tile.h diff --git a/readline/readline-4.3/bind.c b/readline/readline-4.3/bind.c index 71038881..d43df5ac 100644 --- a/readline/readline-4.3/bind.c +++ b/readline/readline-4.3/bind.c @@ -381,7 +381,7 @@ rl_translate_keyseq (seq, array, len) array[l++] = (seq[i] == '?') ? RUBOUT : CTRL (_rl_to_upper (seq[i])); } continue; - } + } /* Translate other backslash-escaped characters. These are the same escape sequences that bash's `echo' and `printf' builtins @@ -738,7 +738,7 @@ _rl_read_init_file (filename, include_level) if (buffer == 0) return (errno); - + if (include_level == 0 && filename != last_readline_init_file) { FREE (last_readline_init_file); @@ -962,7 +962,7 @@ parser_include (args) return r; } - + /* Associate textual names with actual functions. */ static struct { const char *name; @@ -1525,7 +1525,7 @@ sv_isrchterm (value) free (v); return 0; } - + /* Return the character which matches NAME. For example, `Space' returns ' '. */ @@ -1602,7 +1602,7 @@ rl_get_keymap_name (map) return ((char *)keymap_names[i].name); return ((char *)NULL); } - + void rl_set_keymap (map) Keymap map; @@ -1827,7 +1827,7 @@ rl_invoking_keyseqs_in_map (function, map) keyname[0] = (char) key; keyname[1] = '\0'; } - + strcat (keyname, seqs[i]); free (seqs[i]); diff --git a/readline/readline-4.3/callback.c b/readline/readline-4.3/callback.c index a8f4323c..cc7647ea 100644 --- a/readline/readline-4.3/callback.c +++ b/readline/readline-4.3/callback.c @@ -54,7 +54,7 @@ things to handle at once, and dispatches them via select(). Call rl_callback_handler_install() with the prompt and a function to call whenever a complete line of input is ready. The user must then - call rl_callback_read_char() every time some input is available, and + call rl_callback_read_char() every time some input is available, and rl_callback_read_char() will call the user's function with the complete text read in at each end of line. The terminal is kept prepped and signals handled all the time, except during calls to the user's function. */ diff --git a/readline/readline-4.3/complete.c b/readline/readline-4.3/complete.c index 21a9d708..73a310ab 100644 --- a/readline/readline-4.3/complete.c +++ b/readline/readline-4.3/complete.c @@ -261,7 +261,7 @@ rl_compignore_func_t *rl_ignore_some_completions_function = (rl_compignore_func_ and a pointer to the quoting character to be used, which the function can reset if desired. */ rl_quote_func_t *rl_filename_quoting_function = rl_quote_filename; - + /* Function to call to remove quoting characters from a filename. Called before completion is attempted, so the embedded quotes do not interfere with matching names in the file system. Readline doesn't do anything @@ -557,7 +557,7 @@ print_filename (to_print, full_pathname) { PUTX (*s); } -#else +#else char *s, c, *new_full_pathname; int extension_char, slen, tlen; @@ -703,7 +703,7 @@ _rl_find_completion_word (fp, dp) else if (quote_char == '"') found_quote |= RL_QF_DOUBLE_QUOTE; else - found_quote |= RL_QF_OTHER_QUOTE; + found_quote |= RL_QF_OTHER_QUOTE; } } } @@ -815,7 +815,7 @@ gen_completion_matches (text, start, end, our_func, found_quote, quote_char) matches = rl_completion_matches (text, our_func); FREE (temp); - return matches; + return matches; } /* Filter out duplicates in MATCHES. This frees up the strings in @@ -1217,7 +1217,7 @@ display_matches (matches) (*rl_completion_display_matches_hook) (matches, len, max); return; } - + /* If there are many items, then ask the user if she really wants to see them all. */ if (len >= rl_completion_query_items) @@ -1974,7 +1974,7 @@ rl_menu_complete (count, ignore) rl_line_buffer[orig_start] and rl_line_buffer[rl_point] with matches[match_list_index], and add any necessary closing char. */ - if (matches == 0 || match_list_size == 0) + if (matches == 0 || match_list_size == 0) { rl_ding (); FREE (matches); diff --git a/readline/readline-4.3/display.c b/readline/readline-4.3/display.c index d62a4300..3c654963 100644 --- a/readline/readline-4.3/display.c +++ b/readline/readline-4.3/display.c @@ -190,7 +190,7 @@ static int prompt_last_screen_line; \002 (^B) end non-visible characters all characters except \001 and \002 (following a \001) are copied to the returned string; all characters except those between \001 and - \002 are assumed to be `visible'. */ + \002 are assumed to be `visible'. */ static char * expand_prompt (pmt, lp, lip, niflp) @@ -373,7 +373,7 @@ init_line_structures (minsize) inv_lbreaks[0] = vis_lbreaks[0] = 0; } } - + /* Basic redisplay algorithm. */ void rl_redisplay () @@ -491,7 +491,7 @@ rl_redisplay () } \ } while (0) -#if defined (HANDLE_MULTIBYTE) +#if defined (HANDLE_MULTIBYTE) #define CHECK_LPOS() \ do { \ lpos++; \ @@ -1121,7 +1121,7 @@ update_line (old, new, current_line, omax, nmax, inv_botlin) } } - + /* Find first difference. */ #if defined (HANDLE_MULTIBYTE) if (MB_CUR_MAX > 1 && rl_byte_oriented == 0) @@ -1399,7 +1399,7 @@ update_line (old, new, current_line, omax, nmax, inv_botlin) col_lendiff = lendiff; if (col_lendiff) - { + { if (_rl_term_autowrap && current_line < inv_botlin) space_to_eol (col_lendiff); else @@ -2028,7 +2028,7 @@ redraw_prompt (t) prompt_last_invisible = oldlast; prompt_invis_chars_first_line = oldninvis; } - + /* Redisplay the current line after a SIGWINCH is received. */ void _rl_redisplay_after_sigwinch () diff --git a/readline/readline-4.3/emacs_keymap.c b/readline/readline-4.3/emacs_keymap.c index ca9d1343..225d8567 100644 --- a/readline/readline-4.3/emacs_keymap.c +++ b/readline/readline-4.3/emacs_keymap.c @@ -83,7 +83,7 @@ KEYMAP_ENTRY_ARRAY emacs_standard_keymap = { { ISFUNC, rl_insert }, /* - */ { ISFUNC, rl_insert }, /* . */ { ISFUNC, rl_insert }, /* / */ - + /* Regular digits. */ { ISFUNC, rl_insert }, /* 0 */ { ISFUNC, rl_insert }, /* 1 */ diff --git a/readline/readline-4.3/examples/excallback.c b/readline/readline-4.3/examples/excallback.c index 3d4bb189..a27183df 100644 --- a/readline/readline-4.3/examples/excallback.c +++ b/readline/readline-4.3/examples/excallback.c @@ -62,7 +62,7 @@ Jeff * alternate interface. The first is the ability to interactively change the * prompt, which can't be done using the regular interface since rl_prompt is * read-only. - * + * * The second feature really highlights a subtle point when using the alternate * interface. That is, readline will not alter the terminal when inside your * callback handler. So let's so, your callback executes a user command that @@ -91,7 +91,7 @@ tcflag_t old_lflag; cc_t old_vtime; struct termios term; -int +int main() { fd_set fds; @@ -182,7 +182,7 @@ char * get_prompt(void) { /* The prompts can even be different lengths! */ - sprintf(prompt_buf, "%s", + sprintf(prompt_buf, "%s", prompt ? "Hit ctrl-t to toggle prompt> " : "Pretty cool huh?> "); return prompt_buf; } diff --git a/readline/readline-4.3/examples/fileman.c b/readline/readline-4.3/examples/fileman.c index 340eee73..22f5c8fd 100644 --- a/readline/readline-4.3/examples/fileman.c +++ b/readline/readline-4.3/examples/fileman.c @@ -214,7 +214,7 @@ stripwhite (string) for (s = string; whitespace (*s); s++) ; - + if (*s == 0) return (s); diff --git a/readline/readline-4.3/examples/manexamp.c b/readline/readline-4.3/examples/manexamp.c index 9c6cf2c7..6dbadc6d 100644 --- a/readline/readline-4.3/examples/manexamp.c +++ b/readline/readline-4.3/examples/manexamp.c @@ -75,7 +75,7 @@ invert_case_line (count, key) } else direction = 1; - + /* Find the end of the range to modify. */ end = start + (count * direction); diff --git a/readline/readline-4.3/examples/readlinebuf.h b/readline/readline-4.3/examples/readlinebuf.h index 91ef4d64..91c7a0ca 100644 --- a/readline/readline-4.3/examples/readlinebuf.h +++ b/readline/readline-4.3/examples/readlinebuf.h @@ -62,14 +62,14 @@ private: int high_; protected: - + virtual int_type showmanyc() const { return high_ - low_; } - + virtual streamsize xsgetn( char_type* buf, streamsize n ) { int rd = n > (high_ - low_)? (high_ - low_) : n; memcpy( buf, line_, rd ); low_ += rd; - + if ( rd < n ) { low_ = high_ = 0; free( line_ ); // free( NULL ) is a noop @@ -80,10 +80,10 @@ protected: rd += xsgetn( buf + rd, n - rd ); } } - - return rd; + + return rd; } - + virtual int_type underflow() { if ( high_ == low_ ) { low_ = high_ = 0; @@ -94,17 +94,17 @@ protected: if ( history_ && high_ ) add_history( line_ ); } } - + if ( low_ < high_ ) return line_[low_]; else return eof; } - + virtual int_type uflow() { int_type c = underflow(); if ( c != eof ) ++low_; return c; } - + virtual int_type pbackfail( int_type c = eof ) { if ( low_ > 0 ) --low_; else if ( c != eof ) { @@ -125,15 +125,15 @@ protected: return not_eof; } - + public: - readlinebuf( const char* prompt = NULL, bool history = true ) + readlinebuf( const char* prompt = NULL, bool history = true ) : prompt_( prompt ), history_( history ), line_( NULL ), low_( 0 ), high_( 0 ) { setbuf( 0, 0 ); } - - + + }; #endif diff --git a/readline/readline-4.3/examples/rlfe.c b/readline/readline-4.3/examples/rlfe.c index d634d7ce..7710035e 100644 --- a/readline/readline-4.3/examples/rlfe.c +++ b/readline/readline-4.3/examples/rlfe.c @@ -1,7 +1,7 @@ /* A front-end using readline to "cook" input lines for Kawa. * * Copyright (C) 1999 Per Bothner - * + * * This front-end program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License as published * by the Free Software Foundation; either version 2, or (at your option) @@ -164,7 +164,7 @@ volatile int propagate_sigwinch = 0; * propagate window size changes from input file descriptor to * master side of pty. */ -void sigwinch_handler(int signal) { +void sigwinch_handler(int signal) { propagate_sigwinch = 1; } @@ -176,7 +176,7 @@ void sigwinch_handler(int signal) { * Once the slave pty has been opened, you are responsible to free *name. */ -int get_master_pty(char **name) { +int get_master_pty(char **name) { int i, j; /* default to returning error */ int master = -1; @@ -227,7 +227,7 @@ int get_master_pty(char **name) { * Otherwise, it has returned the slave file descriptor. */ -int get_slave_pty(char *name) { +int get_slave_pty(char *name) { struct group *gptr; gid_t gid; int slave = -1; @@ -459,9 +459,9 @@ main(int argc, char** argv) fprintf (stderr, "%s: warning: could not open log file %s: %s\n", progname, logfname, strerror (errno)); } - + rl_readline_name = appname; - + #ifdef DEBUG debugfile = fopen("LOG", "w"); #endif @@ -497,7 +497,7 @@ main(int argc, char** argv) } if (child == 0) - { + { int slave; /* file descriptor for slave pty */ /* We are in the child process */ @@ -517,7 +517,7 @@ main(int argc, char** argv) * not work correctly unless there is a session group leader * and process group leader (which a session group leader * automatically is). This also disassociates us from our old - * controlling tty. + * controlling tty. */ if (setsid() < 0) { @@ -604,8 +604,8 @@ main(int argc, char** argv) rl_instream = fdopen (master, "r"); rl_getc_function = my_rl_getc; - rl_prep_term_function = null_prep_terminal; - rl_deprep_term_function = null_deprep_terminal; + rl_prep_term_function = null_prep_terminal; + rl_deprep_term_function = null_deprep_terminal; rl_callback_handler_install (prompt, line_handler); #if 1 @@ -967,7 +967,7 @@ rlfe_filename_completion_function (text, state) STRDUP (filename, text); else { - filename = malloc(1); + filename = malloc(1); if (filename == 0) return ((char *)NULL); filename[0] = '\0'; diff --git a/readline/readline-4.3/funmap.c b/readline/readline-4.3/funmap.c index fe9a1da4..489110f9 100644 --- a/readline/readline-4.3/funmap.c +++ b/readline/readline-4.3/funmap.c @@ -197,7 +197,7 @@ rl_add_funmap_entry (name, function) funmap_size += 64; funmap = (FUNMAP **)xrealloc (funmap, funmap_size * sizeof (FUNMAP *)); } - + funmap[funmap_entry] = (FUNMAP *)xmalloc (sizeof (FUNMAP)); funmap[funmap_entry]->name = name; funmap[funmap_entry]->function = function; diff --git a/readline/readline-4.3/histexpand.c b/readline/readline-4.3/histexpand.c index 5ed8bae8..f514fce0 100644 --- a/readline/readline-4.3/histexpand.c +++ b/readline/readline-4.3/histexpand.c @@ -268,7 +268,7 @@ get_history_event (string, caller_index, delimiting_quote) { entry = current_history (); history_offset = history_length; - + /* If this was a substring search, then remember the string that we matched for word substitution. */ if (substring_okay) @@ -566,13 +566,13 @@ history_expand_internal (string, start, end_index_ptr, ret_string, current_line) quoted_search_delimiter = c; } else -#endif /* HANDLE_MULTIBYTE */ +#endif /* HANDLE_MULTIBYTE */ if (i && (string[i - 1] == '\'' || string[i - 1] == '"')) quoted_search_delimiter = string[i - 1]; event = get_history_event (string, &i, quoted_search_delimiter); } - + if (event == 0) { *ret_string = hist_error (string, start, i, EVENT_NOT_FOUND); @@ -904,7 +904,7 @@ history_expand (hstring, output) *output = savestring (hstring); return (0); } - + /* Prepare the buffer for printing error messages. */ result = (char *)xmalloc (result_len = 256); result[0] = '\0'; @@ -1000,7 +1000,7 @@ history_expand (hstring, output) i++; } } - + if (string[i] != history_expansion_char) { free (result); @@ -1371,7 +1371,7 @@ history_tokenize_internal (string, wind, indp) return (result); start = i; - + if (member (string[i], "()\n")) { i++; diff --git a/readline/readline-4.3/histfile.c b/readline/readline-4.3/histfile.c index 60a91251..7c9249d8 100644 --- a/readline/readline-4.3/histfile.c +++ b/readline/readline-4.3/histfile.c @@ -108,7 +108,7 @@ history_filename (filename) if (return_val) return (return_val); - + home = sh_get_env_value ("HOME"); if (home == 0) @@ -423,7 +423,7 @@ mmap_error: close (file); return rv; } -#else +#else buffer = (char *)malloc (buffer_size); if (buffer == 0) { diff --git a/readline/readline-4.3/history.c b/readline/readline-4.3/history.c index 4242f33e..dfe5d7eb 100644 --- a/readline/readline-4.3/history.c +++ b/readline/readline-4.3/history.c @@ -154,7 +154,7 @@ history_set_pos (pos) history_offset = pos; return (1); } - + /* Return the current history array. The caller has to be carefull, since this is the actual array of data, and could be bashed or made corrupt easily. The array is terminated with a NULL pointer. */ diff --git a/readline/readline-4.3/history.h b/readline/readline-4.3/history.h index 58b5de46..039427ac 100644 --- a/readline/readline-4.3/history.h +++ b/readline/readline-4.3/history.h @@ -110,7 +110,7 @@ extern HIST_ENTRY **history_list PARAMS((void)); /* Returns the number which says what history element we are now looking at. */ extern int where_history PARAMS((void)); - + /* Return the history entry at the current position, as determined by history_offset. If there is no entry there, return a NULL pointer. */ extern HIST_ENTRY *current_history PARAMS((void)); diff --git a/readline/readline-4.3/input.c b/readline/readline-4.3/input.c index 841f05d1..9bbd49a7 100644 --- a/readline/readline-4.3/input.c +++ b/readline/readline-4.3/input.c @@ -302,8 +302,8 @@ _rl_input_queued (t) void _rl_insert_typein (c) - int c; -{ + int c; +{ int key, t, i; char *string; @@ -483,7 +483,7 @@ _rl_read_mbchar (mbchar, size) memset(&ps, 0, sizeof (mbstate_t)); memset(&ps_back, 0, sizeof (mbstate_t)); - + while (mb_len < size) { RL_SETSTATE(RL_STATE_MOREINPUT); @@ -498,7 +498,7 @@ _rl_read_mbchar (mbchar, size) /* shorted bytes */ ps = ps_back; continue; - } + } else if (mbchar_bytes_length > (size_t)(0)) break; } diff --git a/readline/readline-4.3/kill.c b/readline/readline-4.3/kill.c index a616b920..82be0cf9 100644 --- a/readline/readline-4.3/kill.c +++ b/readline/readline-4.3/kill.c @@ -456,7 +456,7 @@ rl_copy_backward_word (count, key) return (_rl_copy_word_as_kill (count, -1)); } - + /* Yank back the last killed text. This ignores arguments. */ int rl_yank (count, ignore) @@ -604,7 +604,7 @@ rl_yank_last_arg (count, key) if (history_skip < 0) history_skip = 0; } - + if (explicit_arg_p) retval = rl_yank_nth_arg_internal (count_passed, key, history_skip); else diff --git a/readline/readline-4.3/mbutil.c b/readline/readline-4.3/mbutil.c index 8794d02d..00066683 100644 --- a/readline/readline-4.3/mbutil.c +++ b/readline/readline-4.3/mbutil.c @@ -94,7 +94,7 @@ _rl_find_next_mbchar_internal (string, seed, count, find_non_zero) if (seed < point) count --; - while (count > 0) + while (count > 0) { tmp = mbrtowc (&wc, string+point, strlen(string + point), &ps); if ((size_t)(tmp) == (size_t)-1 || (size_t)(tmp) == (size_t)-2) @@ -150,7 +150,7 @@ _rl_find_prev_mbchar_internal (string, seed, find_non_zero) memset(&ps, 0, sizeof(mbstate_t)); length = strlen(string); - + if (seed < 0) return 0; else if (length < seed) @@ -180,7 +180,7 @@ _rl_find_prev_mbchar_internal (string, seed, find_non_zero) prev = point; } else - prev = point; + prev = point; } point += tmp; @@ -190,9 +190,9 @@ _rl_find_prev_mbchar_internal (string, seed, find_non_zero) } /* return the number of bytes parsed from the multibyte sequence starting - at src, if a non-L'\0' wide character was recognized. It returns 0, - if a L'\0' wide character was recognized. It returns (size_t)(-1), - if an invalid multibyte sequence was encountered. It returns (size_t)(-2) + at src, if a non-L'\0' wide character was recognized. It returns 0, + if a L'\0' wide character was recognized. It returns (size_t)(-1), + if an invalid multibyte sequence was encountered. It returns (size_t)(-2) if it couldn't parse a complete multibyte character. */ int _rl_get_char_len (src, ps) @@ -236,7 +236,7 @@ _rl_compare_chars (buf1, pos1, ps1, buf2, pos2, ps2) { int i, w1, w2; - if ((w1 = _rl_get_char_len (&buf1[pos1], ps1)) <= 0 || + if ((w1 = _rl_get_char_len (&buf1[pos1], ps1)) <= 0 || (w2 = _rl_get_char_len (&buf2[pos2], ps2)) <= 0 || (w1 != w2) || (buf1[pos1] != buf2[pos2])) @@ -269,7 +269,7 @@ _rl_adjust_point(string, point, ps) return -1; if (length < point) return -1; - + while (pos < point) { tmp = mbrlen (string + pos, length - pos, ps); diff --git a/readline/readline-4.3/misc.c b/readline/readline-4.3/misc.c index f3775d30..e974938c 100644 --- a/readline/readline-4.3/misc.c +++ b/readline/readline-4.3/misc.c @@ -323,7 +323,7 @@ rl_replace_from_history (entry, flags) rl_mark = rl_end; } #endif -} +} /* **************************************************************** */ /* */ diff --git a/readline/readline-4.3/nls.c b/readline/readline-4.3/nls.c index 706c8195..966d6542 100644 --- a/readline/readline-4.3/nls.c +++ b/readline/readline-4.3/nls.c @@ -50,7 +50,7 @@ #include "rlshell.h" #include "rlprivate.h" -#if !defined (HAVE_SETLOCALE) +#if !defined (HAVE_SETLOCALE) /* A list of legal values for the LANG or LC_CTYPE environment variables. If a locale name in this list is the value for the LC_ALL, LC_CTYPE, or LANG environment variable (using the first of those with a value), @@ -188,7 +188,7 @@ find_codeset (name, lenp) /* This does not make sense: language has to be specified. As an exception we allow the variable to contain only the codeset name. Perhaps there are funny codeset names. */ - if (language == cp) + if (language == cp) { *lenp = strlen (language); result = language; diff --git a/readline/readline-4.3/readline.c b/readline/readline-4.3/readline.c index 43c0c627..cfc11dbf 100644 --- a/readline/readline-4.3/readline.c +++ b/readline/readline-4.3/readline.c @@ -206,12 +206,12 @@ int _rl_horizontal_scroll_mode = 0; /* Non-zero means to display an asterisk at the starts of history lines which have been modified. */ -int _rl_mark_modified_lines = 0; +int _rl_mark_modified_lines = 0; /* The style of `bell' notification preferred. This can be set to NO_BELL, AUDIBLE_BELL, or VISIBLE_BELL. */ int _rl_bell_preference = AUDIBLE_BELL; - + /* String inserted into the line by rl_insert_comment (). */ char *_rl_comment_begin; @@ -271,7 +271,7 @@ rl_set_prompt (prompt) rl_visible_prompt_length = rl_expand_prompt (rl_prompt); return 0; } - + /* Read a line of input. Prompt with PROMPT. An empty PROMPT means none. A return value of NULL means that EOF was encountered. */ char * @@ -814,7 +814,7 @@ readline_initialize_everything () /* Decide whether we should automatically go into eight-bit mode. */ _rl_init_eightbit (); - + /* Read in the init file. */ rl_read_init_file ((char *)NULL); diff --git a/readline/readline-4.3/readline.h b/readline/readline-4.3/readline.h index f11b3d03..870df46d 100644 --- a/readline/readline-4.3/readline.h +++ b/readline/readline-4.3/readline.h @@ -309,7 +309,7 @@ extern rl_command_func_t *rl_function_of_keyseq PARAMS((const char *, Keymap, in extern void rl_list_funmap_names PARAMS((void)); extern char **rl_invoking_keyseqs_in_map PARAMS((rl_command_func_t *, Keymap)); extern char **rl_invoking_keyseqs PARAMS((rl_command_func_t *)); - + extern void rl_function_dumper PARAMS((int)); extern void rl_macro_dumper PARAMS((int)); extern void rl_variable_dumper PARAMS((int)); @@ -411,7 +411,7 @@ extern int rl_clear_signals PARAMS((void)); extern void rl_cleanup_after_signal PARAMS((void)); extern void rl_reset_after_signal PARAMS((void)); extern void rl_free_line_state PARAMS((void)); - + extern int rl_set_paren_blink_timeout PARAMS((int)); /* Undocumented. */ @@ -524,7 +524,7 @@ extern rl_hook_func_t *rl_startup_hook; readline_internal_setup () returns and readline_internal starts reading input characters. */ extern rl_hook_func_t *rl_pre_input_hook; - + /* The address of a function to call periodically while Readline is awaiting character input, or NULL, for no event handling. */ extern rl_hook_func_t *rl_event_hook; @@ -606,7 +606,7 @@ extern const char *rl_basic_word_break_characters; extern const char *rl_completer_word_break_characters; /* List of characters which can be used to quote a substring of the line. - Completion occurs on the entire substring, and within the substring + Completion occurs on the entire substring, and within the substring rl_completer_word_break_characters are treated as any other character, unless they also appear within this list. */ extern const char *rl_completer_quote_characters; diff --git a/readline/readline-4.3/rltty.c b/readline/readline-4.3/rltty.c index 755efeba..761d82e2 100644 --- a/readline/readline-4.3/rltty.c +++ b/readline/readline-4.3/rltty.c @@ -544,7 +544,7 @@ set_tty_settings (tty, tiop) { if (_set_tty_settings (tty, tiop) < 0) return -1; - + #if 0 #if defined (TERMIOS_TTY_DRIVER) @@ -702,7 +702,7 @@ rl_deprep_terminal () release_sigint (); } - + /* **************************************************************** */ /* */ /* Bogus Flow Control */ diff --git a/readline/readline-4.3/signals.c b/readline/readline-4.3/signals.c index 0a1468b6..f7df6091 100644 --- a/readline/readline-4.3/signals.c +++ b/readline/readline-4.3/signals.c @@ -378,7 +378,7 @@ rl_reset_after_signal () /* Free up the readline variable line state for the current line (undo list, any partial history entry, any keyboard macros in progress, and any numeric arguments in process) after catching a signal, before calling - rl_cleanup_after_signal(). */ + rl_cleanup_after_signal(). */ void rl_free_line_state () { diff --git a/readline/readline-4.3/support/wcwidth.c b/readline/readline-4.3/support/wcwidth.c index ace9a3ab..7e3490e5 100644 --- a/readline/readline-4.3/support/wcwidth.c +++ b/readline/readline-4.3/support/wcwidth.c @@ -117,7 +117,7 @@ int wcwidth(wchar_t ucs) /* if we arrive here, ucs is not a combining or C0/C1 control character */ - return 1 + + return 1 + (ucs >= 0x1100 && (ucs <= 0x115f || /* Hangul Jamo init. consonants */ (ucs >= 0x2e80 && ucs <= 0xa4cf && (ucs & ~0x0011) != 0x300a && diff --git a/readline/readline-4.3/terminal.c b/readline/readline-4.3/terminal.c index f3f5b6c4..1d619763 100644 --- a/readline/readline-4.3/terminal.c +++ b/readline/readline-4.3/terminal.c @@ -82,7 +82,7 @@ static int tcap_initialized; #if !defined (__linux__) # if defined (__EMX__) || defined (NEED_EXTERN_PC) -extern +extern # endif /* __EMX__ || NEED_EXTERN_PC */ char PC, *BC, *UP; #endif /* __linux__ */ @@ -280,7 +280,7 @@ rl_get_screen_size (rows, cols) if (cols) *cols = _rl_screenwidth; } - + void rl_resize_terminal () { diff --git a/readline/readline-4.3/text.c b/readline/readline-4.3/text.c index 2a7b724f..2f8335f0 100644 --- a/readline/readline-4.3/text.c +++ b/readline/readline-4.3/text.c @@ -314,7 +314,7 @@ rl_forward_char (count, key) return (rl_forward_byte (count, key)); } #endif /* !HANDLE_MULTIBYTE */ - + /* Backwards compatibility. */ int rl_forward (count, key) @@ -679,7 +679,7 @@ _rl_insert_char (count, c) } } #endif /* HANDLE_MULTIBYTE */ - + /* If we can optimize, then do it. But don't let people crash readline because of extra large arguments. */ if (count > 1 && count <= 1024) @@ -848,7 +848,7 @@ rl_quoted_insert (count, key) _rl_restore_tty_signals (); #endif - return (_rl_insert_char (count, c)); + return (_rl_insert_char (count, c)); } /* Insert a tab character. */ @@ -943,7 +943,7 @@ _rl_overwrite_rubout (count, key) return 0; } - + /* Rubout the character behind point. */ int rl_rubout (count, key) @@ -1067,7 +1067,7 @@ rl_delete (count, key) new_point = _rl_find_next_mbchar (rl_line_buffer, rl_point, 1, MB_FIND_NONZERO); else new_point = rl_point + 1; - + return (rl_delete_text (rl_point, new_point)); } } @@ -1075,7 +1075,7 @@ rl_delete (count, key) /* Delete the character under the cursor, unless the insertion point is at the end of the line, in which case the character behind the cursor is deleted. COUNT is obeyed and may be used - to delete forward or backward that many characters. */ + to delete forward or backward that many characters. */ int rl_rubout_or_delete (count, key) int count, key; @@ -1084,7 +1084,7 @@ rl_rubout_or_delete (count, key) return (_rl_rubout_char (count, key)); else return (rl_delete (count, key)); -} +} /* Delete all spaces and tabs around point. */ int diff --git a/readline/readline-4.3/tilde.c b/readline/readline-4.3/tilde.c index 154f7f81..6db74575 100644 --- a/readline/readline-4.3/tilde.c +++ b/readline/readline-4.3/tilde.c @@ -34,7 +34,7 @@ # include #else /* !HAVE_STRING_H */ # include -#endif /* !HAVE_STRING_H */ +#endif /* !HAVE_STRING_H */ #if defined (HAVE_STDLIB_H) # include @@ -377,7 +377,7 @@ tilde_expand_word (filename) return (dirname); } - + #if defined (TEST) #undef NULL #include diff --git a/readline/readline-4.3/vi_mode.c b/readline/readline-4.3/vi_mode.c index 89303644..6a591d29 100644 --- a/readline/readline-4.3/vi_mode.c +++ b/readline/readline-4.3/vi_mode.c @@ -193,7 +193,7 @@ rl_vi_undo (count, key) { return (rl_undo_command (count, key)); } - + /* Yank the nth arg from the previous line into this line at point. */ int rl_vi_yank_arg (count, key) @@ -621,7 +621,7 @@ _rl_vi_save_insert (up) strncpy (vi_insert_buffer, rl_line_buffer + start, len - 1); vi_insert_buffer[len-1] = '\0'; } - + void _rl_vi_done_inserting () { @@ -1074,7 +1074,7 @@ rl_vi_delete (count, key) end = rl_end; rl_kill_text (rl_point, end); - + if (rl_point > 0 && rl_point == rl_end) rl_backward_char (1, key); return (0); diff --git a/resis/ResBasic.c b/resis/ResBasic.c index 4322401d..07e9d870 100644 --- a/resis/ResBasic.c +++ b/resis/ResBasic.c @@ -25,7 +25,7 @@ static char rcsid[] __attribute__ ((unused)) = "$Header: /usr/cvsroot/magic-8.0/ #include "resis/resis.h" int resSubDevFunc(); - + /* *-------------------------------------------------------------------------- * @@ -116,7 +116,7 @@ resAllPortNodes(tile, list) * sinks including contacts, devices, and junctions. Once this * list is made, calculate the resistor nextwork for the tile. * - * Results: returns TRUE or FALSE depending on whether a node was + * Results: returns TRUE or FALSE depending on whether a node was * involved in a merge. * * Side Effects: creates Nodes, devices, junctions, and breakpoints. @@ -140,7 +140,7 @@ ResEachTile(tile, startpoint) tElement *tcell; tileJunk *tstructs= (tileJunk *)(tile->ti_client); ExtDevice *devptr; - + ResTileCount++; /* Process startpoint, if any. */ @@ -168,7 +168,7 @@ ResEachTile(tile, startpoint) if TTMaskHasType(&(ExtCurStyle->exts_deviceMask), t1) { - /* + /* * The device is put in the center of the tile. This is fine * for single tile device, but not as good for multiple ones. */ @@ -196,12 +196,12 @@ ResEachTile(tile, startpoint) } } } - + #ifdef ARIEL if (i = ExtCurStyle->exts_plugSignalNum[t1]) { tcell = (tElement *) mallocMagic((unsigned)(sizeof(tElement))); - + tcell->te_thist= ResImageAddPlug(tile, i, resCurrentNode); tcell->te_nextt = resCurrentNode->rn_te; resCurrentNode->rn_te = tcell; @@ -218,8 +218,8 @@ ResEachTile(tile, startpoint) { if (TTMaskIntersect(&DBPlaneTypes[pNum], mask)) { - (void)DBSrPaintArea((Tile *) NULL, - ResUse->cu_def->cd_planes[pNum], + (void)DBSrPaintArea((Tile *) NULL, + ResUse->cu_def->cd_planes[pNum], &tileArea, mask, resSubDevFunc, (ClientData) tile); } } @@ -240,13 +240,13 @@ ResEachTile(tile, startpoint) ce = ce->ce_nextc; freeMagic((char *)oldce); } - tstructs->contactList = NULL; + tstructs->contactList = NULL; - /* + /* * Walk the four sides of the tile looking for adjoining connecting * materials. */ - + /* left */ for (tp = BL(tile); BOTTOM(tp) < TOP(tile); tp=RT(tp)) { @@ -337,7 +337,7 @@ ResEachTile(tile, startpoint) } } tstructs->tj_status |= RES_TILE_DONE; - + resAllPortNodes(tile, &ResNodeQueue); merged = ResCalcTileResistance(tile, tstructs, &ResNodeQueue, @@ -345,7 +345,7 @@ ResEachTile(tile, startpoint) return(merged); } - + /* *------------------------------------------------------------------------- * @@ -362,7 +362,7 @@ ResEachTile(tile, startpoint) int resSubDevFunc(tile,tp) Tile *tile,*tp; - + { tileJunk *junk = (tileJunk *)(tile->ti_client); diff --git a/resis/ResChecks.c b/resis/ResChecks.c index 927125a3..6d1954d6 100644 --- a/resis/ResChecks.c +++ b/resis/ResChecks.c @@ -27,12 +27,12 @@ static char rcsid[] __attribute__ ((unused)) = "$Header: /usr/cvsroot/magic-8.0/ #include "resis/resis.h" #ifdef PARANOID - + /* *------------------------------------------------------------------------- * * ResSanityChecks -- Checks that resistor and node lists are consistant. - * Make sure that all resistors are connected, and that each node + * Make sure that all resistors are connected, and that each node * to which a resistor is connected has the correct pointer in its list. * * Results: none @@ -56,7 +56,7 @@ ResSanityChecks(nodename,resistorList,nodeList,devlist) resElement *rcell; static Stack *resSanityStack = NULL; int reached,foundorigin; - + if (resSanityStack == NULL) { resSanityStack = StackNew(64); @@ -64,14 +64,14 @@ ResSanityChecks(nodename,resistorList,nodeList,devlist) for (node = nodeList; node != NULL; node=node->rn_more) { node->rn_status &= ~RES_REACHED_NODE; - if (node->rn_why == RES_NODE_ORIGIN) + if (node->rn_why == RES_NODE_ORIGIN) STACKPUSH((ClientData) node, resSanityStack); } for (resistor = resistorList; resistor != NULL; resistor = resistor->rr_nextResistor) { resistor->rr_status &= ~RES_REACHED_RESISTOR; } - + /* Check 1- Are the resistors and nodes all connected? */ while (!StackEmpty(resSanityStack)) { @@ -83,7 +83,7 @@ ResSanityChecks(nodename,resistorList,nodeList,devlist) resistor = rcell->re_thisEl; if (resistor->rr_status & RES_REACHED_RESISTOR) continue; resistor->rr_status |= RES_REACHED_RESISTOR; - if (resistor->rr_connection1 != node && + if (resistor->rr_connection1 != node && resistor->rr_connection2 != node) { TxError("Stray resElement pointer- node %s, pointer %d\n",nodename,rcell); diff --git a/resis/ResConDCS.c b/resis/ResConDCS.c index 9db0a220..22098b22 100644 --- a/resis/ResConDCS.c +++ b/resis/ResConDCS.c @@ -67,7 +67,7 @@ TileTypeBitMask ResSubsTypeBitMask; /* Forward declarations */ extern void ResCalcPerimOverlap(); - + /* * ---------------------------------------------------------------------------- * @@ -87,7 +87,7 @@ extern void ResCalcPerimOverlap(); int dbcConnectFuncDCS(tile, cx) - Tile *tile; + Tile *tile; TreeContext *cx; { @@ -112,9 +112,9 @@ dbcConnectFuncDCS(tile, cx) ((tileArea.r_ybot >= srArea->r_ytop-1) || (tileArea.r_ytop <= srArea->r_ybot+1))) return 0; - - + + t1 = TiGetType(tile); if TTMaskHasType(&DiffTypeBitMask,t1) { @@ -210,8 +210,8 @@ dbcConnectFuncDCS(tile, cx) { if (TTMaskIntersect(&DBPlaneTypes[pNum], mask)) { - (void)DBSrPaintArea((Tile *) NULL, - scx->scx_use->cu_def->cd_planes[pNum], + (void)DBSrPaintArea((Tile *) NULL, + scx->scx_use->cu_def->cd_planes[pNum], &tileArea,mask,resSubSearchFunc, (ClientData) cx); } } @@ -239,7 +239,7 @@ dbcConnectFuncDCS(tile, cx) if (DBIsContact(loctype)) { /* The mask of contact types must include all stacked contacts */ - + TTMaskZero(¬ConnectMask); TTMaskSetMask(¬ConnectMask, &DBNotConnectTbl[loctype]); } @@ -323,7 +323,7 @@ dbcConnectFuncDCS(tile, cx) return 0; } - + /* *------------------------------------------------------------------------- * @@ -346,10 +346,10 @@ ResCalcPerimOverlap(dev, tile) Tile *tp; int t1; int overlap; - + dev->perim = (TOP(tile)-BOTTOM(tile)-LEFT(tile)+RIGHT(tile))<<1; overlap =0; - + t1 = TiGetType(tile); /* left */ for (tp = BL(tile); BOTTOM(tp) < TOP(tile); tp=RT(tp)) @@ -359,7 +359,7 @@ ResCalcPerimOverlap(dev, tile) overlap += MIN(TOP(tile),TOP(tp))- MAX(BOTTOM(tile),BOTTOM(tp)); } - + } /*right*/ for (tp = TR(tile); TOP(tp) > BOTTOM(tile); tp=LB(tp)) @@ -369,7 +369,7 @@ ResCalcPerimOverlap(dev, tile) overlap += MIN(TOP(tile),TOP(tp))- MAX(BOTTOM(tile),BOTTOM(tp)); } - + } /*top*/ for (tp = RT(tile); RIGHT(tp) > LEFT(tile); tp=BL(tp)) @@ -379,7 +379,7 @@ ResCalcPerimOverlap(dev, tile) overlap += MIN(RIGHT(tile),RIGHT(tp))- MAX(LEFT(tile),LEFT(tp)); } - + } /*bottom */ for (tp = LB(tile); LEFT(tp) < RIGHT(tile); tp=TR(tp)) @@ -389,18 +389,18 @@ ResCalcPerimOverlap(dev, tile) overlap += MIN(RIGHT(tile),RIGHT(tp))- MAX(LEFT(tile),LEFT(tp)); } - + } dev->overlap = overlap; } - - + + /* * ---------------------------------------------------------------------------- * * DBTreeCopyConnectDCS -- * - * Basically the same as DBTreeCopyConnect, except it calls + * Basically the same as DBTreeCopyConnect, except it calls * dbcConnectFuncDCS. * * Results: @@ -416,14 +416,14 @@ ResDevTile * DBTreeCopyConnectDCS(scx, mask, xMask, connect, area, destUse) SearchContext *scx; TileTypeBitMask *mask; - int xMask; + int xMask; TileTypeBitMask *connect; - Rect *area; + Rect *area; CellUse *destUse; { static int first = 1; - struct conSrArg2 csa2; + struct conSrArg2 csa2; int dev, pNum; char *dev_name; TileTypeBitMask *newmask; @@ -498,7 +498,7 @@ DBTreeCopyConnectDCS(scx, mask, xMask, connect, area, destUse) DBReComputeBbox(def); return(DevList); } - + #ifdef ARIEL /* @@ -521,7 +521,7 @@ int resSubSearchFunc(tile,cx) Tile *tile; TreeContext *cx; - + { ResDevTile *thisDev; @@ -529,7 +529,7 @@ resSubSearchFunc(tile,cx) TileType t = TiGetType(tile); ExtDevice *devptr; - /* Right now, we're only going to extract substrate terminals for + /* Right now, we're only going to extract substrate terminals for devices with only one diffusion terminal, principally bipolar devices. */ @@ -542,7 +542,7 @@ resSubSearchFunc(tile,cx) thisDev->nextDev = DevList; DevList = thisDev; ResCalcPerimOverlap(thisDev,tile); - + return 0; } diff --git a/resis/ResDebug.c b/resis/ResDebug.c index d70777e2..4453eed7 100644 --- a/resis/ResDebug.c +++ b/resis/ResDebug.c @@ -29,7 +29,7 @@ static char rcsid[] __attribute__ ((unused)) = "$Header: /usr/cvsroot/magic-8.0/ #define MAXNAME 1000 #define KV_TO_mV 1000000 - + /* *------------------------------------------------------------------------- * @@ -58,7 +58,7 @@ ResPrintNodeList(fp,list) list,list->rn_loc.p_x,list->rn_loc.p_y,list->rn_noderes); } } - + /* *------------------------------------------------------------------------- * @@ -97,7 +97,7 @@ ResPrintResistorList(fp,list) } } - + /* *------------------------------------------------------------------------- * @@ -137,7 +137,7 @@ ResPrintDeviceList(fp,list) fprintf(fp, "%c (%d,%d) ",termtype[i], list->rd_terminals[i]->rn_loc.p_x, list->rd_terminals[i]->rn_loc.p_y); - + } if (fp == stdout) TxPrintf("\n"); diff --git a/resis/ResFract.c b/resis/ResFract.c index 09a42a45..3dd9fcf0 100644 --- a/resis/ResFract.c +++ b/resis/ResFract.c @@ -1,5 +1,5 @@ /* - * ResFract.c + * ResFract.c * * routines to convert a maximum horizontal rectangles database * into one fractured in the manner of Horowitz's '83 Transactions @@ -36,7 +36,7 @@ Plane *resFracPlane; extern void ResCheckConcavity(); - + /* * -------------------------------------------------------------------- * @@ -44,8 +44,8 @@ extern void ResCheckConcavity(); * one where the split at each concave corner is in the direction * with the least material of the same tiletype. This is done * using TiSplitX and TiJoinY. Joins are only done on tiles with - * the same time; this implies that contacts should first be erased - * using ResDissolve contacts. + * the same time; this implies that contacts should first be erased + * using ResDissolve contacts. * * We can't use DBSrPaintArea because the fracturing * routines modify the database. This is essentially the same routine @@ -83,16 +83,16 @@ enumerate: if ((tt=TiGetType(resSrTile)) != TT_SPACE) { - resTopTile = RT(resSrTile); + resTopTile = RT(resSrTile); while (RIGHT(resTopTile) > LEFT(resSrTile)) { TileType ntt = TiGetType(resTopTile); - + if (ntt != tt) { resTopTile=BL(resTopTile); continue; - } + } /* ok, we may have found a concave corner */ ResCheckConcavity(resSrTile,resTopTile,tt); if (resTopTile == NULL) break; @@ -105,7 +105,7 @@ enumerate: resTopTile=BL(resTopTile); } } - + } tpnew = TR(resSrTile); @@ -139,7 +139,7 @@ enumerate: } return (0); } - + /* *------------------------------------------------------------------------- * @@ -240,7 +240,7 @@ ResCheckConcavity(bot,top,tt) } } } - + /* *------------------------------------------------------------------------- * @@ -248,8 +248,8 @@ ResCheckConcavity(bot,top,tt) * for tiles of a given type. * * Results: returns the coordinate that is the farthest point in the specified - * direction that one can walk and still be surrounded by material of - * a given type. + * direction that one can walk and still be surrounded by material of + * a given type. * * Side Effects: if func is non-NULL, it is called on each tile intersected * by the path. (Note that if the path moves along the edge of a tile, @@ -268,7 +268,7 @@ resWalkup(tile,tt,xpos,ypos,func) { Point pt; Tile *tp; - + pt.p_x = xpos; while (TiGetType(tile) == tt) { @@ -281,7 +281,7 @@ resWalkup(tile,tt,xpos,ypos,func) if (TiGetType(tp) != tt) return(BOTTOM(tp)); } } - else + else { if (func) tile = (*func)(tile,xpos); } @@ -302,7 +302,7 @@ resWalkdown(tile,tt,xpos,ypos,func) Point pt; Tile *tp; Tile *endt; - + pt.p_x = xpos; while (TiGetType(tile) == tt) { @@ -315,14 +315,14 @@ resWalkdown(tile,tt,xpos,ypos,func) if (TiGetType(tp) != tt) { if (BOTTOM(tp) < ypos) endt = tp; - } + } } if (endt) { return TOP(endt); } } - else + else { if (func) tile = (*func)(tile,xpos); } @@ -342,7 +342,7 @@ resWalkright(tile,tt,xpos,ypos,func) { Point pt; Tile *tp; - + pt.p_y = ypos; while (TiGetType(tile) == tt) { @@ -355,7 +355,7 @@ resWalkright(tile,tt,xpos,ypos,func) if (TiGetType(tp) != tt) return(LEFT(tp)); } } - else + else { if (func) tile = (*func)(tile,ypos); } @@ -376,7 +376,7 @@ resWalkleft(tile,tt,xpos,ypos,func) Point pt; Tile *tp; Tile *endt; - + pt.p_y = ypos; while (TiGetType(tile) == tt) { @@ -389,14 +389,14 @@ resWalkleft(tile,tt,xpos,ypos,func) if (TiGetType(tp) != tt) { if (LEFT(tp) < xpos) endt = tp; - } + } } if (endt) { return RIGHT(endt); } } - else + else { if (func) tile = (*func)(tile,ypos); } @@ -405,7 +405,7 @@ resWalkleft(tile,tt,xpos,ypos,func) } return(RIGHT(tile)); } - + /* *------------------------------------------------------------------------- * @@ -428,7 +428,7 @@ ResSplitX(tile,x) TileType tt = TiGetType(tile); Tile *tp = TiSplitX(tile,x); Tile *tp2; - + TiSetBody(tp,tt); /* check to see if we can combine with the tiles above or below us */ tp2 = RT(tile); @@ -437,13 +437,13 @@ ResSplitX(tile,x) if (tp2 == resSrTile) { if (resTopTile == tile) resTopTile = NULL; - TiJoinY(tp2,tile,resFracPlane); + TiJoinY(tp2,tile,resFracPlane); tile = tp2; } else { if (resTopTile == tp2) resTopTile = NULL; - TiJoinY(tile,tp2,resFracPlane); + TiJoinY(tile,tp2,resFracPlane); } } tp2 = LB(tile); @@ -452,13 +452,13 @@ ResSplitX(tile,x) if (tp2 == resSrTile) { if (resTopTile == tile) resTopTile = NULL; - TiJoinY(tp2,tile,resFracPlane); + TiJoinY(tp2,tile,resFracPlane); tile = tp2; } else { if (resTopTile == tp2) resTopTile = NULL; - TiJoinY(tile,tp2,resFracPlane); + TiJoinY(tile,tp2,resFracPlane); } } /* do the same checks with the newly created tile */ @@ -471,7 +471,7 @@ ResSplitX(tile,x) tp2 = LB(tp); if (TiGetType(tp2) == tt && LEFT(tp2) == LEFT(tp) && RIGHT(tp2) == RIGHT(tp)) { - TiJoinY(tp2,tp,resFracPlane); + TiJoinY(tp2,tp,resFracPlane); } return tile; } diff --git a/resis/ResJunct.c b/resis/ResJunct.c index 2c736df2..3d19089a 100644 --- a/resis/ResJunct.c +++ b/resis/ResJunct.c @@ -27,7 +27,7 @@ static char rcsid[] __attribute__ ((unused)) = "$Header: /usr/cvsroot/magic-8.0/ #include "resis/resis.h" - + /* *------------------------------------------------------------------------- * @@ -37,7 +37,7 @@ static char rcsid[] __attribute__ ((unused)) = "$Header: /usr/cvsroot/magic-8.0/ * * Results:none * - * Side Effects: determines to which terminal (source or drain) node + * Side Effects: determines to which terminal (source or drain) node * is connected. Makes new node if node hasn't already been created . * Allocates breakpoint in current tile for device. * @@ -55,7 +55,7 @@ ResNewSDDevice(tile,tp,xj,yj,direction,PendingList) tElement *tcell; int newnode; tileJunk *j; - + newnode = FALSE; j = (tileJunk *) tp->ti_client; resDev = j->deviceList; @@ -96,13 +96,13 @@ ResNewSDDevice(tile,tp,xj,yj,direction,PendingList) } NEWBREAK(resptr,tile,xj,yj,NULL); } - + /* *------------------------------------------------------------------------- * * ResProcessJunction-- Called whenever a tile connecting to the tile being * worked on is found. If a junction is already present, its address is - * returned. Otherwise, a new junction is made. + * returned. Otherwise, a new junction is made. * * Results: None. * @@ -151,7 +151,7 @@ ResProcessJunction(tile, tp, xj, yj, NodeList) j0->junctionList = junction; junction->rj_nextjunction[1] = j2->junctionList; j2->junctionList = junction; - + NEWBREAK(junction->rj_jnode,tile, junction->rj_loc.p_x,junction->rj_loc.p_y,NULL); diff --git a/resis/ResMain.c b/resis/ResMain.c index 30a62d72..f1e65a47 100644 --- a/resis/ResMain.c +++ b/resis/ResMain.c @@ -46,13 +46,13 @@ extern ResSimNode *ResInitializeNode(); extern HashTable ResNodeTable; - + /* *-------------------------------------------------------------------------- * * ResInitializeConn-- * - * Sets up mask by Source/Drain type of devices. This is + * Sets up mask by Source/Drain type of devices. This is * exts_deviceSDtypes turned inside out. * * Results: none @@ -68,7 +68,7 @@ ResInitializeConn() TileType dev, diff; char *dev_name; ExtDevice *devptr; - + for (dev = TT_TECHDEPBASE; dev < TT_MAXTYPES; dev++) { devptr = ExtCurStyle->exts_device[dev]; @@ -116,14 +116,14 @@ ResGetReCell() ResDef = DBCellNewDef("__RESIS__"); ASSERT (ResDef != (CellDef *) NULL, "ResGetReCell"); DBCellSetAvail(ResDef); - ResDef->cd_flags |= CDINTERNAL; + ResDef->cd_flags |= CDINTERNAL; } ResUse = DBCellNewUse(ResDef, (char *) NULL); DBSetTrans(ResUse, &GeoIdentityTransform); ResUse->cu_expandMask = CU_DESCEND_SPECIAL; } - + /* *-------------------------------------------------------------------------- * @@ -131,7 +131,7 @@ ResGetReCell() * * results: none * - * Side Effects: All contacts in the design are broken into their + * Side Effects: All contacts in the design are broken into their * constituent * layers. There should be no contacts in ResDef after this procedure * runs. @@ -157,7 +157,7 @@ ResDissolveContacts(contacts) TxError("Error in Contact Dissolving for %s \n",ResCurrentNode); } #endif - + DBFullResidueMask(oldtype, &residues); DBErase(ResUse->cu_def, &(contacts->cp_rect), oldtype); @@ -167,7 +167,7 @@ ResDissolveContacts(contacts) { if (TTMaskHasType(&ExtCurStyle->exts_deviceMask, t)) continue; - DBPaint(ResUse->cu_def, &(contacts->cp_rect), t); + DBPaint(ResUse->cu_def, &(contacts->cp_rect), t); } } @@ -233,7 +233,7 @@ ResMakePortBreakpoints(def) * breakpoints in the "tileJunk" field of their respective tiles in * ResUse. This ensures (among other things) that pins of a top level * cell will be retained and become the endpoint of a net. - * + * *---------------------------------------------------------------------------- */ void @@ -265,7 +265,7 @@ ResMakeLabelBreakpoints(def) TTMaskSetOnlyType(&mask, slab->lab_type); (void) DBSrPaintArea((Tile *) NULL, plane, rect, &mask, ResAddBreakpointFunc, (ClientData)node); - + } } @@ -274,7 +274,7 @@ ResMakeLabelBreakpoints(def) * * ResAddBreakpointFunc -- * - * Add a breakpoint to the "tileJunk" structure of the tile + * Add a breakpoint to the "tileJunk" structure of the tile * *---------------------------------------------------------------------------- */ @@ -290,11 +290,11 @@ ResAddBreakpointFunc(tile, node) return 0; NEWPORT(node, tile); - + return 0; } - + /* *--------------------------------------------------------------------------- * @@ -303,7 +303,7 @@ ResAddBreakpointFunc(tile, node) * * Results: none * - * Side Effects: dissolving contacts eliminated the tiles that + * Side Effects: dissolving contacts eliminated the tiles that * contacts->nextcontact pointed to. This procedure finds the tile now under * center and sets that tile's ti_client field to point to the contact. The * old value of clientdata is set to nextTilecontact. @@ -318,7 +318,7 @@ ResFindNewContactTiles(contacts) int pNum; Tile *tile; TileTypeBitMask mask; - + for (; contacts != (ResContactPoint *) NULL; contacts = contacts->cp_nextcontact) { DBFullResidueMask(contacts->cp_type, &mask); @@ -337,7 +337,7 @@ ResFindNewContactTiles(contacts) { tileJunk *j = (tileJunk *)tile->ti_client; cElement *ce; - + ce = (cElement *) mallocMagic((unsigned) (sizeof(cElement))); contacts->cp_tile[contacts->cp_currentcontact] = tile; ce->ce_thisc = contacts; @@ -354,7 +354,7 @@ ResFindNewContactTiles(contacts) #endif } } - + /* *-------------------------------------------------------------------------- * @@ -365,7 +365,7 @@ ResFindNewContactTiles(contacts) * * Results: Return 1 if any error occurred, 0 otherwise. * - * Side Effects: Cleans extraneous linked lists from nodes. + * Side Effects: Cleans extraneous linked lists from nodes. * *-------------------------------------------------------------------------- */ @@ -384,7 +384,7 @@ ResProcessTiles(goodies, origin) ResFixPoint *fix; resNode *resptr; int (*tilefunc)(); - + #ifdef LAPLACE tilefunc = (ResOptionsFlags & ResOpt_DoLaplace)?ResLaplaceTile:ResEachTile; #else @@ -412,7 +412,7 @@ ResProcessTiles(goodies, origin) if (TiGetTypeExact(tile) != TT_SPACE) { fix->fp_tile = tile; - } + } else { tile = NULL; @@ -435,7 +435,7 @@ ResProcessTiles(goodies, origin) { Tile *tile = fix->fp_tile; - if (tile != NULL && (((tileJunk *)tile->ti_client)->tj_status & + if (tile != NULL && (((tileJunk *)tile->ti_client)->tj_status & RES_TILE_DONE) == 0) { resCurrentNode = fix->fp_node; @@ -455,17 +455,17 @@ ResProcessTiles(goodies, origin) while (ResNodeQueue != NULL) { - /* + /* * merged keeps track of whether another node gets merged into * the current one. If it does, then the node must be processed * because additional junctions or contacts were added */ - + resptr2 = ResNodeQueue; merged = FALSE; /* Process all junctions associated with node */ - + for (workingj = resptr2->rn_je; workingj != NULL; workingj = workingj->je_nextj) { ResJunction *rj = workingj->je_thisj; @@ -475,7 +475,7 @@ ResProcessTiles(goodies, origin) { Tile *tile = rj->rj_Tile[tilenum]; tileJunk *j = (tileJunk *) tile->ti_client; - + if ((j->tj_status & RES_TILE_DONE) == 0) { resCurrentNode = resptr2; @@ -522,12 +522,12 @@ ResProcessTiles(goodies, origin) } } - /* + /* * If nothing new has been added via a merge, then the node is * finished. It is removed from the pending queue, added to the * done list, cleaned up, and passed to ResDoneWithNode */ - + if (merged == FALSE) { ResRemoveFromQueue(resptr2,&ResNodeQueue); @@ -550,10 +550,10 @@ ResProcessTiles(goodies, origin) } return(0); } - + /*------------------------------------------------------------------------- * - * ResExtractNet-- extracts the resistance net at the specified + * ResExtractNet-- extracts the resistance net at the specified * rn_loc. If the resulting net is greater than the tolerance, * simplify and return the resulting network. * @@ -566,7 +566,7 @@ ResProcessTiles(goodies, origin) */ bool -ResExtractNet(startlist,goodies,cellname) +ResExtractNet(startlist,goodies,cellname) ResFixPoint *startlist; ResGlobalParams *goodies; char *cellname; @@ -580,7 +580,7 @@ ResExtractNet(startlist,goodies,cellname) static int first = 1; /* Make sure all global network variables are reset */ - + ResResList=NULL; ResNodeList=NULL; ResDevList=NULL; @@ -589,15 +589,15 @@ ResExtractNet(startlist,goodies,cellname) ResOriginNode = NULL; /* Pass back network pointers */ - + goodies->rg_maxres = 0; goodies->rg_tilecount = 0; /*set up internal stuff if this is the first time through */ - if (first) + if (first) { - ResInitializeConn(); + ResInitializeConn(); first = 0; ResGetReCell(); } @@ -625,10 +625,10 @@ ResExtractNet(startlist,goodies,cellname) return TRUE; } scx.scx_use = (CellUse *) w->w_surfaceID; - scx.scx_trans = GeoIdentityTransform; + scx.scx_trans = GeoIdentityTransform; } - DBCellClearDef(ResUse->cu_def); + DBCellClearDef(ResUse->cu_def); /* Copy Paint */ @@ -659,7 +659,7 @@ ResExtractNet(startlist,goodies,cellname) ResCopyMask, &TiPlaneRect, ResUse); for (tmp = newdevtiles; tmp && tmp->nextDev; tmp = tmp->nextDev); - if (newdevtiles) + if (newdevtiles) { if (DevTiles) { @@ -680,17 +680,17 @@ ResExtractNet(startlist,goodies,cellname) ResContactList = (ResContactPoint *) ExtFindRegions(ResUse->cu_def, &(ResUse->cu_def->cd_bbox), &DBAllButSpaceAndDRCBits, - ResConnectWithSD, extUnInit, ResFirst, + ResConnectWithSD, extUnInit, ResFirst, ResEach); ExtResetTiles(ResUse->cu_def,extUnInit); - - /* - * dissolve the contacts and find which tiles now cover the point + + /* + * dissolve the contacts and find which tiles now cover the point * where the tile used to be. */ ResDissolveContacts(ResContactList); - + /* Add "junk" fields to tiles */ for (pNum = PL_TECHDEPBASE; pNum < DBNumPlanes; pNum++) @@ -705,7 +705,7 @@ ResExtractNet(startlist,goodies,cellname) } /* Finish preprocessing. */ - + ResMakePortBreakpoints(ResUse->cu_def); ResMakeLabelBreakpoints(ResUse->cu_def); ResFindNewContactTiles(ResContactList); @@ -740,7 +740,7 @@ ResExtractNet(startlist,goodies,cellname) return FALSE; } - + /* *------------------------------------------------------------------------- * @@ -772,7 +772,7 @@ ResCleanUpEverything() &(ResUse->cu_def->cd_bbox),&DBAllButSpaceAndDRCBits, (ClientData) CLIENTDEFAULT,ResRemovePlumbing, (ClientData) NULL); - + } while (ResNodeList != NULL) @@ -802,11 +802,11 @@ ResCleanUpEverything() } } - DBCellClearDef(ResUse->cu_def); + DBCellClearDef(ResUse->cu_def); } - + /* *------------------------------------------------------------------------- * @@ -833,7 +833,7 @@ FindStartTile(goodies, SourcePoint) Tile *tile, *tp; int pnum, t1, t2; ExtDevice *devptr; - + /* If the drive point is on a contact, check for the contact residues */ /* first, then the contact type itself. */ @@ -895,7 +895,7 @@ FindStartTile(goodies, SourcePoint) goodies->rg_devloc->p_x, goodies->rg_devloc->p_y); return NULL; } - + tile = ResUse->cu_def->cd_planes[pnum]->pl_hint; GOTOPOINT(tile, &workingPoint); @@ -981,7 +981,7 @@ FindStartTile(goodies, SourcePoint) } return((Tile *) NULL); } - + /* *------------------------------------------------------------------------- * @@ -1005,10 +1005,10 @@ ResGetDevice(pt) Point workingPoint; Tile *tile; int pnum; - + workingPoint.p_x = (*pt).p_x; workingPoint.p_y = (*pt).p_y; - + for (pnum= PL_TECHDEPBASE; pnum < DBNumPlanes; pnum++) { if (TTMaskIntersect(&ExtCurStyle->exts_deviceMask,&DBPlaneTypes[pnum]) == 0) diff --git a/resis/ResMakeRes.c b/resis/ResMakeRes.c index 022f9ed1..6f15b3ee 100644 --- a/resis/ResMakeRes.c +++ b/resis/ResMakeRes.c @@ -31,12 +31,12 @@ bool ResCalcNearDevice(); bool ResCalcNorthSouth(); bool ResCalcEastWest(); - + /* *-------------------------------------------------------------------------- * * ResCalcTileResistance-- Given a set of partitions for a tile, the tile can - * be converted into resistors. To do this, nodes are sorted in the + * be converted into resistors. To do this, nodes are sorted in the * direction of current flow. Resistors are created by counting squares * between successive breakpoints. Breakpoints with the same coordinate * are combined. @@ -49,7 +49,7 @@ bool ResCalcEastWest(); * */ -bool +bool ResCalcTileResistance(tile, junk, pendingList, doneList) Tile *tile; tileJunk *junk; @@ -61,10 +61,10 @@ ResCalcTileResistance(tile, junk, pendingList, doneList) int device; bool merged; Breakpoint *p1; - + merged = FALSE; device = FALSE; - + if ((p1 = junk->breakList) == NULL) return FALSE; for (; p1; p1 = p1->br_next) { @@ -79,10 +79,10 @@ ResCalcTileResistance(tile, junk, pendingList, doneList) device = TRUE; } } - + /* Finally, produce resistors for partition. Keep track of */ /* whether or not the node was involved in a merge. */ - + if (device) { merged |= ResCalcNearDevice(tile, pendingList, doneList, &ResResList); @@ -96,7 +96,7 @@ ResCalcTileResistance(tile, junk, pendingList, doneList) merged |= ResCalcEastWest(tile, pendingList, doneList, &ResResList); } - /* + /* * For all the new resistors, propagate the resistance from the origin * to the new nodes. */ @@ -104,7 +104,7 @@ ResCalcTileResistance(tile, junk, pendingList, doneList) return(merged); } - + /* *------------------------------------------------------------------------- * @@ -131,17 +131,17 @@ ResCalcEastWest(tile, pendingList, doneList, resList) resNode *currNode; float rArea; tileJunk *junk = (tileJunk *)tile->ti_client; - + merged = FALSE; height = TOP(tile) - BOTTOM(tile); - /* + /* * One Breakpoint? No resistors need to be made. Free up the first * breakpoint, then return. */ p1 = junk->breakList; - if (p1->br_next == NULL) + if (p1->br_next == NULL) { p1->br_this->rn_float.rn_area += height * (LEFT(tile) - RIGHT(tile)); freeMagic((char *)p1); @@ -152,9 +152,9 @@ ResCalcEastWest(tile, pendingList, doneList, resList) /* re-sort nodes left to right. */ ResSortBreaks(&junk->breakList, TRUE); - - /* - * Eliminate breakpoints with the same X coordinate and merge + + /* + * Eliminate breakpoints with the same X coordinate and merge * their nodes. */ @@ -199,7 +199,7 @@ ResCalcEastWest(tile, pendingList, doneList, resList) freeMagic((char *)p1); } - /* + /* * Was the node used in another junk or breakpoint? * If so, replace the old node with the new one. */ @@ -214,7 +214,7 @@ ResCalcEastWest(tile, pendingList, doneList, resList) } } - /* + /* * If the X coordinates don't match, make a resistor between * the breakpoints. */ @@ -246,7 +246,7 @@ ResCalcEastWest(tile, pendingList, doneList, resList) resistor->rr_status = RES_DIAGONAL; resistor->rr_status |= (SplitDirection(tile)) ? RES_NS : RES_EW; - + } else { @@ -264,7 +264,7 @@ ResCalcEastWest(tile, pendingList, doneList, resList) resistor->rr_connection1->rn_float.rn_area += rArea; resistor->rr_connection2->rn_float.rn_area += rArea; resistor->rr_float.rr_area = 0; - + freeMagic((char *)p1); } } @@ -274,7 +274,7 @@ ResCalcEastWest(tile, pendingList, doneList, resList) return(merged); } - + /* *------------------------------------------------------------------------- * @@ -301,17 +301,17 @@ ResCalcNorthSouth(tile, pendingList, doneList, resList) resNode *currNode; float rArea; tileJunk *junk = (tileJunk *)tile->ti_client; - + merged = FALSE; width = RIGHT(tile)-LEFT(tile); - /* + /* * One Breakpoint? No resistors need to be made. Free up the first * breakpoint, then return. */ p1 = junk->breakList; - if (p1->br_next == NULL) + if (p1->br_next == NULL) { p1->br_this->rn_float.rn_area += width * (TOP(tile) - BOTTOM(tile)); freeMagic((char *)p1); @@ -322,8 +322,8 @@ ResCalcNorthSouth(tile, pendingList, doneList, resList) /* re-sort nodes south to north. */ ResSortBreaks(&junk->breakList, FALSE); - /* - * Eliminate breakpoints with the same Y coordinate and merge + /* + * Eliminate breakpoints with the same Y coordinate and merge * their nodes. */ @@ -367,8 +367,8 @@ ResCalcNorthSouth(tile, pendingList, doneList, resList) ResMergeNodes(p2->br_this,p1->br_this,pendingList,doneList); freeMagic((char *)p1); } - - /* + + /* * Was the node used in another junk or breakpoint? * If so, replace the old node with the new one. */ @@ -383,7 +383,7 @@ ResCalcNorthSouth(tile, pendingList, doneList, resList) } } - /* + /* * If the Y coordinates don't match, make a resistor between * the breakpoints. */ @@ -440,7 +440,7 @@ ResCalcNorthSouth(tile, pendingList, doneList, resList) return(merged); } - + /* *------------------------------------------------------------------------- * @@ -448,7 +448,7 @@ ResCalcNorthSouth(tile, pendingList, doneList, resList) * devices is tricky because there are two adjoining regions with * vastly different sheet resistances. ResCalcNearDevice is called * whenever a diffusion tile adjoining a real tile is found. It makes - * a guess at the correct direction of current flow, removes extra + * a guess at the correct direction of current flow, removes extra * breakpoints, and call either ResCalcEastWest or ResCalcNorthSouth * * Results: @@ -470,16 +470,16 @@ ResCalcNearDevice(tile, pendingList, doneList, resList) int devcount,devedge,deltax,deltay; Breakpoint *p1,*p2,*p3; tileJunk *junk = (tileJunk *)tile->ti_client; - - + + merged = FALSE; - /* + /* One Breakpoint? No resistors need to be made. Free up the first breakpoint, then return. */ - - if (junk->breakList->br_next == NULL) + + if (junk->breakList->br_next == NULL) { freeMagic((char *)junk->breakList); junk->breakList = NULL; @@ -503,7 +503,7 @@ ResCalcNearDevice(tile, pendingList, doneList, resList) /* use distance from device to next breakpoint as determinant */ /* if there is only one device or if all the devices are along */ /* the same edge. */ - if (devcount == 1 || + if (devcount == 1 || (devedge & LEFTEDGE) == devedge || (devedge & RIGHTEDGE) == devedge || (devedge & TOPEDGE) == devedge || @@ -517,18 +517,18 @@ ResCalcNearDevice(tile, pendingList, doneList, resList) { break; } - if (p1->br_next != NULL && + if (p1->br_next != NULL && (p1->br_loc.p_x != p1->br_next->br_loc.p_x || p1->br_loc.p_y != p1->br_next->br_loc.p_y)) - + { p2 = p1; } } deltax=INFINITY; - for (p3 = p1->br_next; - p3 != NULL && - p3->br_loc.p_x == p1->br_loc.p_x && + for (p3 = p1->br_next; + p3 != NULL && + p3->br_loc.p_x == p1->br_loc.p_x && p3->br_loc.p_y == p1->br_loc.p_y; p3 = p3->br_next); if (p3 != NULL) { @@ -584,18 +584,18 @@ ResCalcNearDevice(tile, pendingList, doneList, resList) { break; } - if (p1->br_next != NULL && + if (p1->br_next != NULL && (p1->br_loc.p_x != p1->br_next->br_loc.p_x || p1->br_loc.p_y != p1->br_next->br_loc.p_y)) - + { p2 = p1; } } deltay=INFINITY; - for (p3 = p1->br_next; - p3 != NULL && - p3->br_loc.p_x == p1->br_loc.p_x && + for (p3 = p1->br_next; + p3 != NULL && + p3->br_loc.p_x == p1->br_loc.p_x && p3->br_loc.p_y == p1->br_loc.p_y; p3 = p3->br_next); if (p3 != NULL) { @@ -652,7 +652,7 @@ ResCalcNearDevice(tile, pendingList, doneList, resList) } /* multiple devices connected to the partition */ - else + else { if (devedge == 0) { @@ -665,8 +665,8 @@ ResCalcNearDevice(tile, pendingList, doneList, resList) /* but not along the left or right */ /* 2. there are devices along two sides at right angles, */ /* and the tile is wider than it is tall. */ - - if ((devedge & TOPEDGE) && + + if ((devedge & TOPEDGE) && (devedge & BOTTOMEDGE) && !(devedge & LEFTEDGE) && !(devedge & RIGHTEDGE) || @@ -688,7 +688,7 @@ ResCalcNearDevice(tile, pendingList, doneList, resList) p2 = junk->breakList; while ( p2 != NULL) { - if (p2->br_this == p1->br_this && + if (p2->br_this == p1->br_this && p2 != p1 && p2->br_loc.p_y != BOTTOM(tile) && p2->br_loc.p_y != TOP(tile)) @@ -729,7 +729,7 @@ ResCalcNearDevice(tile, pendingList, doneList, resList) p2 = junk->breakList; while ( p2 != NULL) { - if (p2->br_this == p1->br_this && + if (p2->br_this == p1->br_this && p2 != p1 && p2->br_loc.p_x != LEFT(tile) && p2->br_loc.p_x != RIGHT(tile)) @@ -760,14 +760,14 @@ ResCalcNearDevice(tile, pendingList, doneList, resList) } } - + /* *------------------------------------------------------------------------- * * ResDoContacts-- Add node (or nodes) for a contact. If there are contact * resistances, also add a resistor. * - * Results: + * Results: * None. * * Side Effects: Creates nodes and resistors @@ -789,7 +789,7 @@ ResDoContacts(contact, nodes, resList) resResistor *resistor; resElement *element; static int too_small = 1; - + minside = CIFGetContactSize(contact->cp_type, &viawidth, &spacing, &border); cscale = CIFCurStyle->cs_scaleFactor; @@ -856,14 +856,14 @@ ResDoContacts(contact, nodes, resList) resptr = (resNode *) mallocMagic((unsigned) (sizeof(resNode))); InitializeNode(resptr,x,y,RES_NODE_CONTACT); ResAddToQueue(resptr,nodes); - + /* add contact pointer to node */ ccell = (cElement *) mallocMagic((unsigned) (sizeof(cElement))); ccell->ce_nextc = resptr->rn_ce; resptr->rn_ce = ccell; ccell->ce_thisc = contact; - + contact->cp_cnode[tilenum] = resptr; NEWBREAK(resptr, tile, contact->cp_center.p_x, contact->cp_center.p_y, &contact->cp_rect); @@ -879,7 +879,7 @@ ResDoContacts(contact, nodes, resList) (*resList) = resistor; resistor->rr_connection1 = contact->cp_cnode[tilenum-1]; resistor->rr_connection2 = contact->cp_cnode[tilenum]; - + element = (resElement *) mallocMagic((unsigned) (sizeof(resElement))); element->re_nextEl = contact->cp_cnode[tilenum-1]->rn_re; element->re_thisEl = resistor; @@ -889,11 +889,11 @@ ResDoContacts(contact, nodes, resList) element->re_thisEl = resistor; contact->cp_cnode[tilenum]->rn_re = element; - /* Need to figure out how to handle the multiple nodes */ + /* Need to figure out how to handle the multiple nodes */ /* and multiple resistors necessary to determine the */ /* correct geometry for the geometry extractor. For */ /* now, extract as one big glob. */ - + /* rr_cl doesn't need to represent centerline; use for */ /* # squares in y direction instead; use rr_width for */ /* # squares in x direction. */ @@ -966,4 +966,4 @@ ResSortBreaks(masterlist, xsort) } } } - + diff --git a/resis/ResMerge.c b/resis/ResMerge.c index 729dd937..db328065 100644 --- a/resis/ResMerge.c +++ b/resis/ResMerge.c @@ -25,7 +25,7 @@ extern void ResEliminateResistor(); extern void ResCleanNode(); extern void ResFixBreakPoint(); - + /* *------------------------------------------------------------------------- * @@ -49,13 +49,13 @@ ResDoneWithNode(resptr) resNode *resptr2; resElement *rcell1; resResistor *rr1; - + resptr2 = NULL; resptr->rn_status |= TRUE; status = UNTOUCHED; /* are there any resistors? */ - + if (resptr->rn_re == NULL) { return; @@ -64,10 +64,10 @@ ResDoneWithNode(resptr) /* Special handling for geometry option */ if (ResOptionsFlags & ResOpt_Geometry) return; - + /* Eliminate resistors with connections to one terminal and */ /* resistors with value 0. */ - + for (rcell1 = resptr->rn_re; rcell1 != NULL; rcell1 = rcell1->re_nextEl) { rr1 = rcell1->re_thisEl; @@ -80,7 +80,7 @@ ResDoneWithNode(resptr) status = LOOP; ResDoneWithNode(resptr); break; - + } else if (rr1->rr_value == 0) { @@ -96,7 +96,7 @@ ResDoneWithNode(resptr) ResMergeNodes(resptr2,resptr,&ResNodeQueue,&ResNodeList); resptr2->rn_float.rn_area += rr1->rr_float.rr_area; ResEliminateResistor(rr1,&ResResList); - if ((resptr2->rn_status & TRUE) == TRUE) + if ((resptr2->rn_status & TRUE) == TRUE) { resptr2->rn_status &= ~TRUE; ResDoneWithNode(resptr2); @@ -121,11 +121,11 @@ ResDoneWithNode(resptr) } if ((status == UNTOUCHED) && (resptr->rn_why != RES_NODE_ORIGIN)) { - status = ResTriangleCheck(resptr); + status = ResTriangleCheck(resptr); } } - + /* *------------------------------------------------------------------------ * @@ -133,7 +133,7 @@ ResDoneWithNode(resptr) * * Results: none * - * Side Effects: ResFixRes combines two resistors in series. the second + * Side Effects: ResFixRes combines two resistors in series. the second * Resistor is eliminated. Resptr is the node that is "cut out" of the * network. * @@ -143,11 +143,11 @@ ResDoneWithNode(resptr) void ResFixRes(resptr,resptr2,resptr3,elimResis,newResis) resNode *resptr,*resptr2,*resptr3; - resResistor *elimResis, *newResis; + resResistor *elimResis, *newResis; { resElement *thisREl; - + resptr3->rn_float.rn_area += newResis->rr_value*resptr->rn_float.rn_area/((float)(newResis->rr_value+elimResis->rr_value)); resptr2->rn_float.rn_area += elimResis->rr_value*resptr->rn_float.rn_area/((float)(newResis->rr_value+elimResis->rr_value)); newResis->rr_value += elimResis->rr_value; @@ -167,15 +167,15 @@ ResFixRes(resptr,resptr2,resptr3,elimResis,newResis) (thisREl->re_thisEl = newResis); break; } - + } if (thisREl == NULL) TxError("Resistor not found in duo\n"); ResDeleteResPointer(resptr,elimResis); ResDeleteResPointer(resptr,newResis); - ResEliminateResistor(elimResis, &ResResList); + ResEliminateResistor(elimResis, &ResResList); ResCleanNode(resptr, TRUE,&ResNodeList,&ResNodeQueue); } - + /* *------------------------------------------------------------------------ * @@ -184,8 +184,8 @@ ResFixRes(resptr,resptr2,resptr3,elimResis,newResis) * Results: none * * Side Effects: ResFixParallel combines two resistors in parallel. T - * The second Resistor is eliminated. - * + * The second Resistor is eliminated. + * * *------------------------------------------------------------------------ */ @@ -215,7 +215,7 @@ ResFixParallel(elimResis,newResis) ResDeleteResPointer(elimResis->rr_connection2,elimResis); ResEliminateResistor(elimResis,&ResResList); } - + /* *------------------------------------------------------------------------- * @@ -265,7 +265,7 @@ ResSeriesCheck(resptr) else if (res_next->re_nextEl == NULL) { rr2 = res_next->re_thisEl; - if (!TTMaskHasType(ResNoMergeMask+rr1->rr_tt,rr2->rr_tt)) + if (!TTMaskHasType(ResNoMergeMask+rr1->rr_tt,rr2->rr_tt)) { if (rr1->rr_connection1 == resptr) { @@ -294,7 +294,7 @@ ResSeriesCheck(resptr) rr1->rr_connection1 = rr2->rr_connection2; ResFixRes(resptr,resptr2,resptr3,rr2,rr1); } - if ((resptr2->rn_status & TRUE) == TRUE) + if ((resptr2->rn_status & TRUE) == TRUE) { resptr2->rn_status &= ~TRUE; ResDoneWithNode(resptr2); @@ -323,7 +323,7 @@ ResSeriesCheck(resptr) rr1->rr_connection1 = rr2->rr_connection1; ResFixRes(resptr,resptr2,resptr3,rr2,rr1); } - if ((resptr2->rn_status & TRUE) == TRUE) + if ((resptr2->rn_status & TRUE) == TRUE) { resptr2->rn_status &= ~TRUE; ResDoneWithNode(resptr2); @@ -352,11 +352,11 @@ ResSeriesCheck(resptr) { status = SERIES; resptr3 = rr2->rr_connection2; - rr1->rr_connection2 = + rr1->rr_connection2 = rr2->rr_connection2; ResFixRes(resptr,resptr2,resptr3,rr2,rr1); } - if ((resptr2->rn_status & TRUE) == TRUE) + if ((resptr2->rn_status & TRUE) == TRUE) { resptr2->rn_status &= ~TRUE; ResDoneWithNode(resptr2); @@ -382,11 +382,11 @@ ResSeriesCheck(resptr) { status = SERIES; resptr3 = rr2->rr_connection1; - rr1->rr_connection2 = + rr1->rr_connection2 = rr2->rr_connection1; ResFixRes(resptr,resptr2,resptr3,rr2,rr1); } - if ((resptr2->rn_status & TRUE) == TRUE) + if ((resptr2->rn_status & TRUE) == TRUE) { resptr2->rn_status &= ~TRUE; ResDoneWithNode(resptr2); @@ -399,7 +399,7 @@ ResSeriesCheck(resptr) return status; } - + /* *------------------------------------------------------------------------- * @@ -422,15 +422,15 @@ ResParallelCheck(resptr) int status=UNTOUCHED; resElement *rcell1,*rcell2; - - for (rcell1 = resptr->rn_re; + + for (rcell1 = resptr->rn_re; rcell1->re_nextEl != NULL; rcell1 = rcell1->re_nextEl) { r1 = rcell1->re_thisEl; - for (rcell2 = rcell1->re_nextEl; + for (rcell2 = rcell1->re_nextEl; rcell2 != NULL; rcell2 = rcell2->re_nextEl) - + { r2 = rcell2->re_thisEl; if (TTMaskHasType(ResNoMergeMask+r1->rr_tt,r2->rr_tt)) continue; @@ -439,7 +439,7 @@ ResParallelCheck(resptr) ((r1->rr_connection1 == r2->rr_connection2) && (r1->rr_connection2 == r2->rr_connection1))) { - resptr3 = (r1->rr_connection1 == resptr) ? + resptr3 = (r1->rr_connection1 == resptr) ? r1->rr_connection2 : r1->rr_connection1; ResFixParallel(r1,r2); status = PARALLEL; @@ -459,7 +459,7 @@ ResParallelCheck(resptr) return status; } - + /* *------------------------------------------------------------------------- * @@ -483,14 +483,14 @@ ResTriangleCheck(resptr) resNode *n1,*n2,*n3; resElement *rcell1,*rcell2,*rcell3,*element; - for (rcell1 = resptr->rn_re; + for (rcell1 = resptr->rn_re; rcell1->re_nextEl != NULL; rcell1 = rcell1->re_nextEl) { rr1 = rcell1->re_thisEl; n1 = (rr1->rr_connection1 == resptr)?rr1->rr_connection2: rr1->rr_connection1; - for (rcell2 = rcell1->re_nextEl; + for (rcell2 = rcell1->re_nextEl; rcell2 != NULL; rcell2 = rcell2->re_nextEl) { rr2 = rcell2->re_thisEl; @@ -498,13 +498,13 @@ ResTriangleCheck(resptr) continue; n2 = (rr2->rr_connection1 == resptr) ? rr2->rr_connection2 : rr2->rr_connection1; - for (rcell3 = n1->rn_re; + for (rcell3 = n1->rn_re; rcell3 != NULL; rcell3 = rcell3->re_nextEl) { rr3 = rcell3->re_thisEl; - if (TTMaskHasType(ResNoMergeMask+rr1->rr_tt,rr3->rr_tt)) + if (TTMaskHasType(ResNoMergeMask+rr1->rr_tt,rr3->rr_tt)) continue; - if (TTMaskHasType(ResNoMergeMask+rr2->rr_tt,rr3->rr_tt)) + if (TTMaskHasType(ResNoMergeMask+rr2->rr_tt,rr3->rr_tt)) continue; if (((rr3->rr_connection1 != n1) || @@ -620,8 +620,8 @@ ResTriangleCheck(resptr) } return status; } - -/* + +/* *-------------------------------------------------------------------------- * * ResMergeNodes-- @@ -638,7 +638,7 @@ ResTriangleCheck(resptr) void ResMergeNodes(node1,node2,pendingList,doneList) resNode *node1,*node2,**pendingList,**doneList; - + { resElement *workingRes,*tRes; tElement *workingDev,*tDev; @@ -646,7 +646,7 @@ ResMergeNodes(node1,node2,pendingList,doneList) cElement *workingCon,*tCon; Tile *tile; int i; - + /* sanity check */ if (node1 == node2) return; if (node1 == NULL || node2 == NULL) @@ -654,7 +654,7 @@ ResMergeNodes(node1,node2,pendingList,doneList) TxError("Attempt to merge NULL node\n"); return; } - + /* don't want to merge away startpoint */ if (node2->rn_why & RES_NODE_ORIGIN) { @@ -672,8 +672,8 @@ ResMergeNodes(node1,node2,pendingList,doneList) } } node1->rn_float.rn_area += node2->rn_float.rn_area; - - + + /* combine relevant flags */ node1->rn_status |= (node2->rn_status & RN_MAXTDI); @@ -733,7 +733,7 @@ ResMergeNodes(node1,node2,pendingList,doneList) tJunc->je_nextj = node1->rn_je; node1->rn_je = tJunc; } - + /* Append connection lists */ workingCon = node2->rn_ce; while (workingCon != NULL) @@ -758,7 +758,7 @@ ResMergeNodes(node1,node2,pendingList,doneList) tCon->ce_nextc = node1->rn_ce; node1->rn_ce = tCon; } - + /* Moves resistors to new node */ workingRes = node2->rn_re; while (workingRes != NULL) @@ -804,7 +804,7 @@ ResMergeNodes(node1,node2,pendingList,doneList) freeMagic((char *)node2); } - + /* *------------------------------------------------------------------------- * @@ -826,7 +826,7 @@ ResDeleteResPointer(node,resistor) { resElement *rcell1,*rcell2; int notfound=TRUE; - + rcell1 = NULL; rcell2 = node->rn_re; while (rcell2 != NULL) @@ -858,7 +858,7 @@ ResDeleteResPointer(node,resistor) } } - + /* *------------------------------------------------------------------------- * @@ -898,7 +898,7 @@ ResEliminateResistor(resistor,homelist) freeMagic((char *)resistor); } - + /* *------------------------------------------------------------------------- * @@ -925,7 +925,7 @@ ResCleanNode(resptr,junk,homelist1,homelist2) cElement *ccell; jElement *jcell; tElement *tcell; - + /* free up contact and junction lists */ while (resptr->rn_ce != NULL) { @@ -977,11 +977,11 @@ ResCleanNode(resptr,junk,homelist1,homelist2) TxError("Error: Attempted to eliminate node from wrong list.\n"); } } - if (resptr->rn_more != NULL) + if (resptr->rn_more != NULL) { resptr->rn_more->rn_less = resptr->rn_less; } - + { resptr->rn_re = (resElement *) CLIENTDEFAULT; resptr->rn_ce = (cElement *) CLIENTDEFAULT; @@ -994,7 +994,7 @@ ResCleanNode(resptr,junk,homelist1,homelist2) } } - + /* *------------------------------------------------------------------------- * @@ -1017,11 +1017,11 @@ ResFixBreakPoint(sourcelist,origNode,newNode) { Breakpoint *bp,*bp2,*bp3,*bp4; int alreadypresent; - + alreadypresent = FALSE; for (bp4 = *sourcelist; bp4 != NULL; bp4 = bp4->br_next) { - if (bp4->br_this == newNode) + if (bp4->br_this == newNode) { alreadypresent = TRUE; break; @@ -1031,7 +1031,7 @@ ResFixBreakPoint(sourcelist,origNode,newNode) bp = *sourcelist; while (bp != NULL) { - if (bp->br_this == origNode) + if (bp->br_this == origNode) { if (alreadypresent) { @@ -1059,5 +1059,5 @@ ResFixBreakPoint(sourcelist,origNode,newNode) bp2 = bp; bp = bp->br_next; } - + } diff --git a/resis/ResPrint.c b/resis/ResPrint.c index 49cc3db6..ac385a06 100644 --- a/resis/ResPrint.c +++ b/resis/ResPrint.c @@ -34,7 +34,7 @@ static char rcsid[] __attribute__ ((unused)) = "$Header: /usr/cvsroot/magic-8.0/ extern ResSimNode *ResInitializeNode(); - + /* *------------------------------------------------------------------------- * @@ -58,10 +58,10 @@ ResPrintExtRes(outextfile,resistors,nodename) char newname[MAXNAME]; HashEntry *entry; ResSimNode *node,*ResInitializeNode(); - + for (; resistors != NULL; resistors=resistors->rr_nextResistor) { - /* + /* These names shouldn't be null; they should either be set by the device name or by the node printing routine. This code is included in case the resistor network is printed @@ -93,11 +93,11 @@ ResPrintExtRes(outextfile,resistors,nodename) } } - + /* *------------------------------------------------------------------------- * - * ResPrintExtDev-- Print out all devices that have had at least + * ResPrintExtDev-- Print out all devices that have had at least * one terminal changed. * * Results:none @@ -183,7 +183,7 @@ ResPrintExtDev(outextfile, devices) } } - + /* *------------------------------------------------------------------------- * @@ -218,7 +218,7 @@ ResPrintExtNode(outextfile, nodelist, nodename) if (nodelist->rn_name != NULL) if (!strcmp(nodelist->rn_name, nodename)) { - DoKillNode = FALSE; + DoKillNode = FALSE; break; } @@ -260,7 +260,7 @@ ResPrintExtNode(outextfile, nodelist, nodename) } } - + /* *------------------------------------------------------------------------- * @@ -428,7 +428,7 @@ ResPrintFHNodes(fp, nodelist, nodename, nidx, celldef) cxb = (float)(contact_res->rr_cl - 1) / 2; for (i = 0; i < contact_res->rr_cl; i++) - { + { cx = del * ((float)i - cxb); cyb = (float)(contact_res->rr_width - 1) / 2; for (j = 0; j < contact_res->rr_width; j++) @@ -439,7 +439,7 @@ ResPrintFHNodes(fp, nodelist, nodename, nidx, celldef) fprintf(fp, "x=%1.2f y=%1.2f z=%1.2f\n", ((float)nodeptr->rn_loc.p_x + cx) * oscale, ((float)nodeptr->rn_loc.p_y + cy) * oscale, - height); + height); } } @@ -448,7 +448,7 @@ ResPrintFHNodes(fp, nodelist, nodename, nidx, celldef) fprintf(fp, ".equiv "); resWriteNodeName(fp, nodeptr); for (i = 0; i < contact_res->rr_cl; i++) - { + { for (j = 0; j < contact_res->rr_width; j++) { fprintf(fp, " "); @@ -520,7 +520,7 @@ ResPrintFHNodes(fp, nodelist, nodename, nidx, celldef) *------------------------------------------------------------------------- * ResPrintFHRects -- * Generate FastHenry segment output to the FastHenry data file - * "fp". + * "fp". * * Results: * None. @@ -655,7 +655,7 @@ ResPrintReference(fp, devices, cellDef) fprintf(fp, ".Default rho=0.02 nhinc=3 nwinc=3 rh=2 rw=2\n\n"); fprintf(fp, "* Reference plane (substrate, ground)\n"); - fprintf(fp, "Gsub x1=%1.2f y1=%1.2f z1=0 x2=%1.2f y2=%1.2f z2=0\n", + fprintf(fp, "Gsub x1=%1.2f y1=%1.2f z1=0 x2=%1.2f y2=%1.2f z2=0\n", llx, lly, urx, lly); fprintf(fp, "+ x3=%1.2f y3=%1.2f z3=0\n", urx, ury); @@ -743,7 +743,7 @@ ResCreateCenterlines(reslist, nidx, def) strcat(name, nodeptr->rn_name); /* Note that if any element exists with name "name" */ - /* it will be deleted (overwritten). */ + /* it will be deleted (overwritten). */ DBWElementAddLine(w, name, &rcanon, def, STYLE_YELLOW1); } } diff --git a/resis/ResReadSim.c b/resis/ResReadSim.c index c64caa88..8c040e48 100644 --- a/resis/ResReadSim.c +++ b/resis/ResReadSim.c @@ -105,7 +105,7 @@ ResFixPoint *ResFixList; extern void ResSimProcessDrivePoints(); - + /* *------------------------------------------------------------------------- * @@ -128,7 +128,7 @@ ResReadSim(simfile,fetproc,capproc,resproc,attrproc,mergeproc) char line[MAXLINE][MAXTOKEN]; int result,fettype,extfile; FILE *fp, *fopen(); - + fp = PaOpen(simfile,"r",".sim",".",(char *) NULL, (char **) NULL); if (fp == NULL) { @@ -143,11 +143,11 @@ ResReadSim(simfile,fetproc,capproc,resproc,attrproc,mergeproc) fettype = MINFINITY; switch(line[0][0]) { - case '|': + case '|': if (strcmp(line[NODEUNITS],"units:") == 0) { resscale = (float)atof(line[NODELAMBDA]); - if (resscale == 0.0) resscale = 1.0; + if (resscale == 0.0) resscale = 1.0; } result=0; break; @@ -167,7 +167,7 @@ ResReadSim(simfile,fetproc,capproc,resproc,attrproc,mergeproc) break; case '=': if (mergeproc)result = (*mergeproc)(line); break; - case 'A': if (attrproc) result = + case 'A': if (attrproc) result = (*attrproc)(line[ATTRIBUTENODENAME], line[ATTRIBUTEVALUE], simfile, &extfile); @@ -203,7 +203,7 @@ ResReadSim(simfile,fetproc,capproc,resproc,attrproc,mergeproc) return(result); } - + /* *------------------------------------------------------------------------- * @@ -220,7 +220,7 @@ ResReadSim(simfile,fetproc,capproc,resproc,attrproc,mergeproc) int ResReadNode(nodefile) char *nodefile; - + { char line[MAXLINE][MAXTOKEN]; FILE *fp, *fopen(); @@ -235,7 +235,7 @@ ResReadNode(nodefile) * change between output and readback. */ lambda = (float)ExtCurStyle->exts_unitsPerLambda; - + fp = PaOpen(nodefile,"r",".nodes",".", (char *) NULL, (char **) NULL); if (fp == NULL) { @@ -246,10 +246,10 @@ ResReadNode(nodefile) { entry = HashFind(&ResNodeTable,line[NODENODENAME]); node = ResInitializeNode(entry); - + node->location.p_x = (int)((float)atof(line[NODENODEX]) / lambda); node->location.p_y = (int)((float)atof(line[NODENODEY]) / lambda); -#ifdef ARIEL +#ifdef ARIEL node->rs_bbox.r_xbot = (int)((float)atof(line[NODE_BBOX_LL_X]) / lambda); node->rs_bbox.r_ybot = (int)((float)atof(line[NODE_BBOX_LL_Y]) / lambda); node->rs_bbox.r_xtop = (int)((float)atof(line[NODE_BBOX_UR_X]) / lambda); @@ -269,12 +269,12 @@ ResReadNode(nodefile) (void)fclose(fp); return(0); } - + /* *------------------------------------------------------------------------- * * getline-- Gets a line from the current input file and breaks it into - * tokens. + * tokens. * * Results:returns the number of tokens in the current line * @@ -291,7 +291,7 @@ gettokens(line,fp) { int i=0,j=0; int c; - + while ((c = getc(fp)) != EOF && c != '\n') { switch(c) @@ -316,7 +316,7 @@ gettokens(line,fp) return(i); } - + /* *------------------------------------------------------------------------- * @@ -341,7 +341,7 @@ ResSimDevice(line,rpersquare,ttype) char *newattr,tmpattr[MAXTOKEN]; static int nowarning = TRUE; float lambda; - + device = (RDev *) mallocMagic((unsigned) (sizeof(RDev))); if ((line[RDEV_WIDTH][0] == '\0') || (line[RDEV_LENGTH][0] == '\0')) { @@ -369,7 +369,7 @@ ResSimDevice(line,rpersquare,ttype) device->rs_sattr=RDEV_NOATTR; device->rs_dattr=RDEV_NOATTR; device->rs_ttype = ttype; - + /* sim attributes look like g=a1,a2 */ /* ext attributes are "a1","a2" */ /* do conversion from one to the other here */ @@ -410,11 +410,11 @@ ResSimDevice(line,rpersquare,ttype) rvalue = ResSimNewNode(line[GATE],GATE,device) + ResSimNewNode(line[SOURCE],SOURCE,device) + ResSimNewNode(line[DRAIN],DRAIN,device); - + return(rvalue); } - + /* *------------------------------------------------------------------------- * @@ -437,7 +437,7 @@ ResSimNewNode(line,type,device) HashEntry *entry; ResSimNode *node; devPtr *tptr; - + if (line[0] == '\0') { TxError("Missing device connection\n"); @@ -464,12 +464,12 @@ ResSimNewNode(line,type,device) return(0); } - + /* *------------------------------------------------------------------------- * * ResSimCapacitor-- Adds the capacitance from a C line to the appropriate - * node. Coupling capacitors are added twice, moving the capacitance + * node. Coupling capacitors are added twice, moving the capacitance * to the substrate. * * Results: @@ -487,7 +487,7 @@ ResSimCapacitor(line) { HashEntry *entry1,*entry2; ResSimNode *node1,*node2; - + if (line[COUPLETERMINAL1][0] == 0 || line[COUPLETERMINAL2][0] == 0) { TxError("Bad Capacitor\n"); @@ -498,7 +498,7 @@ ResSimCapacitor(line) if (ResOptionsFlags & ResOpt_Signal) { node1->capacitance += MagAtof(line[COUPLEVALUE]); - if (strcmp(line[COUPLETERMINAL2],"GND") == 0 || + if (strcmp(line[COUPLETERMINAL2],"GND") == 0 || strcmp(line[COUPLETERMINAL2],"Vdd") == 0) { return(0); @@ -533,15 +533,15 @@ ResSimCapacitor(line) node1->cap_couple += MagAtof(line[COUPLEVALUE]); node2->cap_couple += MagAtof(line[COUPLEVALUE]); return(0); - + } - + /* *------------------------------------------------------------------------- * * ResSimResistor-- Adds the capacitance from a R line to the appropriate - * node. + * node. * * Results * Return 0 to keep search going, 1 to abort @@ -558,7 +558,7 @@ ResSimResistor(line) { HashEntry *entry; ResSimNode *node; - + if (line[RESNODENAME][0] == 0) { TxError("Bad Resistor\n"); @@ -576,11 +576,11 @@ ResSimResistor(line) } - + /* *------------------------------------------------------------------------- * - * ResSimAttribute--checks to see if a node attribute is a resistance + * ResSimAttribute--checks to see if a node attribute is a resistance * attribute. If it is, add it to the correct node's status flag. * Only works with 5.0 1/line attributes * @@ -603,7 +603,7 @@ ResSimAttribute(aname,avalue,rootname,readextfile) char digit[MAXDIGIT]; int i; static int notwarned=TRUE; - + if (aname[0] == 0) { TxError("Bad Resistor\n"); @@ -619,7 +619,7 @@ ResSimAttribute(aname,avalue,rootname,readextfile) } else { - node->status |= SKIP; + node->status |= SKIP; } } else if (strncmp(avalue,"res:force",9) == 0) @@ -630,10 +630,10 @@ ResSimAttribute(aname,avalue,rootname,readextfile) } else { - node->status |= FORCE; + node->status |= FORCE; } } - else if (strncmp(avalue,"res:min=",8) == 0) + else if (strncmp(avalue,"res:min=",8) == 0) { node->status |= MINSIZE; for(i=0,avalue += 8; *avalue != '\0' && *avalue != ','; avalue++) @@ -652,7 +652,7 @@ ResSimAttribute(aname,avalue,rootname,readextfile) *readextfile = 1; } /* is the attribute in root.ext? */ - if (node->drivepoint.p_x != INFINITY) + if (node->drivepoint.p_x != INFINITY) { node->status |= DRIVELOC; } @@ -664,7 +664,7 @@ ResSimAttribute(aname,avalue,rootname,readextfile) } } #ifdef ARIEL - else if (strncmp(avalue,"res:fix",7) == 0 && + else if (strncmp(avalue,"res:fix",7) == 0 && (ResOptionsFlags & ResOpt_Power)) { if (*readextfile == 0) @@ -674,14 +674,14 @@ ResSimAttribute(aname,avalue,rootname,readextfile) } } #endif - if (avalue = strchr(avalue,',')) + if (avalue = strchr(avalue,',')) { (void) ResSimAttribute(aname,avalue+1,rootname,readextfile); } return(0); } - + /* *------------------------------------------------------------------------- * @@ -689,7 +689,7 @@ ResSimAttribute(aname,avalue,rootname,readextfile) * and we are doing a signal extraction, * we need to search through the .ext file looking for attr labels that * contain this text. For efficiency, the .ext file is only parsed when - * the first res:drive is encountered. res:drive labels only work if + * the first res:drive is encountered. res:drive labels only work if * they are in the root cell. * * Results: @@ -709,7 +709,7 @@ ResSimProcessDrivePoints(filename) FILE *fp; HashEntry *entry; ResSimNode *node; - + fp = PaOpen(filename,"r",".ext",".",(char *) NULL,(char **) NULL); if (fp == NULL) { @@ -720,7 +720,7 @@ ResSimProcessDrivePoints(filename) { if (strncmp(line[RES_EXT_ATTR],"attr",4) != 0 || strncmp(line[RES_EXT_ATTR_TEXT],"\"res:drive\"",11) != 0) continue; - + entry = HashFind(&ResNodeTable,line[RES_EXT_ATTR_NAME]); node = ResInitializeNode(entry); node->drivepoint.p_x = atoi(line[RES_EXT_ATTR_X]); @@ -729,12 +729,12 @@ ResSimProcessDrivePoints(filename) } } - + /* *------------------------------------------------------------------------- * - * ResSimProcessFixPoints -- if the sim file contains a "res:fix:name" label - * and we are checking for power supply noise, then we have to + * ResSimProcessFixPoints -- if the sim file contains a "res:fix:name" label + * and we are checking for power supply noise, then we have to * parse the .ext file looking for the fix label locations. This * is only done after the first res:fix label is encountered. * @@ -755,7 +755,7 @@ ResSimProcessFixPoints(filename) char line[MAXLINE][MAXTOKEN],*label,*c; FILE *fp; ResFixPoint *thisfix; - + fp = PaOpen(filename,"r",".ext",".",(char *) NULL,(char **) NULL); if (fp == NULL) { @@ -771,7 +771,7 @@ ResSimProcessFixPoints(filename) if (*label == ':') label++; if ((c=strrchr(label,'"')) != NULL) *c='\0'; else if (*label == '\0'); - else + else { TxError("Bad res:fix attribute label %s\n", line[RES_EXT_ATTR_TEXT]); @@ -788,7 +788,7 @@ ResSimProcessFixPoints(filename) } } - + /* *------------------------------------------------------------------------- * @@ -810,7 +810,7 @@ ResSimMerge(line) { ResSimNode *node; devPtr *ptr; - + if ((line[ALIASNAME][0] == '\0') || (line[REALNAME][0] == '\0')) { TxError("Bad node alias line\n"); @@ -830,7 +830,7 @@ ResSimMerge(line) } return(0); } - + /* *------------------------------------------------------------------------- * diff --git a/resis/ResRex.c b/resis/ResRex.c index eb3a57ae..1fb8f4a8 100644 --- a/resis/ResRex.c +++ b/resis/ResRex.c @@ -121,7 +121,7 @@ ExtResisForDef(celldef, resisdata) ResCheckPorts(celldef); /* Extract networks for nets that require it. */ - if (!(ResOptionsFlags & ResOpt_FastHenry) || + if (!(ResOptionsFlags & ResOpt_FastHenry) || DBIsSubcircuit(celldef)) ResCheckSimNodes(celldef, resisdata); @@ -163,7 +163,7 @@ ExtResisForDef(celldef, resisdata) } } - + /* *------------------------------------------------------------------------- * @@ -201,7 +201,7 @@ CmdExtResis(win, cmd) NULL }; - static char *cmdExtresisCmd[] = + static char *cmdExtresisCmd[] = { "tolerance [value] set ratio between resistor and device tol.", "all extract all the nets", @@ -272,7 +272,7 @@ typedef enum { { case RES_TOL: ResOptionsFlags |= ResOpt_ExplicitRtol; - if (cmd->tx_argc > 2) + if (cmd->tx_argc > 2) { tolerance = MagAtof(cmd->tx_argv[2]); if (tolerance <= 0) @@ -333,7 +333,7 @@ typedef enum { value = Lookup(cmd->tx_argv[2], onOff); if (value) - ResOptionsFlags |= ResOpt_Blackbox; + ResOptionsFlags |= ResOpt_Blackbox; else ResOptionsFlags &= ~ResOpt_Blackbox; } @@ -350,7 +350,7 @@ typedef enum { value = Lookup(cmd->tx_argv[2], onOff); if (value) - ResOptionsFlags |= ResOpt_Simplify | ResOpt_Tdi; + ResOptionsFlags |= ResOpt_Simplify | ResOpt_Tdi; else ResOptionsFlags &= ~(ResOpt_Simplify | ResOpt_Tdi); } @@ -405,7 +405,7 @@ typedef enum { return; case RES_SKIP: - if (cmd->tx_argc > 2) + if (cmd->tx_argc > 2) { j = DBTechNoisyNameType(cmd->tx_argv[2]); if (j >= 0) @@ -468,7 +468,7 @@ typedef enum { LaplaceMissCount,LaplaceMatchCount); } #endif - + ResOptionsFlags = oldoptions; return; } @@ -477,7 +477,7 @@ typedef enum { if (selectedUse == NULL) { TxError("No cell selected\n"); - return; + return; } mainDef = selectedUse->cu_def; ResOptionsFlags &= ~ResOpt_ExtractAll; @@ -502,7 +502,7 @@ typedef enum { default: return; } - + #ifdef LAPLACE LaplaceMatchCount = 0; LaplaceMissCount = 0; @@ -563,7 +563,7 @@ typedef enum { * * Side Effects: * Does resistance extraction for an entire cell. - * + * *------------------------------------------------------------------------- */ @@ -581,7 +581,7 @@ resSubcircuitFunc(cellDef, rdata) return 0; } - + /* *------------------------------------------------------------------------- @@ -679,7 +679,7 @@ resPortFunc(scx, lab, tpath, result) * for extresist to process. If the port use is "ground" or * "power", then don't process the node. If the port class is * "output", then make this node a (forced) driver. - * + * * Results: 0 if one or more nodes was created, 1 otherwise * * Side Effects: Adds driving nodes to the extresis network database. @@ -723,7 +723,7 @@ ResCheckBlackbox(cellDef) * into the subcircuit and declare them to be "driving" nodes so * the extresis algorithm will treat them as being part of valid * networks. - * + * * Results: 0 if one or more nodes was created, 1 otherwise * * Side Effects: Adds driving nodes to the extresis network database. @@ -798,14 +798,14 @@ ResCheckPorts(cellDef) } return result; } - + /* *------------------------------------------------------------------------- * * ResCheckSimNodes-- check to see if lumped resistance is greater than the - * device resistance; if it is, Extract the net + * device resistance; if it is, Extract the net * resistance. If the maximum point to point resistance - * in the extracted net is still creater than the + * in the extracted net is still creater than the * tolerance, then output the extracted net. * * Results: none @@ -858,7 +858,7 @@ ResCheckSimNodes(celldef, resisdata) { ResFHFile = NULL; } - + if (ResExtFile == NULL && (ResOptionsFlags & ResOpt_DoExtFile) || (ResOptionsFlags & ResOpt_DoLumpFile) && ResLumpFile == NULL || (ResOptionsFlags & ResOpt_FastHenry) && ResFHFile == NULL) @@ -882,7 +882,7 @@ ResCheckSimNodes(celldef, resisdata) /* * Write reference plane (substrate) definition and end statement - * to the FastHenry geometry file. + * to the FastHenry geometry file. */ if (ResOptionsFlags & ResOpt_FastHenry) { @@ -900,13 +900,13 @@ ResCheckSimNodes(celldef, resisdata) last4 = node->name+strlen(node->name)-4; last3 = node->name+strlen(node->name)-3; - if ((strncmp(last4,"Vdd!",4) == 0 || + if ((strncmp(last4,"Vdd!",4) == 0 || strncmp(last4,"VDD!",4) == 0 || strncmp(last4,"vdd!",4) == 0 || strncmp(last4,"Gnd!",4) == 0 || strncmp(last4,"gnd!",4) == 0 || strncmp(last4,"GND!",4) == 0 || - strncmp(last3,"Vdd",3) == 0 || + strncmp(last3,"Vdd",3) == 0 || strncmp(last3,"VDD",3) == 0 || strncmp(last3,"vdd",3) == 0 || strncmp(last3,"Gnd",3) == 0 || @@ -918,14 +918,14 @@ ResCheckSimNodes(celldef, resisdata) /* Has this node been merged away or is it marked as skipped? */ /* If so, skip it */ if ((node->status & (FORWARD | REDUNDANT)) || - ((node->status & SKIP) && + ((node->status & SKIP) && (ResOptionsFlags & ResOpt_ExtractAll) == 0)) continue; total++; - + ResSortByGate(&node->firstDev); /* Find largest SD device connected to node. */ - + minRes = FLT_MAX; gparams.rg_devloc = (Point *) NULL; gparams.rg_status = FALSE; @@ -1026,8 +1026,8 @@ ResCheckSimNodes(celldef, resisdata) rctolerance = minRes/rctol; } - /* - * Is the device resistance greater than the lumped node + /* + * Is the device resistance greater than the lumped node * resistance? If so, extract net. */ @@ -1052,8 +1052,8 @@ ResCheckSimNodes(celldef, resisdata) { ResWriteLumpFile(node); } - if (gparams.rg_maxres >= ftolerance || - gparams.rg_maxres >= rctolerance || + if (gparams.rg_maxres >= ftolerance || + gparams.rg_maxres >= rctolerance || (ResOptionsFlags & ResOpt_ExtractAll)) { resNodeNum = 0; @@ -1067,8 +1067,8 @@ ResCheckSimNodes(celldef, resisdata) ResCleanUpEverything(); } } - - /* + + /* * Print out all device which have had at least one terminal changed * by resistance extraction. */ @@ -1079,7 +1079,7 @@ ResCheckSimNodes(celldef, resisdata) } /* - * Write end statement to the FastHenry geometry file. + * Write end statement to the FastHenry geometry file. * (Frequency range should be user-specified. . .) */ @@ -1123,7 +1123,7 @@ ResCheckSimNodes(celldef, resisdata) /* close output files */ - if (ResExtFile != NULL) + if (ResExtFile != NULL) { (void) fclose(ResExtFile); } @@ -1136,12 +1136,12 @@ ResCheckSimNodes(celldef, resisdata) (void) fclose(ResFHFile); } } - + /* *------------------------------------------------------------------------- * - * ResFixUpConnections-- Changes the connection to a terminal of the sim + * ResFixUpConnections-- Changes the connection to a terminal of the sim * device. The new name is formed by appending .t# to the old name. * The new name is added to the hash table of node names. * @@ -1164,7 +1164,7 @@ ResFixUpConnections(simDev, layoutDev, simNode, nodename) static char newname[MAXNAME], oldnodename[MAXNAME]; int notdecremented; resNode *gate, *source, *drain; - + /* If we aren't doing output (i.e. this is just a statistical run) */ /* don't patch up networks. This cuts down on memory use. */ @@ -1184,7 +1184,7 @@ ResFixUpConnections(simDev, layoutDev, simNode, nodename) } (void)sprintf(newname,"%s%s%d",nodename,".t",resNodeNum++); notdecremented = TRUE; - + if (simDev->gate == simNode) { if ((gate=layoutDev->rd_fet_gate) != NULL) @@ -1195,7 +1195,7 @@ ResFixUpConnections(simDev, layoutDev, simNode, nodename) { resNodeNum--; notdecremented = FALSE; - } + } ResFixDevName(newname,GATE,simDev,gate); gate->rn_name = simDev->gate->name; @@ -1210,14 +1210,14 @@ ResFixUpConnections(simDev, layoutDev, simNode, nodename) { if (simDev->drain == simNode) { - if ((source=layoutDev->rd_fet_source) && + if ((source=layoutDev->rd_fet_source) && (drain=layoutDev->rd_fet_drain)) { if (source->rn_name != NULL && notdecremented) { resNodeNum--; notdecremented = FALSE; - } + } ResFixDevName(newname,SOURCE,simDev,source); source->rn_name = simDev->source->name; (void)sprintf(newname,"%s%s%d",nodename,".t",resNodeNum++); @@ -1265,11 +1265,11 @@ ResFixUpConnections(simDev, layoutDev, simNode, nodename) { resNodeNum--; notdecremented = FALSE; - } + } ResFixDevName(newname,SOURCE,simDev,source); source->rn_name = simDev->source->name; } - + } else { @@ -1305,7 +1305,7 @@ ResFixUpConnections(simDev, layoutDev, simNode, nodename) { resNodeNum--; notdecremented = FALSE; - } + } ResFixDevName(newname, DRAIN, simDev, drain); drain->rn_name = simDev->drain->name; } @@ -1315,7 +1315,7 @@ ResFixUpConnections(simDev, layoutDev, simNode, nodename) { resNodeNum--; notdecremented = FALSE; - } + } ResFixDevName(newname,DRAIN,simDev,source); source->rn_name = simDev->drain->name; } @@ -1331,7 +1331,7 @@ ResFixUpConnections(simDev, layoutDev, simNode, nodename) } } - + /* *------------------------------------------------------------------------- * @@ -1356,12 +1356,12 @@ ResFixDevName(line,type,device,layoutnode) HashEntry *entry; ResSimNode *node; devPtr *tptr; - + if (layoutnode->rn_name != NULL) { entry = HashFind(&ResNodeTable,layoutnode->rn_name); node = ResInitializeNode(entry); - + } else { @@ -1393,13 +1393,13 @@ ResFixDevName(line,type,device,layoutnode) } } - + /* *------------------------------------------------------------------------- * * ResSortByGate--sorts device pointers whose terminal field is either * drain or source by gate node number, then by drain (source) number. - * This places devices with identical connections next to one + * This places devices with identical connections next to one * another. * * Results: none @@ -1416,7 +1416,7 @@ ResSortByGate(DevpointerList) int changed=TRUE; int localchange=TRUE; devPtr *working, *last=NULL, *current, *gatelist=NULL; - + working = *DevpointerList; while (working != NULL) { @@ -1457,17 +1457,17 @@ ResSortByGate(DevpointerList) localchange = TRUE; } else if (w->gate == c->gate && - (working->terminal == SOURCE && - current->terminal == SOURCE && + (working->terminal == SOURCE && + current->terminal == SOURCE && w->drain > c->drain || - working->terminal == SOURCE && - current->terminal == DRAIN && + working->terminal == SOURCE && + current->terminal == DRAIN && w->drain > c->source || - working->terminal == DRAIN && - current->terminal == SOURCE && + working->terminal == DRAIN && + current->terminal == SOURCE && w->source > c->drain || - working->terminal == DRAIN && - current->terminal == DRAIN && + working->terminal == DRAIN && + current->terminal == DRAIN && w->source > c->source)) { changed = TRUE; @@ -1512,7 +1512,7 @@ ResSortByGate(DevpointerList) } } } - + /* *------------------------------------------------------------------------- @@ -1550,7 +1550,7 @@ ResWriteLumpFile(node) } fprintf(ResLumpFile,"R %s %d\n", node->name, lumpedres); } - + /* *------------------------------------------------------------------------- @@ -1633,7 +1633,7 @@ ResWriteExtFile(celldef, node, tol, rctol, nidx, eidx) char *cp, newname[MAXNAME]; devPtr *ptr; resDevice *layoutDev, *ResGetDevice(); - + RCdev = gparams.rg_bigdevres * gparams.rg_nodecap; if (tol == 0.0 ||(node->status & FORCE) || @@ -1645,7 +1645,7 @@ ResWriteExtFile(celldef, node, tol, rctol, nidx, eidx) (void)sprintf(newname,"%s",node->name); cp = newname+strlen(newname)-1; if (*cp == '!' || *cp == '#') *cp = '\0'; - if ((rctol+1)*RCdev < rctol*gparams.rg_Tdi || + if ((rctol+1)*RCdev < rctol*gparams.rg_Tdi || (ResOptionsFlags & ResOpt_Tdi) == 0) { if ((ResOptionsFlags & (ResOpt_RunSilent|ResOpt_Tdi)) == ResOpt_Tdi) diff --git a/resis/ResSimple.c b/resis/ResSimple.c index 7c7bc23f..0011125d 100644 --- a/resis/ResSimple.c +++ b/resis/ResSimple.c @@ -49,7 +49,7 @@ extern void ResMoveDevices(); extern void ResAddResistorToList(); - + /* *------------------------------------------------------------------------- * @@ -92,15 +92,15 @@ ResSimplifyNet(nodelist,biglist,reslist,tolerance) } *biglist = node; - /* + /* Walk though resistors. Mark uninitialized ones and assign them A direction. Keep track of the number of resistors pointing in each direction. */ - for (resisptr = node->rn_re; resisptr != NULL; resisptr = resisptr->re_nextEl) + for (resisptr = node->rn_re; resisptr != NULL; resisptr = resisptr->re_nextEl) { if (((resisptr->re_thisEl->rr_status & RES_MARKED) == RES_MARKED) && - (resisptr->re_thisEl->rr_connection2 == node)) + (resisptr->re_thisEl->rr_connection2 == node)) { if (resistor1 == NULL) { @@ -111,16 +111,16 @@ ResSimplifyNet(nodelist,biglist,reslist,tolerance) resistor2 = resisptr->re_thisEl; } numdrive++; - } - else + } + else { - /* + /* Resistor direction is from node1 to node2. If the resistor is not marked, mark it and make sure the direction is set properly. */ - - if ((resisptr->re_thisEl->rr_status & RES_MARKED) != RES_MARKED) + + if ((resisptr->re_thisEl->rr_status & RES_MARKED) != RES_MARKED) { if (resisptr->re_thisEl->rr_connection2 == node) { @@ -133,7 +133,7 @@ ResSimplifyNet(nodelist,biglist,reslist,tolerance) { resistor1 = resisptr->re_thisEl; } - else + else { resistor2 = resisptr->re_thisEl; } @@ -141,7 +141,7 @@ ResSimplifyNet(nodelist,biglist,reslist,tolerance) } } - /* + /* Is the node reached by one resistor? If it is, check the resistor's other end. Check the number of drivers at the other end. If it is more than 1, delete the current resistor to break the deadlock. @@ -165,7 +165,7 @@ ResSimplifyNet(nodelist,biglist,reslist,tolerance) { PendingReceivers++; } - if (resisptr->re_thisEl->rr_status & RES_DEADEND || + if (resisptr->re_thisEl->rr_status & RES_DEADEND || resisptr->re_thisEl->rr_value > tolerance) { MarkedReceivers++; @@ -202,12 +202,12 @@ ResSimplifyNet(nodelist,biglist,reslist,tolerance) return; } - /* - Break loop here. More than one driver indicates a loop; + /* + Break loop here. More than one driver indicates a loop; remove deadend, allowing drivers to be merged */ else if (UnMarkedReceivers == 0 && (MarkedReceivers == 1 && NumberOfDrivers > 1 || resistor2 != resistor1)) - + { otherNode->rn_float.rn_area += resistor1->rr_float.rr_area; otherNode->rn_status &= ~RES_DONE_ONCE; @@ -227,13 +227,13 @@ ResSimplifyNet(nodelist,biglist,reslist,tolerance) } *nodelist = otherNode; } - ResDoneWithNode(otherNode); + ResDoneWithNode(otherNode); } } - + } - /* - Two resistors in series? Combine them and move devices to + /* + Two resistors in series? Combine them and move devices to appropriate end. */ else if (numdrive+numreceive == 2 && @@ -253,12 +253,12 @@ ResSimplifyNet(nodelist,biglist,reslist,tolerance) resistor2->rr_status |= RES_MARKED; node1 = (resistor1->rr_connection1 == node) ? resistor1->rr_connection2 : resistor1->rr_connection1; node2 = (resistor2->rr_connection1 == node) ? resistor2->rr_connection2 : resistor2->rr_connection1; - otherNode = (resistor1->rr_status & RES_DEADEND && + otherNode = (resistor1->rr_status & RES_DEADEND && resistor1->rr_value < tolerance / 2) || - ((resistor2->rr_status & RES_DEADEND) == 0 && + ((resistor2->rr_status & RES_DEADEND) == 0 && resistor1->rr_value < resistor2->rr_value) ? node1 : node2; - /* + /* make one big resistor out of two little ones, eliminating the current node. Devices connected to this node are moved to either end depending on their resistance. @@ -301,7 +301,7 @@ ResSimplifyNet(nodelist,biglist,reslist,tolerance) otherNode->rn_status |= (node->rn_status & RN_MAXTDI); ResCleanNode(node,TRUE,biglist,nodelist); node1->rn_status &= ~RES_DONE_ONCE; - if (node1->rn_status & MARKED) + if (node1->rn_status & MARKED) { node1->rn_status &= ~MARKED; ResRemoveFromQueue(node1,biglist); @@ -314,7 +314,7 @@ ResSimplifyNet(nodelist,biglist,reslist,tolerance) *nodelist = node1; } node2->rn_status &= ~RES_DONE_ONCE; - if (node2->rn_status & MARKED) + if (node2->rn_status & MARKED) { node2->rn_status &= ~MARKED; ResRemoveFromQueue(node2,biglist); @@ -326,22 +326,22 @@ ResSimplifyNet(nodelist,biglist,reslist,tolerance) } *nodelist = node2; } - ResDoneWithNode(node1); + ResDoneWithNode(node1); } - /* + /* Last resort- keep propagating down the tree. To avoid looping, - mark each node when it is reached. Don't reschedule node if + mark each node when it is reached. Don't reschedule node if none of the connections to it have changed since it was marked */ else if (numreceive > 0 && (node->rn_status & RES_DONE_ONCE) == 0) { node->rn_status |= RES_DONE_ONCE; - for (resisptr = node->rn_re; resisptr != NULL; resisptr = resisptr->re_nextEl) + for (resisptr = node->rn_re; resisptr != NULL; resisptr = resisptr->re_nextEl) { if (resisptr->re_thisEl->rr_connection1 == node) { - /* + /* elements with a resistance greater than the tolerance should only be propagated past once- loops may occur otherwise. @@ -352,8 +352,8 @@ ResSimplifyNet(nodelist,biglist,reslist,tolerance) } if (resisptr->re_thisEl->rr_connection2->rn_status & MARKED) { - /* - mark big resistors so we only process them + /* + mark big resistors so we only process them once. */ if (resisptr->re_thisEl->rr_value > tolerance) @@ -376,7 +376,7 @@ ResSimplifyNet(nodelist,biglist,reslist,tolerance) } - + /* *------------------------------------------------------------------------- * @@ -396,7 +396,7 @@ ResMoveDevices(node1,node2) { tElement *devptr,*oldptr; resDevice *device; - + devptr = node1->rn_te; while (devptr != NULL) { @@ -439,12 +439,12 @@ ResMoveDevices(node1,node2) node1->rn_te = NULL; } - + /* *------------------------------------------------------------------------- * * ResScrunchNet-- Last ditch net simplification. Used to break deadlocks - * in ResSimplifyNet. Resistors are sorted by value. The smallest + * in ResSimplifyNet. Resistors are sorted by value. The smallest * resistor is combined with its smallest neighbor, and ResSimplifyNet * is called. This continues until the smallest resistor is greater * than the tolerance. @@ -467,7 +467,7 @@ ResScrunchNet(reslist,pendingList,biglist,tolerance) resNode *node1,*node2; resElement *rcell1; int c1,c2; - + /* sort resistors by size */ current = *reslist; while (current != NULL) @@ -488,8 +488,8 @@ ResScrunchNet(reslist,pendingList,biglist,tolerance) } ResAddResistorToList(working,&locallist); } - - + + *reslist = locallist; while (*reslist != NULL && (*reslist)->rr_value < tolerance) { @@ -501,7 +501,7 @@ ResScrunchNet(reslist,pendingList,biglist,tolerance) working = NULL; c1=0; c2=0; - + /* search for next smallest adjoining resistor */ for (rcell1 = current->rr_connection1->rn_re; rcell1 != NULL; rcell1 = rcell1->re_nextEl) { @@ -515,7 +515,7 @@ ResScrunchNet(reslist,pendingList,biglist,tolerance) } else { - if (working->rr_value > rcell1->re_thisEl->rr_value) + if (working->rr_value > rcell1->re_thisEl->rr_value) { node1 = current->rr_connection1; working = rcell1->re_thisEl; @@ -535,7 +535,7 @@ ResScrunchNet(reslist,pendingList,biglist,tolerance) } else { - if (working->rr_value > rcell1->re_thisEl->rr_value) + if (working->rr_value > rcell1->re_thisEl->rr_value) { node1 = current->rr_connection2; working = rcell1->re_thisEl; @@ -543,7 +543,7 @@ ResScrunchNet(reslist,pendingList,biglist,tolerance) } } } - /* + /* if the current resistor isn't a deadend, add its value and area to that of the next smallest one. If it is a deadend, simply add its area to its node. @@ -557,7 +557,7 @@ ResScrunchNet(reslist,pendingList,biglist,tolerance) { node1->rn_float.rn_area += current->rr_float.rr_area; } - /* + /* Move everything from from one end of the ressistor to the other and eliminate the resistor. */ @@ -581,8 +581,8 @@ ResScrunchNet(reslist,pendingList,biglist,tolerance) ResMergeNodes(node1,node2,pendingList,biglist); } - /* - Try further simplification on net using ResDoneWithNode and + /* + Try further simplification on net using ResDoneWithNode and ResSimplifyNet. */ ResRemoveFromQueue(node1,biglist); @@ -596,11 +596,11 @@ ResScrunchNet(reslist,pendingList,biglist,tolerance) } } - + /* *------------------------------------------------------------------------- * - * ResAddResistorToList-- Adds resistor to list according to its value + * ResAddResistorToList-- Adds resistor to list according to its value * (smallest first). * * Results:none @@ -614,9 +614,9 @@ void ResAddResistorToList(resistor,locallist) resResistor *resistor,**locallist; -{ +{ resResistor *local,*last=NULL; - + for (local = *locallist; local != NULL; local = local->rr_nextResistor) { if (local->rr_value >= resistor->rr_value) @@ -656,7 +656,7 @@ ResAddResistorToList(resistor,locallist) } } - + /* *------------------------------------------------------------------------- * @@ -681,7 +681,7 @@ ResDistributeCapacitance(nodelist,totalcap) float totalarea=0,capperarea; resNode *workingNode; resElement *rptr; - + for (workingNode = nodelist; workingNode != NULL; workingNode=workingNode->rn_more) { for (rptr = workingNode->rn_re; rptr != NULL; rptr=rptr->re_nextEl) @@ -706,12 +706,12 @@ ResDistributeCapacitance(nodelist,totalcap) } } - + /* *------------------------------------------------------------------------- * - * ResCalculateChildCapacitance-- calculates capacitance of this node and - * all downstream nodes. + * ResCalculateChildCapacitance-- calculates capacitance of this node and + * all downstream nodes. * * Results: Returns capacitance of this node and children nodes if connected * to a tree- returns -1 If the subtree contains loops. @@ -734,7 +734,7 @@ ResCalculateChildCapacitance(me) int t; ExtDevice *devptr; - + if (me->rn_client != (ClientData) NULL) /* we have a loop */ { return(-1); @@ -745,7 +745,7 @@ ResCalculateChildCapacitance(me) /* This following assumes that ResDistributeCapacitance has been run */ /* and the the resulting capacitance value is stored in the area field */ myC->rc_Cdownstream = me->rn_float.rn_area; - + /* get capacitance for all connected gates */ for (tptr = me->rn_te; tptr != NULL; tptr = tptr->te_nextt) { @@ -763,7 +763,7 @@ ResCalculateChildCapacitance(me) if (dev->rd_fet_gate == me) { devptr = ExtCurStyle->exts_device[t]; - myC->rc_Cdownstream += + myC->rc_Cdownstream += dev->rd_length* dev->rd_width* devptr->exts_deviceGateCap+ @@ -790,7 +790,7 @@ ResCalculateChildCapacitance(me) return(myC->rc_Cdownstream); } - + /* *------------------------------------------------------------------------- * @@ -814,7 +814,7 @@ ResCalculateTDi(node,resistor,resistorvalue) resElement *workingRes; RCDelayStuff *rcd = (RCDelayStuff *)node->rn_client; RCDelayStuff *rcd2; - + ASSERT(rcd != NULL,"ResCalculateTdi"); if (resistor == NULL) { @@ -824,9 +824,9 @@ ResCalculateTDi(node,resistor,resistorvalue) { rcd2 = (RCDelayStuff *)resistor->rr_connection1->rn_client; ASSERT(rcd2 != NULL,"ResCalculateTdi"); - rcd->rc_Tdi=rcd->rc_Cdownstream*(float)resistor->rr_value + + rcd->rc_Tdi=rcd->rc_Cdownstream*(float)resistor->rr_value + rcd2->rc_Tdi; - + } for (workingRes = node->rn_re; workingRes != NULL; workingRes=workingRes->re_nextEl) @@ -840,11 +840,11 @@ ResCalculateTDi(node,resistor,resistorvalue) } } } - + /* *------------------------------------------------------------------------- * - * ResPruneTree-- Designed to be run just after ResCalculateTDi to prune all + * ResPruneTree-- Designed to be run just after ResCalculateTDi to prune all * branches off the tree whose end node value of Tdi is less than the * tolerance. This eliminates many resistors in nets with high fanout. * @@ -864,14 +864,14 @@ ResPruneTree(node,minTdi,nodelist1,nodelist2,resistorlist) { resResistor *currentRes; resElement *current; - + current = node->rn_re; while(current != NULL) { currentRes = current->re_thisEl; current = current->re_nextEl; /* if branch points outward, call routine on subtrees */ - if (currentRes->rr_connection1 == node) + if (currentRes->rr_connection1 == node) { ResPruneTree(currentRes->rr_connection2, minTdi,nodelist1,nodelist2,resistorlist); } @@ -900,7 +900,7 @@ ResPruneTree(node,minTdi,nodelist1,nodelist2,resistorlist) } } } - + int ResDoSimplify(tolerance,rctol,goodies) float tolerance; @@ -913,7 +913,7 @@ ResDoSimplify(tolerance,rctol,goodies) float millitolerance; float totalcap; resResistor *res; - + resRemoveLoops = FALSE; ResSetPathRes(); @@ -921,10 +921,10 @@ ResDoSimplify(tolerance,rctol,goodies) { bigres = MAX(bigres,node->rn_noderes); } - + bigres /= OHMSTOMILLIOHMS; /* convert from milliohms to ohms */ goodies->rg_maxres = bigres; - + #ifdef PARANOID ResSanityChecks("ExtractSingleNet",ResResList,ResNodeList,ResDevList); #endif @@ -935,12 +935,12 @@ ResDoSimplify(tolerance,rctol,goodies) /* values get calculated correctly. */ (void) ResDistributeCapacitance(ResNodeList,goodies->rg_nodecap); - + if ((tolerance > bigres || (ResOptionsFlags &ResOpt_Simplify)==0) && (ResOptionsFlags &ResOpt_DoLumpFile)==0) { return(0); - } + } res = ResResList; while (res) { @@ -958,7 +958,7 @@ ResDoSimplify(tolerance,rctol,goodies) if (ResOptionsFlags & ResOpt_Tdi) { - if (goodies->rg_nodecap != -1 && + if (goodies->rg_nodecap != -1 && (totalcap = ResCalculateChildCapacitance(ResOriginNode)) != -1) { RCDelayStuff *rc = (RCDelayStuff *) ResNodeList->rn_client; @@ -973,7 +973,7 @@ ResDoSimplify(tolerance,rctol,goodies) slownode = ResNodeList; for (node = ResNodeList; node != NULL; node = node->rn_more) - { + { rc = (RCDelayStuff *)node->rn_client; if (rc && (goodies->rg_Tdi < rc->rc_Tdi)) { @@ -992,24 +992,24 @@ ResDoSimplify(tolerance,rctol,goodies) { goodies->rg_Tdi = 0; } - if ((rctol+1)*goodies->rg_bigdevres*goodies->rg_nodecap > - rctol*goodies->rg_Tdi && + if ((rctol+1)*goodies->rg_bigdevres*goodies->rg_nodecap > + rctol*goodies->rg_Tdi && (ResOptionsFlags & ResOpt_Tdi) && goodies->rg_Tdi != -1) { return(0); } - /* Simplify network; resistors are still in milliohms, so use + /* Simplify network; resistors are still in milliohms, so use millitolerance. */ if (ResOptionsFlags & ResOpt_Simplify) { - + millitolerance = tolerance*MILLIOHMSPEROHM; - /* + /* Start simplification at driver (R=0). Remove it from the done list and add it to the pending list. Call ResSimplifyNet as long as nodes remain in the pending list. @@ -1056,8 +1056,8 @@ ResDoSimplify(tolerance,rctol,goodies) { ResSimplifyNet(&ResNodeQueue,&ResNodeList,&ResResList,millitolerance); } - - /* + + /* Call ResScrunchNet to eliminate any remaining under tolerance resistors. */ @@ -1065,9 +1065,9 @@ ResDoSimplify(tolerance,rctol,goodies) } } return(0); - + } - + void ResSetPathRes() @@ -1081,7 +1081,7 @@ ResSetPathRes() init = 0; HeapInit(&ResistorHeap,128,FALSE,FALSE); } - + for (node = ResNodeList; node != NULL ;node = node->rn_more) { if (node->rn_noderes == 0) @@ -1089,7 +1089,7 @@ ResSetPathRes() ResOriginNode = node; node->rn_status |= FINISHED; } - else + else { node->rn_noderes = RES_INFINITY; node->rn_status &= ~FINISHED; @@ -1109,7 +1109,7 @@ ResSetPathRes() resPathRes((resResistor *) he.he_id); } } - + void resPathNode(node) resNode *node; @@ -1122,12 +1122,12 @@ resPathNode(node) { resResistor *res = re->re_thisEl; resNode *node2; - + if (res->rr_status & RES_HEAP) continue; if ((node2=res->rr_node[0]) == node) node2 = res->rr_node[1]; if ((node2->rn_status & FINISHED) == 0) { - HeapAddInt(&ResistorHeap, node->rn_noderes + res->rr_value, + HeapAddInt(&ResistorHeap, node->rn_noderes + res->rr_value, (char *)res); } } @@ -1140,7 +1140,7 @@ resPathRes(res) { resNode *node0,*node1; int flag0,flag1; - + res->rr_status |= RES_HEAP; res->rr_status &= ~RES_MARKED; node0 = res->rr_node[0]; @@ -1162,7 +1162,7 @@ resPathRes(res) node1->rn_noderes = node0->rn_noderes+res->rr_value; resPathNode(node1); } - else + else { ASSERT(flag1,"ResPathRes"); res->rr_node[0] = node1; diff --git a/resis/ResUtils.c b/resis/ResUtils.c index fe8258f2..1e305705 100644 --- a/resis/ResUtils.c +++ b/resis/ResUtils.c @@ -25,13 +25,13 @@ static char rcsid[] __attribute__ ((unused)) = "$Header: /usr/cvsroot/magic-8.0/ #include "textio/txcommands.h" #include "resis/resis.h" - + /* * --------------------------------------------------------------------------- * - * ResFirst -- Checks to see if tile is a contact. If it is, allocate a + * ResFirst -- Checks to see if tile is a contact. If it is, allocate a * contact structure. - * + * * * Results: Always returns NULL (in the form of a Region pointer) * @@ -52,7 +52,7 @@ ResFirst(tile, arg) ResContactPoint *reg; TileType t; int i; - + if (IsSplit(tile)) { t = (SplitSide(tile)) ? SplitRightType(tile) : SplitLeftType(tile); @@ -86,13 +86,13 @@ ResFirst(tile, arg) } return((Region *) NULL); } - + /* *-------------------------------------------------------------------------- * * ResEach-- * - * ResEach calls ResFirst unless this is the first contact, in which case it + * ResEach calls ResFirst unless this is the first contact, in which case it * has alreay been processed * * results: returns 0 @@ -108,14 +108,14 @@ ResEach(tile, pNum, arg) int pNum; FindRegion *arg; { - + if ( ((ResContactPoint *)(arg->fra_region))->cp_contactTile != tile) { (void) ResFirst(tile, arg); } return(0); } - + /* *------------------------------------------------------------------------- * @@ -123,7 +123,7 @@ ResEach(tile, pNum, arg) * to keep track of various things used by the extractor. ResAddPlumbing * adds this structure and sets the tile's ClientData field to point to it. * If the tile is a device, then a device structure is also added; - * all connected device tiles are enumerated and their deviceList + * all connected device tiles are enumerated and their deviceList * fields set to the new structure. * * Results: always returns 0 @@ -145,7 +145,7 @@ ResAddPlumbing(tile, arg) Tile *tp1,*tp2,*source; resDevice *resDev; ExtDevice *devptr; - + if (resDevStack == NULL) resDevStack = StackNew(64); @@ -156,7 +156,7 @@ ResAddPlumbing(tile, arg) SplitLeftType(tile); else loctype = TiGetTypeExact(tile); - + devptr = ExtCurStyle->exts_device[loctype]; junk2 = resAddField(tile); if (TTMaskHasType(&(ExtCurStyle->exts_deviceMask), loctype)) @@ -200,7 +200,7 @@ ResAddPlumbing(tile, arg) *arg = (ClientData)resDev; junk2->deviceList = resDev; junk2->tj_status |= RES_TILE_DEV; - + source = NULL; /* find diffusion (if present) to be source contact */ @@ -262,13 +262,13 @@ ResAddPlumbing(tile, arg) break; } } - + /* We need to know whether a given diffusion tile connects to - * the source or to the drain of a device. A single + * the source or to the drain of a device. A single * diffusion tile is marked, and all connecting diffusion tiles * are enumerated and called the source. Any other SD tiles - * are assumed to be the drain. BUG: this does not work - * correctly with multi SD structures. + * are assumed to be the drain. BUG: this does not work + * correctly with multi SD structures. */ if (source != (Tile *) NULL) @@ -368,7 +368,7 @@ ResAddPlumbing(tile, arg) STACKPUSH((ClientData)(tp2),resDevStack); Junk->deviceList = resDev; Junk->tj_status |= RES_TILE_DEV; - + } else if TTMaskHasType(&(devptr->exts_deviceSDTypes[0]), TiGetBottomType(tp2)) @@ -514,7 +514,7 @@ ResAddPlumbing(tile, arg) } return(0); } - + /* *------------------------------------------------------------------------- * @@ -533,7 +533,7 @@ ResRemovePlumbing(tile, arg) ClientData *arg; { - + if (tile->ti_client != (ClientData) CLIENTDEFAULT) { freeMagic(((char *)(tile->ti_client))); @@ -542,20 +542,20 @@ ResRemovePlumbing(tile, arg) return(0); } - + /* *------------------------------------------------------------------------- * - * ResPreprocessDevices-- Given a list of all the device tiles and - * a list of all the devices, this procedure calculates the width and - * length. The width is set equal to the sum of all edges that touch - * diffusion divided by 2. The length is the remaining perimeter divided by + * ResPreprocessDevices-- Given a list of all the device tiles and + * a list of all the devices, this procedure calculates the width and + * length. The width is set equal to the sum of all edges that touch + * diffusion divided by 2. The length is the remaining perimeter divided by * 2*tiles. The perimeter and area fields of device structures are also * fixed. * * Results: none * - * Side Effects: sets length and width of devices. "ResDevTile" + * Side Effects: sets length and width of devices. "ResDevTile" * structures are freed. * *------------------------------------------------------------------------- @@ -572,7 +572,7 @@ ResPreProcessDevices(TileList, DeviceList, Def) tileJunk *tstruct; TileType tt, residue; int pNum; - + while (TileList != (ResDevTile *) NULL) { tt = TileList->type; @@ -582,7 +582,7 @@ ResPreProcessDevices(TileList, DeviceList, Def) TileTypeBitMask ttresidues; DBFullResidueMask(tt, &ttresidues); - + for (residue = TT_TECHDEPBASE; residue < DBNumUserLayers; residue++) { if (TTMaskHasType(&ttresidues, residue)) @@ -643,7 +643,7 @@ ResPreProcessDevices(TileList, DeviceList, Def) { double perimeter = DeviceList->rd_perim; double area = DeviceList->rd_area; - + perimeter /= 4.0; DeviceList->rd_width = perimeter + @@ -655,7 +655,7 @@ ResPreProcessDevices(TileList, DeviceList, Def) } } - + /* *------------------------------------------------------------------------- * @@ -677,7 +677,7 @@ ResAddToQueue(node,list) *list = node; } - + /* *------------------------------------------------------------------------- * @@ -696,7 +696,7 @@ ResRemoveFromQueue(node,list) resNode *node,**list; { - + if (node->rn_less != NULL) { node->rn_less->rn_more = node->rn_more; diff --git a/resis/ResWrite.c b/resis/ResWrite.c index 7483c8e4..53313a33 100644 --- a/resis/ResWrite.c +++ b/resis/ResWrite.c @@ -2,7 +2,7 @@ /* *------------------------------------------------------------------------- * - * Write.c -- Dumps network + * Write.c -- Dumps network * * *------------------------------------------------------------------------- @@ -48,10 +48,10 @@ ResPrintNetwork(filename, reslist) { char bigname[255],name1[255],name2[255]; - + FILE *fp; int i=1; - + sprintf(bigname,"%s.%s",filename,"res"); fp = fopen(bigname,"w"); if (fp != NULL) @@ -105,9 +105,9 @@ ResPrintCurrents(filename,extension,node) char bigname[255]; FILE *fp; int resCurrentPrintFunc(); - + sprintf(bigname,"%s.%d",filename,abs((int)(extension))); - + fp = fopen(bigname,"w"); if (fp != NULL) { @@ -116,9 +116,9 @@ ResPrintCurrents(filename,extension,node) } fclose(fp); } - - + + /* *------------------------------------------------------------------------- * @@ -138,7 +138,7 @@ resCurrentPrintFunc(node,resistor,filename) { tElement *workingDev; float i_sum=0.0; - + for (workingDev = node->rn_te; workingDev != NULL; workingDev=workingDev->te_nextt) { @@ -151,7 +151,7 @@ resCurrentPrintFunc(node,resistor,filename) if (node->rn_why == RES_NODE_ORIGIN) { fprintf(filename,"i gnd %f\n",i_sum); - + } else { @@ -160,7 +160,7 @@ resCurrentPrintFunc(node,resistor,filename) } } -} +} void ResDeviceCounts() @@ -176,7 +176,7 @@ ResDeviceCounts() TxError("n=%d t=%d r=%d\n",i,j,k); TxFlushErr(); } - + void ResWriteECLFile(filename,reslist,nodelist) @@ -192,7 +192,7 @@ ResWriteECLFile(filename,reslist,nodelist) strcpy(newname,filename); if (per = strrchr(newname,'.')) *per = '\0'; strcat(newname,".res"); - + if ((fp = fopen(newname,"w")) == NULL) { TxError("Can't open %s\n",newname); @@ -218,12 +218,12 @@ ResWriteECLFile(filename,reslist,nodelist) } for (;reslist;reslist = reslist->rr_nextResistor) { - + fprintf(fp,"r %s %s %f %s %d\n", reslist->rr_node[0]->rn_name,reslist->rr_node[1]->rn_name, /* /1000.0 gets ohms from milliohms */ (float)(reslist->rr_value)/1000.0, - DBTypeShortName(reslist->rr_tt),reslist->rr_csArea); + DBTypeShortName(reslist->rr_tt),reslist->rr_csArea); } fclose(fp); } diff --git a/resis/resis.h b/resis/resis.h index 5eb2e1f6..cadf28cc 100644 --- a/resis/resis.h +++ b/resis/resis.h @@ -19,15 +19,15 @@ typedef struct contactpoint Point cp_center; /*Center of contact */ Rect cp_rect; /* Tile rectangle */ Tile *cp_contactTile; - /* - The following two keep + /* + The following two keep track of the tiles where the contact was before preprocessing, and the next contact in that tile's area. */ - + Tile *cp_tile[LAYERS_PER_CONTACT]; int cp_currentcontact; /* keeps track of tile being processed @@ -44,11 +44,11 @@ typedef struct contactpoint typedef struct resistor { struct resistor *rr_nextResistor; /* Doubly linked list pointers */ - struct resistor *rr_lastResistor; + struct resistor *rr_lastResistor; struct resnode *rr_node[2]; float rr_value; /* Resistor's value in milliohms */ int rr_status; /* Status bit used for processing */ - union + union { float rr_area; /* area in resistor. Used to */ /* distribute capacitance */ @@ -98,7 +98,7 @@ typedef struct device #endif } resDevice; -/* +/* a junction is formed when two tiles that connect are next to one another. */ @@ -124,9 +124,9 @@ typedef struct resport char *rp_nodename; } resPort; -/* +/* ?element are 'cons' cells used to make linked lists of their referential - structures. + structures. */ typedef struct reselement @@ -160,7 +160,7 @@ typedef struct celement ResContactPoint *ce_thisc; } cElement; -/* +/* Nodes formed from network. These are linked both forwards and backwords to other nodes. Lists of devices, resistors, junctions, and contacts corresponding to this node are kept. @@ -201,7 +201,7 @@ typedef struct nelement resNode *ne_thisEl; } nElement; -/* +/* Breakpoints are places on a tile which may serve as sources/sinks of current. When resistance is calculated for a tile. this is calculated between these points. @@ -215,7 +215,7 @@ typedef struct breakpoint Rect *br_crect; } Breakpoint; -/* +/* Each tile needs to keep track of the following things associated with it. Since there are too many things to fit in the single ti_client field, this 1 to 6 adaptor is used. @@ -251,15 +251,15 @@ typedef struct resdevtile int overlap; } ResDevTile; -/* +/* Goodies contains random stuff passed between the node extractor - and ResCheckSimNodes. The location of a start tile and the resistive - tolerance are passed down, while the derived network is passed back. + and ResCheckSimNodes. The location of a start tile and the resistive + tolerance are passed down, while the derived network is passed back. */ typedef struct goodstuff { - TileType rg_ttype; + TileType rg_ttype; float rg_maxres; float rg_nodecap; float rg_Tdi; @@ -335,7 +335,7 @@ typedef struct ressimnode char *oldname; /* Pointer to previous name of */ /* node, if it exists */ tElement *rs_sublist[2]; /* pointers to Gnd and Vdd sub */ - /* strate connections, + /* strate connections, if they exist */ } ResSimNode; @@ -394,7 +394,7 @@ typedef struct resfixpoint /* Keeps track of where voltage sources are */ int fp_status; Tile *fp_tile; resNode *fp_node; - char fp_name[1]; + char fp_name[1]; } ResFixPoint; typedef struct clump @@ -406,7 +406,7 @@ typedef struct clump rElement *rp_singlelist; } ResClump; -/* the first two fields of this plug must be the the same as for +/* the first two fields of this plug must be the the same as for resDevice */ typedef struct plug @@ -467,7 +467,7 @@ typedef struct capval /*a temporary marking flag */ #define RES_TILE_MARK 0x8 /* indicates that tile has unidirectional current flow */ -#ifdef LAPLACE +#ifdef LAPLACE #define RES_TILE_1D 0x10 #define RES_TILE_GDONE 0x20 #endif @@ -584,7 +584,7 @@ extern HashTable ResPlugTable; extern CellUse *ResUse; extern CellDef *ResDef; extern TileTypeBitMask ResConnectWithSD[NT]; -extern TileTypeBitMask ResCopyMask[NT]; +extern TileTypeBitMask ResCopyMask[NT]; extern resResistor *ResResList; extern resNode *ResNodeList; extern resDevice *ResDevList; diff --git a/router/router.h b/router/router.h index e11a2ef1..dc4ffb77 100644 --- a/router/router.h +++ b/router/router.h @@ -4,16 +4,16 @@ * This file defines the interface provided by the router module, * which is the top-level module that controls routing. * - * ********************************************************************* - * * Copyright (C) 1985, 1990 Regents of the University of California. * - * * Permission to use, copy, modify, and distribute this * - * * software and its documentation for any purpose and without * - * * fee is hereby granted, provided that the above copyright * - * * notice appear in all copies. The University of California * - * * makes no representations about the suitability of this * - * * software for any purpose. It is provided "as is" without * - * * express or implied warranty. Export of this software outside * - * * of the United States of America may require an export license. * + * ********************************************************************* + * * Copyright (C) 1985, 1990 Regents of the University of California. * + * * Permission to use, copy, modify, and distribute this * + * * software and its documentation for any purpose and without * + * * fee is hereby granted, provided that the above copyright * + * * notice appear in all copies. The University of California * + * * makes no representations about the suitability of this * + * * software for any purpose. It is provided "as is" without * + * * express or implied warranty. Export of this software outside * + * * of the United States of America may require an export license. * * ********************************************************************* * * diff --git a/router/routerInt.h b/router/routerInt.h index 67bd4ead..61c0ddc1 100644 --- a/router/routerInt.h +++ b/router/routerInt.h @@ -3,19 +3,19 @@ * * Internal definitions for Router module. * - * ********************************************************************* - * * Copyright (C) 1985, 1990 Regents of the University of California. * - * * Permission to use, copy, modify, and distribute this * - * * software and its documentation for any purpose and without * - * * fee is hereby granted, provided that the above copyright * - * * notice appear in all copies. The University of California * - * * makes no representations about the suitability of this * - * * software for any purpose. It is provided "as is" without * - * * express or implied warranty. Export of this software outside * - * * of the United States of America may require an export license. * + * ********************************************************************* + * * Copyright (C) 1985, 1990 Regents of the University of California. * + * * Permission to use, copy, modify, and distribute this * + * * software and its documentation for any purpose and without * + * * fee is hereby granted, provided that the above copyright * + * * notice appear in all copies. The University of California * + * * makes no representations about the suitability of this * + * * software for any purpose. It is provided "as is" without * + * * express or implied warranty. Export of this software outside * + * * of the United States of America may require an export license. * * ********************************************************************* * - * rcsid="$Header: /usr/cvsroot/magic-8.0/router/routerInt.h,v 1.1.1.1 2008/02/03 20:43:50 tim Exp $" + * rcsid="$Header: /usr/cvsroot/magic-8.0/router/routerInt.h,v 1.1.1.1 2008/02/03 20:43:50 tim Exp $" */ /* diff --git a/router/rtrChannel.c b/router/rtrChannel.c index b6fe742e..6dcafe75 100644 --- a/router/rtrChannel.c +++ b/router/rtrChannel.c @@ -2,16 +2,16 @@ * * Code to handle channels and the obstacles within them. * - * ********************************************************************* - * * Copyright (C) 1985, 1990 Regents of the University of California. * - * * Permission to use, copy, modify, and distribute this * - * * software and its documentation for any purpose and without * - * * fee is hereby granted, provided that the above copyright * - * * notice appear in all copies. The University of California * - * * makes no representations about the suitability of this * - * * software for any purpose. It is provided "as is" without * - * * express or implied warranty. Export of this software outside * - * * of the United States of America may require an export license. * + * ********************************************************************* + * * Copyright (C) 1985, 1990 Regents of the University of California. * + * * Permission to use, copy, modify, and distribute this * + * * software and its documentation for any purpose and without * + * * fee is hereby granted, provided that the above copyright * + * * notice appear in all copies. The University of California * + * * makes no representations about the suitability of this * + * * software for any purpose. It is provided "as is" without * + * * express or implied warranty. Export of this software outside * + * * of the United States of America may require an export license. * * ********************************************************************* */ @@ -53,7 +53,7 @@ Plane *RtrChannelPlane; /* List of channels created from decomposed tile plane */ GCRChannel *RtrChannelList = NULL; -/* Multiplier for when to make end connections */ +/* Multiplier for when to make end connections */ #ifndef lint float RtrEndConst = 1.0; #else @@ -64,7 +64,7 @@ float RtrEndConst; /* Sun lint brain death */ extern int rtrChannelObstacleMark(); extern void rtrChannelObstaclePins(); - + /* * ---------------------------------------------------------------------------- * @@ -189,7 +189,7 @@ bottom: *pCount += errs1; RtrMilestonePrint(); } - + /* * ---------------------------------------------------------------------------- * @@ -248,7 +248,7 @@ RtrChannelBounds(loc, pLength, pWidth, origin) } *pWidth = (hi - lo) / RtrGridSpacing + 1; } - + /* * ---------------------------------------------------------------------------- * @@ -316,7 +316,7 @@ RtrChannelObstacles(use, ch) rtrChannelObstaclePins(ch); } - + /* * ---------------------------------------------------------------------------- * @@ -381,7 +381,7 @@ rtrChannelObstaclePins(ch) else if (!CLEAR(res[col][end])) ch->gcr_tPins[col].gcr_pFlags = GCROBST; } } - + /* * ---------------------------------------------------------------------------- * @@ -485,7 +485,7 @@ rtrChannelObstacleMark(tile, cxp) return (0); } - + /* * ---------------------------------------------------------------------------- * @@ -562,7 +562,7 @@ RtrChannelDensity(ch) if (*vdens > density) density = *vdens; ch->gcr_dMaxByRow = density; } - + /* * ---------------------------------------------------------------------------- * diff --git a/router/rtrCmd.c b/router/rtrCmd.c index ea419ac0..d7ed8288 100644 --- a/router/rtrCmd.c +++ b/router/rtrCmd.c @@ -3,16 +3,16 @@ * * Commands for the route modules only. * - * ********************************************************************* - * * Copyright (C) 1985, 1990 Regents of the University of California. * - * * Permission to use, copy, modify, and distribute this * - * * software and its documentation for any purpose and without * - * * fee is hereby granted, provided that the above copyright * - * * notice appear in all copies. The University of California * - * * makes no representations about the suitability of this * - * * software for any purpose. It is provided "as is" without * - * * express or implied warranty. Export of this software outside * - * * of the United States of America may require an export license. * + * ********************************************************************* + * * Copyright (C) 1985, 1990 Regents of the University of California. * + * * Permission to use, copy, modify, and distribute this * + * * software and its documentation for any purpose and without * + * * fee is hereby granted, provided that the above copyright * + * * notice appear in all copies. The University of California * + * * makes no representations about the suitability of this * + * * software for any purpose. It is provided "as is" without * + * * express or implied warranty. Export of this software outside * + * * of the United States of America may require an export license. * * ********************************************************************* */ @@ -499,7 +499,7 @@ CmdRoute(w, cmd) char *netListName; static char *cmdRouteOption[] = - { + { "*checks toggle column checking", "*debug toggle router trace messages", "*file route from a channel data file", @@ -515,7 +515,7 @@ CmdRoute(w, cmd) "obstacle set obstacle constant", "origin [x y] print or set routing grid origin", "stats print and clear previous route statistics", - "settings show router parameters", + "settings show router parameters", "steady set steady net constant", "tech show router technology information", "vias set metal maximization via limit (grid units)", diff --git a/router/rtrDcmpose.c b/router/rtrDcmpose.c index d32e6d1e..32162de6 100644 --- a/router/rtrDcmpose.c +++ b/router/rtrDcmpose.c @@ -16,16 +16,16 @@ * the original plane and horizontal edges defining channels. This * is done in the new, generated plane--not in the original plane. * - * ********************************************************************* - * * Copyright (C) 1985, 1990 Regents of the University of California. * - * * Permission to use, copy, modify, and distribute this * - * * software and its documentation for any purpose and without * - * * fee is hereby granted, provided that the above copyright * - * * notice appear in all copies. The University of California * - * * makes no representations about the suitability of this * - * * software for any purpose. It is provided "as is" without * - * * express or implied warranty. Export of this software outside * - * * of the United States of America may require an export license. * + * ********************************************************************* + * * Copyright (C) 1985, 1990 Regents of the University of California. * + * * Permission to use, copy, modify, and distribute this * + * * software and its documentation for any purpose and without * + * * fee is hereby granted, provided that the above copyright * + * * notice appear in all copies. The University of California * + * * makes no representations about the suitability of this * + * * software for any purpose. It is provided "as is" without * + * * express or implied warranty. Export of this software outside * + * * of the United States of America may require an export license. * * ********************************************************************* */ @@ -79,7 +79,7 @@ extern void rtrMarkChannel(); extern void rtrMerge(); bool rtrUseCorner(); - + /* * ---------------------------------------------------------------------------- * @@ -132,7 +132,7 @@ RtrDecomposeName(routeUse, area, name) return (def); } - + /* * ---------------------------------------------------------------------------- * @@ -246,7 +246,7 @@ RtrDecompose(routeUse, area, netList) return (cdTo); } - + /* * ---------------------------------------------------------------------------- * @@ -280,7 +280,7 @@ RtrFindChannelDef() return (def); } - + /* * ---------------------------------------------------------------------------- * @@ -338,7 +338,7 @@ rtrSrCells(scx, targetDef) DBStdWriteTbl(CELLTILE), (PaintUndoInfo *) NULL); return (0); } - + /* * ---------------------------------------------------------------------------- * @@ -403,7 +403,7 @@ rtrRoundRect(r, sepUp, sepDown, doRoundUp) r->r_ytop -= halfGrid; } } - + /* * ---------------------------------------------------------------------------- * @@ -433,7 +433,7 @@ rtrHashKill(ht) GCRFreeChannel((GCRChannel *) HashGetValue(he)); HashKill(ht); } - + /* * ---------------------------------------------------------------------------- * @@ -499,7 +499,7 @@ rtrSplitToArea(area, def) p.p_y = TOP(tile); } } - + /* * ---------------------------------------------------------------------------- * @@ -524,7 +524,7 @@ rtrSrClear(tile, area) Rect *area; { /* Clear all */ - rtrCLEAR(tile, -1); + rtrCLEAR(tile, -1); if (TiGetBody(tile) == (ClientData) NULL) { @@ -557,7 +557,7 @@ rtrSrClear(tile, area) return (0); } - + /* * ---------------------------------------------------------------------------- * @@ -590,7 +590,7 @@ rtrSrFunc(tile, plane) /* * Check each corner of this cell tile to see if it is convex, - * and no marked boundary is incident upon it. + * and no marked boundary is incident upon it. */ p = tile->ti_ll; if (rtrUseCorner(&p, rtrSW, plane, tiles)) @@ -610,7 +610,7 @@ rtrSrFunc(tile, plane) return (0); } - + /* * ---------------------------------------------------------------------------- * @@ -698,7 +698,7 @@ rtrUseCorner(point, corner, plane, tiles) } return(FALSE); } - + /* * ---------------------------------------------------------------------------- * @@ -821,7 +821,7 @@ rtrMarkChannel(plane, tiles, point, corner) rtrMerge(RT(tile), tile, plane); } } - + /* * ---------------------------------------------------------------------------- * @@ -929,7 +929,7 @@ rtrYDist(tiles, point, up, plane) return (yStart - p.p_y); } } - + /* * ---------------------------------------------------------------------------- * @@ -961,7 +961,7 @@ rtrXDist(tiles, x, isRight) return (MIN(l0, l1)); } - + /* * ---------------------------------------------------------------------------- * diff --git a/router/rtrDcmpose.h b/router/rtrDcmpose.h index 2d4d51f9..24d115e0 100644 --- a/router/rtrDcmpose.h +++ b/router/rtrDcmpose.h @@ -3,19 +3,19 @@ * * Routines to do channel decomposition. * - * ********************************************************************* - * * Copyright (C) 1985, 1990 Regents of the University of California. * - * * Permission to use, copy, modify, and distribute this * - * * software and its documentation for any purpose and without * - * * fee is hereby granted, provided that the above copyright * - * * notice appear in all copies. The University of California * - * * makes no representations about the suitability of this * - * * software for any purpose. It is provided "as is" without * - * * express or implied warranty. Export of this software outside * - * * of the United States of America may require an export license. * + * ********************************************************************* + * * Copyright (C) 1985, 1990 Regents of the University of California. * + * * Permission to use, copy, modify, and distribute this * + * * software and its documentation for any purpose and without * + * * fee is hereby granted, provided that the above copyright * + * * notice appear in all copies. The University of California * + * * makes no representations about the suitability of this * + * * software for any purpose. It is provided "as is" without * + * * express or implied warranty. Export of this software outside * + * * of the United States of America may require an export license. * * ********************************************************************* * - * rcsid="$Header: /usr/cvsroot/magic-8.0/router/rtrDcmpose.h,v 1.1.1.1 2008/02/03 20:43:50 tim Exp $" + * rcsid="$Header: /usr/cvsroot/magic-8.0/router/rtrDcmpose.h,v 1.1.1.1 2008/02/03 20:43:50 tim Exp $" */ #ifndef _RTRDECOMPOSE_H diff --git a/router/rtrFdback.c b/router/rtrFdback.c index 9ef0914d..23be3da4 100644 --- a/router/rtrFdback.c +++ b/router/rtrFdback.c @@ -6,16 +6,16 @@ * feedback from these attempts until it knows which version of the * routing is the real one, whose errors should appear in the layout. * - * ********************************************************************* - * * Copyright (C) 1985, 1990 Regents of the University of California. * - * * Permission to use, copy, modify, and distribute this * - * * software and its documentation for any purpose and without * - * * fee is hereby granted, provided that the above copyright * - * * notice appear in all copies. The University of California * - * * makes no representations about the suitability of this * - * * software for any purpose. It is provided "as is" without * - * * express or implied warranty. Export of this software outside * - * * of the United States of America may require an export license. * + * ********************************************************************* + * * Copyright (C) 1985, 1990 Regents of the University of California. * + * * Permission to use, copy, modify, and distribute this * + * * software and its documentation for any purpose and without * + * * fee is hereby granted, provided that the above copyright * + * * notice appear in all copies. The University of California * + * * makes no representations about the suitability of this * + * * software for any purpose. It is provided "as is" without * + * * express or implied warranty. Export of this software outside * + * * of the United States of America may require an export license. * * ********************************************************************* */ @@ -59,7 +59,7 @@ typedef struct rtrFb RtrFB * rtrFList[] = {(RtrFB *) NULL, (RtrFB *) NULL}; /* Lists of feedback */ int rtrFNum; /* Says which list is active */ - + /* * ---------------------------------------------------------------------------- * @@ -116,7 +116,7 @@ RtrChannelError(ch, col, track, msg, net) (void) rtrFBAdd(&box, buff); } - + /* * ---------------------------------------------------------------------------- * @@ -152,7 +152,7 @@ rtrFBClear() } rtrFNum=0; } - + /* * ---------------------------------------------------------------------------- * @@ -183,7 +183,7 @@ rtrFBAdd(r, t) new->rtr_Fnext=rtrFList[rtrFNum]; rtrFList[rtrFNum]=new; } - + /* * ---------------------------------------------------------------------------- * @@ -211,7 +211,7 @@ RtrFBPaint(num) 1, STYLE_PALEHIGHLIGHTS); rtrFBClear(); } - + /* * ---------------------------------------------------------------------------- * diff --git a/router/rtrHazards.c b/router/rtrHazards.c index 2b0ecbf3..c76eec49 100644 --- a/router/rtrHazards.c +++ b/router/rtrHazards.c @@ -17,16 +17,16 @@ * right. Hazards in the other orientations are used only by the global * router, in choosing channel-to-channel crossings. * - * ********************************************************************* - * * Copyright (C) 1985, 1990 Regents of the University of California. * - * * Permission to use, copy, modify, and distribute this * - * * software and its documentation for any purpose and without * - * * fee is hereby granted, provided that the above copyright * - * * notice appear in all copies. The University of California * - * * makes no representations about the suitability of this * - * * software for any purpose. It is provided "as is" without * - * * express or implied warranty. Export of this software outside * - * * of the United States of America may require an export license. * + * ********************************************************************* + * * Copyright (C) 1985, 1990 Regents of the University of California. * + * * Permission to use, copy, modify, and distribute this * + * * software and its documentation for any purpose and without * + * * fee is hereby granted, provided that the above copyright * + * * notice appear in all copies. The University of California * + * * makes no representations about the suitability of this * + * * software for any purpose. It is provided "as is" without * + * * express or implied warranty. Export of this software outside * + * * of the United States of America may require an export license. * * ********************************************************************* */ @@ -47,7 +47,7 @@ static char rcsid[] __attribute__ ((unused)) = "$Header: /usr/cvsroot/magic-8.0/ extern void rtrFindEnds(); extern void rtrFlag(); - + /* * ---------------------------------------------------------------------------- * @@ -213,7 +213,7 @@ RtrHazards(ch) freeMagic((char *) height); freeMagic((char *) width); } - + /* * ---------------------------------------------------------------------------- * @@ -276,7 +276,7 @@ rtrHeights(ch) /* * Set height values at every grid point touched * in this column by the obstacle. - */ + */ n = row - start; for (i = start; i < row; i++) hcol[i] = n; @@ -285,7 +285,7 @@ rtrHeights(ch) return (heights); } - + /* * ---------------------------------------------------------------------------- * @@ -346,7 +346,7 @@ rtrWidths(ch) /* Set width values at every grid point touched in this column * by the obstacle. - */ + */ n = col - start; for (i = start; i < col; i++) widths[i][row] = n; @@ -355,7 +355,7 @@ rtrWidths(ch) return(widths); } - + /* * ---------------------------------------------------------------------------- * @@ -447,7 +447,7 @@ gotVL: *lo = row + 1; } } - + /* * ---------------------------------------------------------------------------- * diff --git a/router/rtrMain.c b/router/rtrMain.c index 26844c1c..e7063ad1 100644 --- a/router/rtrMain.c +++ b/router/rtrMain.c @@ -2,16 +2,16 @@ * * Top level routing code, and glue that doesn't belong elsewhere. * - * ********************************************************************* - * * Copyright (C) 1985, 1990 Regents of the University of California. * - * * Permission to use, copy, modify, and distribute this * - * * software and its documentation for any purpose and without * - * * fee is hereby granted, provided that the above copyright * - * * notice appear in all copies. The University of California * - * * makes no representations about the suitability of this * - * * software for any purpose. It is provided "as is" without * - * * express or implied warranty. Export of this software outside * - * * of the United States of America may require an export license. * + * ********************************************************************* + * * Copyright (C) 1985, 1990 Regents of the University of California. * + * * Permission to use, copy, modify, and distribute this * + * * software and its documentation for any purpose and without * + * * fee is hereby granted, provided that the above copyright * + * * notice appear in all copies. The University of California * + * * makes no representations about the suitability of this * + * * software for any purpose. It is provided "as is" without * + * * express or implied warranty. Export of this software outside * + * * of the United States of America may require an export license. * * ********************************************************************* */ @@ -57,7 +57,7 @@ void RtrMilestoneDone(); * Set by the "route origin" command. */ Point RtrOrigin = { 0, 0 }; - + /* * ---------------------------------------------------------------------------- * @@ -143,7 +143,7 @@ done: /* Clean up global routing information */ NLFree(&netList); } - + /* * ---------------------------------------------------------------------------- * @@ -206,7 +206,7 @@ rtrMakeChannel(tile, clipBox) return(0); } - + /* * ---------------------------------------------------------------------------- * @@ -249,7 +249,7 @@ RtrRunStats() TxFlush(); } -void +void RtrMilestoneStart(event) char *event; { diff --git a/router/rtrPaint.c b/router/rtrPaint.c index 4f5327fb..e1115be5 100644 --- a/router/rtrPaint.c +++ b/router/rtrPaint.c @@ -4,16 +4,16 @@ * on channel routing results, then paint the results back * into the edit cell. * - * ********************************************************************* - * * Copyright (C) 1985, 1990 Regents of the University of California. * - * * Permission to use, copy, modify, and distribute this * - * * software and its documentation for any purpose and without * - * * fee is hereby granted, provided that the above copyright * - * * notice appear in all copies. The University of California * - * * makes no representations about the suitability of this * - * * software for any purpose. It is provided "as is" without * - * * express or implied warranty. Export of this software outside * - * * of the United States of America may require an export license. * + * ********************************************************************* + * * Copyright (C) 1985, 1990 Regents of the University of California. * + * * Permission to use, copy, modify, and distribute this * + * * software and its documentation for any purpose and without * + * * fee is hereby granted, provided that the above copyright * + * * notice appear in all copies. The University of California * + * * makes no representations about the suitability of this * + * * software for any purpose. It is provided "as is" without * + * * express or implied warranty. Export of this software outside * + * * of the United States of America may require an export license. * * ********************************************************************* */ @@ -51,7 +51,7 @@ extern void rtrMaxMetal(); bool rtrMetalOkay(); bool rtrDoVia(); - + /* * ---------------------------------------------------------------------------- * RtrPaintBack -- @@ -79,7 +79,7 @@ RtrPaintBack(ch, def) rtrPaintRows(def, ch); rtrPaintColumns(def, ch); } - + /* * ---------------------------------------------------------------------------- * @@ -154,7 +154,7 @@ rtrPaintRows(def, ch) } else nextType = TT_SPACE; - /* If the new type is different from the old, paint the old, + /* If the new type is different from the old, paint the old, * and store the start of the new run. */ @@ -171,7 +171,7 @@ rtrPaintRows(def, ch) DBPaintPlane(def->cd_planes[ui.pu_pNum], &paint, DBStdPaintTbl(curType, ui.pu_pNum), &ui); } - + paint.r_xbot = ch->gcr_origin.p_x + (col * RtrGridSpacing); paint.r_ybot = ch->gcr_origin.p_y + (row * RtrGridSpacing); if (nextType == RtrMetalType) @@ -204,7 +204,7 @@ rtrPaintRows(def, ch) } } } - + /* * ---------------------------------------------------------------------------- * @@ -253,7 +253,7 @@ rtrPaintColumns(def, ch) /* Figure out what material needs to be present in this * column between this row and the next one above. */ - + code = column[row]; if (code & GCRU) { @@ -311,7 +311,7 @@ rtrPaintColumns(def, ch) } } } - + /* * ---------------------------------------------------------------------------- * @@ -407,7 +407,7 @@ rtrDoVia(ch, col, row) return(FALSE); } - + /* * ---------------------------------------------------------------------------- * @@ -540,7 +540,7 @@ rtrMaxMetal(ch) } } } - + /* * ---------------------------------------------------------------------------- * @@ -599,7 +599,7 @@ rtrMetalOkay(ch, col, dir) return ((flags & (GCRBLKM|GCRR)) == 0); } - + /* * ---------------------------------------------------------------------------- * @@ -638,7 +638,7 @@ RtrPaintContact(def, area) DBPaint(def, &larger, RtrPolyType); } } - + /* * ---------------------------------------------------------------------------- * diff --git a/router/rtrPin.c b/router/rtrPin.c index 89d98830..3ae0f8a1 100644 --- a/router/rtrPin.c +++ b/router/rtrPin.c @@ -3,16 +3,16 @@ * * Code for linking together the pins in adjacent channels. * - * ********************************************************************* - * * Copyright (C) 1985, 1990 Regents of the University of California. * - * * Permission to use, copy, modify, and distribute this * - * * software and its documentation for any purpose and without * - * * fee is hereby granted, provided that the above copyright * - * * notice appear in all copies. The University of California * - * * makes no representations about the suitability of this * - * * software for any purpose. It is provided "as is" without * - * * express or implied warranty. Export of this software outside * - * * of the United States of America may require an export license. * + * ********************************************************************* + * * Copyright (C) 1985, 1990 Regents of the University of California. * + * * Permission to use, copy, modify, and distribute this * + * * software and its documentation for any purpose and without * + * * fee is hereby granted, provided that the above copyright * + * * notice appear in all copies. The University of California * + * * makes no representations about the suitability of this * + * * software for any purpose. It is provided "as is" without * + * * express or implied warranty. Export of this software outside * + * * of the United States of America may require an export license. * * ********************************************************************* * Lawrence Livermore National Laboratory */ @@ -45,7 +45,7 @@ static char rcsid[] __attribute__ ((unused)) = "$Header: /usr/cvsroot/magic-8.0/ bool rtrPinArrayBlock(); void rtrPinShow(GCRPin *); - + /* * ---------------------------------------------------------------------------- * @@ -189,7 +189,7 @@ rtrPinArrayInit(ch, side, pins, nPins) } return 0; } - + /* * ---------------------------------------------------------------------------- * @@ -250,7 +250,7 @@ RtrPointToPin(ch, side, point) ASSERT(FALSE, "Pin not on side of channel in RtrPointToPin"); return &ch->gcr_lPins[0]; } - + /* * ---------------------------------------------------------------------------- * @@ -265,7 +265,7 @@ RtrPointToPin(ch, side, point) * * Also propagate obstacle flags for pins. If a pin's obstacle flags * contain GCROBST, then set this bit in gcr_linked's flags as well. - * + * * Results: * TRUE if the blockage state of any pins changed, FALSE * otherwise. The caller should iterate over all channels @@ -339,7 +339,7 @@ rtrPinArrayBlock(ch, pins, opins, nPins) return changed; } - + /* * ---------------------------------------------------------------------------- * @@ -349,7 +349,7 @@ rtrPinArrayBlock(ch, pins, opins, nPins) * list headed by the zero-th pin along that side. Usable pins (for purposes * of global routing) are those that are unassigned (gcr_pId == 0) and that * have gcr_linked != NULL. - * + * * Results: * None. * @@ -437,7 +437,7 @@ void rtrPinShow(pin) ShowRect(EditCellUse->cu_def, &r, STYLE_ERASEHIGHLIGHTS); #endif /* notdef */ } - + /* * ---------------------------------------------------------------------------- * @@ -447,7 +447,7 @@ void rtrPinShow(pin) * actually used during global routing. The unused ones have gcr_pSeg * equal to GCR_STEMSEGID and must be unmarked here (otherwise the channel * router will try to route them!). - * + * * Results: * None. * diff --git a/router/rtrSide.c b/router/rtrSide.c index a9e880f7..ea44ba3f 100644 --- a/router/rtrSide.c +++ b/router/rtrSide.c @@ -4,16 +4,16 @@ * Contains procedures for enumerating the sides of groups of * collinear cells. * - * ********************************************************************* - * * Copyright (C) 1985, 1990 Regents of the University of California. * - * * Permission to use, copy, modify, and distribute this * - * * software and its documentation for any purpose and without * - * * fee is hereby granted, provided that the above copyright * - * * notice appear in all copies. The University of California * - * * makes no representations about the suitability of this * - * * software for any purpose. It is provided "as is" without * - * * express or implied warranty. Export of this software outside * - * * of the United States of America may require an export license. * + * ********************************************************************* + * * Copyright (C) 1985, 1990 Regents of the University of California. * + * * Permission to use, copy, modify, and distribute this * + * * software and its documentation for any purpose and without * + * * fee is hereby granted, provided that the above copyright * + * * notice appear in all copies. The University of California * + * * makes no representations about the suitability of this * + * * software for any purpose. It is provided "as is" without * + * * express or implied warranty. Export of this software outside * + * * of the United States of America may require an export license. * * ********************************************************************* */ @@ -74,7 +74,7 @@ int rtrSideMinChanWidth; /* See comments in rtrEnumSides() */ int rtrEnumSidesFunc(); int rtrSideInitClient(); int rtrSideLookCellsFunc(); - + /* * ---------------------------------------------------------------------------- * @@ -180,7 +180,7 @@ rtrEnumSides(use, area, minChannelWidth, func, cdata) return (0); } - + /* * ---------------------------------------------------------------------------- * @@ -263,7 +263,7 @@ rtrSideProcess(use, side, area, trans) return (retval); } - + /* * ---------------------------------------------------------------------------- * @@ -289,7 +289,7 @@ rtrSideInitClient(tile, client) tile->ti_client = client; return (0); } - + /* * ---------------------------------------------------------------------------- * @@ -450,7 +450,7 @@ rtrEnumSidesFunc(tile) return (0); } - + /* * ---------------------------------------------------------------------------- * diff --git a/router/rtrStem.c b/router/rtrStem.c index 106b8994..8510d186 100644 --- a/router/rtrStem.c +++ b/router/rtrStem.c @@ -6,16 +6,16 @@ * non-grid-aligned terminals in cells and grid lines at the * edges of channels. * - * ********************************************************************* - * * Copyright (C) 1985, 1990 Regents of the University of California. * - * * Permission to use, copy, modify, and distribute this * - * * software and its documentation for any purpose and without * - * * fee is hereby granted, provided that the above copyright * - * * notice appear in all copies. The University of California * - * * makes no representations about the suitability of this * - * * software for any purpose. It is provided "as is" without * - * * express or implied warranty. Export of this software outside * - * * of the United States of America may require an export license. * + * ********************************************************************* + * * Copyright (C) 1985, 1990 Regents of the University of California. * + * * Permission to use, copy, modify, and distribute this * + * * software and its documentation for any purpose and without * + * * fee is hereby granted, provided that the above copyright * + * * notice appear in all copies. The University of California * + * * makes no representations about the suitability of this * + * * software for any purpose. It is provided "as is" without * + * * express or implied warranty. Export of this software outside * + * * of the United States of America may require an export license. * * ********************************************************************* */ @@ -83,7 +83,7 @@ bool rtrSrArea(); bool rtrStemMask(); bool RtrComputeJogs(); - + /* * ---------------------------------------------------------------------------- * @@ -202,7 +202,7 @@ RtrStemProcessAll(use, netList, doWarn, func) out: RtrMilestoneDone(); } - + /* * ---------------------------------------------------------------------------- * @@ -346,11 +346,11 @@ RtrStemAssignExt(use, doWarn, loc, term, net) } /* - * Overall algorithm: find the nearest channel in + * Overall algorithm: find the nearest channel in * allowable directions and try to assign a stem tip * in that direction. */ - + pins = 0; loc->nloc_chan == (GCRChannel *) NULL; for ( dr = dirs; dr->dr_dir; dr++) @@ -425,7 +425,7 @@ rtrStemExpandFunc(Tile *t, TreeContext *cxp) return 0; /* Probably should report an error and stop */ } - + /* * ---------------------------------------------------------------------------- * @@ -495,7 +495,7 @@ rtrStemTip(loc, si, use) } return ((GCRPin *) NULL); } - + /* * ---------------------------------------------------------------------------- * @@ -518,7 +518,7 @@ rtrAbort(tile) { return 1; } - + /* * ---------------------------------------------------------------------------- * @@ -597,7 +597,7 @@ rtrStemTryPin(loc, dir, p, use) * Verify stem extending to channel will not overlap * material in the edit cell or nested subcells. */ - + if ( rtrTreeSrArea(loc, dir, p, use) ) return (GCRPin *) NULL; @@ -623,7 +623,7 @@ rtrStemTryPin(loc, dir, p, use) loc->nloc_pin = pin; return (pin); } - + /* * ---------------------------------------------------------------------------- * @@ -711,7 +711,7 @@ rtrTreeSrArea(loc, dir, p, use) return FALSE; } - + bool rtrSrArea(dir,use,tmp,delta) int dir; @@ -783,7 +783,7 @@ rtrSrArea(dir,use,tmp,delta) { if (DBTreeSrTiles(&scx, &DBAllButSpaceAndDRCBits, 0, rtrAbort, (ClientData)0) ) return TRUE; - return FALSE; + return FALSE; } } @@ -874,7 +874,7 @@ rtrStemRange(loc, dir, si) break; } } - + /* * ---------------------------------------------------------------------------- * @@ -909,7 +909,7 @@ rtrStemContactLine(lo, hi, origin) return (center); } - + /* * ---------------------------------------------------------------------------- * @@ -971,7 +971,7 @@ rtrStemSearch(center, dir, point) return (ch); } - + /* * ---------------------------------------------------------------------------- * @@ -1214,7 +1214,7 @@ rtrStemTypes(startMask, finalMask, startType, finalType) } return 0; } - + /* * ---------------------------------------------------------------------------- * @@ -1282,7 +1282,7 @@ RtrComputeJogs(loc, stem, dir, contact, jog, start, width) start->p_x = jog->p_x; start->p_y = area->r_ybot - width; break; - + case GEO_EAST: contact->p_x = RTR_GRIDDOWN(stem->p_x, RtrOrigin.p_x); contact->p_y = stem->p_y; @@ -1294,7 +1294,7 @@ RtrComputeJogs(loc, stem, dir, contact, jog, start, width) start->p_y = jog->p_y; start->p_x = area->r_xtop; break; - + case GEO_WEST: contact->p_x = RTR_GRIDUP(stem->p_x, RtrOrigin.p_x); contact->p_y = stem->p_y; @@ -1306,7 +1306,7 @@ RtrComputeJogs(loc, stem, dir, contact, jog, start, width) start->p_y = jog->p_y; start->p_x = area->r_xbot - width; break; - + default: return TRUE; } diff --git a/router/rtrTech.c b/router/rtrTech.c index 724ce297..be93b644 100644 --- a/router/rtrTech.c +++ b/router/rtrTech.c @@ -5,16 +5,16 @@ * giving, for example, the layers to use for routing, their * widths, and so on. * - * ********************************************************************* - * * Copyright (C) 1985, 1990 Regents of the University of California. * - * * Permission to use, copy, modify, and distribute this * - * * software and its documentation for any purpose and without * - * * fee is hereby granted, provided that the above copyright * - * * notice appear in all copies. The University of California * - * * makes no representations about the suitability of this * - * * software for any purpose. It is provided "as is" without * - * * express or implied warranty. Export of this software outside * - * * of the United States of America may require an export license. * + * ********************************************************************* + * * Copyright (C) 1985, 1990 Regents of the University of California. * + * * Permission to use, copy, modify, and distribute this * + * * software and its documentation for any purpose and without * + * * fee is hereby granted, provided that the above copyright * + * * notice appear in all copies. The University of California * + * * makes no representations about the suitability of this * + * * software for any purpose. It is provided "as is" without * + * * express or implied warranty. Export of this software outside * + * * of the United States of America may require an export license. * * ********************************************************************* */ @@ -64,7 +64,7 @@ int RtrPaintSepsUp[TT_MAXTYPES], RtrPaintSepsDown[TT_MAXTYPES]; int RtrMetalSeps[TT_MAXTYPES], RtrPolySeps[TT_MAXTYPES]; - + /* * ---------------------------------------------------------------------------- * @@ -107,7 +107,7 @@ RtrTechInit() RtrPaintSepsDown[i] = 0; } } - + /* * ---------------------------------------------------------------------------- * @@ -286,7 +286,7 @@ RtrTechLine(sectionName, argc, argv) TechError("Unknown router statement \"%s\".\n", argv[0]); return TRUE; } - + /* * ---------------------------------------------------------------------------- * @@ -317,7 +317,7 @@ RtrTechFinal() * down (since this works better if the two routing layers are different * widths). */ - + i = RtrMetalWidth; if (RtrPolyWidth > i) i = RtrPolyWidth; RtrContactOffset = - (RtrContactWidth + 1 - i)/2; @@ -327,7 +327,7 @@ RtrTechFinal() * material, and where routing material goes relative to the * grid line. */ - + RtrSubcellSepUp = RtrSubcellSepDown = 0; /* Compute how far above and below grid lines the routing layers run, diff --git a/router/rtrTravers.c b/router/rtrTravers.c index a3a88c52..73d00868 100644 --- a/router/rtrTravers.c +++ b/router/rtrTravers.c @@ -6,16 +6,16 @@ * modified to maintain a traversal path using * the C runtime stack. * - * ********************************************************************* - * * Copyright (C) 1985, 1990 Regents of the University of California. * - * * Permission to use, copy, modify, and distribute this * - * * software and its documentation for any purpose and without * - * * fee is hereby granted, provided that the above copyright * - * * notice appear in all copies. The University of California * - * * makes no representations about the suitability of this * - * * software for any purpose. It is provided "as is" without * - * * express or implied warranty. Export of this software outside * - * * of the United States of America may require an export license. * + * ********************************************************************* + * * Copyright (C) 1985, 1990 Regents of the University of California. * + * * Permission to use, copy, modify, and distribute this * + * * software and its documentation for any purpose and without * + * * fee is hereby granted, provided that the above copyright * + * * notice appear in all copies. The University of California * + * * makes no representations about the suitability of this * + * * software for any purpose. It is provided "as is" without * + * * express or implied warranty. Export of this software outside * + * * of the United States of America may require an export license. * * ********************************************************************* */ @@ -56,7 +56,7 @@ int rtrDelta; /* Change in layer width */ * of information that must be passed through multiple * levels of search function. */ - + struct conSrArg { CellDef *csa_def; /* Definition being searched. */ @@ -84,7 +84,7 @@ struct rtrTileStack struct rtrTileStack *ts_link; /* Pointer to previous stack entry */ struct conSrArg *ts_csa; /* Pointer to search arguments */ }; - + /* * ---------------------------------------------------------------------------- * @@ -100,7 +100,7 @@ struct rtrTileStack * the stack and recognize patterns of material * in the connection path. Since the connection path * is a tree, a stack is convenient data structure for - * recording a particular path originating from a single node. + * recording a particular path originating from a single node. * * Results: * 0 is returned if the search finished normally. 1 is returned @@ -125,7 +125,7 @@ struct rtrTileStack * 1 then the search is aborted. * * *** WARNING *** - * + * * Func should not modify any paint during the search, since this * will mess up pointers kept by these procedures and likely cause * a core-dump. @@ -224,7 +224,7 @@ rtrSrTraverseStartFunc(tile, pTile) *pTile = tile; return 1; } - + /* * ---------------------------------------------------------------------------- * @@ -233,7 +233,7 @@ rtrSrTraverseStartFunc(tile, pTile) * This search function gets called by DBSrPaintArea as part * of rtrSrTraverse, and also recursively by itself. Each invocation * is made to process a single tile that is of interest. - * This function is copied from dbSrConnectFunc and differs by + * This function is copied from dbSrConnectFunc and differs by * maintaining a stack (on the C-run time stack) of the search * path. * @@ -309,7 +309,7 @@ rtrSrTraverseFunc(tile, ts) * connected tiles. For each one found, call ourselves * recursively. */ - + connectMask = &csa->csa_connect[ttype]; /* Left side: */ @@ -377,7 +377,7 @@ rtrSrTraverseFunc(tile, ts) /* Lastly, check to see if this tile connects to anything on * other planes. If so, search those planes. */ - + planes = DBConnPlanes[ttype]; planes &= ~(csa->csa_pNum); if (planes != 0) @@ -399,7 +399,7 @@ rtrSrTraverseFunc(tile, ts) return 0; } - + /* * ---------------------------------------------------------------------------- * @@ -427,20 +427,20 @@ rtrExamineTile(tile, cdata) { if ( TiGetType(tile) == rtrTarget ) return 1; - - if ( (tile != (Tile *) cdata) && + + if ( (tile != (Tile *) cdata) && (TiGetType(tile) == rtrReplace) ) return 1; return 0; } - + /* * ---------------------------------------------------------------------------- * * rtrExamineStack -- * - * Examine a segment of the traversal path + * Examine a segment of the traversal path * and identify segments of replacement material * connected by vias at both ends and not overlapped * or electrically connected to other routing material. diff --git a/router/rtrVia.c b/router/rtrVia.c index f0a9d5fe..31d0de7b 100644 --- a/router/rtrVia.c +++ b/router/rtrVia.c @@ -3,16 +3,16 @@ * This file contains procedures that minimize vias and * maximize metal. * - * ********************************************************************* - * * Copyright (C) 1985, 1990 Regents of the University of California. * - * * Permission to use, copy, modify, and distribute this * - * * software and its documentation for any purpose and without * - * * fee is hereby granted, provided that the above copyright * - * * notice appear in all copies. The University of California * - * * makes no representations about the suitability of this * - * * software for any purpose. It is provided "as is" without * - * * express or implied warranty. Export of this software outside * - * * of the United States of America may require an export license. * + * ********************************************************************* + * * Copyright (C) 1985, 1990 Regents of the University of California. * + * * Permission to use, copy, modify, and distribute this * + * * software and its documentation for any purpose and without * + * * fee is hereby granted, provided that the above copyright * + * * notice appear in all copies. The University of California * + * * makes no representations about the suitability of this * + * * software for any purpose. It is provided "as is" without * + * * express or implied warranty. Export of this software outside * + * * of the United States of America may require an export license. * * ********************************************************************* */ @@ -85,7 +85,7 @@ int rtrExamineStack(); /* Examines the tile stack for replacement segments to be converted to the target material */ - + /* * ---------------------------------------------------------------------------- * @@ -125,7 +125,7 @@ rtrFollowLocFunc(rect, name, label, area) return 0; } - + /* * ---------------------------------------------------------------------------- * @@ -161,7 +161,7 @@ rtrFollowName(name, firstInNet, area) } return 0; } - + /* * ---------------------------------------------------------------------------- * @@ -200,7 +200,7 @@ rtrCheckTypes(tile, cdata) return 0; } - + /* * ---------------------------------------------------------------------------- * @@ -239,7 +239,7 @@ rtrExtend(tile,area,stub) stub->r_ytop = MIN(area->r_ytop, TOP(tile)); } } - + /* * ---------------------------------------------------------------------------- * @@ -281,14 +281,14 @@ rtrStubGen(tile, si) } return 0; } - + /* * ---------------------------------------------------------------------------- * * rtrReferenceTile -- * Store a reference tile and corresponding extension stub. * Recursively call DBSrPaintArea to generate extension - * stubs intersecting the reference stub. Each tile + * stubs intersecting the reference stub. Each tile * adjacent to the via will in turn be a reference tile. * * Results: @@ -313,7 +313,7 @@ rtrReferenceTile(tile, si) return 0; } - + /* * ---------------------------------------------------------------------------- * @@ -377,7 +377,7 @@ rtrViaCheck(area, def) (void) DBSrPaintArea((Tile *)NULL, si.si_plane, &r, &mask, rtrReferenceTile, (ClientData) &si); } - + /* * Erase via and paint extensions. */ @@ -392,7 +392,7 @@ rtrViaCheck(area, def) rtrVias++; return; } - + /* * ---------------------------------------------------------------------------- * @@ -436,7 +436,7 @@ rtrListArea(tile, oldType, newType, deltax, deltay) ap->ap_next = rtrAreaList; rtrAreaList = ap; } - + /* * ---------------------------------------------------------------------------- * @@ -469,7 +469,7 @@ rtrListVia(tile) return 0; } - + /* * ---------------------------------------------------------------------------- * @@ -482,7 +482,7 @@ rtrListVia(tile) * Side effects: * On the first pass, segments of poly * are replaced with metal and connecting vias are erased. - * On the second pass, segments of metal + * On the second pass, segments of metal * are replaced with poly and connecting vias are erased. * * ---------------------------------------------------------------------------- @@ -505,7 +505,7 @@ RtrViaMinimize(def) * These segments of poly are replaced with metal * and the connecting via's are removed. */ - + rtrVias = 0; rtrTarget = RtrMetalType; rtrReplace = RtrPolyType; @@ -536,7 +536,7 @@ RtrViaMinimize(def) rtrViaCheck(&vp->vp_area, def); freeMagic( (char *)vp); } - + /* * Pass 2 -- * Repeat the entire process replacing metal with poly. diff --git a/router/tclroute.c b/router/tclroute.c index 81469f66..0922b6f5 100644 --- a/router/tclroute.c +++ b/router/tclroute.c @@ -33,7 +33,7 @@ extern void CmdRoute(), CmdIRoute(), CmdGaRoute(); extern void CmdChannel(), CmdSeeFlags(); extern void CmdGARouterTest(), CmdGRouterTest(); -extern void CmdIRouterTest(), CmdMZRouterTest(); +extern void CmdIRouterTest(), CmdMZRouterTest(); /* * ---------------------------------------------------------------------------- diff --git a/select/selCreate.c b/select/selCreate.c index 16d77417..62b01ebf 100644 --- a/select/selCreate.c +++ b/select/selCreate.c @@ -3,16 +3,16 @@ * This file provides routines to make selections by copying * things into a special cell named "__SELECT__". * - * ********************************************************************* - * * Copyright (C) 1985, 1990 Regents of the University of California. * - * * Permission to use, copy, modify, and distribute this * - * * software and its documentation for any purpose and without * - * * fee is hereby granted, provided that the above copyright * - * * notice appear in all copies. The University of California * - * * makes no representations about the suitability of this * - * * software for any purpose. It is provided "as is" without * - * * express or implied warranty. Export of this software outside * - * * of the United States of America may require an export license. * + * ********************************************************************* + * * Copyright (C) 1985, 1990 Regents of the University of California. * + * * Permission to use, copy, modify, and distribute this * + * * software and its documentation for any purpose and without * + * * fee is hereby granted, provided that the above copyright * + * * notice appear in all copies. The University of California * + * * makes no representations about the suitability of this * + * * software for any purpose. It is provided "as is" without * + * * express or implied warranty. Export of this software outside * + * * of the United States of America may require an export license. * * ********************************************************************* */ @@ -71,7 +71,7 @@ CellDef *SelectRootDef = NULL; global CellUse *selectLastUse = NULL; - + /* * ---------------------------------------------------------------------------- * @@ -135,7 +135,7 @@ SelectInit() SelUndoInit(); } - + /* * ---------------------------------------------------------------------------- * @@ -253,7 +253,7 @@ selClearFunc(scx) else return 2; } - + /* * ---------------------------------------------------------------------------- * @@ -344,7 +344,7 @@ SelectArea(scx, types, xMask) &DBAllButSpaceBits); } - + /* * ---------------------------------------------------------------------------- * @@ -460,7 +460,7 @@ selFindChunk(plane, wrongTypes, searchArea, containedArea, bestMin, else goto tryY; /* Bad material overlaps containedArea in x. */ selFindChunk(plane, wrongTypes, &smaller, containedArea, bestMin, bestMax, bestChunk, level + 1); - + /* Also try reducing the y-range to see if that works better. */ @@ -488,7 +488,7 @@ selSplitFunc(tile, cxp) if (IsSplit(tile)) { - TiToRect(tile, &locarea); + TiToRect(tile, &locarea); GeoTransRect(&scx->scx_trans, &locarea, area); return 1; } @@ -509,13 +509,13 @@ selChunkFunc(tile, wrong) return 1; /* Abort the search. */ } - + /* * ---------------------------------------------------------------------------- * * SelectChunk -- * - * This procedure selects a single rectangular chunk of + * This procedure selects a single rectangular chunk of * homogeneous material. * * Results: @@ -629,7 +629,7 @@ SelectChunk(scx, type, xMask, pArea, less) /* If the chunk is completely inside the area we yanked, then we're * done. */ - + if (GEO_SURROUND_STRONG(&newscx.scx_area, &bestChunk)) break; /* The chunk extends to the edge of the area. Any place that the @@ -637,7 +637,7 @@ SelectChunk(scx, type, xMask, pArea, less) * Any place it doesn't touch, move the edge in to be just one * unit out from the chunk. */ - + width = newscx.scx_area.r_xtop - newscx.scx_area.r_xbot; height = newscx.scx_area.r_ytop - newscx.scx_area.r_ybot; @@ -680,7 +680,7 @@ chunkdone: if (pArea != NULL) *pArea = bestChunk; } - + /* * ---------------------------------------------------------------------------- * @@ -755,7 +755,7 @@ SelectRegion(scx, type, xMask, pArea, less) /* Now transfer what we found into the main selection cell. Pick * up all the labels that correspond to the selected material. */ - + SelRememberForUndo(TRUE, (CellDef *) NULL, (Rect *) NULL); if (less) { @@ -785,7 +785,7 @@ SelectRegion(scx, type, xMask, pArea, less) if (pArea != NULL) *pArea = Select2Def->cd_extended; } - + /* * ---------------------------------------------------------------------------- * @@ -859,7 +859,7 @@ SelectNet(scx, type, xMask, pArea, less) /* Now transfer what we found into the main selection cell. Pick * up all the labels that correspond to the selected material. */ - + UndoDisable(); if (less) { @@ -881,7 +881,7 @@ SelectNet(scx, type, xMask, pArea, less) /* unselect it. */ SelectUse->cu_flags |= CU_SELECT_NET; - UndoEnable(); + UndoEnable(); DBReComputeBbox(SelectDef); DBComputeUseBbox(SelectUse); @@ -892,7 +892,7 @@ SelectNet(scx, type, xMask, pArea, less) if (pArea != NULL) *pArea = Select2Def->cd_extended; } - + /* * ---------------------------------------------------------------------------- * @@ -1025,7 +1025,7 @@ SelectAndCopy1() /* Just copy the information in Select2Def twice, once into the * edit cell and once into the main selection cell. */ - + scx.scx_use = SelectUse; scx.scx_area = SelectUse->cu_bbox; GeoTransTrans(&SelectUse->cu_transform, &RootToEditTransform, &scx.scx_trans); @@ -1081,7 +1081,7 @@ SelectAndCopy2(newSourceDef) /* Just copy the information in Select2Def twice, once into the * edit cell and once into the main selection cell. */ - + scx.scx_use = Select2Use; scx.scx_area = Select2Use->cu_bbox; scx.scx_trans = RootToEditTransform; @@ -1113,7 +1113,7 @@ SelectAndCopy2(newSourceDef) * use Select2Def to figure out what areas of what planes to put into * SelectUse, but use the actual tile types from the edit cell. */ - + for (plane = PL_SELECTBASE; plane < DBNumPlanes; plane++) { (void) DBSrPaintArea((Tile *) NULL, Select2Def->cd_planes[plane], @@ -1139,7 +1139,7 @@ SelectAndCopy2(newSourceDef) DBReComputeBbox(SelectDef); DBComputeUseBbox(SelectUse); - + /* A little hack here: don't do explicit redisplay of the selection, * or record a very large redisplay area for undo-ing. It's not * necessary since the layout redisplay also redisplays the highlights. @@ -1199,7 +1199,7 @@ selACPaintFunc(tile, plane) * tile and editClip into SelectDef. * * This function is like dbCopyAllPaint() but differs just enough - * that a separate function is required. However, much of the code + * that a separate function is required. However, much of the code * could be shared between the two functions if it were properly * broken out into subroutines. */ diff --git a/select/selDisplay.c b/select/selDisplay.c index 8e00ccb0..8f4ec39f 100644 --- a/select/selDisplay.c +++ b/select/selDisplay.c @@ -3,16 +3,16 @@ * This file provides routines for displaying the current * selection on the screen. * - * ********************************************************************* - * * Copyright (C) 1985, 1990 Regents of the University of California. * - * * Permission to use, copy, modify, and distribute this * - * * software and its documentation for any purpose and without * - * * fee is hereby granted, provided that the above copyright * - * * notice appear in all copies. The University of California * - * * makes no representations about the suitability of this * - * * software for any purpose. It is provided "as is" without * - * * express or implied warranty. Export of this software outside * - * * of the United States of America may require an export license. * + * ********************************************************************* + * * Copyright (C) 1985, 1990 Regents of the University of California. * + * * Permission to use, copy, modify, and distribute this * + * * software and its documentation for any purpose and without * + * * fee is hereby granted, provided that the above copyright * + * * notice appear in all copies. The University of California * + * * makes no representations about the suitability of this * + * * software for any purpose. It is provided "as is" without * + * * express or implied warranty. Export of this software outside * + * * of the United States of America may require an export license. * * ********************************************************************* */ @@ -57,7 +57,7 @@ static CellDef *selDisRoot = NULL; /* Name of a root cell in a window, */ static Plane *selRedisplayPlane; - + /* * ---------------------------------------------------------------------------- * @@ -102,7 +102,7 @@ SelRedisplay(window, plane) /* Make sure that we've got something to show in the area * being redisplayed. */ - + if (((CellUse *) (window->w_surfaceID))->cu_def != selDisRoot) return; displayDef = selDisUse->cu_def; if (!DBBoundPlane(plane, &planeArea)) return; @@ -231,8 +231,8 @@ selRedisplayFunc(tile, window) * of a different type along that border. If the bottom of * the tile is at -infinity, then don't do anything. */ - - if (IsSplit(tile)) + + if (IsSplit(tile)) { /* By definition, split tiles have a different type on the other */ /* side of the split. So always draw a line on the diagonal. */ @@ -358,7 +358,7 @@ selRedisplayCellFunc(scx, window) GR_TEXT_LARGE, TRUE, &screen, (Rect *) NULL); return 0; } - + /* * ---------------------------------------------------------------------------- * diff --git a/select/selEnum.c b/select/selEnum.c index 586e0a7c..7f0529b7 100644 --- a/select/selEnum.c +++ b/select/selEnum.c @@ -6,16 +6,16 @@ * also in the edit cell. The procedures here are used as basic * building blocks for the selection commands like copy or delete. * - * ********************************************************************* - * * Copyright (C) 1985, 1990 Regents of the University of California. * - * * Permission to use, copy, modify, and distribute this * - * * software and its documentation for any purpose and without * - * * fee is hereby granted, provided that the above copyright * - * * notice appear in all copies. The University of California * - * * makes no representations about the suitability of this * - * * software for any purpose. It is provided "as is" without * - * * express or implied warranty. Export of this software outside * - * * of the United States of America may require an export license. * + * ********************************************************************* + * * Copyright (C) 1985, 1990 Regents of the University of California. * + * * Permission to use, copy, modify, and distribute this * + * * software and its documentation for any purpose and without * + * * fee is hereby granted, provided that the above copyright * + * * notice appear in all copies. The University of California * + * * makes no representations about the suitability of this * + * * software for any purpose. It is provided "as is" without * + * * express or implied warranty. Export of this software outside * + * * of the United States of America may require an export license. * * ********************************************************************* */ @@ -80,7 +80,7 @@ struct searg * selection with a possibly limited number * of named types. */ - + /* * ---------------------------------------------------------------------------- * @@ -153,7 +153,7 @@ SelEnumPaint(layers, editOnly, foundNonEdit, func, clientData) * layers. Use the same procedure as "dbCellUniqueTileSrFunc()" * so that contacts are not double-counted. */ - + for (plane = PL_SELECTBASE; plane < DBNumPlanes; plane++) { arg.sea_plane = plane; @@ -193,7 +193,7 @@ selEnumPFunc1(tile, arg) else loctype = SplitLeftType(tile); } - else + else loctype = TiGetType(tile); if (IsSplit(tile)) @@ -204,7 +204,7 @@ selEnumPFunc1(tile, arg) /* If the paint doesn't have to be in the edit cell, life's pretty * simple: just call the client and quit. */ - + if (!(arg->sea_flags & SEA_EDIT_ONLY)) { if ((*arg->sea_func)(&arg->sea_rect, arg->sea_type, arg->sea_cdarg) != 0) @@ -266,7 +266,7 @@ selEnumPFunc1(tile, arg) int selEnumPFunc2(tile, arg) - Tile *tile; /* Tile found in the edit cell */ + Tile *tile; /* Tile found in the edit cell */ struct searg *arg; /* Describes our search */ { ExtRectList *lr; @@ -368,7 +368,7 @@ selEnumPFunc2(tile, arg) if (!IsSplit(tile)) { /* Things get messy here. Clip against the select triangle */ - /* and decompose the result into rectangles and triangles. */ + /* and decompose the result into rectangles and triangles. */ GrClipTriangle(&arg->sea_rect, &lr->r_r, TRUE, arg->sea_type, points, &np); @@ -488,7 +488,7 @@ splitdone: return 0; } - + /* * ---------------------------------------------------------------------------- * @@ -593,7 +593,7 @@ selEnumCFunc1(scx, arg) * handle it specially: just look for any use that's a top-level * use, then call the client for it. */ - + if (scx->scx_use->cu_def == SelectRootDef) { CellUse *parent; @@ -605,7 +605,7 @@ selEnumCFunc1(scx, arg) if (arg->sea_nonEdit != NULL) *(arg->sea_nonEdit) = TRUE; return 2; } - + /* Find a top-level use (one with no parent). */ for (parent = SelectRootDef->cd_parents; @@ -637,7 +637,7 @@ selEnumCFunc1(scx, arg) * we can't use DBTreeSrCells for this, because we don't want to * look at expanded/unexpanded information. */ - + scx2.scx_use = &dummy; dummy.cu_def = SelectRootDef; dummy.cu_id = NULL; @@ -711,7 +711,7 @@ selEnumCFunc2(scx, arg) || (use->cu_array.ar_xsep != selUse->cu_array.ar_xsep) || (use->cu_array.ar_ysep != selUse->cu_array.ar_ysep)) goto checkChildren; - + arg->sea_foundUse = use; arg->sea_foundTrans = scx->scx_trans; return 1; @@ -723,7 +723,7 @@ selEnumCFunc2(scx, arg) return 1; else return 0; } - + /* * ---------------------------------------------------------------------------- * @@ -794,7 +794,7 @@ SelEnumLabels(layers, editOnly, foundNonEdit, func, clientData) if (!TTMaskHasType(layers, selLabel->lab_type)) continue; /* Find the label corresponding to this one in the design. */ - + scx.scx_use = &dummy; dummy.cu_def = SelectRootDef; dummy.cu_id = NULL; @@ -822,7 +822,7 @@ SelEnumLabels(layers, editOnly, foundNonEdit, func, clientData) /* If only edit-cell labels are wanted, check this label's * parentage. */ - + if (editOnly && (arg.sea_foundUse->cu_def != EditCellUse->cu_def)) { if (foundNonEdit != NULL) *foundNonEdit = TRUE; diff --git a/select/selInt.h b/select/selInt.h index 1dcec61f..e6ead595 100644 --- a/select/selInt.h +++ b/select/selInt.h @@ -4,16 +4,16 @@ * Contains definitions that are private to the implementation of * the select module. No other module should need anything in here. * - * ********************************************************************* - * * Copyright (C) 1985, 1990 Regents of the University of California. * - * * Permission to use, copy, modify, and distribute this * - * * software and its documentation for any purpose and without * - * * fee is hereby granted, provided that the above copyright * - * * notice appear in all copies. The University of California * - * * makes no representations about the suitability of this * - * * software for any purpose. It is provided "as is" without * - * * express or implied warranty. Export of this software outside * - * * of the United States of America may require an export license. * + * ********************************************************************* + * * Copyright (C) 1985, 1990 Regents of the University of California. * + * * Permission to use, copy, modify, and distribute this * + * * software and its documentation for any purpose and without * + * * fee is hereby granted, provided that the above copyright * + * * notice appear in all copies. The University of California * + * * makes no representations about the suitability of this * + * * software for any purpose. It is provided "as is" without * + * * express or implied warranty. Export of this software outside * + * * of the United States of America may require an export license. * * ********************************************************************* * * diff --git a/select/selOps.c b/select/selOps.c index 3dbc92ac..1fdcf877 100644 --- a/select/selOps.c +++ b/select/selOps.c @@ -4,16 +4,16 @@ * This file contains top-level procedures to manipulate the selection, * e.g. to delete it, move it, etc. * - * ********************************************************************* - * * Copyright (C) 1985, 1990 Regents of the University of California. * - * * Permission to use, copy, modify, and distribute this * - * * software and its documentation for any purpose and without * - * * fee is hereby granted, provided that the above copyright * - * * notice appear in all copies. The University of California * - * * makes no representations about the suitability of this * - * * software for any purpose. It is provided "as is" without * - * * express or implied warranty. Export of this software outside * - * * of the United States of America may require an export license. * + * ********************************************************************* + * * Copyright (C) 1985, 1990 Regents of the University of California. * + * * Permission to use, copy, modify, and distribute this * + * * software and its documentation for any purpose and without * + * * fee is hereby granted, provided that the above copyright * + * * notice appear in all copies. The University of California * + * * makes no representations about the suitability of this * + * * software for any purpose. It is provided "as is" without * + * * express or implied warranty. Export of this software outside * + * * of the United States of America may require an export license. * * ********************************************************************* */ @@ -69,7 +69,7 @@ typedef struct stretchArea } StretchArea; static StretchArea *selStretchList; /* List of areas to paint. */ - + /* * ---------------------------------------------------------------------------- * @@ -149,12 +149,12 @@ selDelPaintFunc(rect, type) if (type & TT_DIAGONAL) { dinfo = DBTransformDiagonal(type, &RootToEditTransform); - TTMaskSetOnlyType(&tmask, type & TT_LEFTMASK); + TTMaskSetOnlyType(&tmask, type & TT_LEFTMASK); } else { dinfo = 0; - TTMaskSetOnlyType(&tmask, type); + TTMaskSetOnlyType(&tmask, type); } GeoTransRect(&RootToEditTransform, rect, &editRect); @@ -192,7 +192,7 @@ selDelLabelFunc(label) label->lab_text); return 0; } - + /* * ---------------------------------------------------------------------------- * @@ -665,7 +665,7 @@ donesrch: } return 0; } - + /* * ---------------------------------------------------------------------------- @@ -720,7 +720,7 @@ SelectShort(char *lab1, char *lab2) if (srclab == NULL || destlab == NULL) return NULL; /* Must be able to find tiles associated with each label */ - + pmask = DBTypePlaneMaskTbl[srclab->lab_type]; for (pnum = PL_TECHDEPBASE; pnum < DBNumPlanes; pnum++) { @@ -759,7 +759,7 @@ SelectShort(char *lab1, char *lab2) return rlist; } - + /* * ---------------------------------------------------------------------------- * @@ -900,7 +900,7 @@ selTransLabelFunc(label, cellUse, defTransform, transform) label->lab_text, label->lab_type, label->lab_flags); return 0; } - + /* * ---------------------------------------------------------------------------- * @@ -937,7 +937,7 @@ SelectTransform(transform) SelectDelete("modified", TRUE); SelectAndCopy2(EditRootDef); } - + /* * ---------------------------------------------------------------------------- * @@ -1007,7 +1007,7 @@ selExpandFunc(selUse, use, transform, mask) } return 0; } - + /* * ---------------------------------------------------------------------------- * @@ -1038,7 +1038,7 @@ SelectArray(arrayInfo) * selection, then copy everything back from Select2Def and * select it. */ - + UndoDisable(); DBCellClearDef(Select2Def); (void) SelEnumPaint(&DBAllButSpaceAndDRCBits, TRUE, (bool *) NULL, @@ -1053,7 +1053,7 @@ SelectArray(arrayInfo) /* Now just delete the selection and recreate it from Select2Def, * copying into the edit cell along the way. */ - + SelectDelete("arrayed", TRUE); SelectAndCopy2(EditRootDef); } @@ -1128,11 +1128,11 @@ selArrayCFunc(selUse, use, transform, arrayInfo) DBMakeArray(newUse, &tinv, arrayInfo->ar_xlo, arrayInfo->ar_ylo, arrayInfo->ar_xhi, arrayInfo->ar_yhi, arrayInfo->ar_xsep, arrayInfo->ar_ysep); - + /* Set the array's transform so that its lower-left corner is in * the same place that it used to be. */ - + GeoInvertTrans(&use->cu_transform, &tinv); GeoTransRect(&tinv, &use->cu_bbox, &tmp); GeoTransRect(transform, &tmp, &oldBbox); @@ -1253,7 +1253,7 @@ SelectStretch(x, y) /* First of all, copy from SelectDef to Select2Def, moving the * selection along the way. */ - + GeoTranslateTrans(&GeoIdentityTransform, x, y, &transform); selTransTo2(&transform); @@ -1273,7 +1273,7 @@ SelectStretch(x, y) /* Next, delete all the material in front of each piece of paint in * the selection. */ - + selStretchX = x; selStretchY = y; for (plane = PL_SELECTBASE; plane < DBNumPlanes; plane++) @@ -1319,7 +1319,7 @@ SelectStretch(x, y) * select it again, and tell DRC and display about what we * changed. */ - + SelectAndCopy2(EditRootDef); DBWAreaChanged(EditCellUse->cu_def, &editModified, DBW_ALLWINDOWS, (TileTypeBitMask *) NULL); @@ -1381,7 +1381,7 @@ selStretchEraseFunc(tile, plane) */ GeoTransRect(&RootToEditTransform, &area, &editArea); - + /* We need to erase all types that interact with "type", *not* all */ /* types on "plane", due to the way stacked contacts are handled. */ /* Contacts on different planes may stretch across one another */ @@ -1430,7 +1430,7 @@ selStretchEraseFunc(tile, plane) */ TTMaskZero(&tmpmask); - + selStretchEraseTbl[TT_SPACE] = (PaintResultType)TT_SPACE; for (t = TT_SPACE + 1; t < DBNumUserLayers; t++) { @@ -1520,7 +1520,7 @@ selStretchFillFunc(tile, plane) * stretch direction) for space in the selection and non-space in * the edit cell. */ - + if (selStretchX > 0) { area.r_xtop = area.r_xbot; @@ -1566,7 +1566,7 @@ selStretchFillFunc(tile, plane) (void) DBSrPaintArea((Tile *) NULL, Select2Def->cd_planes[*plane], &area, &DBSpaceBits, selStretchFillFunc2, (ClientData) &area); - + return 0; } @@ -1666,7 +1666,7 @@ selStretchFillFunc3(tile, area) /* Compute the material to be painted. Be careful: for contacts, * must use the master image. */ - + if (IsSplit(tile)) { if (selStretchX > 0) @@ -1739,7 +1739,7 @@ selStretchFillFunc3(tile, area) return 0; } - + /* * ---------------------------------------------------------------------------- * diff --git a/select/selUndo.c b/select/selUndo.c index d0350498..813b5c84 100644 --- a/select/selUndo.c +++ b/select/selUndo.c @@ -6,16 +6,16 @@ * All this file does is record things to be redisplayed, since * the normal undo package won't handle that. * - * ********************************************************************* - * * Copyright (C) 1985, 1990 Regents of the University of California. * - * * Permission to use, copy, modify, and distribute this * - * * software and its documentation for any purpose and without * - * * fee is hereby granted, provided that the above copyright * - * * notice appear in all copies. The University of California * - * * makes no representations about the suitability of this * - * * software for any purpose. It is provided "as is" without * - * * express or implied warranty. Export of this software outside * - * * of the United States of America may require an export license. * + * ********************************************************************* + * * Copyright (C) 1985, 1990 Regents of the University of California. * + * * Permission to use, copy, modify, and distribute this * + * * software and its documentation for any purpose and without * + * * fee is hereby granted, provided that the above copyright * + * * notice appear in all copies. The University of California * + * * makes no representations about the suitability of this * + * * software for any purpose. It is provided "as is" without * + * * express or implied warranty. Export of this software outside * + * * of the United States of America may require an export license. * * ********************************************************************* */ @@ -111,7 +111,7 @@ typedef struct UndoType SelUndoNetClientID; - + /* * ---------------------------------------------------------------------------- * @@ -149,7 +149,7 @@ SelUndoInit() if (SelUndoNetClientID < (UndoType) 0) TxError("Couldn't add net selection as an undo client!\n"); } - + /* * ---------------------------------------------------------------------------- * @@ -202,7 +202,7 @@ SelRememberForUndo(before, def, area) * created, so save around its address and fill in the event when * the "after" event is created. */ - + if (before) { sue->sue_before = TRUE; @@ -222,7 +222,7 @@ SelRememberForUndo(before, def, area) beforeEvent = NULL; } } - + /* * ---------------------------------------------------------------------------- * @@ -374,7 +374,7 @@ SelUndoCreateNet(sue) scx.scx_area.r_ybot = sue->sue_startpoint.p_y; scx.scx_area.r_xtop = scx.scx_area.r_xbot + 1; scx.scx_area.r_ytop = scx.scx_area.r_ybot + 1; - + // window = CmdGetRootPoint((Point *) NULL, &scx.scx_area); window = CmdGetRootPoint((Point *) NULL, (Rect *) NULL); @@ -397,7 +397,7 @@ SelUndoCreateNet(sue) * * ---------------------------------------------------------------------------- */ - + void SelUndoDestroyNet() { diff --git a/select/selUnselect.c b/select/selUnselect.c index 1656507d..466a326e 100644 --- a/select/selUnselect.c +++ b/select/selUnselect.c @@ -23,7 +23,7 @@ #include "utils/malloc.h" #include "textio/textio.h" - + /* * ---------------------------------------------------------------------------- * @@ -50,13 +50,13 @@ selUnselFunc(tile, arg) { TileType type; Rect rect; - + if ((type = TiGetType(tile)) >= DBNumUserLayers) return 0; TiToRect(tile, &rect); DBErase(SelectDef, &rect, type); return 0; } - + /* * ---------------------------------------------------------------------------- * @@ -94,7 +94,7 @@ selRemoveCellFunc(scx, cdarg) if (++selNRemove >= MAXUNSELUSES) return 1; else return 2; } - + /* * ---------------------------------------------------------------------------- * @@ -158,7 +158,7 @@ SelRemoveArea(area, mask) while (TRUE) { int i; - + selNRemove = 0; (void) DBCellSrArea(&scx, selRemoveCellFunc, (ClientData) &bbox); for (i = 0; i < selNRemove; i++) @@ -183,7 +183,7 @@ SelRemoveArea(area, mask) DBReComputeBbox(SelectDef); DBWAreaChanged(SelectDef, &bbox, DBW_ALLWINDOWS, (TileTypeBitMask *) NULL); } - + /* * ---------------------------------------------------------------------------- * @@ -215,7 +215,7 @@ selRemoveLabelPaintFunc(tile, label) return 1; } - + /* * ---------------------------------------------------------------------------- * @@ -286,7 +286,7 @@ SelRemoveSel2() DBEraseLabelsByContent(SelectDef, &label->lab_rect, -1, label->lab_text); return 0; } - + typedef struct { CellUse *ed_use, *sel_use; @@ -341,7 +341,7 @@ SelRemoveCellSearchFunc(scx, cdarg) } return 0; } - + /* * ---------------------------------------------------------------------------- * diff --git a/select/select.h b/select/select.h index 82f73248..843c1ee7 100644 --- a/select/select.h +++ b/select/select.h @@ -4,16 +4,16 @@ * Contains definitions for things that are exported by the * selection module. * - * ********************************************************************* - * * Copyright (C) 1985, 1990 Regents of the University of California. * - * * Permission to use, copy, modify, and distribute this * - * * software and its documentation for any purpose and without * - * * fee is hereby granted, provided that the above copyright * - * * notice appear in all copies. The University of California * - * * makes no representations about the suitability of this * - * * software for any purpose. It is provided "as is" without * - * * express or implied warranty. Export of this software outside * - * * of the United States of America may require an export license. * + * ********************************************************************* + * * Copyright (C) 1985, 1990 Regents of the University of California. * + * * Permission to use, copy, modify, and distribute this * + * * software and its documentation for any purpose and without * + * * fee is hereby granted, provided that the above copyright * + * * notice appear in all copies. The University of California * + * * makes no representations about the suitability of this * + * * software for any purpose. It is provided "as is" without * + * * express or implied warranty. Export of this software outside * + * * of the United States of America may require an export license. * * ********************************************************************* * * diff --git a/sim/SimDBstuff.c b/sim/SimDBstuff.c index 26d2e7c2..840d749f 100644 --- a/sim/SimDBstuff.c +++ b/sim/SimDBstuff.c @@ -2,23 +2,23 @@ /* SimDBstuff.c - * * This file contains routines that extract electrically connected - * regions of a layout for Magic. This extractor operates + * regions of a layout for Magic. This extractor operates * hierarchically, across cell boundaries (SimTreeCopyConnect), as * well as within a single cell (SimSrConnect). * * This also contains routines corresponding to those in the DBWind * module. * - * ********************************************************************* - * * Copyright (C) 1985, 1990 Regents of the University of California. * - * * Permission to use, copy, modify, and distribute this * - * * software and its documentation for any purpose and without * - * * fee is hereby granted, provided that the above copyright * - * * notice appear in all copies. The University of California * - * * makes no representations about the suitability of this * - * * software for any purpose. It is provided "as is" without * - * * express or implied warranty. Export of this software outside * - * * of the United States of America may require an export license. * + * ********************************************************************* + * * Copyright (C) 1985, 1990 Regents of the University of California. * + * * Permission to use, copy, modify, and distribute this * + * * software and its documentation for any purpose and without * + * * fee is hereby granted, provided that the above copyright * + * * notice appear in all copies. The University of California * + * * makes no representations about the suitability of this * + * * software for any purpose. It is provided "as is" without * + * * express or implied warranty. Export of this software outside * + * * of the United States of America may require an export license. * * ********************************************************************* * University of California */ @@ -49,7 +49,7 @@ * of information that must be passed through multiple * levels of search function. */ - + struct conSrArg { CellDef *csa_def; /* Definition being searched. */ @@ -103,7 +103,7 @@ extern void SimMakePathname(); static char bestName[256]; - + /* * ---------------------------------------------------------------------------- * @@ -170,7 +170,7 @@ SimConnectFunc(tile, cx) /* Clip the current area down to something that overlaps the * area of interest. */ - + csa2 = (struct conSrArg2 *)cx->tc_filter->tf_arg; GeoClip(&newarea, csa2->csa2_bounds); if (GEO_RECTNULL(&newarea)) return 0; @@ -185,7 +185,7 @@ SimConnectFunc(tile, cx) char c = *n; SigDisableInterrupts(); - strcpy(nodeName, SimGetNodeName(cx->tc_scx, tile, tpath->tp_first)); + strcpy(nodeName, SimGetNodeName(cx->tc_scx, tile, tpath->tp_first)); SigEnableInterrupts(); *n = c; @@ -199,7 +199,7 @@ SimConnectFunc(tile, cx) loctype = TiGetTypeExact(tile); /* Resolve geometric transformations on diagonally-split tiles */ - + if (IsSplit(tile)) { dinfo = DBTransformDiagonal(loctype, &scx->scx_trans); @@ -222,7 +222,7 @@ SimConnectFunc(tile, cx) TTMaskSetOnlyType(¬ConnectMask, loctype); - /* Differenct contact types may share residues (6/18/04) */ + /* Differenct contact types may share residues (6/18/04) */ for (ctype = TT_TECHDEPBASE; ctype < DBNumUserLayers; ctype++) { if (DBIsContact(ctype)) @@ -234,7 +234,7 @@ SimConnectFunc(tile, cx) } /* The mask of contact types must include all stacked contacts */ - for (ctype = DBNumUserLayers; ctype < DBNumTypes; ctype++) + for (ctype = DBNumUserLayers; ctype < DBNumTypes; ctype++) { cMask = DBResidueMask(ctype); if TTMaskHasType(cMask, loctype) @@ -255,7 +255,7 @@ SimConnectFunc(tile, cx) return 0; /* Paint this tile into the destination cell. */ - + DBNMPaintPlane(def->cd_planes[pNum], dinfo, &newarea, DBStdPaintTbl(loctype, pNum), (PaintUndoInfo *) NULL); @@ -290,7 +290,7 @@ SimConnectFunc(tile, cx) newarea.r_ytop += 1; } - /* Abort the name search if the name is in the abort name search table + /* Abort the name search if the name is in the abort name search table * or if the name is global and the SimIgnoreGlobals flag is not set. */ @@ -332,7 +332,7 @@ SimConnectFunc(tile, cx) return 0; } - + /* * ---------------------------------------------------------------------------- * @@ -413,7 +413,7 @@ SimTreeCopyConnect(scx, mask, xMask, connect, area, destUse, Node_Name) csa2.csa2_top = -1; tpath.tp_first = tpath.tp_next = pathName; - tpath.tp_last = pathName + MAXPATHNAME; + tpath.tp_last = pathName + MAXPATHNAME; pathName[0] = '\0'; bestName[0] = '\0'; @@ -439,7 +439,7 @@ SimTreeCopyConnect(scx, mask, xMask, connect, area, destUse, Node_Name) /* Recompute the bounding box of the destination and record * its area for redisplay. */ - + strcpy(Node_Name, bestName); DBReComputeBbox(destUse->cu_def); } @@ -504,7 +504,7 @@ efPreferredName(name1, name2) if (np1 - name1 > np2 - name2) return (FALSE); /* same # of pathname components; same length; use lex order */ - if (strcmp(name1, name2) > 0) + if (strcmp(name1, name2) > 0) return(TRUE); else return(FALSE); @@ -528,7 +528,7 @@ efPreferredName(name1, name2) if (np1 - name1 > np2 - name2) return (FALSE); /* same # of pathname components; same length; use lex ordering */ - if (strcmp(name1, name2) > 0) + if (strcmp(name1, name2) > 0) return(TRUE); else return(FALSE); @@ -570,10 +570,10 @@ efPreferredName(name1, name2) * 1 then the search is aborted. * * *** WARNING *** - * + * * Func should not modify any paint during the search, since this * will mess up pointers kept by these procedures and likely cause - * a core-dump. + * a core-dump. * * ---------------------------------------------------------------------------- */ @@ -863,7 +863,7 @@ cleanup: return (result); } - + /* * ---------------------------------------------------------------------------- * @@ -914,7 +914,7 @@ SimPutLabel(cellDef, rect, align, text, type) * from the boundary, so it won't stick out past the edge of * the cell boundary. */ - + #define BORDER 5 if (align < 0) { diff --git a/sim/SimExtract.c b/sim/SimExtract.c index dfc1faad..9ea35a6f 100644 --- a/sim/SimExtract.c +++ b/sim/SimExtract.c @@ -5,16 +5,16 @@ * Magic circuit. Some of this code is based on the Magic extract * module. * - * ********************************************************************* - * * Copyright (C) 1985, 1990 Regents of the University of California. * - * * Permission to use, copy, modify, and distribute this * - * * software and its documentation for any purpose and without * - * * fee is hereby granted, provided that the above copyright * - * * notice appear in all copies. The University of California * - * * makes no representations about the suitability of this * - * * software for any purpose. It is provided "as is" without * - * * express or implied warranty. Export of this software outside * - * * of the United States of America may require an export license. * + * ********************************************************************* + * * Copyright (C) 1985, 1990 Regents of the University of California. * + * * Permission to use, copy, modify, and distribute this * + * * software and its documentation for any purpose and without * + * * fee is hereby granted, provided that the above copyright * + * * notice appear in all copies. The University of California * + * * makes no representations about the suitability of this * + * * software for any purpose. It is provided "as is" without * + * * express or implied warranty. Export of this software outside * + * * of the United States of America may require an export license. * * ********************************************************************* * of California. */ @@ -109,7 +109,7 @@ PlaneMask SimFetPlanes; * *---------------------------------------------------------------- */ - + void SimAddDefList(newdef) CellDef *newdef; @@ -119,7 +119,7 @@ SimAddDefList(newdef) /* check to see if the cell def is already in our list */ for (d = DefList; d != (DefListElt *) NULL; d = d->dl_next) { - if (d->dl_def == newdef) { + if (d->dl_def == newdef) { return; } } @@ -163,7 +163,7 @@ void SimInitDefList() { DefListElt *p, *q; - + p = q = DefList; while (p != (DefListElt *) NULL) { q = p; @@ -220,7 +220,7 @@ void SimFreeNodeRegs() { NodeRegion *p, *q; - + if( NodeRegList != (NodeRegion *) NULL ) /* sanity */ ExtFreeLabRegions((LabRegion *) NodeRegList ); @@ -408,7 +408,7 @@ int SimTransTerms( bp, trans ) { if( LEFT(tile) < term->pos.p_x ) term->pos = tile->ti_ll; - else if( LEFT(tile) == term->pos.p_x && + else if( LEFT(tile) == term->pos.p_x && BOTTOM(tile) < term->pos.p_y ) term->pos.p_y = BOTTOM(tile); } @@ -751,7 +751,7 @@ SimGetNodeName(sx, tp, path) } } - /* Check whether or not to print out node name aliases. Each alias + /* Check whether or not to print out node name aliases. Each alias * found is hashed in a table in order to suppress printing of * duplicate aliases. */ @@ -781,7 +781,7 @@ SimGetNodeName(sx, tp, path) strcpy(buff, nname); } if (SimGetnodeAlias && SimIsGetnode) { - if (HashLookOnly(&SimGNAliasTbl, nodename) + if (HashLookOnly(&SimGNAliasTbl, nodename) == (HashEntry *) NULL) { HashFind(&SimGNAliasTbl, nodename); #ifdef MAGIC_WRAPPER @@ -807,7 +807,7 @@ SimGetNodeName(sx, tp, path) * * This procedure is called to clean up the data structures and the * tile database after a node name is extracted. - * + * * Results: * None. * diff --git a/sim/SimRsim.c b/sim/SimRsim.c index 7e5b88f6..772b1e76 100644 --- a/sim/SimRsim.c +++ b/sim/SimRsim.c @@ -5,16 +5,16 @@ * Communications takes place using two pipes, one for Magic to * send a command to the simulator, the other to get back the reply. * - * ********************************************************************* - * * Copyright (C) 1985, 1990 Regents of the University of California. * - * * Permission to use, copy, modify, and distribute this * - * * software and its documentation for any purpose and without * - * * fee is hereby granted, provided that the above copyright * - * * notice appear in all copies. The University of California * - * * makes no representations about the suitability of this * - * * software for any purpose. It is provided "as is" without * - * * express or implied warranty. Export of this software outside * - * * of the United States of America may require an export license. * + * ********************************************************************* + * * Copyright (C) 1985, 1990 Regents of the University of California. * + * * Permission to use, copy, modify, and distribute this * + * * software and its documentation for any purpose and without * + * * fee is hereby granted, provided that the above copyright * + * * notice appear in all copies. The University of California * + * * makes no representations about the suitability of this * + * * software for any purpose. It is provided "as is" without * + * * express or implied warranty. Export of this software outside * + * * of the United States of America may require an export license. * * ********************************************************************* * of California. All rights reserved. * @@ -85,7 +85,7 @@ void SimStopRsim(); * SimGetNodeCommand * * This function returns the "full" name of the rsim command if 'cmd' - * should be applied to the selected node(s) or NULL if the command + * should be applied to the selected node(s) or NULL if the command * should be shipped without any node names. * * Results: @@ -260,7 +260,7 @@ SimStartRsim(argv) } return(FALSE); /* to keep lint happy */ -} +} /* @@ -279,7 +279,7 @@ SimStartRsim(argv) * * Side effects: * The reply generated by Rsim is printed. - * The reply buffer from SimGetReplyLine is statically allocated. + * The reply buffer from SimGetReplyLine is statically allocated. * Subsequent calls will change the contents of this buffer. * *----------------------------------------------------------------------- @@ -289,7 +289,7 @@ void SimConnectRsim(escRsim) bool escRsim; /* TRUE if we should escape back to Magic */ { - static char HELLO_MSG[] = + static char HELLO_MSG[] = "Type \"q\" to quit simulator or \".\" to escape back to Magic.\n"; char *replyLine; /* used to hold one line of the Rsim reply */ @@ -530,7 +530,7 @@ RsimErrorMsg() * * This procedure takes an Rsim command and a node name to apply * the command to, constructs a complete Rsim command and sends it - * to Rsim to process. + * to Rsim to process. * * Results: * None. @@ -540,7 +540,7 @@ RsimErrorMsg() * after this routine to read the Rsim output for each node. * The reply buffer is statically allocated. Subsequent calls will * change the contents of this buffer. - * + * *----------------------------------------------------------------------- */ @@ -618,7 +618,7 @@ SimRsimIt(cmd, nodeName) int SimFillBuffer(buffHead, pLastChar, charCount) char *buffHead; /* ptr to start of buffer */ - char **pLastChar; /* used to return ptr to last char + char **pLastChar; /* used to return ptr to last char * in the buffer. */ int *charCount; /* number of chars in the buffer */ @@ -775,15 +775,15 @@ SimFindNewLine(buffStart, buffEnd) * returned from this buffer. This routine automatically refills * the reply buffer if no '\n' charcters are found. Head and tail * pointers to the "unprocessed" charcters in the buffer (those - * characters beloning to a reply line in the buffer which has not + * characters beloning to a reply line in the buffer which has not * yet been returned) are maintained. - * + * * We assume that the longest line Rsim will return is less than * 256 characters, and that at most 4K characters can be read * from a pipe in one read call. * * Results: - * SimGetReplyLine returns TRUE if replyLine is a valid value, + * SimGetReplyLine returns TRUE if replyLine is a valid value, * otherwise it is FALSE. * If we find a line containing only the rsim prompt, replyLine * points to a NULL pointer and TRUE is returned. @@ -800,7 +800,7 @@ bool SimGetReplyLine(replyLine) char **replyLine; { - static char simReadBuff[READBUF_SIZE]; /* buffer in which to read the + static char simReadBuff[READBUF_SIZE]; /* buffer in which to read the * rsim reply before processing * it. This is big enough for * one incomplete Rsim line @@ -826,7 +826,7 @@ SimGetReplyLine(replyLine) while (charsInBuff < prompt_len) { SimShiftChars(simReadBuff, &lineStart, &lastChar); status = SimFillBuffer(simReadBuff, &lastChar, &charsInBuff); - if (status == 0) { + if (status == 0) { /* no more characters to read; stop Rsim */ SimStopRsim(); *replyLine = NULL; @@ -840,7 +840,7 @@ SimGetReplyLine(replyLine) } /* check for the prompt at the end of the buffer, if found then - * reset buffer pointers and character count. + * reset buffer pointers and character count. */ if (!(strncmp(rsim_prompt, lineStart, prompt_len))) { @@ -857,7 +857,7 @@ SimGetReplyLine(replyLine) if (!strptr) { /* haven't found a '\n' in the buffer yet */ - + SimShiftChars(simReadBuff, &lineStart, &lastChar); strptr1 = lastChar; @@ -873,7 +873,7 @@ SimGetReplyLine(replyLine) } strptr1 = lastChar; status = SimFillBuffer(simReadBuff, &lastChar, &charsInBuff); - if (status == 0) { + if (status == 0) { /* no more characters to read; stop Rsim */ SimStopRsim(); *replyLine = NULL; diff --git a/sim/SimSelect.c b/sim/SimSelect.c index 0320c828..11e19c08 100644 --- a/sim/SimSelect.c +++ b/sim/SimSelect.c @@ -4,16 +4,16 @@ * things into a special cell named "__SELECT__". It is based * on code in the select module. * - * ********************************************************************* - * * Copyright (C) 1985, 1990 Regents of the University of California. * - * * Permission to use, copy, modify, and distribute this * - * * software and its documentation for any purpose and without * - * * fee is hereby granted, provided that the above copyright * - * * notice appear in all copies. The University of California * - * * makes no representations about the suitability of this * - * * software for any purpose. It is provided "as is" without * - * * express or implied warranty. Export of this software outside * - * * of the United States of America may require an export license. * + * ********************************************************************* + * * Copyright (C) 1985, 1990 Regents of the University of California. * + * * Permission to use, copy, modify, and distribute this * + * * software and its documentation for any purpose and without * + * * fee is hereby granted, provided that the above copyright * + * * notice appear in all copies. The University of California * + * * makes no representations about the suitability of this * + * * software for any purpose. It is provided "as is" without * + * * express or implied warranty. Export of this software outside * + * * of the United States of America may require an export license. * * ********************************************************************* * of California */ @@ -65,11 +65,11 @@ typedef struct def_list_elt static SimDefListElt *SimCellLabList = (SimDefListElt *) NULL; /* list of all the cell defs we have - * put RSIM labels in + * put RSIM labels in */ /* Data structure for node names extracted from the current selection. For - * each node, save the node name, a tile which lies in the node, and + * each node, save the node name, a tile which lies in the node, and * the text for the label corresponding to the node's rsim value. */ @@ -114,7 +114,7 @@ bool SimRsimRunning = FALSE; /* Always false if there's no rsim module */ * Side effects: * Starting from material of type "type" under scx, this procedure * finds all material in all expanded cells that are electrically- - * connected to the starting material through a chain of expanded + * connected to the starting material through a chain of expanded * cells. * * ---------------------------------------------------------------------------- @@ -154,8 +154,8 @@ SimSelectNode(scx, type, xMask, buffer) if (!SimIgnoreGlobals) { - strptr = buffer + strlen(buffer) - 1; - if (*strptr == '!') { + strptr = buffer + strlen(buffer) - 1; + if (*strptr == '!') { *strptr = '\0'; while (strptr != buffer) { if (*strptr == '/') { @@ -246,7 +246,7 @@ simFreeNodeEntry(list, entry) * * Side Effects: * The tiles of the selection cell definition are first marked in the - * search algorithm. After finishing the search, these marks are + * search algorithm. After finishing the search, these marks are * erased. * * ---------------------------------------------------------------------------- @@ -299,14 +299,14 @@ SimSelectArea(Rect *rect) * This procedure is called for each tile in the current selection. * It first checks to see if the node the tile belongs to has not * yet been visited. If it has not been visited, then the node name - * is extracted and all other tiles in the selection which belong to + * is extracted and all other tiles in the selection which belong to * this node are marked. * * Results: * Return 0 to keep the search going. * * Side effects: - * The tiles in the selection cell definition are left marked. + * The tiles in the selection cell definition are left marked. * It is the responsibility of the calling function to erase these * tile marks when finished. * ---------------------------------------------------------------------------- @@ -339,7 +339,7 @@ SimSelectFunc(tile, pHead) { type = (SplitSide(tile)) ? SplitRightType(tile): SplitLeftType(tile); - } + } else type = TiGetTypeExact(tile); @@ -377,7 +377,7 @@ SimSelectFunc(tile, pHead) /* mark all other tiles in the selection that are part of this node */ - SimSrConnect(SelectDef, &scx.scx_area, &DBAllButSpaceAndDRCBits, + SimSrConnect(SelectDef, &scx.scx_area, &DBAllButSpaceAndDRCBits, DBConnectTbl, &TiPlaneRect, NullFunc, (ClientData) NULL); /* Pick a tile type to use for selection. */ @@ -440,7 +440,7 @@ SimSelection(cmd) char *replyLine; char *strPtr; bool goodReply; - + extern RsimErrorMsg(); timeString[0] = 0; @@ -481,7 +481,7 @@ the selection.\n"); if (!replyLine) { /* Rsim's reponse to the command was just a prompt. We are done - * with the current node, so process the next node in the + * with the current node, so process the next node in the * selection. */ continue; @@ -551,9 +551,9 @@ the selection.\n"); break; } } - + /* read all lines of the Rsim reply */ - + goodReply = TRUE; for (;replyLine; goodReply = SimGetReplyLine(&replyLine)) { if (!goodReply) { @@ -589,13 +589,13 @@ the selection.\n"); * SimAddLabels * * This procedure adds the node value labels to the Magic database - * so they will be displayed in the layout. + * so they will be displayed in the layout. * * Results: * None. * * Side effects: - * The cell modified flags are deliberately not set when these labels + * The cell modified flags are deliberately not set when these labels * are added to the database. * * ---------------------------------------------------------------------------- @@ -621,7 +621,7 @@ SimAddLabels(SelectNodeList, rootuse) continue; } TiToRect(current->tl_nodeTile, &selectBox); - pos = SimPutLabel(rootuse, &selectBox, GEO_CENTER, + pos = SimPutLabel(rootuse, &selectBox, GEO_CENTER, current->tl_simLabel, TT_SPACE); DBReComputeBbox(rootuse); DBWLabelChanged(rootuse, current->tl_simLabel, &selectBox, @@ -667,7 +667,7 @@ SimRsimMouse(w) /* check to see if the cell def is already in our list */ sawcell = FALSE; for (dummy = SimCellLabList; dummy; dummy = dummy->dl_next) { - if (dummy->dl_def == cu->cu_def) { + if (dummy->dl_def == cu->cu_def) { sawcell = TRUE; break; } @@ -734,7 +734,7 @@ SimGetnode() return; } - for (; current != (TileListElt *) NULL; current = current->tl_next) + for (; current != (TileListElt *) NULL; current = current->tl_next) { #ifdef MAGIC_WRAPPER /* Return the node name as the result of the command */ @@ -779,7 +779,7 @@ SimGetsnode() return; } - for (; current != (TileListElt *) NULL; current = current->tl_next) + for (; current != (TileListElt *) NULL; current = current->tl_next) { #ifdef MAGIC_WRAPPER /* Return the node short name as the result of the command */ diff --git a/tcltk/bsitools.tcl b/tcltk/bsitools.tcl index 97e4cff0..5ada329b 100644 --- a/tcltk/bsitools.tcl +++ b/tcltk/bsitools.tcl @@ -21,7 +21,7 @@ proc magic::add_menu {framename toolname button_text } { ### proc magic::add_menu_command {framename toolname button_text command} { set m ${framename}.titlebar.mbuttons.${toolname}.toolmenu - $m add command -label "$button_text" -command $command + $m add command -label "$button_text" -command $command } ### diff --git a/tcltk/console.tcl b/tcltk/console.tcl index 40c80c55..3cf80f02 100755 --- a/tcltk/console.tcl +++ b/tcltk/console.tcl @@ -129,7 +129,7 @@ rename ::tkcon::New ::tkcon::NewConsole proc ::tkcon::New {} { global argv0 argc argv - set argc 1 - list set argv $argv0 - ::tkcon::NewConsole + set argc 1 + list set argv $argv0 + ::tkcon::NewConsole } diff --git a/tcltk/drcmgr.tcl b/tcltk/drcmgr.tcl index 3f46203e..0dd5ca08 100644 --- a/tcltk/drcmgr.tcl +++ b/tcltk/drcmgr.tcl @@ -220,7 +220,7 @@ proc magic::drc_save_report {{cellname ""} {outfile ""}} { set origname [cellname list self] puts stdout "loading $cellname\n" flush stdout - + load $cellname select top cell } diff --git a/tcltk/libmgr.tcl b/tcltk/libmgr.tcl index 95643c83..2361e8e6 100644 --- a/tcltk/libmgr.tcl +++ b/tcltk/libmgr.tcl @@ -138,7 +138,7 @@ proc magic::addlibentry {parent child name tech} { } } -# +# proc magic::addtolibset {item} { global filtered @@ -147,7 +147,7 @@ proc magic::addtolibset {item} { # puts stdout "addtolibset $item" # Sort files alphabetically - + foreach f [lsort $pathfiles] { set tailname [file tail $f] set rootname [file root $tailname] diff --git a/tcltk/mazeroute.tcl b/tcltk/mazeroute.tcl index 59e81a97..628e0abc 100644 --- a/tcltk/mazeroute.tcl +++ b/tcltk/mazeroute.tcl @@ -125,7 +125,7 @@ proc genmazeparams {} { incr k label .mazeparams.r${k}0 -text [lindex $layer 0] checkbox .mazeparams.r${k}1 - for {set j 2} {$j < 8} {incr j} { + for {set j 2} {$j < 8} {incr j} { entry .mazeparams.r${k}${j} -text [lindex $contact $j] } } @@ -138,7 +138,7 @@ proc genmazeparams {} { incr k label .mazeparams.r${k}0 -text [lindex $contact 0] checkbox .mazeparams.r${k}1 - for {set j 2} {$j < 4} {incr j} { + for {set j 2} {$j < 4} {incr j} { entry .mazeparams.r${k}${j} -text [lindex $contact $j] } } @@ -155,7 +155,7 @@ proc loadnetlist { {netfile {}} } { set netfile [ tk_getOpenFile -filetypes \ {{NET {.net {.net}}} {"All files" {*}}}] } - + if [catch {open $netfile r} fnet] { set netname [file rootname $netfile] if [catch {open ${netfile}.net r} fnet] { @@ -373,7 +373,7 @@ proc disassemble {} { proc buildfence {} { global Opts - pushbox + pushbox if {$Opts(fenced) == 0} { select top cell box grow c 1i @@ -416,7 +416,7 @@ proc loadfailed { {netfile {}} } { set netfile [ tk_getOpenFile -filetypes \ {{FAILED {.failed {.failed}}} {"All files" {*}}}] } - + if [catch {open $netfile r} fnet] { set netname [file rootname $netfile] if [catch {open ${netfile}.failed r} fnet] { @@ -454,7 +454,7 @@ proc savefailed { {netfile {}} } { set netname [file rootname $netfile] set netname ${netname}.failed } - + if [catch {open $netfile w} fnet] { set netname [file rootname $netfile] if [catch {open ${netfile}.failed w} fnet] { diff --git a/tcltk/socketcmd.tcl b/tcltk/socketcmd.tcl index 24545a54..c305a0a7 100644 --- a/tcltk/socketcmd.tcl +++ b/tcltk/socketcmd.tcl @@ -20,7 +20,7 @@ proc handleComm {chan} { } proc acceptComm {chan addr port} { - fconfigure $chan -blocking 0 -buffering line -translation crlf + fconfigure $chan -blocking 0 -buffering line -translation crlf fileevent $chan readable [list handleComm $chan] } diff --git a/tcltk/strip_reflibs.tcl b/tcltk/strip_reflibs.tcl index 516f4ea3..897347b7 100755 --- a/tcltk/strip_reflibs.tcl +++ b/tcltk/strip_reflibs.tcl @@ -18,7 +18,7 @@ # Note that if all cells are treated as library references, then the # GDS file itself does not need to exist. -foreach fname [glob *.mag] { +foreach fname [glob *.mag] { if [catch {open $fname r} fIn] { puts stdout "Error: can't open file $fname" } else { diff --git a/tcltk/tclmagic.c b/tcltk/tclmagic.c index 8f896ac8..f039b875 100644 --- a/tcltk/tclmagic.c +++ b/tcltk/tclmagic.c @@ -27,11 +27,11 @@ #include #include "tcltk/tclmagic.h" -#include "utils/main.h" -#include "utils/magic.h" +#include "utils/main.h" +#include "utils/magic.h" #include "utils/geometry.h" -#include "tiles/tile.h" -#include "utils/hash.h" +#include "tiles/tile.h" +#include "utils/hash.h" #include "utils/dqueue.h" #include "database/database.h" #include "windows/windows.h" @@ -41,7 +41,7 @@ #include "textio/txcommands.h" #include "utils/signals.h" #include "graphics/graphics.h" -#include "utils/malloc.h" +#include "utils/malloc.h" #include "dbwind/dbwind.h" /* @@ -124,7 +124,7 @@ TagCallback(interp, tkpath, argc, argv) if (postcmd) { /* The Tag callback should not increase the command number */ - /* sequence, so save it now and restore it before returning. */ + /* sequence, so save it now and restore it before returning. */ cmdnum = TxCommandNumber; substcmd = (char *)mallocMagic(strlen(postcmd) + 1); @@ -153,7 +153,7 @@ TagCallback(interp, tkpath, argc, argv) /* path has been passed in the argument. If not, get */ /* the window path if there is only one window. */ /* Otherwise, the window is unknown so we substitute */ - /* a null list "{}". */ + /* a null list "{}". */ if (tkpath == NULL) { @@ -268,7 +268,7 @@ AddCommandTag(ClientData clientData, return TCL_ERROR; entry = HashFind(&txTclTagTable, argv[1]); - + if (entry == NULL) return TCL_ERROR; hstring = (char *)HashGetValue(entry); @@ -302,7 +302,7 @@ static int _tcl_dispatch(ClientData clientData, Tcl_Interp *interp, int argc, char *argv[]) { - int wval; + int wval; int result, idx; Tcl_Obj *objv0; char *argv0, *tkwind; @@ -341,7 +341,7 @@ _tcl_dispatch(ClientData clientData, { int i; Tcl_Obj **objv = (Tcl_Obj **)Tcl_Alloc(argc * sizeof(Tcl_Obj *)); - + /* Create a Tcl_Obj array suitable for calling Tcl_EvalObjv. */ /* The first argument is changed from the magic command name to */ /* "tcl" + the command name. This assumes that all conflicting */ @@ -502,7 +502,7 @@ MakeWindowCommand(char *wname, MagWindow *mw) /*------------------------------------------------------*/ /* Main startup procedure */ /*------------------------------------------------------*/ - + static int _magic_initialize(ClientData clientData, Tcl_Interp *interp, int argc, char *argv[]) @@ -632,7 +632,7 @@ _magic_flags(ClientData clientData, "true", "1", (char *)NULL}; if ((objc != 2) && (objc != 3)) { - Tcl_WrongNumArgs(interp, 1, objv, "flag ?value?"); + Tcl_WrongNumArgs(interp, 1, objv, "flag ?value?"); return TCL_ERROR; } if (Tcl_GetIndexFromObj(interp, objv[1], (CONST84 char **)flagOptions, @@ -841,7 +841,7 @@ extern char txPromptChar; void TxSetPrompt(ch) char ch; -{ +{ Tcl_SavedResult state; char promptline[16]; @@ -852,7 +852,7 @@ TxSetPrompt(ch) Tcl_EvalEx(consoleinterp, promptline, 15, 0); Tcl_RestoreResult(consoleinterp, &state); } -} +} /*--------------------------------------------------------------*/ /* Get a line from stdin (Tcl replacement for Tx function) */ @@ -1046,7 +1046,7 @@ Tcl_printf(FILE *f, char *fmt, va_list args_in) if (escapes > 0) { - /* "+ 4" required to process "$$...$$"; haven't figured out why. */ + /* "+ 4" required to process "$$...$$"; haven't figured out why. */ finalstr = Tcl_Alloc(nchars + escapes + 26 + 4); strncpy(finalstr, outptr, 24); escapes = 0; @@ -1081,7 +1081,7 @@ Tcl_printf(FILE *f, char *fmt, va_list args_in) return result; } - + /*--------------------------------------------------------------*/ /* Tcl_escape() takes a string as input and produces a string */ /* in which characters are escaped as necessary to make them */ @@ -1181,7 +1181,7 @@ TerminalInputProc(instanceData, buf, toRead, errorCodePtr) if (errno != EINTR) break; } *errorCodePtr = errno; - + return -1; } @@ -1239,7 +1239,7 @@ Tclmagic_Init(interp) int Tclmagic_SafeInit(interp) - Tcl_Interp *interp; + Tcl_Interp *interp; { return Tclmagic_Init(interp); } diff --git a/tcltk/texthelper.tcl b/tcltk/texthelper.tcl index 33141be2..ffa764e8 100644 --- a/tcltk/texthelper.tcl +++ b/tcltk/texthelper.tcl @@ -9,7 +9,7 @@ set textdefaults [dict create \ offset "0 0" \ port "0" \ ] - + proc magic::make_texthelper { mgrpath } { global typedflt typesticky typeport toplevel ${mgrpath} @@ -64,7 +64,7 @@ proc magic::make_texthelper { mgrpath } { menubutton ${mgrpath}.just.btn -text "default" -menu ${mgrpath}.just.btn.menu menubutton ${mgrpath}.font.btn -text "default" -menu ${mgrpath}.font.btn.menu - + button ${mgrpath}.buttonbar.cancel -text "Cancel" -command "wm withdraw ${mgrpath}" button ${mgrpath}.buttonbar.apply -text "Apply" button ${mgrpath}.buttonbar.okay -text "Okay" @@ -361,7 +361,7 @@ proc magic::update_texthelper {} { # Reduce list to what's editable set slist [] foreach sitem $splist { - set scell [lindex $sitem 2] + set scell [lindex $sitem 2] if {$scell == {}} { lappend slist $sitem } diff --git a/tcltk/tkcon.tcl b/tcltk/tkcon.tcl index 2b1d199b..44d2cb98 100755 --- a/tcltk/tkcon.tcl +++ b/tcltk/tkcon.tcl @@ -36,7 +36,7 @@ exec ${MAGIC_WISH:=wish} "$0" ${1+"$@"} # # set ::tkcon::PRIV(proxy) {wwwproxy:8080 1} # -# Or you can set the above variable from within tkcon by calling +# Or you can set the above variable from within tkcon by calling # # tkcon master set ::tkcon:PRIV(proxy) wwwproxy:8080 # @@ -656,7 +656,7 @@ proc ::tkcon::GarbageCollect {} { ## ::tkcon::EvalCmd) in turn. Any uncompleted command will not be eval'ed. # ARGS: w - console text widget # Calls: ::tkcon::CmdGet, ::tkcon::CmdSep, ::tkcon::EvalCmd -## +## proc ::tkcon::Eval {w} { set incomplete [CmdSep [CmdGet $w] cmds last] $w mark set insert end-1c @@ -676,7 +676,7 @@ proc ::tkcon::Eval {w} { # Calls: ::tkcon::Prompt # Outputs: result of command to stdout (or stderr if error occured) # Returns: next event number -## +## proc ::tkcon::EvalCmd {w cmd} { variable OPT variable PRIV @@ -907,7 +907,7 @@ proc ::tkcon::EvalSocketClosed {} { ## ::tkcon::EvalNamespace - evaluates the args in a particular namespace ## This is an override for ::tkcon::EvalAttached for when the user wants ## to attach to a particular namespace of the attached interp -# ARGS: attached +# ARGS: attached # namespace the namespace to evaluate in # args the args to evaluate # RETURNS: the result of the command @@ -935,7 +935,7 @@ proc ::tkcon::Namespaces {{ns ::} {l {}}} { ## ::tkcon::CmdGet - gets the current command from the console widget # ARGS: w - console text widget # Returns: text which compromises current command line -## +## proc ::tkcon::CmdGet w { if {![llength [$w tag nextrange prompt limit end]]} { $w tag add stdin limit end-1c @@ -949,7 +949,7 @@ proc ::tkcon::CmdGet w { # last - varname of any remainder (like an incomplete final command). # If there is only one command, it's placed in this var. # Returns: constituent command info in varnames specified by list & rmd. -## +## proc ::tkcon::CmdSep {cmd list last} { upvar 1 $list cmds $last inc set inc {} @@ -976,7 +976,7 @@ proc ::tkcon::CmdSep {cmd list last} { ## ::tkcon::CmdSplit - splits multiple commands into a list # ARGS: cmd - (possible) multiple command to separate # Returns: constituent commands in a list -## +## proc ::tkcon::CmdSplit {cmd} { set inc {} set cmds {} @@ -1000,7 +1000,7 @@ proc ::tkcon::CmdSplit {cmd} { ## Called by ::tkcon::EvalCmd # ARGS: w - text widget # Outputs: tag name guaranteed unique in the widget -## +## proc ::tkcon::UniqueTag {w} { set tags [$w tag names] set idx 0 @@ -1013,7 +1013,7 @@ proc ::tkcon::UniqueTag {w} { # ARGS: w - console text widget # size - # of lines to constrain to # Outputs: may delete data in console widget -## +## proc ::tkcon::ConstrainBuffer {w size} { if {[$w index end] > $size} { $w delete 1.0 [expr {int([$w index end])-$size}].0 @@ -1023,7 +1023,7 @@ proc ::tkcon::ConstrainBuffer {w size} { ## ::tkcon::Prompt - displays the prompt in the console widget # ARGS: w - console text widget # Outputs: prompt (specified in ::tkcon::OPT(prompt1)) to console -## +## proc ::tkcon::Prompt {{pre {}} {post {}} {prompt {}}} { variable OPT variable PRIV @@ -1055,7 +1055,7 @@ proc ::tkcon::Prompt {{pre {}} {post {}} {prompt {}}} { } ## ::tkcon::About - gives about info for tkcon -## +## proc ::tkcon::About {} { variable OPT variable PRIV @@ -1090,7 +1090,7 @@ proc ::tkcon::About {} { ## ::tkcon::InitMenus - inits the menubar and popup for the console # ARGS: w - console text widget -## +## proc ::tkcon::InitMenus {w title} { variable OPT variable PRIV @@ -1523,7 +1523,7 @@ proc ::tkcon::NamespaceMenu m { } } -## Namepaces List +## Namepaces List ## proc ::tkcon::NamespacesList {names} { variable PRIV @@ -1896,7 +1896,7 @@ proc ::tkcon::NewSocket {} { ## The file is actually sourced in the currently attached's interp # ARGS: fn - (optional) filename to source in # Returns: selected filename ({} if nothing was selected) -## +## proc ::tkcon::Load { {fn ""} } { set types { {{Tcl Files} {.tcl .tk}} @@ -1915,7 +1915,7 @@ proc ::tkcon::Load { {fn ""} } { ## This does not eval in a slave because it's not necessary # ARGS: w - console text widget # fn - (optional) filename to save to -## +## proc ::tkcon::Save { {fn ""} {type ""} {opt ""} {mode w} } { variable PRIV @@ -1985,7 +1985,7 @@ proc ::tkcon::MainInit {} { ## Creates a slave interpreter and sources in this script. ## All other interpreters also get a command to eval function in the ## new interpreter. - ## + ## proc ::tkcon::New {} { variable PRIV global argv0 argc argv @@ -2022,7 +2022,7 @@ proc ::tkcon::MainInit {} { ## ::tkcon::Exit - full exit OR destroy slave console ## This proc should only be called in the main interpreter from a slave. ## The master determines whether we do a full exit or just kill the slave. - ## + ## proc ::tkcon::Exit {slave args} { variable PRIV variable OPT @@ -2045,7 +2045,7 @@ proc ::tkcon::MainInit {} { ## This proc should only be called by the main interpreter. If it is ## called from there, it will ask before exiting tkcon. All others ## (slaves) will just have their slave interpreter deleted, closing them. - ## + ## proc ::tkcon::Destroy {{slave {}}} { variable PRIV @@ -2515,7 +2515,7 @@ proc ::tkcon::ErrorHighlight w { ## This always exists in the main interpreter, and is aliased into ## other connected interpreters # ARGS: totally variable, see internal comments -## +## proc tkcon {cmd args} { global errorInfo @@ -2797,9 +2797,9 @@ proc tkcon {cmd args} { ## This allows me to capture all stdout/stderr to the console window ## This will be renamed to 'puts' at the appropriate time during init ## -# ARGS: same as usual +# ARGS: same as usual # Outputs: the string with a color-coded text tag -## +## proc tkcon_puts args { set len [llength $args] foreach {arg1 arg2 arg3} $args { break } @@ -2861,7 +2861,7 @@ proc tkcon_puts args { set sarg [string range $sarg 0 [expr {$bpt - 1}]] set nl 0 } - + if {$nl == 0} { tkcon console insert output $sarg $farg @@ -2901,7 +2901,7 @@ proc tkcon_puts args { ## This allows me to capture all stdin input without needing to stdin ## This will be renamed to 'gets' at the appropriate time during init ## -# ARGS: same as gets +# ARGS: same as gets # Outputs: same as gets ## proc tkcon_gets args { @@ -2925,12 +2925,12 @@ proc tkcon_gets args { } ## edit - opens a file/proc/var for reading/editing -## +## # Arguments: # type proc/file/var # what the actual name of the item # Returns: nothing -## +## proc edit {args} { array set opts {-find {} -type {} -attach {}} while {[string match -* [lindex $args 0]]} { @@ -3082,7 +3082,7 @@ proc echo args { puts [concat $args] } ## clear - clears the buffer of the console (not the history though) ## This is executed in the parent interpreter -## +## proc clear {{pcnt 100}} { if {![regexp {^[0-9]*$} $pcnt] || $pcnt < 1 || $pcnt > 100} { return -code error \ @@ -3100,7 +3100,7 @@ proc clear {{pcnt 100}} { ## If called with one arg, returns the alias of that arg (or {} if none) # ARGS: newcmd - (optional) command to bind alias to # args - command and args being aliased -## +## proc alias {{newcmd {}} args} { if {[string match {} $newcmd]} { set res {} @@ -3117,7 +3117,7 @@ proc alias {{newcmd {}} args} { ## unalias - unaliases an alias'ed command # ARGS: cmd - command to unbind as an alias -## +## proc unalias {cmd} { interp alias {} $cmd {} } @@ -3137,7 +3137,7 @@ proc unalias {cmd} { # -- forcibly ends options recognition # # Returns: the values of the requested items in a 'source'able form -## +## proc dump {type args} { set whine 1 set code ok @@ -3689,13 +3689,13 @@ proc observe_var {name el op} { ## which - tells you where a command is found # ARGS: cmd - command name # Returns: where command is found (internal / external / unknown) -## +## proc which cmd { ## This tries to auto-load a command if not recognized set types [uplevel 1 [list what $cmd 1]] if {[llength $types]} { set out {} - + foreach type $types { switch -- $type { alias { set res "$cmd: aliased to [alias $cmd]" } @@ -3726,7 +3726,7 @@ proc which cmd { ## what - tells you what a string is recognized as # ARGS: str - string to id # Returns: id types of command as list -## +## proc what {str {autoload 0}} { set types {} if {[llength [info commands $str]] || ($autoload && \ @@ -3773,7 +3773,7 @@ proc what {str {autoload 0}} { # -long - list in full format "permissions size date filename" # -full - displays / after directories and link paths for links # Returns: a directory listing -## +## proc dir {args} { array set s { all 0 full 0 long 0 @@ -4183,7 +4183,7 @@ proc ::tkcon::Bindings {} { } ## Get all Text bindings into TkConsole - foreach ev [bind Text] { bind TkConsole $ev [bind Text $ev] } + foreach ev [bind Text] { bind TkConsole $ev [bind Text $ev] } ## We really didn't want the newline insertion bind TkConsole {} @@ -4655,7 +4655,7 @@ proc ::tkcon::TagProc w { # c1 - first char of pair # c2 - second char of pair # Calls: ::tkcon::Blink -## +## proc ::tkcon::MatchPair {w c1 c2 {lim 1.0}} { if {[string compare {} [set ix [$w search -back $c1 insert $lim]]]} { while { @@ -4693,7 +4693,7 @@ proc ::tkcon::MatchPair {w c1 c2 {lim 1.0}} { ## The quote to match is assumed to be at the text index 'insert'. # ARGS: w - console text widget # Calls: ::tkcon::Blink -## +## proc ::tkcon::MatchQuote {w {lim 1.0}} { set i insert-1c set j 0 @@ -4719,7 +4719,7 @@ proc ::tkcon::MatchQuote {w {lim 1.0}} { # i2 - end index of blink region # dur - duration in usecs to blink for # Outputs: blinks selected characters in $w -## +## proc ::tkcon::Blink {w args} { eval [list $w tag add blink] $args after $::tkcon::OPT(blinktime) [list $w] tag remove blink $args @@ -4734,7 +4734,7 @@ proc ::tkcon::Blink {w args} { # ARGS: w - text window in which to insert the string # s - string to insert (usually just a single char) # Outputs: $s to text widget -## +## proc ::tkcon::Insert {w s} { if {[string match {} $s] || [string match disabled [$w cget -state]]} { return @@ -4750,7 +4750,7 @@ proc ::tkcon::Insert {w s} { $w see insert } -## ::tkcon::Expand - +## ::tkcon::Expand - # ARGS: w - text widget in which to expand str # type - type of expansion (path / proc / variable) # Calls: ::tkcon::Expand(Pathname|Procname|Variable) @@ -4759,7 +4759,7 @@ proc ::tkcon::Insert {w s} { # match equaled the string to expand, then all possible matches # are output to stdout. Triggers bell if no matches are found. # Returns: number of matches found -## +## proc ::tkcon::Expand {w {type ""}} { set exp "\[^\\\\\]\[\[ \t\n\r\\\{\"$\]" set tmp [$w search -backwards -regexp $exp insert-1c limit-1c] @@ -4798,7 +4798,7 @@ proc ::tkcon::Expand {w {type ""}} { # Calls: ::tkcon::ExpandBestMatch # Returns: list containing longest unique match followed by all the # possible further matches -## +## proc ::tkcon::ExpandPathname str { set pwd [EvalAttached pwd] # Cause a string like {C:/Program\ Files/} to become "C:/Program Files/" @@ -4880,7 +4880,7 @@ proc ::tkcon::ExpandProcname str { # Calls: ::tkcon::ExpandBestMatch # Returns: list containing longest unique match followed by all the # possible further matches -## +## proc ::tkcon::ExpandVariable str { if {[regexp {([^\(]*)\((.*)} $str junk ary str]} { ## Looks like they're trying to expand an array. @@ -4908,7 +4908,7 @@ proc ::tkcon::ExpandVariable str { ## or $e is {}. $e is extra for compatibility with proc below. # ARGS: l - list to find best unique match in # Returns: longest unique match in the list -## +## proc ::tkcon::ExpandBestMatch2 {l {e {}}} { set s [lindex $l 0] if {[llength $l]>1} { @@ -4928,7 +4928,7 @@ proc ::tkcon::ExpandBestMatch2 {l {e {}}} { # ARGS: l - list to find best unique match in # e - currently best known unique match # Returns: longest unique match in the list -## +## proc ::tkcon::ExpandBestMatch {l {e {}}} { set ec [lindex $l 0] if {[llength $l]>1} { @@ -5292,7 +5292,7 @@ proc ::tkcon::Retrieve {} { ## ::tkcon::Resource - re'source's this script into current console ## Meant primarily for my development of this program. It follows ## links until the ultimate source is found. -## +## set ::tkcon::PRIV(SCRIPT) [info script] if {!$::tkcon::PRIV(WWW) && [string compare $::tkcon::PRIV(SCRIPT) {}]} { # we use a catch here because some wrap apps choke on 'file type' diff --git a/tcltk/toolkit.tcl b/tcltk/toolkit.tcl index c62df42d..75fa12cd 100644 --- a/tcltk/toolkit.tcl +++ b/tcltk/toolkit.tcl @@ -150,7 +150,7 @@ proc magic::gencell {gencell_name {instname {}} args} { } set argpar [dict create {*}$args] - if {$gencell_name == {}} { + if {$gencell_name == {}} { # Find selected item (to-do: handle multiple selections) set wlist [what -list] @@ -204,7 +204,7 @@ proc magic::gencell {gencell_name {instname {}} args} { if {[dict exists $parameters nocell]} { set arcount [array -list count] set arpitch [array -list pitch] - + dict set parameters nx [lindex $arcount 1] dict set parameters ny [lindex $arcount 3] dict set parameters pitchx $delx @@ -385,7 +385,7 @@ proc magic::get_gencell_name {gencell_type} { set pint [expr 48 + int(rand() * 36)] if {$pint > 57} {set pint [expr $pint + 39]} append postfix [format %c $pint] - } + } if {[cellname list exists ${gencell_type}_$postfix] == 0} {break} } return ${gencell_type}_$postfix @@ -457,7 +457,7 @@ proc magic::gencell_create {gencell_type library parameters} { if {[catch {${library}::${gencell_type}_draw $parameters} drawerr]} { puts stderr $drawerr } - property library $library + property library $library property gencell $gencell_type property parameters $parameters popstack @@ -476,7 +476,7 @@ proc magic::gencell_create {gencell_type library parameters} { } #----------------------------------------------------- -# Add a standard entry parameter to the gencell window +# Add a standard entry parameter to the gencell window #----------------------------------------------------- proc magic::add_entry {pname ptext parameters} { @@ -486,7 +486,7 @@ proc magic::add_entry {pname ptext parameters} { } else { set value "" } - + set numrows [lindex [grid size .params.edits] 1] label .params.edits.${pname}_lab -text $ptext entry .params.edits.${pname}_ent -background white -textvariable magic::${pname}_val @@ -499,8 +499,8 @@ proc magic::add_entry {pname ptext parameters} { } #---------------------------------------------------------- -# Default entry callback, without any dependencies. Each -# parameter changed +# Default entry callback, without any dependencies. Each +# parameter changed #---------------------------------------------------------- proc magic::add_check_callbacks {gencell_type library} { @@ -589,7 +589,7 @@ proc magic::update_dialog {callback pname gencell_type library} { } #---------------------------------------------------------- -# Add a standard checkbox parameter to the gencell window +# Add a standard checkbox parameter to the gencell window #---------------------------------------------------------- proc magic::add_checkbox {pname ptext parameters} { @@ -599,7 +599,7 @@ proc magic::add_checkbox {pname ptext parameters} { } else { set value "" } - + set numrows [lindex [grid size .params.edits] 1] label .params.edits.${pname}_lab -text $ptext checkbutton .params.edits.${pname}_chk -variable magic::${pname}_val @@ -622,7 +622,7 @@ proc magic::add_message {pname ptext parameters {color blue}} { } else { set value "" } - + set numrows [lindex [grid size .params.edits] 1] label .params.edits.${pname}_lab -text $ptext label .params.edits.${pname}_txt -text $value \ @@ -632,7 +632,7 @@ proc magic::add_message {pname ptext parameters {color blue}} { } #---------------------------------------------------------- -# Add a selectable-list parameter to the gencell window +# Add a selectable-list parameter to the gencell window #---------------------------------------------------------- proc magic::add_selectlist {pname ptext all_values parameters {itext ""}} { @@ -646,7 +646,7 @@ proc magic::add_selectlist {pname ptext all_values parameters {itext ""}} { set numrows [lindex [grid size .params.edits] 1] label .params.edits.${pname}_lab -text $ptext menubutton .params.edits.${pname}_sel -menu .params.edits.${pname}_sel.menu \ - -relief groove -text ${value} + -relief groove -text ${value} grid .params.edits.${pname}_lab -row $numrows -column 0 -sticky ens grid .params.edits.${pname}_sel -row $numrows -column 1 -sticky wns menu .params.edits.${pname}_sel.menu -tearoff 0 @@ -659,7 +659,7 @@ proc magic::add_selectlist {pname ptext all_values parameters {itext ""}} { } #---------------------------------------------------------- -# Add a selectable-list parameter to the gencell window +# Add a selectable-list parameter to the gencell window # Unlike the routine above, it returns the index of the # selection, not the selection itself. This is useful for # keying the selection to other parameter value lists. diff --git a/tcltk/toolkit_rev0.tcl b/tcltk/toolkit_rev0.tcl index 3fab0f10..044b9aa1 100644 --- a/tcltk/toolkit_rev0.tcl +++ b/tcltk/toolkit_rev0.tcl @@ -55,7 +55,7 @@ proc magic::add_toolkit_button {framename button_text gencell_type library} { #----------------------------------------------------- proc magic::gen_params {} { - + # Find selected item (to-do: handle multiple selections) set wlist [what -list] set clist [lindex $wlist 2] @@ -193,7 +193,7 @@ proc magic::gencell_draw {gname gencell_type library} { } #----------------------------------------------------- -# Add a standard parameter to the gencell window +# Add a standard parameter to the gencell window #----------------------------------------------------- proc magic::add_param {gname pname ptext default_value} { @@ -206,7 +206,7 @@ proc magic::add_param {gname pname ptext default_value} { set value [cellname property $gname $pname] } if {$value == {}} {set value $default_value} - + set numrows [lindex [grid size .params.edits] 0] label .params.edits.${pname}_lab -text $ptext entry .params.edits.${pname}_ent -background white @@ -216,7 +216,7 @@ proc magic::add_param {gname pname ptext default_value} { } #----------------------------------------------------- -# Update the properties of a cell +# Update the properties of a cell #----------------------------------------------------- proc magic::update_params {gname ptext default_value} { diff --git a/tcltk/tools.tcl b/tcltk/tools.tcl index c72ee067..89cd8401 100644 --- a/tcltk/tools.tcl +++ b/tcltk/tools.tcl @@ -83,7 +83,7 @@ proc magic::crashbackups {{option start}} { #-------------------------------------------------------------------------- proc magic::pushstack {{name ""}} { - global editstack + global editstack if {$name == ""} { # no cell selected, so see if we can select one set selected [what -list] @@ -121,8 +121,8 @@ proc magic::popstack {} { } else { set ltag [tag load] tag load {} - load [lindex $editstack end] - view [lindex $editstack end-1] + load [lindex $editstack end] + view [lindex $editstack end-1] tag load $ltag set editstack [lrange $editstack 0 end-2] catch {magic::cellmanager} @@ -467,7 +467,7 @@ proc magic::enable_tools {} { # Set keystrokes for push and pop magic::macro XK_greater {magic::pushstack [cellname list self]} magic::macro XK_less {magic::popstack} - + # Set keystrokes for the "tool" command. magic::macro space {magic::tool} magic::macro Shift_space {magic::tool box} @@ -660,7 +660,7 @@ proc magic::tool {{type next}} { macro Shift_Button3 "wire decr type ; wire show" macro Button4 "wire incr width ; wire show" macro Button5 "wire decr width ; wire show" - + } netlist { puts stdout {Switching to NETLIST tool.} diff --git a/tcltk/wrapper.tcl b/tcltk/wrapper.tcl index b798b5ef..cacc5b27 100644 --- a/tcltk/wrapper.tcl +++ b/tcltk/wrapper.tcl @@ -31,7 +31,7 @@ proc magic::makeglyphimages {} { if {![catch {set Glyph(up)}]} {return} # Glyph images - + set gsize [expr {int($Opts(scale) * 13)}] set gscale [expr {int($Opts(scale))}] @@ -245,7 +245,7 @@ proc magic::drcstate { status } { set framename [winfo parent $lwin] if {$framename == "."} {return} switch $status { - idle { + idle { set dct [*bypass drc list count total] if {$dct > 0} { ${framename}.titlebar.drcbutton configure -selectcolor red @@ -413,7 +413,7 @@ proc magic::techmanager {{option "update"}} { menu .techmgr.cif1.lstyle.menu -tearoff 0 menu .techmgr.extract.lstyle.menu -tearoff 0 menu .techmgr.drc.lstyle.menu -tearoff 0 - + } if {$option == "init"} { @@ -800,7 +800,7 @@ proc magic::maketoolbar { framename } { button ${framename}.toolbar.b$layername -image img_$layername -command \ "$win see $layername" - # Bindings: Entering the button puts the canonical layer name in the + # Bindings: Entering the button puts the canonical layer name in the # message window. bind ${framename}.toolbar.b$layername \ [subst {focus %W ; ${framename}.titlebar.message configure \ @@ -1113,7 +1113,7 @@ proc magic::openwrapper {{cell ""} {framename ""}} { global Glyph global Opts global Winopts - + # Disallow scrollbars and title caption on windows---we'll do these ourselves if {$lwindow == 0} { @@ -1123,11 +1123,11 @@ proc magic::openwrapper {{cell ""} {framename ""}} { } if {$framename == ""} { - incr lwindow + incr lwindow set framename .layout${lwindow} } set winname ${framename}.pane.top.magic - + toplevel $framename tkwait visibility $framename @@ -1551,7 +1551,7 @@ proc magic::closewrapper { framename } { if {$tk_version >= 8.5} { if {![catch {wm state .cellmgr}]} { .cellmgr.target.list configure -text "default" - } + } } } @@ -1631,7 +1631,7 @@ proc magic::render3d {{cell ""}} { -command [subst { if { \$Opts(cutbox) } { .render.magic cutbox box \ } else { \ .render.magic cutbox none } }] - + if {$cell == ""} {set cell default} label .render.title.msg -text "3D Rendering window Cell: $cell" \ -foreground white -background sienna4 -anchor w -padx 15 diff --git a/textio/textio.h b/textio/textio.h index e62d91d2..3d976312 100644 --- a/textio/textio.h +++ b/textio/textio.h @@ -3,16 +3,16 @@ * * Routines in the textio module * - * ********************************************************************* - * * Copyright (C) 1985, 1990 Regents of the University of California. * - * * Permission to use, copy, modify, and distribute this * - * * software and its documentation for any purpose and without * - * * fee is hereby granted, provided that the above copyright * - * * notice appear in all copies. The University of California * - * * makes no representations about the suitability of this * - * * software for any purpose. It is provided "as is" without * - * * express or implied warranty. Export of this software outside * - * * of the United States of America may require an export license. * + * ********************************************************************* + * * Copyright (C) 1985, 1990 Regents of the University of California. * + * * Permission to use, copy, modify, and distribute this * + * * software and its documentation for any purpose and without * + * * fee is hereby granted, provided that the above copyright * + * * notice appear in all copies. The University of California * + * * makes no representations about the suitability of this * + * * software for any purpose. It is provided "as is" without * + * * express or implied warranty. Export of this software outside * + * * of the United States of America may require an export license. * * ********************************************************************* * * Needs: diff --git a/textio/textioInt.h b/textio/textioInt.h index dd22c40b..5f35ecee 100644 --- a/textio/textioInt.h +++ b/textio/textioInt.h @@ -3,16 +3,16 @@ * * INTERNAL definitions for the textio module * - * ********************************************************************* - * * Copyright (C) 1985, 1990 Regents of the University of California. * - * * Permission to use, copy, modify, and distribute this * - * * software and its documentation for any purpose and without * - * * fee is hereby granted, provided that the above copyright * - * * notice appear in all copies. The University of California * - * * makes no representations about the suitability of this * - * * software for any purpose. It is provided "as is" without * - * * express or implied warranty. Export of this software outside * - * * of the United States of America may require an export license. * + * ********************************************************************* + * * Copyright (C) 1985, 1990 Regents of the University of California. * + * * Permission to use, copy, modify, and distribute this * + * * software and its documentation for any purpose and without * + * * fee is hereby granted, provided that the above copyright * + * * notice appear in all copies. The University of California * + * * makes no representations about the suitability of this * + * * software for any purpose. It is provided "as is" without * + * * express or implied warranty. Export of this software outside * + * * of the United States of America may require an export license. * * ********************************************************************* * * @@ -28,7 +28,7 @@ extern bool txHavePrompt; typedef struct { - fd_set tx_fdmask; /* A mask of the file descriptors for this + fd_set tx_fdmask; /* A mask of the file descriptors for this * device. */ void (*tx_inputProc)(); /* A procedure that fetches events and stores diff --git a/textio/txCommands.c b/textio/txCommands.c index e5bf6417..238b6f6b 100644 --- a/textio/txCommands.c +++ b/textio/txCommands.c @@ -2,18 +2,18 @@ * txCommands.c -- * * Reads commands from devices and sends them to the window package, - * which sends them to a particular window. + * which sends them to a particular window. * - * ********************************************************************* - * * Copyright (C) 1985, 1990 Regents of the University of California. * - * * Permission to use, copy, modify, and distribute this * - * * software and its documentation for any purpose and without * - * * fee is hereby granted, provided that the above copyright * - * * notice appear in all copies. The University of California * - * * makes no representations about the suitability of this * - * * software for any purpose. It is provided "as is" without * - * * express or implied warranty. Export of this software outside * - * * of the United States of America may require an export license. * + * ********************************************************************* + * * Copyright (C) 1985, 1990 Regents of the University of California. * + * * Permission to use, copy, modify, and distribute this * + * * software and its documentation for any purpose and without * + * * fee is hereby granted, provided that the above copyright * + * * notice appear in all copies. The University of California * + * * makes no representations about the suitability of this * + * * software for any purpose. It is provided "as is" without * + * * express or implied warranty. Export of this software outside * + * * of the United States of America may require an export license. * * ********************************************************************* */ @@ -68,7 +68,7 @@ static int txLastInputEntry = -1; /* The current point -- reset by the 'setpoint' command and for each * interactive command. Calls to TxClearPoint clear previous setpoints, * - * Each input point is associated with a window, as windows may use + * Each input point is associated with a window, as windows may use * different coordinate systems. * * Also, keep around the last input event. @@ -80,7 +80,7 @@ TxInputEvent txLastEvent; /* Input queues. We have an input queue for low-level input events, and - * a queue for assembled interactive commands and file commands. Also, there + * a queue for assembled interactive commands and file commands. Also, there * are free lists for these structures. */ @@ -103,12 +103,12 @@ DQueue txFreeCommands; static struct timeval txZeroTime; -/* Mask of buttons down, as of the last command in the queue (not the last +/* Mask of buttons down, as of the last command in the queue (not the last * command executed). */ -int TxCurButtons = 0; +int TxCurButtons = 0; -/* +/* * Commands are numbered sequentially starting at zero. This number says * which command we are collecting or executing. */ @@ -132,7 +132,7 @@ static TxCommand *lisp_cur_cmd = NULL; */ bool -FD_IsZero(fdmask) +FD_IsZero(fdmask) fd_set fdmask; { int i; @@ -142,7 +142,7 @@ FD_IsZero(fdmask) } void -FD_OrSet(fdmask, dst) +FD_OrSet(fdmask, dst) fd_set fdmask; fd_set *dst; { @@ -381,7 +381,7 @@ TxNewCommand() { TxCommand *command; command = (TxCommand *) DQPopFront(&txFreeCommands); - if (command == NULL) + if (command == NULL) command = (TxCommand *) mallocMagic(sizeof(TxCommand)); command->tx_button = TX_CHARACTER; return command; @@ -455,7 +455,7 @@ TxAddInputDevice(fdmask, inputProc, cdata) void (*inputProc)(); /* A routine to call. This routine will * be passed a single file descriptor that * is ready, and should read that file and - * add events(s) by calling TxNewEvent() + * add events(s) by calling TxNewEvent() * followed by TxAddEvent(). */ ClientData cdata; /* Will be passed back to the proc whenever @@ -478,9 +478,9 @@ TxAddInputDevice(fdmask, inputProc, cdata) void TxAdd1InputDevice(fd, inputProc, cdata) - int fd; - void (*inputProc)(); - ClientData cdata; + int fd; + void (*inputProc)(); + ClientData cdata; { fd_set fs; FD_ZERO(&fs); @@ -516,7 +516,7 @@ TxDeleteInputDevice(fdmask) void TxDelete1InputDevice(fd) - int fd; + int fd; { int i, j; @@ -632,7 +632,7 @@ TxLogCommands(fileName, update) char *fileName; bool update; /* Request a screen update after each command */ { - if (txLogFile != NULL) + if (txLogFile != NULL) { (void) fclose(txLogFile); txLogFile = NULL; @@ -641,7 +641,7 @@ TxLogCommands(fileName, update) txLogUpdate = update; txLogFile = fopen(fileName, "w"); - if (txLogFile == NULL) + if (txLogFile == NULL) TxError("Could not open file '%s' for writing.\n", fileName); } @@ -681,11 +681,11 @@ txLogCommand(cmd) if (cmd->tx_wid >= 0) { /* Command has a window associated with it. */ - fprintf(txLogFile, ":setpoint %d %d %d\n", + fprintf(txLogFile, ":setpoint %d %d %d\n", cmd->tx_p.p_x, cmd->tx_p.p_y, cmd->tx_wid); } else { /* No window associated with the command. */ - fprintf(txLogFile, ":setpoint %d %d\n", + fprintf(txLogFile, ":setpoint %d %d\n", cmd->tx_p.p_x, cmd->tx_p.p_y); } @@ -717,8 +717,8 @@ txLogCommand(cmd) case TX_BUTTON_UP: { act = 1; break; }; default: {ASSERT(FALSE, "txLogCommand"); break; }; } - - fprintf(txLogFile, ":pushbutton %s %s\n", + + fprintf(txLogFile, ":pushbutton %s %s\n", txButTable[but], txActTable[act]); } if (txLogUpdate) @@ -776,7 +776,7 @@ TxGetInputEvent(block, returnOnSigWinch) { if (returnOnSigWinch && SigGotSigWinch) return gotSome; inputs = txInputDescriptors; - numReady = select(TX_MAX_OPEN_FILES, &inputs, (fd_set *)NULL, + numReady = select(TX_MAX_OPEN_FILES, &inputs, (fd_set *)NULL, (fd_set *)NULL, waitTime); if (numReady <= 0) FD_ZERO(&inputs); /* no fd is ready */ } while ((numReady <= 0) && (errno == EINTR)); @@ -792,7 +792,7 @@ TxGetInputEvent(block, returnOnSigWinch) * it so that it can add events to the input queue. */ for (fd = 0; fd < TX_MAX_OPEN_FILES; fd++) { - if (FD_ISSET(fd, &inputs) && + if (FD_ISSET(fd, &inputs) && FD_ISSET(fd, &(txInputDevice[i].tx_fdmask))) { lastNum = txNumInputEvents; (*(txInputDevice[i].tx_inputProc)) @@ -805,7 +805,7 @@ TxGetInputEvent(block, returnOnSigWinch) } /* * At this point we have handled all the bits in 'inputs' -- almost. - * It is possible for an input handler to remove or add other handlers + * It is possible for an input handler to remove or add other handlers * via calls to TxDeleteDevice or TxAddDevice. Therefore, there may be * bits in inputs that haven't been turned off. */ @@ -837,7 +837,7 @@ void TxParseString(str, q, event) char *str; /* The string to be parsed. */ DQueue *q; /* Add to the tail of this queue. */ - TxInputEvent *event; /* An event to supply the point, window ID, + TxInputEvent *event; /* An event to supply the point, window ID, * etc. . If NULL, we will use the last * event processed. */ @@ -854,7 +854,7 @@ TxParseString(str, q, event) strncpy(cmd->tx_argstring, remainder, TX_MAX_CMDLEN); cmd->tx_argstring[TX_MAX_CMDLEN - 1] = '\0'; - if (ParsSplit(cmd->tx_argstring, TX_MAXARGS, + if (ParsSplit(cmd->tx_argstring, TX_MAXARGS, &(cmd->tx_argc), cmd->tx_argv, &remainder) ) { if (event == NULL) event = &txLastEvent; @@ -865,7 +865,7 @@ TxParseString(str, q, event) } else { - TxError("Unable to completely parse command line '%s'\n", + TxError("Unable to completely parse command line '%s'\n", str); TxFreeCommand(cmd); return; @@ -879,7 +879,7 @@ TxParseString(str, q, event) * ---------------------------------------------------------------------------- * txGetInteractiveCommand: * - * Get one or more commands from one of the interactive input devices, + * Get one or more commands from one of the interactive input devices, * and put it into the input queue. * * Results: @@ -1238,7 +1238,7 @@ TxDispatch(f) bool inFile; DQueue inputCommands; /* A queue of commands from our input * sources. - */ + */ DQInit(&inputCommands, 4); @@ -1248,7 +1248,7 @@ TxDispatch(f) { if (!inFile) { - /* Update the screen info of the window package and all of + /* Update the screen info of the window package and all of * its clients. If there's already input waiting, skip this... * it can get done at the end, after all pending commands have * been processed. @@ -1259,7 +1259,7 @@ TxDispatch(f) if (DQIsEmpty(&inputCommands)) { WindUpdate(); - if (SigInterruptPending) + if (SigInterruptPending) TxPrintf("[Redisplay Interrupted]\n"); txGetInteractiveCommand(FALSE, &inputCommands); } @@ -1274,7 +1274,7 @@ TxDispatch(f) /* Call background DRC. * It will return if it is not enabled, there is no work to - * be done, or it learns that the user has entered a + * be done, or it learns that the user has entered a * command. */ SigIOReady = FALSE; @@ -1295,7 +1295,7 @@ TxDispatch(f) TxPrompt(); (void) GrEnableTablet(); GrFlush(); - + txGetInteractiveCommand(TRUE, &inputCommands); TxUnPrompt(); @@ -1308,7 +1308,7 @@ TxDispatch(f) else { if (feof(f)) goto done; - if (SigInterruptPending && inFile) + if (SigInterruptPending && inFile) { TxPrintf("[Read-in of command file aborted]\n"); goto done; @@ -1348,7 +1348,7 @@ TxDispatch(f) }; /**** - ASSERT(cmd->tx_argc >= 0 && cmd->tx_argc <= TX_MAXARGS, + ASSERT(cmd->tx_argc >= 0 && cmd->tx_argc <= TX_MAXARGS, "TxDispatch"); if (cmd->tx_argc != 0) { ASSERT(cmd->tx_button == TX_CHARACTER, "TxDispatch"); @@ -1365,7 +1365,7 @@ TxDispatch(f) }; ****/ if (!inFile && (txLogFile != NULL)) txLogCommand(cmd); - + /* * Add lisp interpreter here. We trap the character * commands and call the lisp interpreter that traps @@ -1438,7 +1438,7 @@ txCommandsInit() /* * ---------------------------------------------------------------------------- * - * txLispDispatch -- + * txLispDispatch -- * * Send command to magic window. * diff --git a/textio/txInput.c b/textio/txInput.c index 6338ae43..c56060a1 100644 --- a/textio/txInput.c +++ b/textio/txInput.c @@ -3,16 +3,16 @@ * * Handles 'stdin' and terminal driver settings. * - * ********************************************************************* - * * Copyright (C) 1985, 1990 Regents of the University of California. * - * * Permission to use, copy, modify, and distribute this * - * * software and its documentation for any purpose and without * - * * fee is hereby granted, provided that the above copyright * - * * notice appear in all copies. The University of California * - * * makes no representations about the suitability of this * - * * software for any purpose. It is provided "as is" without * - * * express or implied warranty. Export of this software outside * - * * of the United States of America may require an export license. * + * ********************************************************************* + * * Copyright (C) 1985, 1990 Regents of the University of California. * + * * Permission to use, copy, modify, and distribute this * + * * software and its documentation for any purpose and without * + * * fee is hereby granted, provided that the above copyright * + * * notice appear in all copies. The University of California * + * * makes no representations about the suitability of this * + * * software for any purpose. It is provided "as is" without * + * * express or implied warranty. Export of this software outside * + * * of the United States of America may require an export license. * * ********************************************************************* */ @@ -132,23 +132,23 @@ static struct cmd_spec { { "see*", LAYER_COMPL, {(char *)NULL} }, { "paint", LAYER_COMPL, {(char *)NULL} }, - { "*extract", ARGS_COMPL, {"clrdebug", "clrlength", "driver", "interactions", - "intercount", "parents", "receiver", "setdebug", - "showdebug", "showparents", "showtech", "stats", + { "*extract", ARGS_COMPL, {"clrdebug", "clrlength", "driver", "interactions", + "intercount", "parents", "receiver", "setdebug", + "showdebug", "showparents", "showtech", "stats", "step", "times", (char *)NULL} }, { "*garoute", ARGS_COMPL, {"clrdebug", "setdebug", "showdebug", (char *)NULL} }, - { "*groute", ARGS_COMPL, {"clrdebug", "onlynet", "setdebug", "showdebug", + { "*groute", ARGS_COMPL, {"clrdebug", "onlynet", "setdebug", "showdebug", "sides", (char *)NULL} }, { "*iroute", ARGS_COMPL, {"debug", "help", "parms", (char *)NULL} }, { "*malloc", ARGS_COMPL, {"all", "off", "on", "only", "watch", "unwatch", (char *)NULL} }, - { "*mzroute", ARGS_COMPL, {"debug", "dumpEstimates", "dumpTags", "help", + { "*mzroute", ARGS_COMPL, {"debug", "dumpEstimates", "dumpTags", "help", "numberLine", "parms", "plane", "version", (char *)NULL} }, - { "*plow", ARGS_COMPL, {"help", "clrdebug", "jogreduce", "lwidth", "lshadow", - "mergedown", "mergeup", "move", "outline", "plow", - "print", "random", "setdebug", "shadow", "showdebug", - "split", "techshow", "trail", "whenbot", "whentop", + { "*plow", ARGS_COMPL, {"help", "clrdebug", "jogreduce", "lwidth", "lshadow", + "mergedown", "mergeup", "move", "outline", "plow", + "print", "random", "setdebug", "shadow", "showdebug", + "split", "techshow", "trail", "whenbot", "whentop", "width", (char *)NULL} }, { "*plow lwidth", LAYER_COMPL, { (char *)NULL } }, { "*plow width", LAYER_COMPL, { (char *)NULL } }, @@ -162,12 +162,12 @@ static struct cmd_spec { { "*watch", PLANE_COMPL, {(char *)NULL} }, { "*watch*", ARGS_COMPL, {"demo", "types", (char *)NULL} }, - { "calma", ARGS_COMPL, {"help", "flatten", "labels", "lower", "noflatten", + { "calma", ARGS_COMPL, {"help", "flatten", "labels", "lower", "noflatten", "nolabels", "nolower", "read", "write", (char *)NULL} }, { "calma read", FILE_COMPL, { (char *)NULL } }, { "calma write", FILE_COMPL, { (char *)NULL } }, - { "cif", ARGS_COMPL, {"help", "arealabels", "idcell", "istyle", "prefix", + { "cif", ARGS_COMPL, {"help", "arealabels", "idcell", "istyle", "prefix", "ostyle", "read", "see", "statistics", "write", "flat", (char *)NULL} }, { "cif read", FILE_COMPL, { (char *)NULL } }, { "cif flat", FILE_COMPL, { (char *)NULL } }, @@ -183,46 +183,46 @@ static struct cmd_spec { { "move", DIRECT_COMPL, { (char *)NULL } }, { "stretch", DIRECT_COMPL, { (char *)NULL } }, - { "drc", ARGS_COMPL, {"help", "catchup", "check", "count", "find", "off", + { "drc", ARGS_COMPL, {"help", "catchup", "check", "count", "find", "off", "on", "printrules", "rulestats", "statistics", "why", (char *)NULL} }, { "drc printrules", FILE_COMPL, { (char *)NULL } }, - { "ext", ARGS_COMPL, {"help", "all", "cell", "do", "length", "no", "parents", + { "ext", ARGS_COMPL, {"help", "all", "cell", "do", "length", "no", "parents", "showparents", "style", "unique", "warn", (char *)NULL} }, { "ext style", OSTYLE_COMPL, { (char *)NULL } }, - { "feedback", ARGS_COMPL, {"help", "add", "clear", "count", "find", "save", + { "feedback", ARGS_COMPL, {"help", "add", "clear", "count", "find", "save", "why", "fill", (char *)NULL} }, { "feedback save", FILE_COMPL, { (char *)NULL } }, - { "garoute", ARGS_COMPL, {"help", "channel", "generate", "nowarn", "route", + { "garoute", ARGS_COMPL, {"help", "channel", "generate", "nowarn", "route", "reset", "warn", (char *)NULL} }, { "getnode", ARGS_COMPL, {"alias", "fast", "abort", (char *)NULL} }, - { "iroute", ARGS_COMPL, {"help", "contacts", "layers", "route", - "saveParameters", "search", "spacings", "verbosity", + { "iroute", ARGS_COMPL, {"help", "contacts", "layers", "route", + "saveParameters", "search", "spacings", "verbosity", "version", "wizard", (char *)NULL} }, - { "iroute help", ARGS_COMPL, {"contacts", "layers", "route", - "saveParameters", "search", "spacings", "verbosity", + { "iroute help", ARGS_COMPL, {"contacts", "layers", "route", + "saveParameters", "search", "spacings", "verbosity", "version", "wizard", (char *)NULL} }, - { "plot", ARGS_COMPL, {"help", "postscript", "gremlin", "versatec", "pnm", + { "plot", ARGS_COMPL, {"help", "postscript", "gremlin", "versatec", "pnm", "parameters", (char *)NULL} }, { "plot postscript", FILE_COMPL, { (char *)NULL } }, { "plot gremlin", FILE_COMPL, { (char *)NULL } }, { "plot versatec", FILE_COMPL, { (char *)NULL } }, { "plot pnm", FILE_COMPL, { (char *)NULL } }, - { "plow", ARGS_COMPL, {"help", "boundary", "horizon", "jogs", "selection", + { "plow", ARGS_COMPL, {"help", "boundary", "horizon", "jogs", "selection", "straighten", "noboundary", "nojogs", "nostraighten", (char *)NULL} }, { "plow selection", DIRECT_COMPL, { (char *)NULL } }, - { "route", ARGS_COMPL, {"help", "end", "jog", "metal", "netlist", "obstacle", - "origin", "stats", "settings", "steady", "tech", + { "route", ARGS_COMPL, {"help", "end", "jog", "metal", "netlist", "obstacle", + "origin", "stats", "settings", "steady", "tech", "vias", "viamin", (char *)NULL} }, { "route netlist", FILE_COMPL, { (char *)NULL } }, - { "select", ARGS_COMPL, {"help", "more", "less", "area", "visible", "cell", + { "select", ARGS_COMPL, {"help", "more", "less", "area", "visible", "cell", "clear", "save", "box", (char *)NULL} }, { "select save", FILE_COMPL, { (char *)NULL } }, { "select more", ARGS_COMPL, { "area", "visible", "cell", "box", (char *)NULL } }, @@ -236,14 +236,14 @@ static struct cmd_spec { { "select more box", LAYER_COMPL, { (char *)NULL } }, { "select less box", LAYER_COMPL, { (char *)NULL } }, - { "send", ARGS_COMPL, {"netlist", "color", "layout", + { "send", ARGS_COMPL, {"netlist", "color", "layout", #ifdef THREE_D "wind3d", #endif (char *)NULL} }, { "snap", ARGS_COMPL, {"on", "off", (char *)NULL} }, { "tool", ARGS_COMPL, {"box", "wiring", "netlist", "rsim", (char *)NULL} }, - { "wire", ARGS_COMPL, {"help", "horizontal", "leg", "switch", "type", + { "wire", ARGS_COMPL, {"help", "horizontal", "leg", "switch", "type", "vertical", (char *)NULL} }, { "wire type", LAYER_COMPL, { (char *)NULL } }, { "wire switch", LAYER_COMPL, { (char *)NULL } }, @@ -349,7 +349,7 @@ TxDialog(prompt, responses, deflt) return code; } - + /* * ---------------------------------------------------------------------------- * TxSetPrompt -- @@ -373,7 +373,7 @@ TxSetPrompt(ch) #endif - + /* * ---------------------------------------------------------------------------- * TxPrompt -- @@ -409,7 +409,7 @@ TxPrompt() lastPromptChar = txPromptChar; } - + /* * ---------------------------------------------------------------------------- * TxRestorePrompt -- @@ -434,12 +434,12 @@ TxRestorePrompt() } } - + /* * ---------------------------------------------------------------------------- * TxUnPrompt -- * - * Erase the prompt. + * Erase the prompt. * * Results: * None. @@ -511,7 +511,7 @@ TxGetChar() ASSERT(event != NULL, "TxGetChar"); txLastEvent = *event; if (event->txe_button == TX_EOF) { - ch = EOF; + ch = EOF; goto gotone; } if (event->txe_button == TX_CHARACTER) { @@ -535,7 +535,7 @@ gotone: * Instantiation of the readline function *rl_pre_input_hook(), executed * between the prompt and the input (readline v4.1). Prepends the text * of an interactive macro (if non-NULL) to the command line. - * + * * ---------------------------------------------------------------------------- */ int @@ -652,7 +652,7 @@ magic_completion_function(char *text, int start, int end) break; } } - + for (i = 0; i < num_tokens; i++) free(tokens[i]); @@ -1077,7 +1077,7 @@ TxGetLinePrompt(dest, maxChars, prompt) #ifndef MAGIC_WRAPPER - + /* * ---------------------------------------------------------------------------- * TxGetLinePfix: @@ -1086,13 +1086,13 @@ TxGetLinePrompt(dest, maxChars, prompt) * * Results: * A char pointer to the string is returned. - * If an end-of-file is typed, returns (char *) NULL and + * If an end-of-file is typed, returns (char *) NULL and * stores in the string any characters recieved up to that point. * * Side effects: * The input stream is read, and 'dest' is filled in with up to maxChars-1 * characters. Up to maxChars of the 'dest' may be changed during the - * input process, however, since a '\0' is added at the end. There is no + * input process, however, since a '\0' is added at the end. There is no * newline at the end of 'dest'. * ---------------------------------------------------------------------------- */ @@ -1190,7 +1190,7 @@ TxGetLine(dest, maxChars) return TxGetLinePfix(dest, maxChars, NULL); } - + /* * ---------------------------------------------------------------------------- * txGetTermState: @@ -1228,7 +1228,7 @@ txGetTermState(buf) } #endif /* SYSV */ - + /* * ---------------------------------------------------------------------------- * txSetTermState: @@ -1261,7 +1261,7 @@ txSetTermState(buf) } - + /* * ---------------------------------------------------------------------------- * txInitTermRec: @@ -1299,7 +1299,7 @@ txInitTermRec(buf) #endif /* SYSV */ } - + #if defined(SYSV) || defined(CYGWIN) struct termio closeTermState; @@ -1315,7 +1315,7 @@ static bool haveCloseState = FALSE; * * Save the terminal characteristics so they can be restored when * magic leaves. - * + * * * Results: * none. @@ -1351,7 +1351,7 @@ txSaveTerm() #endif /* SYSV */ } - + /* * ---------------------------------------------------------------------------- * TxSetTerminal: @@ -1390,7 +1390,7 @@ TxSetTerminal() } } - + /* * ---------------------------------------------------------------------------- * TxResetTerminal: diff --git a/textio/txMain.c b/textio/txMain.c index 92a241f8..17c9ed52 100644 --- a/textio/txMain.c +++ b/textio/txMain.c @@ -4,16 +4,16 @@ * This module handles output to the text terminal as well as * collecting input and sending the commands to the window package. * - * ********************************************************************* - * * Copyright (C) 1985, 1990 Regents of the University of California. * - * * Permission to use, copy, modify, and distribute this * - * * software and its documentation for any purpose and without * - * * fee is hereby granted, provided that the above copyright * - * * notice appear in all copies. The University of California * - * * makes no representations about the suitability of this * - * * software for any purpose. It is provided "as is" without * - * * express or implied warranty. Export of this software outside * - * * of the United States of America may require an export license. * + * ********************************************************************* + * * Copyright (C) 1985, 1990 Regents of the University of California. * + * * Permission to use, copy, modify, and distribute this * + * * software and its documentation for any purpose and without * + * * fee is hereby granted, provided that the above copyright * + * * notice appear in all copies. The University of California * + * * makes no representations about the suitability of this * + * * software for any purpose. It is provided "as is" without * + * * express or implied warranty. Export of this software outside * + * * of the United States of America may require an export license. * * ********************************************************************* */ @@ -61,7 +61,7 @@ extern char **magic_command_list; #endif - + /* * ---------------------------------------------------------------------------- * TxInit: @@ -75,7 +75,7 @@ extern char **magic_command_list; * Side effects: * misc. * ---------------------------------------------------------------------------- - */ + */ void TxInit() diff --git a/textio/txMore.c b/textio/txMore.c index 1b0bb048..40111ceb 100644 --- a/textio/txMore.c +++ b/textio/txMore.c @@ -2,16 +2,16 @@ * * Routine to pause until user hits `return' * - * ********************************************************************* - * * Copyright (C) 1985, 1990 Regents of the University of California. * - * * Permission to use, copy, modify, and distribute this * - * * software and its documentation for any purpose and without * - * * fee is hereby granted, provided that the above copyright * - * * notice appear in all copies. The University of California * - * * makes no representations about the suitability of this * - * * software for any purpose. It is provided "as is" without * - * * express or implied warranty. Export of this software outside * - * * of the United States of America may require an export license. * + * ********************************************************************* + * * Copyright (C) 1985, 1990 Regents of the University of California. * + * * Permission to use, copy, modify, and distribute this * + * * software and its documentation for any purpose and without * + * * fee is hereby granted, provided that the above copyright * + * * notice appear in all copies. The University of California * + * * makes no representations about the suitability of this * + * * software for any purpose. It is provided "as is" without * + * * express or implied warranty. Export of this software outside * + * * of the United States of America may require an export license. * * ********************************************************************* */ @@ -24,7 +24,7 @@ static char rcsid[] __attribute__ ((unused)) = "$Header: /usr/cvsroot/magic-8.0/ #include "utils/magic.h" - + /* * ---------------------------------------------------------------------------- * diff --git a/textio/txOutput.c b/textio/txOutput.c index a7880118..5813b153 100644 --- a/textio/txOutput.c +++ b/textio/txOutput.c @@ -3,16 +3,16 @@ * * Handles 'stdout' and 'stderr' output. * - * ********************************************************************* - * * Copyright (C) 1985, 1990 Regents of the University of California. * - * * Permission to use, copy, modify, and distribute this * - * * software and its documentation for any purpose and without * - * * fee is hereby granted, provided that the above copyright * - * * notice appear in all copies. The University of California * - * * makes no representations about the suitability of this * - * * software for any purpose. It is provided "as is" without * - * * express or implied warranty. Export of this software outside * - * * of the United States of America may require an export license. * + * ********************************************************************* + * * Copyright (C) 1985, 1990 Regents of the University of California. * + * * Permission to use, copy, modify, and distribute this * + * * software and its documentation for any purpose and without * + * * fee is hereby granted, provided that the above copyright * + * * notice appear in all copies. The University of California * + * * makes no representations about the suitability of this * + * * software for any purpose. It is provided "as is" without * + * * express or implied warranty. Export of this software outside * + * * of the United States of America may require an export license. * * ********************************************************************* */ @@ -53,7 +53,7 @@ FILE * TxMoreFile = NULL; static int txMorePid; static bool txPrintFlag = TRUE; - + /* * ---------------------------------------------------------------------------- * txFprintfBasic: @@ -69,11 +69,11 @@ static bool txPrintFlag = TRUE; * Side effects: * text appears on stdout on the text terminal * - * Note: + * Note: * Many thanks to Paul Chow at Stanford for getting this to run on * a Pyramid machine. * ---------------------------------------------------------------------------- - */ + */ void txFprintfBasic(FILE *f, ...) @@ -87,7 +87,7 @@ txFprintfBasic(FILE *f, ...) va_end(args); } - + /* * ---------------------------------------------------------------------------- * TxPrintf: @@ -103,11 +103,11 @@ txFprintfBasic(FILE *f, ...) * Side effects: * text appears on stdout on the text terminal * - * Note: + * Note: * Many thanks to Paul Chow at Stanford for getting this to run on * a Pyramid machine. * ---------------------------------------------------------------------------- - */ + */ void TxPrintf(char *fmt, ...) @@ -117,7 +117,7 @@ TxPrintf(char *fmt, ...) if (txPrintFlag) { - if (TxMoreFile != NULL) + if (TxMoreFile != NULL) { f = TxMoreFile; } @@ -134,7 +134,7 @@ TxPrintf(char *fmt, ...) va_end(args); TxPrompt(); } - else + else { va_start(args, fmt); Vfprintf(f, fmt, args); @@ -158,7 +158,7 @@ TxPrintf(char *fmt, ...) * None. * * ---------------------------------------------------------------------------- - */ + */ char * TxPrintString(char *fmt, ...) @@ -193,7 +193,7 @@ TxPrintString(char *fmt, ...) return outstr; } - + /* * ---------------------------------------------------------------------------- * TxPrintOn -- @@ -204,7 +204,7 @@ TxPrintString(char *fmt, ...) * Previous value of flag. * * ---------------------------------------------------------------------------- - */ + */ bool TxPrintOn() @@ -212,11 +212,11 @@ TxPrintOn() bool oldValue = txPrintFlag; txPrintFlag = TRUE; - + return oldValue; } - + /* * ---------------------------------------------------------------------------- * TxPrintOff -- @@ -227,7 +227,7 @@ TxPrintOn() * Previous value of flag. * * ---------------------------------------------------------------------------- - */ + */ bool TxPrintOff() @@ -241,7 +241,7 @@ TxPrintOff() #ifndef MAGIC_WRAPPER - + /* * ---------------------------------------------------------------------------- * TxFlush -- @@ -252,7 +252,7 @@ TxPrintOff() * None. * * ---------------------------------------------------------------------------- - */ + */ void TxFlushErr() @@ -279,7 +279,7 @@ TxFlush() #endif - + /* * ---------------------------------------------------------------------------- * TxError: @@ -295,7 +295,7 @@ TxFlush() * Side effects: * text appears on stderr on the text terminal * - * Note: + * Note: * Many thanks to Paul Chow at Stanford for getting this to run on * a Pyramid machine. * ---------------------------------------------------------------------------- @@ -308,7 +308,7 @@ TxError(char *fmt, ...) FILE *f; TxFlushOut(); - if (TxMoreFile != NULL) + if (TxMoreFile != NULL) f = TxMoreFile; else f = stderr; @@ -328,7 +328,7 @@ TxError(char *fmt, ...) #ifndef MAGIC_WRAPPER - + /* * ---------------------------------------------------------------------------- * @@ -396,7 +396,7 @@ TxUseMore() char *argv[100]; close(pipeEnds[1]); dup2(pipeEnds[0], 0); - if ((pagername = strrchr(pagerpath, '/')) != (char *) 0) + if ((pagername = strrchr(pagerpath, '/')) != (char *) 0) pagername++; else pagername = pagerpath; @@ -410,7 +410,7 @@ TxUseMore() /* This is the parent process. Close the input descriptor and make * an official FILE for the output descriptor. */ - + close(pipeEnds[0]); TxMoreFile = fdopen(pipeEnds[1], "w"); @@ -418,7 +418,7 @@ done: if (useenv == NULL) freeMagic(pagerpath); return; } - + /* * ---------------------------------------------------------------------------- * @@ -452,7 +452,7 @@ TxStopMore() * created for other purposes at the same time, but I can't see * any way around it. */ - + WaitPid (txMorePid, 0); txMorePid = 0; } diff --git a/textio/txcommands.h b/textio/txcommands.h index 1cc7a3b3..d1834ba0 100644 --- a/textio/txcommands.h +++ b/textio/txcommands.h @@ -3,16 +3,16 @@ * * Declarations for textio command routines. * - * ********************************************************************* - * * Copyright (C) 1985, 1990 Regents of the University of California. * - * * Permission to use, copy, modify, and distribute this * - * * software and its documentation for any purpose and without * - * * fee is hereby granted, provided that the above copyright * - * * notice appear in all copies. The University of California * - * * makes no representations about the suitability of this * - * * software for any purpose. It is provided "as is" without * - * * express or implied warranty. Export of this software outside * - * * of the United States of America may require an export license. * + * ********************************************************************* + * * Copyright (C) 1985, 1990 Regents of the University of California. * + * * Permission to use, copy, modify, and distribute this * + * * software and its documentation for any purpose and without * + * * fee is hereby granted, provided that the above copyright * + * * notice appear in all copies. The University of California * + * * makes no representations about the suitability of this * + * * software for any purpose. It is provided "as is" without * + * * express or implied warranty. Export of this software outside * + * * of the United States of America may require an export license. * * ********************************************************************* * * rcsid $Header: /usr/cvsroot/magic-8.0/textio/txcommands.h,v 1.1.1.1 2008/02/03 20:43:50 tim Exp $ @@ -24,8 +24,8 @@ #include "utils/magic.h" #include "utils/geometry.h" -/* Structure of one Magic command. All commands are in the same format. - * Commands are tagged with the point and window at which the command was +/* Structure of one Magic command. All commands are in the same format. + * Commands are tagged with the point and window at which the command was * invoked. */ @@ -41,12 +41,12 @@ typedef struct { /* A command -- either a button push or * a textual command. */ Point tx_p; /* The location of the pointing device - * when this command was invoked. + * when this command was invoked. */ int tx_button; /* The event type (button number). * See below. */ - int tx_buttonAction; /* The action of the button (if any), such as + int tx_buttonAction; /* The action of the button (if any), such as * TX_BUTTON_UP, DOWN */ int tx_argc; /* The number of textual command words, @@ -62,7 +62,7 @@ typedef struct { /* A command -- either a button push or * (See windows.h for window IDs.) */ char tx_argstring[TX_MAX_CMDLEN]; - /* The storage used for the command line. + /* The storage used for the command line. * Tx_argv[] points into this. */ } TxCommand; @@ -72,11 +72,11 @@ typedef struct { /* A command -- either a button push or * character typed. */ -typedef struct { +typedef struct { Point txe_p; /* The point at which this action took place.*/ - int txe_wid; /* The window that the event occured in (see + int txe_wid; /* The window that the event occured in (see * windows.h for details, may be defaulted to - * WIND_UNKNOWN_WINDOW by some low-level + * WIND_UNKNOWN_WINDOW by some low-level * device drivers). */ int txe_button; /* The event type. */ @@ -84,8 +84,8 @@ typedef struct { int txe_ch; /* The character typed, if a character. */ } TxInputEvent; -/* Event types (button numbers) in the above structures, carefully chosen so - * there is 1 bit per event (as they are used elsewhere in masks). +/* Event types (button numbers) in the above structures, carefully chosen so + * there is 1 bit per event (as they are used elsewhere in masks). */ #define TX_CHARACTER 0x00 #define TX_NO_BUTTON 0x00 /* for backward compat. only */ @@ -110,7 +110,7 @@ extern TxCommand TxCurCommand; /* Button actions for the above structures. */ -#define TX_BUTTON_DOWN 0 +#define TX_BUTTON_DOWN 0 #define TX_BUTTON_UP 1 #define TX_KEY_DOWN 2 @@ -120,8 +120,8 @@ extern TxCommand *TxDeviceStdin(); extern TxCommand *TxButtonMaskToCommand(); extern void TxAddInputDevice(); /* Can read multiple file desc. */ extern void TxAdd1InputDevice(); /* Can read only 1 file desc. */ -extern void TxDeleteInputDevice(); -extern void TxDelete1InputDevice(); +extern void TxDeleteInputDevice(); +extern void TxDelete1InputDevice(); /* Routines to manipulate the current point. Only really used for command * scripts. diff --git a/tiles/search.c b/tiles/search.c index bd3bd4ad..52a892ca 100644 --- a/tiles/search.c +++ b/tiles/search.c @@ -3,16 +3,16 @@ * * Point searching. * - * ********************************************************************* - * * Copyright (C) 1985, 1990 Regents of the University of California. * - * * Permission to use, copy, modify, and distribute this * - * * software and its documentation for any purpose and without * - * * fee is hereby granted, provided that the above copyright * - * * notice appear in all copies. The University of California * - * * makes no representations about the suitability of this * - * * software for any purpose. It is provided "as is" without * - * * express or implied warranty. Export of this software outside * - * * of the United States of America may require an export license. * + * ********************************************************************* + * * Copyright (C) 1985, 1990 Regents of the University of California. * + * * Permission to use, copy, modify, and distribute this * + * * software and its documentation for any purpose and without * + * * fee is hereby granted, provided that the above copyright * + * * notice appear in all copies. The University of California * + * * makes no representations about the suitability of this * + * * software for any purpose. It is provided "as is" without * + * * express or implied warranty. Export of this software outside * + * * of the United States of America may require an export license. * * ********************************************************************* */ @@ -26,7 +26,7 @@ static char rcsid[] __attribute__ ((unused)) = "$Header: /usr/cvsroot/magic-8.0/ #include "utils/geometry.h" #include "tiles/tile.h" - + /* * -------------------------------------------------------------------- * diff --git a/tiles/tile.c b/tiles/tile.c index e08cb782..00b7d566 100644 --- a/tiles/tile.c +++ b/tiles/tile.c @@ -3,16 +3,16 @@ * * Basic tile manipulation * - * ********************************************************************* - * * Copyright (C) 1985, 1990 Regents of the University of California. * - * * Permission to use, copy, modify, and distribute this * - * * software and its documentation for any purpose and without * - * * fee is hereby granted, provided that the above copyright * - * * notice appear in all copies. The University of California * - * * makes no representations about the suitability of this * - * * software for any purpose. It is provided "as is" without * - * * express or implied warranty. Export of this software outside * - * * of the United States of America may require an export license. * + * ********************************************************************* + * * Copyright (C) 1985, 1990 Regents of the University of California. * + * * Permission to use, copy, modify, and distribute this * + * * software and its documentation for any purpose and without * + * * fee is hereby granted, provided that the above copyright * + * * notice appear in all copies. The University of California * + * * makes no representations about the suitability of this * + * * software for any purpose. It is provided "as is" without * + * * express or implied warranty. Export of this software outside * + * * of the United States of America may require an export license. * * ********************************************************************* */ @@ -69,7 +69,7 @@ static void *_block_end = NULL; #endif /* HAVE_SYS_MMAN_H */ - + /* * -------------------------------------------------------------------- * @@ -162,7 +162,7 @@ TiNewPlane(tile) newplane->pl_hint = tile; return (newplane); } - + /* * -------------------------------------------------------------------- * @@ -190,7 +190,7 @@ TiFreePlane(plane) TiFree(plane->pl_bottom); freeMagic((char *) plane); } - + /* * -------------------------------------------------------------------- * @@ -217,7 +217,7 @@ TiToRect(tile, rect) rect->r_ybot = BOTTOM(tile); rect->r_ytop = TOP(tile); } - + /* * -------------------------------------------------------------------- * @@ -289,7 +289,7 @@ TiSplitX(tile, x) return (newtile); } - + /* * -------------------------------------------------------------------- * @@ -361,7 +361,7 @@ TiSplitY(tile, y) return (newtile); } - + /* * -------------------------------------------------------------------- * @@ -424,7 +424,7 @@ TiSplitX_Left(tile, x) return (newtile); } - + /* * -------------------------------------------------------------------- * @@ -487,7 +487,7 @@ TiSplitY_Bottom(tile, y) return (newtile); } - + /* * -------------------------------------------------------------------- * @@ -572,7 +572,7 @@ TiJoinX(tile1, tile2, plane) plane->pl_hint = tile1; TiFree(tile2); } - + /* * -------------------------------------------------------------------- * @@ -666,7 +666,7 @@ mmapTileStore() { int prot = PROT_READ | PROT_WRITE; int flags = MAP_ANON | MAP_PRIVATE; - unsigned long map_len = TILE_STORE_BLOCK_SIZE; + unsigned long map_len = TILE_STORE_BLOCK_SIZE; _block_begin = mmap(NULL, map_len, prot, flags, -1, 0); if (_block_begin == MAP_FAILED) @@ -689,7 +689,7 @@ getTileFromTileStore() mmapTileStore(); } - /* Check if we can get the tile from the + /* Check if we can get the tile from the * Free list */ @@ -702,13 +702,13 @@ getTileFromTileStore() /* Get it from the mmap */ - if (((unsigned long)_current_ptr + sizeof(Tile)) + if (((unsigned long)_current_ptr + sizeof(Tile)) > (unsigned long)_block_end) { mmapTileStore(); } _current_ptr = (void *)((unsigned long)_current_ptr + sizeof(Tile)); - + if ((unsigned long)_current_ptr > (unsigned long) _block_end) { fprintf(stderr,"TileStore: internal assertion failure..."); diff --git a/tiles/tile.h b/tiles/tile.h index 3be991b7..59c357d1 100644 --- a/tiles/tile.h +++ b/tiles/tile.h @@ -5,16 +5,16 @@ * The definitions in this file are all that is visible to * the Ti (tile) modules. * - * ********************************************************************* - * * Copyright (C) 1985, 1990 Regents of the University of California. * - * * Permission to use, copy, modify, and distribute this * - * * software and its documentation for any purpose and without * - * * fee is hereby granted, provided that the above copyright * - * * notice appear in all copies. The University of California * - * * makes no representations about the suitability of this * - * * software for any purpose. It is provided "as is" without * - * * express or implied warranty. Export of this software outside * - * * of the United States of America may require an export license. * + * ********************************************************************* + * * Copyright (C) 1985, 1990 Regents of the University of California. * + * * Permission to use, copy, modify, and distribute this * + * * software and its documentation for any purpose and without * + * * fee is hereby granted, provided that the above copyright * + * * notice appear in all copies. The University of California * + * * makes no representations about the suitability of this * + * * software for any purpose. It is provided "as is" without * + * * express or implied warranty. Export of this software outside * + * * of the United States of America may require an export license. * * ********************************************************************* * * rcsid "$Header: /usr/cvsroot/magic-8.0/tiles/tile.h,v 1.3 2010/06/24 12:37:57 tim Exp $" @@ -224,7 +224,7 @@ extern Tile *TiSrPoint(Tile *, Plane *, Point *); #define SplitDirection(tp) ((TileType)(spointertype)((tp)->ti_body) & TT_DIRECTION ? 1 : 0) #define SplitSide(tp) ((TileType)(spointertype)((tp)->ti_body) & TT_SIDE ? 1 : 0) #define IsSplit(tp) ((TileType)(spointertype)((tp)->ti_body) & TT_DIAGONAL ? TRUE : FALSE) - + #define SplitLeftType(tp) ((TileType)(spointertype)((tp)->ti_body) & TT_LEFTMASK) #define SplitRightType(tp) (((TileType)(spointertype)((tp)->ti_body) & TT_RIGHTMASK) >> 14) #define SplitTopType(tp) (((TileType)(spointertype)((tp)->ti_body) & TT_DIRECTION) ? \ @@ -236,7 +236,7 @@ extern Tile *TiSrPoint(Tile *, Plane *, Point *); #define TiGetRightType(tp) ((IsSplit(tp)) ? SplitRightType(tp) : TiGetType(tp)) #define TiGetTopType(tp) ((IsSplit(tp)) ? SplitTopType(tp) : TiGetType(tp)) #define TiGetBottomType(tp) ((IsSplit(tp)) ? SplitBottomType(tp) : TiGetType(tp)) - + #define TiGetBody(tp) ((tp)->ti_body) /* See diagnostic subroutine version in tile.c */ #define TiSetBody(tp, b) ((tp)->ti_body = (ClientData)(pointertype) (b)) @@ -256,10 +256,10 @@ void TiFree(Tile *); (BOTTOM(tile) <= (point)->p_y ) && \ ((point)->p_y <= TOP(tile) )) -/* The four macros below are for finding next tile RIGHT, UP, LEFT or DOWN +/* The four macros below are for finding next tile RIGHT, UP, LEFT or DOWN * from current tile at a given coordinate value. * - * For example, NEXT_TILE_RIGHT points tResult to tile to right of t + * For example, NEXT_TILE_RIGHT points tResult to tile to right of t * at y-coordinate y. */ @@ -274,7 +274,7 @@ void TiFree(Tile *); #define NEXT_TILE_LEFT(tResult, t, y) \ for ((tResult) = BL(t); TOP(tResult) <= (y); (tResult) = RT(tResult)) \ /* Nothing */; - + #define NEXT_TILE_DOWN(tResult, t, x) \ for ((tResult) = LB(t); RIGHT(tResult) <= (x); (tResult) = TR(tResult)) \ /* Nothing */; diff --git a/utils/LIBdbio.c b/utils/LIBdbio.c index b3e4a0e8..36e619b3 100644 --- a/utils/LIBdbio.c +++ b/utils/LIBdbio.c @@ -4,16 +4,16 @@ * File that only goes in libmagicutils.a to define procedures * referenced from dbio that might not be defined elsewhere. * - * ********************************************************************* - * * Copyright (C) 1985, 1990 Regents of the University of California. * - * * Permission to use, copy, modify, and distribute this * - * * software and its documentation for any purpose and without * - * * fee is hereby granted, provided that the above copyright * - * * notice appear in all copies. The University of California * - * * makes no representations about the suitability of this * - * * software for any purpose. It is provided "as is" without * - * * express or implied warranty. Export of this software outside * - * * of the United States of America may require an export license. * + * ********************************************************************* + * * Copyright (C) 1985, 1990 Regents of the University of California. * + * * Permission to use, copy, modify, and distribute this * + * * software and its documentation for any purpose and without * + * * fee is hereby granted, provided that the above copyright * + * * notice appear in all copies. The University of California * + * * makes no representations about the suitability of this * + * * software for any purpose. It is provided "as is" without * + * * express or implied warranty. Export of this software outside * + * * of the United States of America may require an export license. * * ********************************************************************* */ @@ -26,7 +26,7 @@ static char rcsid[] = "$Header: /usr/cvsroot/magic-8.0/utils/LIBdbio.c,v 1.1.1.1 #include "utils/magic.h" - + /* * ---------------------------------------------------------------------------- * diff --git a/utils/LIBmain.c b/utils/LIBmain.c index f9da78c2..20cff26d 100644 --- a/utils/LIBmain.c +++ b/utils/LIBmain.c @@ -4,16 +4,16 @@ * File that only goes in libmagicutils.a to define procedures * referenced from main that might not be defined elsewhere. * - * ********************************************************************* - * * Copyright (C) 1985, 1990 Regents of the University of California. * - * * Permission to use, copy, modify, and distribute this * - * * software and its documentation for any purpose and without * - * * fee is hereby granted, provided that the above copyright * - * * notice appear in all copies. The University of California * - * * makes no representations about the suitability of this * - * * software for any purpose. It is provided "as is" without * - * * express or implied warranty. Export of this software outside * - * * of the United States of America may require an export license. * + * ********************************************************************* + * * Copyright (C) 1985, 1990 Regents of the University of California. * + * * Permission to use, copy, modify, and distribute this * + * * software and its documentation for any purpose and without * + * * fee is hereby granted, provided that the above copyright * + * * notice appear in all copies. The University of California * + * * makes no representations about the suitability of this * + * * software for any purpose. It is provided "as is" without * + * * express or implied warranty. Export of this software outside * + * * of the United States of America may require an export license. * * ********************************************************************* */ @@ -24,7 +24,7 @@ static char rcsid[] = "$Header: /usr/cvsroot/magic-8.0/utils/LIBmain.c,v 1.1.1.1 #include #include - + /* * ---------------------------------------------------------------------------- * @@ -50,7 +50,7 @@ MainExit(code) char AbortMessage[500] = ""; - + /* * ---------------------------------------------------------------------------- * diff --git a/utils/LIBtextio.c b/utils/LIBtextio.c index f23cbfaf..e8fc279d 100644 --- a/utils/LIBtextio.c +++ b/utils/LIBtextio.c @@ -4,16 +4,16 @@ * File that only goes in libmagicutils.a to define procedures * referenced from textio that might not be defined elsewhere. * - * ********************************************************************* - * * Copyright (C) 1985, 1990 Regents of the University of California. * - * * Permission to use, copy, modify, and distribute this * - * * software and its documentation for any purpose and without * - * * fee is hereby granted, provided that the above copyright * - * * notice appear in all copies. The University of California * - * * makes no representations about the suitability of this * - * * software for any purpose. It is provided "as is" without * - * * express or implied warranty. Export of this software outside * - * * of the United States of America may require an export license. * + * ********************************************************************* + * * Copyright (C) 1985, 1990 Regents of the University of California. * + * * Permission to use, copy, modify, and distribute this * + * * software and its documentation for any purpose and without * + * * fee is hereby granted, provided that the above copyright * + * * notice appear in all copies. The University of California * + * * makes no representations about the suitability of this * + * * software for any purpose. It is provided "as is" without * + * * express or implied warranty. Export of this software outside * + * * of the United States of America may require an export license. * * ********************************************************************* */ @@ -23,7 +23,7 @@ static char rcsid[] = "$Header: /usr/cvsroot/magic-8.0/utils/LIBtextio.c,v 1.1.1 #include #include - + /* * ---------------------------------------------------------------------------- * @@ -48,7 +48,7 @@ TxGetLine(buf, size) return (fgets(buf, size, stdin)); } - + /* * ---------------------------------------------------------------------------- * @@ -78,7 +78,7 @@ TxFlush() (void) fflush(stdout); } - + /* * ---------------------------------------------------------------------------- * @@ -99,7 +99,7 @@ void TxError(char *fmt, ...) { va_list ap; - + (void) fflush(stdout); (void) fflush(stderr); va_start(ap, fmt); @@ -107,7 +107,7 @@ TxError(char *fmt, ...) va_end(ap); (void) fflush(stderr); } - + /* * ---------------------------------------------------------------------------- @@ -129,7 +129,7 @@ void TxPrintf(char *fmt, ...) { va_list ap; - + (void) fflush(stderr); (void) fflush(stdout); va_start(ap, fmt); @@ -137,5 +137,5 @@ TxPrintf(char *fmt, ...) va_end(ap); (void) fflush(stdout); } - + diff --git a/utils/args.c b/utils/args.c index efea39cd..cd62b8d0 100644 --- a/utils/args.c +++ b/utils/args.c @@ -3,16 +3,16 @@ * * Procedures to assist in command-line argument processing. * - * ********************************************************************* - * * Copyright (C) 1985, 1990 Regents of the University of California. * - * * Permission to use, copy, modify, and distribute this * - * * software and its documentation for any purpose and without * - * * fee is hereby granted, provided that the above copyright * - * * notice appear in all copies. The University of California * - * * makes no representations about the suitability of this * - * * software for any purpose. It is provided "as is" without * - * * express or implied warranty. Export of this software outside * - * * of the United States of America may require an export license. * + * ********************************************************************* + * * Copyright (C) 1985, 1990 Regents of the University of California. * + * * Permission to use, copy, modify, and distribute this * + * * software and its documentation for any purpose and without * + * * fee is hereby granted, provided that the above copyright * + * * notice appear in all copies. The University of California * + * * makes no representations about the suitability of this * + * * software for any purpose. It is provided "as is" without * + * * express or implied warranty. Export of this software outside * + * * of the United States of America may require an export license. * * ********************************************************************* */ @@ -24,7 +24,7 @@ static char rcsid[] __attribute__ ((unused)) = "$Header: /usr/cvsroot/magic-8.0/ #include "utils/magic.h" #include "utils/utils.h" - + /* * ---------------------------------------------------------------------------- * diff --git a/utils/child.c b/utils/child.c index 3898f52c..734a6eb5 100644 --- a/utils/child.c +++ b/utils/child.c @@ -119,7 +119,7 @@ delete_from_list (pid) int pid; { struct Wait_List *l, *prev; - + prev = NULL; l = wl; while (l) { @@ -136,7 +136,7 @@ delete_from_list (pid) } } - + /*------------------------------------------------------------------------ * diff --git a/utils/dqueue.c b/utils/dqueue.c index ae81cb0b..b3ab7e87 100644 --- a/utils/dqueue.c +++ b/utils/dqueue.c @@ -3,16 +3,16 @@ * * Routines for double ended queues. See 'dqueue.h'. * - * ********************************************************************* - * * Copyright (C) 1985, 1990 Regents of the University of California. * - * * Permission to use, copy, modify, and distribute this * - * * software and its documentation for any purpose and without * - * * fee is hereby granted, provided that the above copyright * - * * notice appear in all copies. The University of California * - * * makes no representations about the suitability of this * - * * software for any purpose. It is provided "as is" without * - * * express or implied warranty. Export of this software outside * - * * of the United States of America may require an export license. * + * ********************************************************************* + * * Copyright (C) 1985, 1990 Regents of the University of California. * + * * Permission to use, copy, modify, and distribute this * + * * software and its documentation for any purpose and without * + * * fee is hereby granted, provided that the above copyright * + * * notice appear in all copies. The University of California * + * * makes no representations about the suitability of this * + * * software for any purpose. It is provided "as is" without * + * * express or implied warranty. Export of this software outside * + * * of the United States of America may require an export license. * * ********************************************************************* */ @@ -76,7 +76,7 @@ void DQFree(q) DQueue *q; { - freeMagic((char *) q->dq_data); + freeMagic((char *) q->dq_data); } /* @@ -101,7 +101,7 @@ DQPushFront(q, elem) ClientData elem; { if (q->dq_size == q->dq_maxSize) DQChangeSize(q, 2 * q->dq_maxSize); - q->dq_data[q->dq_front] = elem; + q->dq_data[q->dq_front] = elem; q->dq_front--; if (q->dq_front < 0) q->dq_front = q->dq_maxSize; q->dq_size++; @@ -113,7 +113,7 @@ DQPushRear(q, elem) ClientData elem; { if (q->dq_size == q->dq_maxSize) DQChangeSize(q, 2 * q->dq_maxSize); - q->dq_data[q->dq_rear] = elem; + q->dq_data[q->dq_rear] = elem; q->dq_rear++; if (q->dq_rear > q->dq_maxSize) q->dq_rear = 0; q->dq_size++; @@ -184,7 +184,7 @@ DQChangeSize(q, newSize) if (newSize < q->dq_size) newSize = q->dq_size; DQInit(&newq, newSize); DQCopy(&newq, q); - freeMagic((char *) q->dq_data); + freeMagic((char *) q->dq_data); q->dq_data = newq.dq_data; q->dq_maxSize = newq.dq_maxSize; q->dq_front = newq.dq_front; diff --git a/utils/dqueue.h b/utils/dqueue.h index a877b7b7..a64c73e6 100644 --- a/utils/dqueue.h +++ b/utils/dqueue.h @@ -6,16 +6,16 @@ * The head of the queue grows towards lower addresses, and the tail grows * up. The array is treated like a cirular ring of size dq_maxSize. * - * ********************************************************************* - * * Copyright (C) 1985, 1990 Regents of the University of California. * - * * Permission to use, copy, modify, and distribute this * - * * software and its documentation for any purpose and without * - * * fee is hereby granted, provided that the above copyright * - * * notice appear in all copies. The University of California * - * * makes no representations about the suitability of this * - * * software for any purpose. It is provided "as is" without * - * * express or implied warranty. Export of this software outside * - * * of the United States of America may require an export license. * + * ********************************************************************* + * * Copyright (C) 1985, 1990 Regents of the University of California. * + * * Permission to use, copy, modify, and distribute this * + * * software and its documentation for any purpose and without * + * * fee is hereby granted, provided that the above copyright * + * * notice appear in all copies. The University of California * + * * makes no representations about the suitability of this * + * * software for any purpose. It is provided "as is" without * + * * express or implied warranty. Export of this software outside * + * * of the United States of America may require an export license. * * ********************************************************************* * * rcsid "$Header: /usr/cvsroot/magic-8.0/utils/dqueue.h,v 1.1.1.1 2008/02/03 20:43:50 tim Exp $" @@ -27,7 +27,7 @@ #include "utils/magic.h" -/* The dqueue structure, to be manipulated only by the +/* The dqueue structure, to be manipulated only by the * procedures declared in this file. */ typedef struct { diff --git a/utils/finddisp.c b/utils/finddisp.c index 33255492..034f0590 100644 --- a/utils/finddisp.c +++ b/utils/finddisp.c @@ -1,16 +1,16 @@ /* * finddisplay.c - * - * ********************************************************************* - * * Copyright (C) 1985, 1990 Regents of the University of California. * - * * Permission to use, copy, modify, and distribute this * - * * software and its documentation for any purpose and without * - * * fee is hereby granted, provided that the above copyright * - * * notice appear in all copies. The University of California * - * * makes no representations about the suitability of this * - * * software for any purpose. It is provided "as is" without * - * * express or implied warranty. Export of this software outside * - * * of the United States of America may require an export license. * + * ********************************************************************* + * * Copyright (C) 1985, 1990 Regents of the University of California. * + * * Permission to use, copy, modify, and distribute this * + * * software and its documentation for any purpose and without * + * * fee is hereby granted, provided that the above copyright * + * * notice appear in all copies. The University of California * + * * makes no representations about the suitability of this * + * * software for any purpose. It is provided "as is" without * + * * express or implied warranty. Export of this software outside * + * * of the United States of America may require an export license. * * ********************************************************************* * * This file contains a single routine that will find the correct @@ -34,7 +34,7 @@ static char rcsid[] __attribute__ ((unused)) = "$Header: /usr/cvsroot/magic-8.0/ extern char *ttyname(); - + /* * ---------------------------------------------------------------------------- * FindDisplay -- @@ -80,7 +80,7 @@ FindDisplay(tty, file, path, pDisplayPort, pTabletPort, pDisType, pMonType) char **pDisplayPort; /* Will be filled in with the name of the * port for the graphics display. */ - char **pTabletPort; /* Will be filled in with the name of the + char **pTabletPort; /* Will be filled in with the name of the * tablet. */ char **pDisType; /* Will be filled in with the display type. */ char **pMonType; /* Will be filled in with the monitor type. */ diff --git a/utils/flock.c b/utils/flock.c index 5437d4c4..8aba86e8 100644 --- a/utils/flock.c +++ b/utils/flock.c @@ -69,7 +69,7 @@ * modified the file right after opening. However, this rare condition * is unlikely to be a serious problem, and prevents a process from * having to hold open many file descriptors. - * + * *------------------------------------------------------------------------- */ @@ -105,7 +105,7 @@ FILE *flock_open(filename, mode, is_locked) /* a normal fopen() and return. */ if (is_locked == NULL) return fopen(filename, mode); - + /* Diagnostic */ /* TxPrintf("Opening file <%s>\n", filename); */ @@ -114,7 +114,7 @@ FILE *flock_open(filename, mode, is_locked) { if (is_locked) *is_locked = TRUE; f = fopen(filename, "r"); - goto done; + goto done; } fl.l_len = 0; @@ -130,7 +130,7 @@ FILE *flock_open(filename, mode, is_locked) goto done; } fclose(tmp); - + if (fl.l_type == F_UNLCK) { fl.l_len = 0; diff --git a/utils/flsbuf.c b/utils/flsbuf.c index 33b46c36..c7143408 100644 --- a/utils/flsbuf.c +++ b/utils/flsbuf.c @@ -2,16 +2,16 @@ /* flsbuf.c -- * - * ********************************************************************* - * * Copyright (C) 1985, 1990 Regents of the University of California. * - * * Permission to use, copy, modify, and distribute this * - * * software and its documentation for any purpose and without * - * * fee is hereby granted, provided that the above copyright * - * * notice appear in all copies. The University of California * - * * makes no representations about the suitability of this * - * * software for any purpose. It is provided "as is" without * - * * express or implied warranty. Export of this software outside * - * * of the United States of America may require an export license. * + * ********************************************************************* + * * Copyright (C) 1985, 1990 Regents of the University of California. * + * * Permission to use, copy, modify, and distribute this * + * * software and its documentation for any purpose and without * + * * fee is hereby granted, provided that the above copyright * + * * notice appear in all copies. The University of California * + * * makes no representations about the suitability of this * + * * software for any purpose. It is provided "as is" without * + * * express or implied warranty. Export of this software outside * + * * of the United States of America may require an export license. * * ********************************************************************* * * This file is a modified version of the standard system diff --git a/utils/fraction.c b/utils/fraction.c index 50f014a6..d5ace09b 100644 --- a/utils/fraction.c +++ b/utils/fraction.c @@ -1,16 +1,16 @@ /* * fraction.c - * - * ********************************************************************* - * * Copyright (C) 1985, 1990 Regents of the University of California. * - * * Permission to use, copy, modify, and distribute this * - * * software and its documentation for any purpose and without * - * * fee is hereby granted, provided that the above copyright * - * * notice appear in all copies. The University of California * - * * makes no representations about the suitability of this * - * * software for any purpose. It is provided "as is" without * - * * express or implied warranty. Export of this software outside * - * * of the United States of America may require an export license. * + * ********************************************************************* + * * Copyright (C) 1985, 1990 Regents of the University of California. * + * * Permission to use, copy, modify, and distribute this * + * * software and its documentation for any purpose and without * + * * fee is hereby granted, provided that the above copyright * + * * notice appear in all copies. The University of California * + * * makes no representations about the suitability of this * + * * software for any purpose. It is provided "as is" without * + * * express or implied warranty. Export of this software outside * + * * of the United States of America may require an export license. * * ********************************************************************* * * This file contains procedures for handling fractions @@ -80,7 +80,7 @@ FindGCF(a, b) */ void -ReduceFraction(n, d) +ReduceFraction(n, d) int *n, *d; { int c; diff --git a/utils/geofast.h b/utils/geofast.h index 78aaa9e1..1af24db1 100644 --- a/utils/geofast.h +++ b/utils/geofast.h @@ -1,16 +1,16 @@ /* * geofast.h -- * - * ********************************************************************* - * * Copyright (C) 1985, 1990 Regents of the University of California. * - * * Permission to use, copy, modify, and distribute this * - * * software and its documentation for any purpose and without * - * * fee is hereby granted, provided that the above copyright * - * * notice appear in all copies. The University of California * - * * makes no representations about the suitability of this * - * * software for any purpose. It is provided "as is" without * - * * express or implied warranty. Export of this software outside * - * * of the United States of America may require an export license. * + * ********************************************************************* + * * Copyright (C) 1985, 1990 Regents of the University of California. * + * * Permission to use, copy, modify, and distribute this * + * * software and its documentation for any purpose and without * + * * fee is hereby granted, provided that the above copyright * + * * notice appear in all copies. The University of California * + * * makes no representations about the suitability of this * + * * software for any purpose. It is provided "as is" without * + * * express or implied warranty. Export of this software outside * + * * of the United States of America may require an export license. * * ********************************************************************* * * This file contains macros for fast geometrical operations: diff --git a/utils/geometry.c b/utils/geometry.c index 7821da83..faabe9d3 100644 --- a/utils/geometry.c +++ b/utils/geometry.c @@ -1,15 +1,15 @@ /* geometry.c -- * - * ********************************************************************* - * * Copyright (C) 1985, 1990 Regents of the University of California. * - * * Permission to use, copy, modify, and distribute this * - * * software and its documentation for any purpose and without * - * * fee is hereby granted, provided that the above copyright * - * * notice appear in all copies. The University of California * - * * makes no representations about the suitability of this * - * * software for any purpose. It is provided "as is" without * - * * express or implied warranty. Export of this software outside * - * * of the United States of America may require an export license. * + * ********************************************************************* + * * Copyright (C) 1985, 1990 Regents of the University of California. * + * * Permission to use, copy, modify, and distribute this * + * * software and its documentation for any purpose and without * + * * fee is hereby granted, provided that the above copyright * + * * notice appear in all copies. The University of California * + * * makes no representations about the suitability of this * + * * software for any purpose. It is provided "as is" without * + * * express or implied warranty. Export of this software outside * + * * of the United States of America may require an export license. * * ********************************************************************* * * This file contains a bunch of utility routines for manipulating @@ -78,7 +78,7 @@ global Rect GeoNullRect = { 0, 0, 0, 0 }; global Rect GeoInvertedRect = { 0, 0, -1, -1 }; global Point GeoOrigin = { 0, 0 }; - + /*------------------------------------------------------------------- * GeoTransPoint -- * Transforms a point from one coordinate system to another. @@ -188,7 +188,7 @@ GeoTransAngle(t, a) return a; } - + /*------------------------------------------------------------------- * GeoTransRect -- * Transforms a rectangle from one coordinate system to another. @@ -243,7 +243,7 @@ GeoTransRect(t, r1, r2) r2->r_ytop = y1; } } - + /*------------------------------------------------------------------- * GeoTranslateTrans -- * Translate a transform by the indicated (x, y) amount. @@ -270,7 +270,7 @@ GeoTranslateTrans(trans1, x, y, trans2) trans2->t_c = trans1->t_c + x; trans2->t_f = trans1->t_f + y; } - + /*------------------------------------------------------------------- * GeoTransTranslate -- * Transform a translation by the indicated (x, y) amount. @@ -304,7 +304,7 @@ GeoTransTranslate(x, y, trans1, trans2) trans2->t_f = x*trans1->t_d + y*trans1->t_e + trans1->t_f; } - + /*------------------------------------------------------------------- * GeoTransTrans -- * This routine transforms a transform. @@ -332,7 +332,7 @@ GeoTransTrans(first, second, net) net->t_f = first->t_c*second->t_d + first->t_f*second->t_e + second->t_f; } - + /*------------------------------------------------------------------- * GeoNameToPos -- * Map the name of a position into an integer position parameter. @@ -443,7 +443,7 @@ GeoNameToPos(name, manhattan, verbose) return (pos); } - + /* * ---------------------------------------------------------------------------- * @@ -478,7 +478,7 @@ GeoPosToName(pos) default: return("*ILLEGAL*"); } } - + /*------------------------------------------------------------------- * GeoTransPos -- * This routine computes the transform of a relative position. @@ -530,7 +530,7 @@ GeoTransPos(t, pos) return pos; } - + /*------------------------------------------------------------------- * GeoInvertTrans -- * This routine computes the inverse of a transform. @@ -564,7 +564,7 @@ GeoInvertTrans(t, inverse) GeoTransTrans(&t2, &t3, inverse); } - + /*------------------------------------------------------------------- * GeoInclude -- * This routine includes one rectangle into another by expanding @@ -591,7 +591,7 @@ GeoInclude(src, dst) *dst = *src; return TRUE; } - + value = FALSE; if (dst->r_xbot > src->r_xbot) { @@ -616,7 +616,7 @@ GeoInclude(src, dst) return value; } - + /*------------------------------------------------------------------- * GeoIncludeAll -- * This routine includes one rectangle into another by expanding @@ -649,7 +649,7 @@ GeoIncludeAll(src, dst) if ((src->r_xbot > src->r_xtop) || (src->r_ybot > src->r_ytop)) return FALSE; - + value = FALSE; if (dst->r_xbot > src->r_xbot) { @@ -674,7 +674,7 @@ GeoIncludeAll(src, dst) return value; } - + /*------------------------------------------------------------------- * GeoIncludePoint -- * This routine includes a point into a rectangle by expanding @@ -733,7 +733,7 @@ GeoIncludeRectInBBox(r, bbox) bbox->r_ytop = MAX(bbox->r_ytop,r->r_ytop); } - + /*------------------------------------------------------------------- * GeoClip -- * clips one rectangle against another. @@ -760,7 +760,7 @@ GeoClip(r, area) if (r->r_xtop > area->r_xtop) r->r_xtop = area->r_xtop; if (r->r_ytop > area->r_ytop) r->r_ytop = area->r_ytop; } - + /*------------------------------------------------------------------- * GeoClipPoint -- * Clips one point against a rectangle, moving the point into @@ -783,7 +783,7 @@ GeoClipPoint(p, area) if (p->p_x > area->r_xtop) p->p_x = area->r_xtop; if (p->p_y > area->r_ytop) p->p_y = area->r_ytop; } - + /* * ---------------------------------------------------------------------------- * GeoDisjoint -- @@ -834,7 +834,7 @@ GeoDisjoint(area, clipBox, func, cdarg) * into one piece that is DEFINITELY outside clipBox, and one * piece left to check some more. */ - + /* Top edge of clipBox: */ rArea = *area; @@ -889,7 +889,7 @@ GeoDummyFunc(box, cdarg) return TRUE; } - + /*------------------------------------------------------------------- * GeoCanonicalRect -- * Turns a rectangle into a canonical form in which the @@ -929,7 +929,7 @@ GeoCanonicalRect(r, rnew) rnew->r_ytop = r->r_ytop; } } - + /*------------------------------------------------------------------- * GeoScale -- * @@ -986,7 +986,7 @@ GeoScaleTrans(trans1, m, trans2) trans2->t_f = trans1->t_f * m; } - + /*------------------------------------------------------------------- * GeoRectPointSide -- * @@ -1015,7 +1015,7 @@ GeoRectPointSide(r, p) else return(GEO_CENTER); } - + /*------------------------------------------------------------------- * GeoRectRectSide -- * @@ -1047,7 +1047,7 @@ GeoRectRectSide(r0, r1) else return(GEO_CENTER); } - + /* ---------------------------------------------------------------------------- * * GeoDecomposeTransform -- @@ -1068,7 +1068,7 @@ GeoRectRectSide(r0, r1) void GeoDecomposeTransform(t, upsidedown, angle) Transform *t; - bool *upsidedown; /* Set to TRUE iff we should flip upsidedown + bool *upsidedown; /* Set to TRUE iff we should flip upsidedown * before rotating. */ int *angle; /* Amount to rotate. @@ -1087,15 +1087,15 @@ GeoDecomposeTransform(t, upsidedown, angle) /* Compute rotations and flips. */ *upsidedown = ((notrans.t_a == 0) ^ (notrans.t_b == notrans.t_d) ^ (notrans.t_a == notrans.t_e)); - if (*upsidedown) + if (*upsidedown) GeoTransTrans(¬rans, &GeoUpsideDownTransform, &rotonly); else rotonly = notrans; /* Verify no flipping. */ - ASSERT(rotonly.t_a == rotonly.t_e, "GeoDecomposeTransform"); + ASSERT(rotonly.t_a == rotonly.t_e, "GeoDecomposeTransform"); *angle = 0; - if (rotonly.t_b != 0) + if (rotonly.t_b != 0) { *angle += 90; if (*upsidedown) *angle += 180; diff --git a/utils/geometry.h b/utils/geometry.h index 1cfb175e..cf482fa5 100644 --- a/utils/geometry.h +++ b/utils/geometry.h @@ -1,15 +1,15 @@ /* geometry.h -- * - * ********************************************************************* - * * Copyright (C) 1985, 1990 Regents of the University of California. * - * * Permission to use, copy, modify, and distribute this * - * * software and its documentation for any purpose and without * - * * fee is hereby granted, provided that the above copyright * - * * notice appear in all copies. The University of California * - * * makes no representations about the suitability of this * - * * software for any purpose. It is provided "as is" without * - * * express or implied warranty. Export of this software outside * - * * of the United States of America may require an export license. * + * ********************************************************************* + * * Copyright (C) 1985, 1990 Regents of the University of California. * + * * Permission to use, copy, modify, and distribute this * + * * software and its documentation for any purpose and without * + * * fee is hereby granted, provided that the above copyright * + * * notice appear in all copies. The University of California * + * * makes no representations about the suitability of this * + * * software for any purpose. It is provided "as is" without * + * * express or implied warranty. Export of this software outside * + * * of the United States of America may require an export license. * * ********************************************************************* * * This module contains the basic definitions for geometrical @@ -99,7 +99,7 @@ typedef struct #define GEO_WEST 7 #define GEO_NORTHWEST 8 - + /* See if two points are equal */ #define GEO_SAMEPOINT(p1, p2) ((p1).p_x == (p2).p_x && (p1).p_y == (p2).p_y) @@ -109,7 +109,7 @@ typedef struct /*------------------------------------------------------------------- * The following macros are predicates to see if two - * rectangles overlap or touch. + * rectangles overlap or touch. *------------------------------------------------------------------- */ @@ -144,7 +144,7 @@ typedef struct #define GEO_ENCLOSE(p, r) \ ( ((p)->p_x <= (r)->r_xtop) && ((p)->p_x >= (r)->r_xbot) && \ ((p)->p_y <= (r)->r_ytop) && ((p)->p_y >= (r)->r_ybot) ) - + /* See if a label is in a given area */ #define GEO_LABEL_IN_AREA(lab,area) \ (GEO_SURROUND(area, lab) || \ diff --git a/utils/getrect.c b/utils/getrect.c index c51cf273..0e4d7800 100644 --- a/utils/getrect.c +++ b/utils/getrect.c @@ -1,16 +1,16 @@ /* * getrect.c - * - * ********************************************************************* - * * Copyright (C) 1985, 1990 Regents of the University of California. * - * * Permission to use, copy, modify, and distribute this * - * * software and its documentation for any purpose and without * - * * fee is hereby granted, provided that the above copyright * - * * notice appear in all copies. The University of California * - * * makes no representations about the suitability of this * - * * software for any purpose. It is provided "as is" without * - * * express or implied warranty. Export of this software outside * - * * of the United States of America may require an export license. * + * ********************************************************************* + * * Copyright (C) 1985, 1990 Regents of the University of California. * + * * Permission to use, copy, modify, and distribute this * + * * software and its documentation for any purpose and without * + * * fee is hereby granted, provided that the above copyright * + * * notice appear in all copies. The University of California * + * * makes no representations about the suitability of this * + * * software for any purpose. It is provided "as is" without * + * * express or implied warranty. Export of this software outside * + * * of the United States of America may require an export license. * * ********************************************************************* * Lawrence Livermore National Laboratory * diff --git a/utils/hash.c b/utils/hash.c index 7c20582e..93f62419 100644 --- a/utils/hash.c +++ b/utils/hash.c @@ -1,15 +1,15 @@ /* hash.c -- * - * ********************************************************************* - * * Copyright (C) 1985, 1990 Regents of the University of California. * - * * Permission to use, copy, modify, and distribute this * - * * software and its documentation for any purpose and without * - * * fee is hereby granted, provided that the above copyright * - * * notice appear in all copies. The University of California * - * * makes no representations about the suitability of this * - * * software for any purpose. It is provided "as is" without * - * * express or implied warranty. Export of this software outside * - * * of the United States of America may require an export license. * + * ********************************************************************* + * * Copyright (C) 1985, 1990 Regents of the University of California. * + * * Permission to use, copy, modify, and distribute this * + * * software and its documentation for any purpose and without * + * * fee is hereby granted, provided that the above copyright * + * * notice appear in all copies. The University of California * + * * makes no representations about the suitability of this * + * * software for any purpose. It is provided "as is" without * + * * express or implied warranty. Export of this software outside * + * * of the United States of America may require an export license. * * ********************************************************************* * * This module contains routines to manipulate a hash table. @@ -39,13 +39,13 @@ void rebuild(); static int rebuildLimit = 3; /* - * An invalid pointer, guaranteed to cause a coredump if + * An invalid pointer, guaranteed to cause a coredump if * we try to indirect through it. This should help catch * attempts to indirect through stale pointers. */ #define NIL ((HashEntry *) (1<<29)) - + /*--------------------------------------------------------- * * HashInit -- @@ -133,7 +133,7 @@ static int rebuildLimit = 3; * Free a key that had been allocated with (*copyFn)(). * If NULL, then nothing is done. * - * int + * int * (*killFn)(key) * char *key; * { @@ -193,7 +193,7 @@ HashInitClient(table, nBuckets, ptrKeys, compareFn, copyFn, hashFn, killFn) for (i = 0; i < table->ht_size; i++) *ptr++ = NIL; } - + /*--------------------------------------------------------- * * hash -- @@ -261,7 +261,7 @@ hash(table, key) /* Randomize! */ return ((i*1103515245 + 12345) >> table->ht_downShift) & table->ht_mask; } - + /*--------------------------------------------------------- * * HashLookOnly -- @@ -330,7 +330,7 @@ next: /* The desired entry isn't there */ return ((HashEntry *) NULL); } - + /*--------------------------------------------------------- * * HashFind -- @@ -456,7 +456,7 @@ next: *(table->ht_table + bucket) = h; return h; } - + /*--------------------------------------------------------- * * rebuild -- @@ -517,7 +517,7 @@ rebuild(table) freeMagic((char *) oldTable); } - + /*--------------------------------------------------------- * * HashStats -- @@ -603,7 +603,7 @@ HashRemove(table, key) } } - + /*--------------------------------------------------------- * * HashStartSearch -- @@ -628,7 +628,7 @@ HashStartSearch(hs) hs->hs_nextIndex = 0; hs->hs_h = NIL; } - + /*--------------------------------------------------------- * * HashNext -- @@ -665,7 +665,7 @@ HashNext(table, hs) hs->hs_h = h->h_next; return h; } - + /*--------------------------------------------------------- * * HashKill -- @@ -708,11 +708,11 @@ HashKill(table) /*--------------------------------------------------------- * * HashFreeKill --- - * + * * This routine removes everything from a hash table * and frees up the memory space it occupied along with * the stuff pointed by h_pointer - * + * * Results: * None. * diff --git a/utils/hash.h b/utils/hash.h index 3262eff6..12157478 100644 --- a/utils/hash.h +++ b/utils/hash.h @@ -1,15 +1,15 @@ /* hash.h -- * - * ********************************************************************* - * * Copyright (C) 1985, 1990 Regents of the University of California. * - * * Permission to use, copy, modify, and distribute this * - * * software and its documentation for any purpose and without * - * * fee is hereby granted, provided that the above copyright * - * * notice appear in all copies. The University of California * - * * makes no representations about the suitability of this * - * * software for any purpose. It is provided "as is" without * - * * express or implied warranty. Export of this software outside * - * * of the United States of America may require an export license. * + * ********************************************************************* + * * Copyright (C) 1985, 1990 Regents of the University of California. * + * * Permission to use, copy, modify, and distribute this * + * * software and its documentation for any purpose and without * + * * fee is hereby granted, provided that the above copyright * + * * notice appear in all copies. The University of California * + * * makes no representations about the suitability of this * + * * software for any purpose. It is provided "as is" without * + * * express or implied warranty. Export of this software outside * + * * of the United States of America may require an export license. * * ********************************************************************* * * This file contains definitions used by the hash module, @@ -111,7 +111,7 @@ typedef struct h2 *--------------------------------------------------------- */ -extern void HashInit(HashTable *, int, int), HashInitClient(), HashStats(), HashKill(), +extern void HashInit(HashTable *, int, int), HashInitClient(), HashStats(), HashKill(), HashFreeKill(); extern HashEntry *HashFind(HashTable *, char *); extern HashEntry *HashLookOnly(HashTable *, char *); diff --git a/utils/heap.c b/utils/heap.c index cc4f4cf2..7666ed94 100644 --- a/utils/heap.c +++ b/utils/heap.c @@ -3,16 +3,16 @@ * * Routines to create and manipulate heaps. * - * ********************************************************************* - * * Copyright (C) 1985, 1990 Regents of the University of California. * - * * Permission to use, copy, modify, and distribute this * - * * software and its documentation for any purpose and without * - * * fee is hereby granted, provided that the above copyright * - * * notice appear in all copies. The University of California * - * * makes no representations about the suitability of this * - * * software for any purpose. It is provided "as is" without * - * * express or implied warranty. Export of this software outside * - * * of the United States of America may require an export license. * + * ********************************************************************* + * * Copyright (C) 1985, 1990 Regents of the University of California. * + * * Permission to use, copy, modify, and distribute this * + * * software and its documentation for any purpose and without * + * * fee is hereby granted, provided that the above copyright * + * * notice appear in all copies. The University of California * + * * makes no representations about the suitability of this * + * * software for any purpose. It is provided "as is" without * + * * express or implied warranty. Export of this software outside * + * * of the United States of America may require an export license. * * ********************************************************************* */ @@ -84,7 +84,7 @@ static char rcsid[] __attribute__ ((unused)) = "$Header: /usr/cvsroot/magic-8.0/ extern void heapify(); - + /* * ---------------------------------------------------------------------------- * @@ -154,7 +154,7 @@ HeapInitType(heap, size, descending, stringIds, keyType) * sizeof (HeapEntry))); ASSERT(heap->he_list != NULL, "Malloc failed in HeapInit"); } - + /* * ---------------------------------------------------------------------------- * @@ -190,7 +190,7 @@ HeapKill(heap, func) freeMagic((char *) heap->he_list); heap->he_list = NULL; } - + /* * ---------------------------------------------------------------------------- * @@ -216,7 +216,7 @@ HeapFreeIdFunc(heap, i) if (heap->he_stringId) freeMagic(heap->he_list[i].he_id); } - + /* * ---------------------------------------------------------------------------- * @@ -256,7 +256,7 @@ HeapRemoveTop(heap, entry) heapify(heap, 1); return entry; } - + /* * ---------------------------------------------------------------------------- * @@ -268,7 +268,7 @@ HeapRemoveTop(heap, entry) * Pointer to the top heap element, or NULL if heap is empty. * * Side effects: - * If the heap has been touched, restore the heap property before + * If the heap has been touched, restore the heap property before * returning the top element. * * ---------------------------------------------------------------------------- @@ -290,7 +290,7 @@ HeapLookAtTop(heap) heap->he_built = heap->he_used; return &heap->he_list[1]; } - + /* * ---------------------------------------------------------------------------- * @@ -348,7 +348,7 @@ heapify(heap, root) } } } - + /* * ---------------------------------------------------------------------------- * @@ -487,7 +487,7 @@ HeapAddDLong(heap, data, id) void HeapAddFloat(heap, data, id) Heap *heap; - float data; + float data; char *id; { union heUnion pKey; @@ -512,7 +512,7 @@ HeapAddDouble(heap, data, id) HeapAdd(heap, &pKey, id); } - + /* * ---------------------------------------------------------------------------- * diff --git a/utils/heap.h b/utils/heap.h index 268279e3..cebf4247 100644 --- a/utils/heap.h +++ b/utils/heap.h @@ -3,16 +3,16 @@ * * Routines to create and maintain heaps. * - * ********************************************************************* - * * Copyright (C) 1985, 1990 Regents of the University of California. * - * * Permission to use, copy, modify, and distribute this * - * * software and its documentation for any purpose and without * - * * fee is hereby granted, provided that the above copyright * - * * notice appear in all copies. The University of California * - * * makes no representations about the suitability of this * - * * software for any purpose. It is provided "as is" without * - * * express or implied warranty. Export of this software outside * - * * of the United States of America may require an export license. * + * ********************************************************************* + * * Copyright (C) 1985, 1990 Regents of the University of California. * + * * Permission to use, copy, modify, and distribute this * + * * software and its documentation for any purpose and without * + * * fee is hereby granted, provided that the above copyright * + * * notice appear in all copies. The University of California * + * * makes no representations about the suitability of this * + * * software for any purpose. It is provided "as is" without * + * * express or implied warranty. Export of this software outside * + * * of the United States of America may require an export license. * * ********************************************************************* * * rcsid "$Header: /usr/cvsroot/magic-8.0/utils/heap.h,v 1.1.1.1 2008/02/03 20:43:50 tim Exp $"; @@ -38,7 +38,7 @@ * Heap * h; * HeapEntry * e; * int key; - * + * * HeapInit(&h, 1024, 0, FALSE); * HeapAdd(&h, 0, 0); * HeapDump(&h); @@ -60,7 +60,7 @@ * HeapKill(&h, NULL); * } */ - + #ifndef _HEAP_H #define _HEAP_H @@ -108,7 +108,7 @@ typedef struct /* A heap is an array with size set to some power of 2. Links are implicit: * the left child of a node n is 2n, and the right child is 2n+1. 'build' * keeps track of the last child participating in a rebuild operation. If - * entries have been added since the last rebuild, then process those children. + * entries have been added since the last rebuild, then process those children. * The he_stringId flag enables automatically copies character string id's * during calls to HeapAdd. If the id is actually a pointer to a struct, you * must pass a pointer to a copy and set he_stringId to FALSE. diff --git a/utils/ihash.c b/utils/ihash.c index 9896431c..65248306 100644 --- a/utils/ihash.c +++ b/utils/ihash.c @@ -1,28 +1,28 @@ // ************************************************************************ -// +// // Copyright (c) 1995-2002 Juniper Networks, Inc. All rights reserved. -// +// // Permission is hereby granted, without written agreement and without // license or royalty fees, to use, copy, modify, and distribute this // software and its documentation for any purpose, provided that the // above copyright notice and the following three paragraphs appear in // all copies of this software. -// +// // IN NO EVENT SHALL JUNIPER NETWORKS, INC. BE LIABLE TO ANY PARTY FOR // DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES // ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN IF // JUNIPER NETWORKS, INC. HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH // DAMAGE. -// +// // JUNIPER NETWORKS, INC. SPECIFICALLY DISCLAIMS ANY WARRANTIES, // INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF // MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, AND // NON-INFRINGEMENT. -// +// // THE SOFTWARE PROVIDED HEREUNDER IS ON AN "AS IS" BASIS, AND JUNIPER // NETWORKS, INC. HAS NO OBLIGATION TO PROVIDE MAINTENANCE, SUPPORT, // UPDATES, ENHANCEMENTS, OR MODIFICATIONS. -// +// // ************************************************************************ @@ -30,14 +30,14 @@ /* ihash.c -- * * Implements "internal" hash, i.e. hash on user supplied structures, - * without need for parallel hash entry structs. + * without need for parallel hash entry structs. * - * pointers involving users structs are cast to (void *) + * pointers involving users structs are cast to (void *) * This should make the pointer arithmetic work out regardless * of alignments within structs. - * + * * See ihash.h - * + * */ #define DEREF(ptr,offset) ((ptr)+(offset)) @@ -63,8 +63,8 @@ static void iHashResize(IHashTable *table); /* create a new hash table */ /* offsets should be generated by pointer subtraction of (void *) pointers */ extern IHashTable *IHashInit( - int nBuckets, - int keyOffset, + int nBuckets, + int keyOffset, int nextOffset, int (*hashFn)(void* key), int (*sameKeyFn)(void* key1, void* key2) @@ -77,7 +77,7 @@ extern IHashTable *IHashInit( table->iht_nBucketsInit = nBuckets; table->iht_nBuckets = nBuckets; table->iht_nEntries = 0; - table->iht_keyOffset = keyOffset; + table->iht_keyOffset = keyOffset; table->iht_nextOffset = nextOffset; table->iht_hashFn = hashFn; table->iht_sameKeyFn = sameKeyFn; @@ -91,20 +91,20 @@ extern IHashTable *IHashInit( void IHashFree(IHashTable *table) { freeMagic((char *) table->iht_table); /* free buckets */ - freeMagic((char *) table); + freeMagic((char *) table); } /* delete all entrys (and restore initial hash table size) */ void IHashClear(IHashTable *table) { /* reinitial bucket array */ - freeMagic((char *) table->iht_table); + freeMagic((char *) table->iht_table); table->iht_table = (void **)callocMagic(sizeof(void *)*table->iht_nBucketsInit); table->iht_nBuckets = table->iht_nBucketsInit; table->iht_nEntries = 0; } - + /* lookup an entry in table */ void *IHashLookUp(IHashTable *table, void *key) { @@ -115,24 +115,24 @@ void *IHashLookUp(IHashTable *table, void *key) hash = (table->iht_hashFn)(key); bucket = ABS(hash) % table->iht_nBuckets; - for(entry=table->iht_table[bucket]; + for(entry=table->iht_table[bucket]; entry && !(table->iht_sameKeyFn)(key, DEREF(entry,(table->iht_keyOffset))); entry = *((void **) DEREF(entry,table->iht_nextOffset))) /* empty body*/; return entry; } - + /* return next matching entry */ void *IHashLookUpNext(IHashTable *table, void *prevEntry) { void *entry; - void *key = DEREF(prevEntry,table->iht_keyOffset); + void *key = DEREF(prevEntry,table->iht_keyOffset); int hash = (table->iht_hashFn)(key); int bucket = ABS(hash) % table->iht_nBuckets; for(entry = *((void **) DEREF(prevEntry,table->iht_nextOffset)); - entry && !(table->iht_sameKeyFn)(key,DEREF(entry,table->iht_keyOffset)); + entry && !(table->iht_sameKeyFn)(key,DEREF(entry,table->iht_keyOffset)); entry = *((void **) DEREF(entry,table->iht_nextOffset))) /* empty body*/; return entry; @@ -161,7 +161,7 @@ void IHashAdd(IHashTable *table, void *entry) } /* deletes an entry from table */ -/* +/* * NOTE: bplane code assumes IHashDelete() does not restructure table! * (IHashLookUpNext() is called before IHashDelete(), and then the enum. * is continued with further IHashLookUpNext() calls. @@ -172,11 +172,11 @@ void IHashDelete(IHashTable *table, void *entry) int bucket; void **pp; int nextOffset = table->iht_nextOffset; - + hash = (table->iht_hashFn)DEREF(entry,table->iht_keyOffset); bucket = ABS(hash) % table->iht_nBuckets; - for(pp = &table->iht_table[bucket]; + for(pp = &table->iht_table[bucket]; (*pp) && (*pp) != entry; pp = DEREF((*pp),nextOffset)); @@ -199,8 +199,8 @@ void IHashEnum(IHashTable *table, void (*clientFunc)(void *entry)) for(bucket=0; bucketiht_nBuckets; bucket++) { void *entry; - for(entry=table->iht_table[bucket]; - entry; + for(entry=table->iht_table[bucket]; + entry; entry = *((void **) DEREF(entry,table->iht_nextOffset))) { (*clientFunc)(entry); @@ -215,7 +215,7 @@ static void iHashResize(IHashTable *table) int oldSize = table->iht_nBuckets; int newSize = oldSize*4; int bucket; - + /* alloc a new table */ table->iht_table = (void **)callocMagic(sizeof(void *)*newSize); table->iht_nBuckets = newSize; @@ -226,8 +226,8 @@ static void iHashResize(IHashTable *table) { void *entry; void *next; - for(entry=oldBuckets[bucket]; - entry; + for(entry=oldBuckets[bucket]; + entry; entry = next) { next = *((void **) DEREF(entry,table->iht_nextOffset)); @@ -236,7 +236,7 @@ static void iHashResize(IHashTable *table) } /* finally, free old table */ - freeMagic((char *) oldBuckets); + freeMagic((char *) oldBuckets); } /* print out statistics */ @@ -256,8 +256,8 @@ void IHashStats(IHashTable *table) { void *entry; int num = 0; - for(entry=table->iht_table[bucket]; - entry; + for(entry=table->iht_table[bucket]; + entry; entry = *((void **) DEREF(entry,table->iht_nextOffset))) { num++; @@ -267,7 +267,7 @@ void IHashStats(IHashTable *table) } /* return statistics on hash table (returns memory utilized by table) */ -int IHashStats2(IHashTable *table, +int IHashStats2(IHashTable *table, int *nBuckets, /* if non-null return num buckets here */ int *nEntries) /* if non-null return num entries here */ { @@ -275,15 +275,15 @@ int IHashStats2(IHashTable *table, if(nBuckets) *nBuckets = table->iht_nBuckets; if(nEntries) *nEntries = table->iht_nEntries; - return - IHashAlignedSize(sizeof(IHashTable)) + + return + IHashAlignedSize(sizeof(IHashTable)) + IHashAlignedSize(sizeof(void *)* table->iht_nBuckets); } /* hash for key fields that are pointers to strings */ int IHashStringPKeyHash(void *key) { - char *s = * (char **) key; + char *s = * (char **) key; int i=0; /* Add up the characters as though this were a number */ @@ -302,7 +302,7 @@ int IHashStringPKeyEq(void *key1, void *key2) /* hash for key fields that are strings */ int IHashStringKeyHash(void *key) { - char *s = (char *) key; + char *s = (char *) key; int i=0; /* Add up the characters as though this were a number */ @@ -333,10 +333,10 @@ int IHashWordKeyEq(void *key1p, void *key2p) /* hash for n-byte field */ -static __inline__ int +static __inline__ int iHash(void *key, int n) { - char *s = (char *) key; + char *s = (char *) key; int hash=0; int i; diff --git a/utils/ihash.h b/utils/ihash.h index 91c0dc4a..9c5d3f34 100644 --- a/utils/ihash.h +++ b/utils/ihash.h @@ -1,37 +1,37 @@ // ************************************************************************ -// +// // Copyright (c) 1995-2002 Juniper Networks, Inc. All rights reserved. -// +// // Permission is hereby granted, without written agreement and without // license or royalty fees, to use, copy, modify, and distribute this // software and its documentation for any purpose, provided that the // above copyright notice and the following three paragraphs appear in // all copies of this software. -// +// // IN NO EVENT SHALL JUNIPER NETWORKS, INC. BE LIABLE TO ANY PARTY FOR // DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES // ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN IF // JUNIPER NETWORKS, INC. HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH // DAMAGE. -// +// // JUNIPER NETWORKS, INC. SPECIFICALLY DISCLAIMS ANY WARRANTIES, // INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF // MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, AND // NON-INFRINGEMENT. -// +// // THE SOFTWARE PROVIDED HEREUNDER IS ON AN "AS IS" BASIS, AND JUNIPER // NETWORKS, INC. HAS NO OBLIGATION TO PROVIDE MAINTENANCE, SUPPORT, // UPDATES, ENHANCEMENTS, OR MODIFICATIONS. -// +// // ************************************************************************ /* ihash.h -- * - * "Internal" hash routines. + * "Internal" hash routines. * Allows hashing of existing structs without creating parallel structs - * to hold keys etc. + * to hold keys etc. * * The structs to be hashed must have "key" and "next" fields. The offsets * of these fields are passed to HashInit. @@ -66,10 +66,10 @@ typedef struct ihashtable int (*iht_sameKeyFn)(void *key1, void *key2); /* returns 1 if keys match */ } IHashTable; - + /* create a new hash table */ extern IHashTable *IHashInit( - int nBuckets, + int nBuckets, int keyOffset, int nextOffset, int (*hashFn)(void *key), @@ -83,10 +83,10 @@ extern void *IHashLookUp(IHashTable *table, void *key); extern void *IHashLookUpNext(IHashTable *table, void *prevEntry); /* add an entry to the table */ -extern void IHashAdd(IHashTable *table, void *entry); +extern void IHashAdd(IHashTable *table, void *entry); /* delete an entry from the table */ -extern void IHashDelete(IHashTable *table, void *entry); +extern void IHashDelete(IHashTable *table, void *entry); /* delete all entrys (and restore initial hash table size) */ extern void IHashClear(IHashTable *table); @@ -102,7 +102,7 @@ extern void IHashStats(IHashTable *table); /* return hashtable memory usage and stats */ extern int IHashStats2(IHashTable *table, int *nBuckets, int *nEntries); - + /* free hash table (does not free client strucs!) */ extern void IHashFree(IHashTable *table); diff --git a/utils/list.c b/utils/list.c index 9f10d0fa..f63c91d9 100644 --- a/utils/list.c +++ b/utils/list.c @@ -4,16 +4,16 @@ * A separate structure is used to link list elements together. * Thus list elements do not require pointers and can be anything. * - * ********************************************************************* - * * Copyright (C) 1985, 1990 Regents of the University of California. * - * * Permission to use, copy, modify, and distribute this * - * * software and its documentation for any purpose and without * - * * fee is hereby granted, provided that the above copyright * - * * notice appear in all copies. The University of California * - * * makes no representations about the suitability of this * - * * software for any purpose. It is provided "as is" without * - * * express or implied warranty. Export of this software outside * - * * of the United States of America may require an export license. * + * ********************************************************************* + * * Copyright (C) 1985, 1990 Regents of the University of California. * + * * Permission to use, copy, modify, and distribute this * + * * software and its documentation for any purpose and without * + * * fee is hereby granted, provided that the above copyright * + * * notice appear in all copies. The University of California * + * * makes no representations about the suitability of this * + * * software for any purpose. It is provided "as is" without * + * * express or implied warranty. Export of this software outside * + * * of the United States of America may require an export license. * * ********************************************************************* */ @@ -28,7 +28,7 @@ static char rcsid[] __attribute__ ((unused)) = "$Header: /usr/cvsroot/magic-8.0/ #include "utils/malloc.h" #include "utils/list.h" - + /* ---------------------------------------------------------------------------- * ListPop -- * Returns top data item on list, deallocates top list element, and @@ -55,7 +55,7 @@ ListPop(listPP) return result; } - + /* ---------------------------------------------------------------------------- * ListContainsP -- * Check if list contains given element. @@ -78,7 +78,7 @@ ListContainsP(element,list) return list!=NULL; } - + /* ---------------------------------------------------------------------------- * ListDealloc -- * Deallocate list strucs in list. @@ -89,7 +89,7 @@ ListContainsP(element,list) * Side effects: * Storage reclaimed. * - * NOTE: Remember to set pointers to lists to null after deallocating + * NOTE: Remember to set pointers to lists to null after deallocating * the list (if pointers are to be used again)! * ---------------------------------------------------------------------------- */ @@ -104,7 +104,7 @@ ListDealloc(list) return; } - + /* ---------------------------------------------------------------------------- * ListDeallocC -- * Deallocate list strucs in list AND CONTENTS of list. @@ -115,7 +115,7 @@ ListDealloc(list) * Side effects: * Storage reclaimed. * - * NOTE: Remember to set pointers to lists to null after deallocating + * NOTE: Remember to set pointers to lists to null after deallocating * the list (if pointers are to be used again)! * ---------------------------------------------------------------------------- */ @@ -132,7 +132,7 @@ ListDeallocC(list) return; } - + /* ---------------------------------------------------------------------------- * ListLength -- * Count number of elements in list. @@ -156,7 +156,7 @@ ListLength(list) return count; } - + /* ---------------------------------------------------------------------------- * ListReverse -- * Make reversed copy of list. diff --git a/utils/list.h b/utils/list.h index 8e124a08..26bf8841 100644 --- a/utils/list.h +++ b/utils/list.h @@ -1,23 +1,23 @@ /* * list.h -- - * Structure and macros for mantaining and manipulating linked lists + * Structure and macros for mantaining and manipulating linked lists * of arbitrary things. * These lists are lisp like, i.e. list pointers are in separate strucutures * rather than in the strucs being linked. * (Equivalent to lisp lists.) - * + * * Global definitions for all MAGIC modules * - * ********************************************************************* - * * Copyright (C) 1985, 1990 Regents of the University of California. * - * * Permission to use, copy, modify, and distribute this * - * * software and its documentation for any purpose and without * - * * fee is hereby granted, provided that the above copyright * - * * notice appear in all copies. The University of California * - * * makes no representations about the suitability of this * - * * software for any purpose. It is provided "as is" without * - * * express or implied warranty. Export of this software outside * - * * of the United States of America may require an export license. * + * ********************************************************************* + * * Copyright (C) 1985, 1990 Regents of the University of California. * + * * Permission to use, copy, modify, and distribute this * + * * software and its documentation for any purpose and without * + * * fee is hereby granted, provided that the above copyright * + * * notice appear in all copies. The University of California * + * * makes no representations about the suitability of this * + * * software for any purpose. It is provided "as is" without * + * * express or implied warranty. Export of this software outside * + * * of the United States of America may require an export license. * * ********************************************************************* * * Needs to include and diff --git a/utils/lookup.c b/utils/lookup.c index f0e03d6b..ccc28c82 100644 --- a/utils/lookup.c +++ b/utils/lookup.c @@ -1,15 +1,15 @@ /* lookup.c -- * - * ********************************************************************* - * * Copyright (C) 1985, 1990 Regents of the University of California. * - * * Permission to use, copy, modify, and distribute this * - * * software and its documentation for any purpose and without * - * * fee is hereby granted, provided that the above copyright * - * * notice appear in all copies. The University of California * - * * makes no representations about the suitability of this * - * * software for any purpose. It is provided "as is" without * - * * express or implied warranty. Export of this software outside * - * * of the United States of America may require an export license. * + * ********************************************************************* + * * Copyright (C) 1985, 1990 Regents of the University of California. * + * * Permission to use, copy, modify, and distribute this * + * * software and its documentation for any purpose and without * + * * fee is hereby granted, provided that the above copyright * + * * notice appear in all copies. The University of California * + * * makes no representations about the suitability of this * + * * software for any purpose. It is provided "as is" without * + * * express or implied warranty. Export of this software outside * + * * of the United States of America may require an export license. * * ********************************************************************* * * This file contains a single routine used to look up a string in @@ -26,7 +26,7 @@ static char rcsid[] __attribute__ ((unused)) = "$Header: /usr/cvsroot/magic-8.0/ #include "utils/magic.h" #include "utils/utils.h" - + /*--------------------------------------------------------- * Lookup -- * Searches a table of strings to find one that matches a given @@ -39,12 +39,12 @@ static char rcsid[] __attribute__ ((unused)) = "$Header: /usr/cvsroot/magic-8.0/ * If str is the same as * or an unambiguous abbreviation for one of the entries * in table, then the index of the matching entry is returned. - * If str is not the same as any entry in the table, but - * an abbreviation for more than one entry, + * If str is not the same as any entry in the table, but + * an abbreviation for more than one entry, * then -1 is returned. If str doesn't match any entry, then * -2 is returned. Case differences are ignored. * - * NOTE: + * NOTE: * Table entries need no longer be in alphabetical order * and they need not be lower case. The irouter command parsing * depends on these features. @@ -58,7 +58,7 @@ int Lookup(str, table) char *str; /* Pointer to a string to be looked up */ char *(table[]); /* Pointer to an array of string pointers - * which are the valid commands. + * which are the valid commands. * The end of * the table is indicated by a NULL string. */ @@ -97,7 +97,7 @@ char *(table[]); /* Pointer to an array of string pointers } - if(*strc=='\0') + if(*strc=='\0') { /* entry matches */ if(*tabc==' ' || *tabc=='\0') @@ -105,13 +105,13 @@ char *(table[]); /* Pointer to an array of string pointers /* exact match - record it and terminate search */ match = pos; break; - } + } else if (match == -2) { - /* inexact match and no previous match - record this one + /* inexact match and no previous match - record this one * and continue search */ match = pos; - } + } else { /* previous match, so string is ambiguous unless exact @@ -125,7 +125,7 @@ char *(table[]); /* Pointer to an array of string pointers return(match); } - + /*--------------------------------------------------------- * * LookupStruct -- @@ -148,8 +148,8 @@ char *(table[]); /* Pointer to an array of string pointers * If str is the same as * or an unambiguous abbreviation for one of the entries * in table, then the index of the matching entry is returned. - * If str is not the same as any entry in the table, but - * an abbreviation for more than one entry, + * If str is not the same as any entry in the table, but + * an abbreviation for more than one entry, * then -1 is returned. If str doesn't match any entry, then * -2 is returned. Case differences are ignored. * @@ -167,7 +167,7 @@ int LookupStruct(str, table, size) char str[]; /* Pointer to a string to be looked up */ char **table; /* Pointer to an array of structs containing string - * pointers to valid commands. + * pointers to valid commands. * The last table entry should have a NULL * string pointer. */ @@ -192,7 +192,7 @@ LookupStruct(str, table, size) tabc++; } - if(*strc=='\0') + if(*strc=='\0') { /* entry matches */ if(*tabc==' ' || *tabc=='\0') @@ -200,13 +200,13 @@ LookupStruct(str, table, size) /* exact match - record it and terminate search */ match = pos; break; - } + } else if (match == -2) { - /* in exact match and no previous match - record this one + /* in exact match and no previous match - record this one * and continue search */ match = pos; - } + } else { /* previous match, so string is ambiguous unless exact @@ -217,7 +217,7 @@ LookupStruct(str, table, size) } } pos++; - entry = (char **)((long)entry + (long) size); + entry = (char **)((long)entry + (long) size); } return(match); } diff --git a/utils/lookupany.c b/utils/lookupany.c index e9bad6c1..26a89a64 100644 --- a/utils/lookupany.c +++ b/utils/lookupany.c @@ -1,16 +1,16 @@ /* * lookupany.c -- * - * ********************************************************************* - * * Copyright (C) 1985, 1990 Regents of the University of California. * - * * Permission to use, copy, modify, and distribute this * - * * software and its documentation for any purpose and without * - * * fee is hereby granted, provided that the above copyright * - * * notice appear in all copies. The University of California * - * * makes no representations about the suitability of this * - * * software for any purpose. It is provided "as is" without * - * * express or implied warranty. Export of this software outside * - * * of the United States of America may require an export license. * + * ********************************************************************* + * * Copyright (C) 1985, 1990 Regents of the University of California. * + * * Permission to use, copy, modify, and distribute this * + * * software and its documentation for any purpose and without * + * * fee is hereby granted, provided that the above copyright * + * * notice appear in all copies. The University of California * + * * makes no representations about the suitability of this * + * * software for any purpose. It is provided "as is" without * + * * express or implied warranty. Export of this software outside * + * * of the United States of America may require an export license. * * ********************************************************************* * Full rights reserved. * @@ -24,7 +24,7 @@ static char rcsid[] __attribute__ ((unused)) = "$Header: /usr/cvsroot/magic-8.0/utils/lookupany.c,v 1.1.1.1 2008/02/03 20:43:50 tim Exp $"; #endif /* not lint */ - + /* * ---------------------------------------------------------------------------- * LookupAny -- diff --git a/utils/lookupfull.c b/utils/lookupfull.c index 3156d8ad..10f75682 100644 --- a/utils/lookupfull.c +++ b/utils/lookupfull.c @@ -1,16 +1,16 @@ /* * lookupfull.c -- * - * ********************************************************************* - * * Copyright (C) 1985, 1990 Regents of the University of California. * - * * Permission to use, copy, modify, and distribute this * - * * software and its documentation for any purpose and without * - * * fee is hereby granted, provided that the above copyright * - * * notice appear in all copies. The University of California * - * * makes no representations about the suitability of this * - * * software for any purpose. It is provided "as is" without * - * * express or implied warranty. Export of this software outside * - * * of the United States of America may require an export license. * + * ********************************************************************* + * * Copyright (C) 1985, 1990 Regents of the University of California. * + * * Permission to use, copy, modify, and distribute this * + * * software and its documentation for any purpose and without * + * * fee is hereby granted, provided that the above copyright * + * * notice appear in all copies. The University of California * + * * makes no representations about the suitability of this * + * * software for any purpose. It is provided "as is" without * + * * express or implied warranty. Export of this software outside * + * * of the United States of America may require an export license. * * ********************************************************************* * Full rights reserved. * @@ -27,7 +27,7 @@ static char rcsid[] __attribute__ ((unused)) = "$Header: /usr/cvsroot/magic-8.0/ #include "utils/magic.h" - + /* * ---------------------------------------------------------------------------- * LookupFull -- @@ -72,7 +72,7 @@ LookupFull(name, table) return (-1); } - + /*--------------------------------------------------------- * * LookupStructFull -- @@ -108,7 +108,7 @@ int LookupStructFull(str, table, size) char str[]; /* Pointer to a string to be looked up */ char **table; /* Pointer to an array of structs containing string - * pointers to valid commands. + * pointers to valid commands. * The last table entry should have a NULL * string pointer. */ @@ -121,7 +121,7 @@ LookupStructFull(str, table, size) if( strcmp(str, *entry) == 0 ) { return pos; } - entry = (char **)((long)entry + (long)size); + entry = (char **)((long)entry + (long)size); } return -1; diff --git a/utils/macros.c b/utils/macros.c index b8a1678d..2c11dc74 100644 --- a/utils/macros.c +++ b/utils/macros.c @@ -3,16 +3,16 @@ * * Defines and retrieves macros * - * ********************************************************************* - * * Copyright (C) 1985, 1990 Regents of the University of California. * - * * Permission to use, copy, modify, and distribute this * - * * software and its documentation for any purpose and without * - * * fee is hereby granted, provided that the above copyright * - * * notice appear in all copies. The University of California * - * * makes no representations about the suitability of this * - * * software for any purpose. It is provided "as is" without * - * * express or implied warranty. Export of this software outside * - * * of the United States of America may require an export license. * + * ********************************************************************* + * * Copyright (C) 1985, 1990 Regents of the University of California. * + * * Permission to use, copy, modify, and distribute this * + * * software and its documentation for any purpose and without * + * * fee is hereby granted, provided that the above copyright * + * * notice appear in all copies. The University of California * + * * makes no representations about the suitability of this * + * * software for any purpose. It is provided "as is" without * + * * express or implied warranty. Export of this software outside * + * * of the United States of America may require an export license. * * ********************************************************************* */ @@ -313,7 +313,7 @@ MacroSubstitute(macrostr, searchstr, replacestr) return macrostr; } - + /*--------------------------------------------------------- * MacroDelete: * This procedure deletes a macro. @@ -360,7 +360,7 @@ MacroDelete(client, xc) } } - + /* * ---------------------------------------------------------------------------- * MacroName -- @@ -446,7 +446,7 @@ MacroName(xc) return(vis); } - + /* * ---------------------------------------------------------------------------- * MacroKey: @@ -539,7 +539,7 @@ MacroKey(str, verbose) /* single ASCII character handling */ char tc = *vis; - + /* Revert Control and Shift characters to ASCII */ /* unless other modifiers are present. Always make */ /* characters with Control and Shift uppercase. */ @@ -606,7 +606,7 @@ MacroKey(str, verbose) return(0); } - + /* * ---------------------------------------------------------------------------- * CommandLineTranslate diff --git a/utils/macros.h b/utils/macros.h index 2c9dfda1..5e078ff4 100644 --- a/utils/macros.h +++ b/utils/macros.h @@ -3,16 +3,16 @@ * * Routines to define and retrieve macros * - * ********************************************************************* - * * Copyright (C) 1985, 1990 Regents of the University of California. * - * * Permission to use, copy, modify, and distribute this * - * * software and its documentation for any purpose and without * - * * fee is hereby granted, provided that the above copyright * - * * notice appear in all copies. The University of California * - * * makes no representations about the suitability of this * - * * software for any purpose. It is provided "as is" without * - * * express or implied warranty. Export of this software outside * - * * of the United States of America may require an export license. * + * ********************************************************************* + * * Copyright (C) 1985, 1990 Regents of the University of California. * + * * Permission to use, copy, modify, and distribute this * + * * software and its documentation for any purpose and without * + * * fee is hereby granted, provided that the above copyright * + * * notice appear in all copies. The University of California * + * * makes no representations about the suitability of this * + * * software for any purpose. It is provided "as is" without * + * * express or implied warranty. Export of this software outside * + * * of the United States of America may require an export license. * * ********************************************************************* * * @@ -28,7 +28,7 @@ /* * Macro data structure */ - + typedef struct { char *macrotext; bool interactive; diff --git a/utils/magic.h b/utils/magic.h index 394d188c..f118956b 100644 --- a/utils/magic.h +++ b/utils/magic.h @@ -3,16 +3,16 @@ * * Global definitions for all MAGIC modules * - * ********************************************************************* - * * Copyright (C) 1985, 1990 Regents of the University of California. * - * * Permission to use, copy, modify, and distribute this * - * * software and its documentation for any purpose and without * - * * fee is hereby granted, provided that the above copyright * - * * notice appear in all copies. The University of California * - * * makes no representations about the suitability of this * - * * software for any purpose. It is provided "as is" without * - * * express or implied warranty. Export of this software outside * - * * of the United States of America may require an export license. * + * ********************************************************************* + * * Copyright (C) 1985, 1990 Regents of the University of California. * + * * Permission to use, copy, modify, and distribute this * + * * software and its documentation for any purpose and without * + * * fee is hereby granted, provided that the above copyright * + * * notice appear in all copies. The University of California * + * * makes no representations about the suitability of this * + * * software for any purpose. It is provided "as is" without * + * * express or implied warranty. Export of this software outside * + * * of the United States of America may require an export license. * * ********************************************************************* * * rcsid="$Header" @@ -170,7 +170,7 @@ extern char AbortMessage[]; #endif /* - * Irix + * Irix */ #ifdef sgi #define vfork fork @@ -180,7 +180,7 @@ extern char AbortMessage[]; /* * Select system call * - * Note: Errors here may be caused by not including + * Note: Errors here may be caused by not including * before "magic.h" (deprecated; more modern usage is */ #include diff --git a/utils/magsgtty.h b/utils/magsgtty.h index a0962a0e..89d3ef85 100644 --- a/utils/magsgtty.h +++ b/utils/magsgtty.h @@ -3,16 +3,16 @@ * * Magic's own sgtty.h file. For porting * - * ********************************************************************* - * * Copyright (C) 1985, 1990 Regents of the University of California. * - * * Permission to use, copy, modify, and distribute this * - * * software and its documentation for any purpose and without * - * * fee is hereby granted, provided that the above copyright * - * * notice appear in all copies. The University of California * - * * makes no representations about the suitability of this * - * * software for any purpose. It is provided "as is" without * - * * express or implied warranty. Export of this software outside * - * * of the United States of America may require an export license. * + * ********************************************************************* + * * Copyright (C) 1985, 1990 Regents of the University of California. * + * * Permission to use, copy, modify, and distribute this * + * * software and its documentation for any purpose and without * + * * fee is hereby granted, provided that the above copyright * + * * notice appear in all copies. The University of California * + * * makes no representations about the suitability of this * + * * software for any purpose. It is provided "as is" without * + * * express or implied warranty. Export of this software outside * + * * of the United States of America may require an export license. * * ********************************************************************* * * diff --git a/utils/main.c b/utils/main.c index 708f0354..42bd033f 100644 --- a/utils/main.c +++ b/utils/main.c @@ -5,16 +5,16 @@ * initializes the other modules and then calls the 'textio' * module to read and execute commands. * - * ********************************************************************* - * * Copyright (C) 1985, 1990 Regents of the University of California. * - * * Permission to use, copy, modify, and distribute this * - * * software and its documentation for any purpose and without * - * * fee is hereby granted, provided that the above copyright * - * * notice appear in all copies. The University of California * - * * makes no representations about the suitability of this * - * * software for any purpose. It is provided "as is" without * - * * express or implied warranty. Export of this software outside * - * * of the United States of America may require an export license. * + * ********************************************************************* + * * Copyright (C) 1985, 1990 Regents of the University of California. * + * * Permission to use, copy, modify, and distribute this * + * * software and its documentation for any purpose and without * + * * fee is hereby granted, provided that the above copyright * + * * notice appear in all copies. The University of California * + * * makes no representations about the suitability of this * + * * software for any purpose. It is provided "as is" without * + * * express or implied warranty. Export of this software outside * + * * of the United States of America may require an export license. * * ********************************************************************* */ @@ -77,7 +77,7 @@ static char rcsid[] __attribute__ ((unused)) = "$Header: /usr/cvsroot/magic-8.0/ #include "graphics/wind3d.h" #endif - + /* * Global data structures * @@ -105,17 +105,17 @@ global CellDef *EditRootDef = NULL; global Transform EditToRootTransform; global Transform RootToEditTransform; - + /* * data structures local to main.c * */ /* the filename specified on the command line */ -static char *MainFileName = NULL; +static char *MainFileName = NULL; /* RC file specified on the command line */ -static char *RCFileName = NULL; +static char *RCFileName = NULL; /* Definition of file types that magic can read */ #define FN_MAGIC_DB 0 @@ -152,7 +152,7 @@ global char *MainCopyright = "\n--- MAGIC: Copyright (C) 1985, 1990 " /* Forward declarations */ char *mainArg(); - + /* * ---------------------------------------------------------------------------- * MainExit: @@ -308,7 +308,7 @@ mainDoArgs(argc, argv) } break; - /* + /* * We are being debugged. */ case 'D': @@ -422,7 +422,7 @@ mainDoArgs(argc, argv) return 0; } - + /* * ---------------------------------------------------------------------------- * @@ -463,7 +463,7 @@ mainArg(pargc, pargv, mesg) return cp; } - + /* * ---------------------------------------------------------------------------- * mainInitBeforeArgs: @@ -501,7 +501,7 @@ mainInitBeforeArgs(argc, argv) * Get preliminary info on the graphics display. * This may be overriden later. */ - GrGuessDisplayType(&MainGraphicsFile, &MainMouseFile, + GrGuessDisplayType(&MainGraphicsFile, &MainMouseFile, &MainDisplayType, &MainMonType); FindDisplay((char *)NULL, "displays", CAD_LIB_PATH, &MainGraphicsFile, &MainMouseFile, &MainDisplayType, &MainMonType); @@ -509,7 +509,7 @@ mainInitBeforeArgs(argc, argv) return 0; } - + /* * ---------------------------------------------------------------------------- * mainInitAfterArgs: @@ -577,7 +577,7 @@ mainInitAfterArgs() } else StrDup(&CellLibPath, MAGIC_LIB_PATH_DEFAULT); - + if (MainGraphicsFile == NULL) MainGraphicsFile = "/dev/null"; if (MainMouseFile == NULL) MainMouseFile = MainGraphicsFile; @@ -631,13 +631,13 @@ mainInitAfterArgs() #ifdef CIF_MODULE TechAddClient("cifoutput", CIFTechStyleInit, CIFTechLine, CIFTechFinal, (SectionID) 0, &sec_cifoutput, FALSE); - + TechAddClient("cifinput", CIFReadTechStyleInit, CIFReadTechLine, CIFReadTechFinal, (SectionID) 0, &sec_cifinput, FALSE); #else TechAddClient("cifoutput", nullProc,nullProc,nullProc, (SectionID) 0, &sec_cifoutput, FALSE); - + TechAddClient("cifinput", nullProc,nullProc,nullProc, (SectionID) 0, &sec_cifinput, FALSE); #endif @@ -666,7 +666,7 @@ mainInitAfterArgs() TechAddClient("extract", nullProc, ExtTechLine, ExtTechFinal, sec_types|sec_connect, &sec_extract, FALSE); #endif - + TechAddClient("wiring", WireTechInit, WireTechLine, WireTechFinal, sec_types, &sec_wiring, TRUE); @@ -752,7 +752,7 @@ mainInitAfterArgs() #ifdef ROUTE_MODULE MZInit(); - /* Initialize the interactive router - + /* Initialize the interactive router - * NOTE the mzrouter must be initialized prior to the irouter * so that default parameters will be completely setup */ @@ -873,8 +873,8 @@ mainInitFinal() f = PaOpen(MAGIC_SYS_DOT, "r", (char *) NULL, ".", (char *) NULL, (char **) NULL); if (f != NULL) - { - TxDispatch(f); + { + TxDispatch(f); (void) fclose(f); } @@ -1039,7 +1039,7 @@ mainInitFinal() if (f != NULL) { - TxDispatch(f); + TxDispatch(f); (void) fclose(f); } } @@ -1071,7 +1071,7 @@ mainInitFinal() if (f != NULL) { - TxDispatch(f); + TxDispatch(f); fclose(f); } @@ -1175,7 +1175,7 @@ mainInitFinal() freeMagic(temporary); } } - + /* Create an initial box. */ if (MakeMainWindow && EditCellUse) @@ -1190,7 +1190,7 @@ mainInitFinal() return 0; } - + /* * ---------------------------------------------------------------------------- * mainFinish: @@ -1221,7 +1221,7 @@ mainFinished() * not called 'main' so that other programs that use Magic may do * something else. * - * Results: + * Results: * None. * * Side Effects: @@ -1248,5 +1248,5 @@ magicMain(argc, argv) mainFinished(); } - + diff --git a/utils/main.h b/utils/main.h index 74cb41ff..2add0bcb 100644 --- a/utils/main.h +++ b/utils/main.h @@ -1,19 +1,19 @@ /* * main.h -- * - * Header file containing global variables for all MAGIC modules and a + * Header file containing global variables for all MAGIC modules and a * couple of global procedures. * - * ********************************************************************* - * * Copyright (C) 1985, 1990 Regents of the University of California. * - * * Permission to use, copy, modify, and distribute this * - * * software and its documentation for any purpose and without * - * * fee is hereby granted, provided that the above copyright * - * * notice appear in all copies. The University of California * - * * makes no representations about the suitability of this * - * * software for any purpose. It is provided "as is" without * - * * express or implied warranty. Export of this software outside * - * * of the United States of America may require an export license. * + * ********************************************************************* + * * Copyright (C) 1985, 1990 Regents of the University of California. * + * * Permission to use, copy, modify, and distribute this * + * * software and its documentation for any purpose and without * + * * fee is hereby granted, provided that the above copyright * + * * notice appear in all copies. The University of California * + * * makes no representations about the suitability of this * + * * software for any purpose. It is provided "as is" without * + * * express or implied warranty. Export of this software outside * + * * of the United States of America may require an export license. * * ********************************************************************* * * diff --git a/utils/malloc.c b/utils/malloc.c index b7fc8ed8..965d6893 100644 --- a/utils/malloc.c +++ b/utils/malloc.c @@ -20,16 +20,16 @@ * The Tcl/Tk version of magic makes use of Tcl_Alloc() and Tcl_Free() * which allows the Tcl/Tk version to trace memory using Tcl's methods. * - * ********************************************************************* - * * Copyright (C) 1985, 1990 Regents of the University of California. * - * * Permission to use, copy, modify, and distribute this * - * * software and its documentation for any purpose and without * - * * fee is hereby granted, provided that the above copyright * - * * notice appear in all copies. The University of California * - * * makes no representations about the suitability of this * - * * software for any purpose. It is provided "as is" without * - * * express or implied warranty. Export of this software outside * - * * of the United States of America may require an export license. * + * ********************************************************************* + * * Copyright (C) 1985, 1990 Regents of the University of California. * + * * Permission to use, copy, modify, and distribute this * + * * software and its documentation for any purpose and without * + * * fee is hereby granted, provided that the above copyright * + * * notice appear in all copies. The University of California * + * * makes no representations about the suitability of this * + * * software for any purpose. It is provided "as is" without * + * * express or implied warranty. Export of this software outside * + * * of the United States of America may require an export license. * * ********************************************************************* */ @@ -60,7 +60,7 @@ extern char *TxGetLine(); /* * Magic may reference an object after it is free'ed, but only one object. * This is a change from previous versions of Magic, which needed to reference - * an arbitrary number of objects before the next call to malloc. Only then + * an arbitrary number of objects before the next call to malloc. Only then * would no further references would be made to free'ed storage. */ @@ -95,7 +95,7 @@ mallocMagic(nbytes) size_t nbytes; { void *p; - + if (freeDelayedItem) { /* fprintf(stderr, "freed 0x%x (delayed)\n", freeDelayedItem); fflush(stderr); */ @@ -104,7 +104,7 @@ mallocMagic(nbytes) freeDelayedItem=NULL; } - if ((p = (void *)MallocRoutine(nbytes)) != NULL) + if ((p = (void *)MallocRoutine(nbytes)) != NULL) { /* fprintf(stderr, "alloc'd %u bytes at 0x%x\n", nbytes, p); fflush(stderr); */ diff --git a/utils/malloc.h b/utils/malloc.h index 1bb587bf..40f9edb8 100644 --- a/utils/malloc.h +++ b/utils/malloc.h @@ -6,16 +6,16 @@ * * rcsid "$Header: /usr/cvsroot/magic-8.0/utils/malloc.h,v 1.2 2009/09/10 20:32:55 tim Exp $" * - * ********************************************************************* - * * Copyright (C) 1985, 1990 Regents of the University of California. * - * * Permission to use, copy, modify, and distribute this * - * * software and its documentation for any purpose and without * - * * fee is hereby granted, provided that the above copyright * - * * notice appear in all copies. The University of California * - * * makes no representations about the suitability of this * - * * software for any purpose. It is provided "as is" without * - * * express or implied warranty. Export of this software outside * - * * of the United States of America may require an export license. * + * ********************************************************************* + * * Copyright (C) 1985, 1990 Regents of the University of California. * + * * Permission to use, copy, modify, and distribute this * + * * software and its documentation for any purpose and without * + * * fee is hereby granted, provided that the above copyright * + * * notice appear in all copies. The University of California * + * * makes no representations about the suitability of this * + * * software for any purpose. It is provided "as is" without * + * * express or implied warranty. Export of this software outside * + * * of the United States of America may require an export license. * * ********************************************************************* */ diff --git a/utils/match.c b/utils/match.c index 74d7dbf3..067574cd 100644 --- a/utils/match.c +++ b/utils/match.c @@ -2,16 +2,16 @@ * * String matching operations. * - * ********************************************************************* - * * Copyright (C) 1985, 1990 Regents of the University of California. * - * * Permission to use, copy, modify, and distribute this * - * * software and its documentation for any purpose and without * - * * fee is hereby granted, provided that the above copyright * - * * notice appear in all copies. The University of California * - * * makes no representations about the suitability of this * - * * software for any purpose. It is provided "as is" without * - * * express or implied warranty. Export of this software outside * - * * of the United States of America may require an export license. * + * ********************************************************************* + * * Copyright (C) 1985, 1990 Regents of the University of California. * + * * Permission to use, copy, modify, and distribute this * + * * software and its documentation for any purpose and without * + * * fee is hereby granted, provided that the above copyright * + * * notice appear in all copies. The University of California * + * * makes no representations about the suitability of this * + * * software for any purpose. It is provided "as is" without * + * * express or implied warranty. Export of this software outside * + * * of the United States of America may require an export license. * * ********************************************************************* */ @@ -23,7 +23,7 @@ static char rcsid[] __attribute__ ((unused)) = "$Header: /usr/cvsroot/magic-8.0/ #include "utils/magic.h" #include "textio/textio.h" - + /* * ---------------------------------------------------------------------------- * @@ -56,7 +56,7 @@ Match(pattern, string) * so, we succeeded. If we're at the end of pattern, but not * of string, we failed. */ - + if (*pattern == 0) { if (*string == 0) return TRUE; @@ -69,7 +69,7 @@ Match(pattern, string) * recursively for each postfix of string, until either we * match or we reach the end of the string. */ - + if (*pattern == '*') { pattern += 1; @@ -81,7 +81,7 @@ Match(pattern, string) } return FALSE; } - + /* Check for a "?" as the next pattern character. It matches * any single character. */ @@ -92,7 +92,7 @@ Match(pattern, string) * by a list of characters that are acceptable, or by a range * (two characters separated by "-"). */ - + if (*pattern == '[') { pattern += 1; @@ -113,11 +113,11 @@ Match(pattern, string) while ((*pattern != ']') && (*pattern != 0)) pattern += 1; goto thisCharOK; } - + /* If the next pattern character is '\', just strip off the '\' * so we do exact matching on the character that follows. */ - + if (*pattern == '\\') { pattern += 1; @@ -127,7 +127,7 @@ Match(pattern, string) /* There's no special character. Just make sure that the next * characters of each string match. */ - + if (*pattern != *string) return FALSE; thisCharOK: pattern += 1; diff --git a/utils/maxrect.c b/utils/maxrect.c index 7b7df302..86bd1a98 100644 --- a/utils/maxrect.c +++ b/utils/maxrect.c @@ -1,7 +1,7 @@ #ifndef lint static char rcsid[] __attribute__ ((unused)) = "$Header: /usr/cvsroot/magic-8.0/utils/maxrect.c,v 1.4 2010/09/24 19:53:20 tim Exp $"; -#endif +#endif #include #include @@ -164,7 +164,7 @@ FindMaxRects(tile, mrd) if (entries > (mrd->listdepth - 4)) // was entries == mrd->listdepth { - Rect *newrlist; + Rect *newrlist; mrd->listdepth <<= 1; /* double the list size */ @@ -240,7 +240,7 @@ FindMaxRects(tile, mrd) * Results: * Pointer to a rectangle containing the maximum size area found. * This pointer should not be deallocated! - * + * *------------------------------------------------------------------------- */ @@ -298,7 +298,7 @@ FindMaxRectangle(bbox, startpoint, plane, expandtypes) * Results: * Pointer to a rectangle containing the maximum size area found. * This pointer should not be deallocated! - * + * *------------------------------------------------------------------------- */ diff --git a/utils/maxrect.h b/utils/maxrect.h index 20bbe2c8..71e60e02 100644 --- a/utils/maxrect.h +++ b/utils/maxrect.h @@ -3,16 +3,16 @@ * * Definitions needed for finding maximum-area rectangles * - * ********************************************************************* - * * Copyright (C) 1985, 1990 Regents of the University of California. * - * * Permission to use, copy, modify, and distribute this * - * * software and its documentation for any purpose and without * - * * fee is hereby granted, provided that the above copyright * - * * notice appear in all copies. The University of California * - * * makes no representations about the suitability of this * - * * software for any purpose. It is provided "as is" without * - * * express or implied warranty. Export of this software outside * - * * of the United States of America may require an export license. * + * ********************************************************************* + * * Copyright (C) 1985, 1990 Regents of the University of California. * + * * Permission to use, copy, modify, and distribute this * + * * software and its documentation for any purpose and without * + * * fee is hereby granted, provided that the above copyright * + * * notice appear in all copies. The University of California * + * * makes no representations about the suitability of this * + * * software for any purpose. It is provided "as is" without * + * * express or implied warranty. Export of this software outside * + * * of the United States of America may require an export license. * * ********************************************************************* * * Needs to include: magic.h database.h diff --git a/utils/netlist.c b/utils/netlist.c index edeba540..40dd4a7d 100644 --- a/utils/netlist.c +++ b/utils/netlist.c @@ -5,16 +5,16 @@ * of a netlist, finding all locations for each terminal, and sorting * the nets of a netlist into order of increasing area on a Heap. * - * ********************************************************************* - * * Copyright (C) 1985, 1990 Regents of the University of California. * - * * Permission to use, copy, modify, and distribute this * - * * software and its documentation for any purpose and without * - * * fee is hereby granted, provided that the above copyright * - * * notice appear in all copies. The University of California * - * * makes no representations about the suitability of this * - * * software for any purpose. It is provided "as is" without * - * * express or implied warranty. Export of this software outside * - * * of the United States of America may require an export license. * + * ********************************************************************* + * * Copyright (C) 1985, 1990 Regents of the University of California. * + * * Permission to use, copy, modify, and distribute this * + * * software and its documentation for any purpose and without * + * * fee is hereby granted, provided that the above copyright * + * * notice appear in all copies. The University of California * + * * makes no representations about the suitability of this * + * * software for any purpose. It is provided "as is" without * + * * express or implied warranty. Export of this software outside * + * * of the United States of America may require an export license. * * ********************************************************************* */ @@ -41,7 +41,7 @@ static char rcsid[] __attribute__ ((unused)) = "$Header: /usr/cvsroot/magic-8.0/ /* Forward declarations */ int nlTermFunc(), nlLabelFunc(); - + /* * ---------------------------------------------------------------------------- * @@ -127,7 +127,7 @@ NLBuild(rootUse, netList) done: return (netList->nnl_numNets); } - + /* * ---------------------------------------------------------------------------- * @@ -187,7 +187,7 @@ nlTermFunc(name, firstInNet, netList) return (0); } - + /* * ---------------------------------------------------------------------------- * @@ -237,7 +237,7 @@ nlLabelFunc(area, name, label, term) (void) GeoInclude(&loc->nloc_rect, &term->nterm_net->nnet_area); return (0); } - + /* * ---------------------------------------------------------------------------- * @@ -276,7 +276,7 @@ NLFree(netList) HashKill(&netList->nnl_names); } - + /* * ---------------------------------------------------------------------------- * @@ -332,7 +332,7 @@ NLSort(netList, netHeap) } } } - + /* * ---------------------------------------------------------------------------- * diff --git a/utils/netlist.h b/utils/netlist.h index 7d0a56c5..87997630 100644 --- a/utils/netlist.h +++ b/utils/netlist.h @@ -3,16 +3,16 @@ * * This file defines the structures that represent netlists. * - * ********************************************************************* - * * Copyright (C) 1985, 1990 Regents of the University of California. * - * * Permission to use, copy, modify, and distribute this * - * * software and its documentation for any purpose and without * - * * fee is hereby granted, provided that the above copyright * - * * notice appear in all copies. The University of California * - * * makes no representations about the suitability of this * - * * software for any purpose. It is provided "as is" without * - * * express or implied warranty. Export of this software outside * - * * of the United States of America may require an export license. * + * ********************************************************************* + * * Copyright (C) 1985, 1990 Regents of the University of California. * + * * Permission to use, copy, modify, and distribute this * + * * software and its documentation for any purpose and without * + * * fee is hereby granted, provided that the above copyright * + * * notice appear in all copies. The University of California * + * * makes no representations about the suitability of this * + * * software for any purpose. It is provided "as is" without * + * * express or implied warranty. Export of this software outside * + * * of the United States of America may require an export license. * * ********************************************************************* * * diff --git a/utils/niceabort.c b/utils/niceabort.c index a8885a15..8c23fb5b 100644 --- a/utils/niceabort.c +++ b/utils/niceabort.c @@ -4,16 +4,16 @@ * Nice version of abort which dumps core without actually * killing the running job. * - * ********************************************************************* - * * Copyright (C) 1985, 1990 Regents of the University of California. * - * * Permission to use, copy, modify, and distribute this * - * * software and its documentation for any purpose and without * - * * fee is hereby granted, provided that the above copyright * - * * notice appear in all copies. The University of California * - * * makes no representations about the suitability of this * - * * software for any purpose. It is provided "as is" without * - * * express or implied warranty. Export of this software outside * - * * of the United States of America may require an export license. * + * ********************************************************************* + * * Copyright (C) 1985, 1990 Regents of the University of California. * + * * Permission to use, copy, modify, and distribute this * + * * software and its documentation for any purpose and without * + * * fee is hereby granted, provided that the above copyright * + * * notice appear in all copies. The University of California * + * * makes no representations about the suitability of this * + * * software for any purpose. It is provided "as is" without * + * * express or implied warranty. Export of this software outside * + * * of the United States of America may require an export license. * * ********************************************************************* */ @@ -61,7 +61,7 @@ time_t time(); char *ctime(); void -DumpCore() +DumpCore() { int parentPid = getpid(); int cpid, gcpid, wpid; @@ -161,7 +161,7 @@ DumpCore() } } - + /* * ---------------------------------------------------------------------------- * @@ -186,7 +186,7 @@ niceabort() timesCalled++; TxPrintf("-------------------- Error #%d\n", timesCalled); - if (timesCalled > 10) + if (timesCalled > 10) { TxPrintf("\nAbort called more than 10 times -- things are really hosed!\n"); TxPrintf("Recommendation:\n"); @@ -194,7 +194,7 @@ niceabort() TxPrintf(" 2) Send magic a SIGTERM signal and it will ATTEMPT to write out your files.\n"); TxPrintf(" (It might trash them, though.)\n"); TxPrintf("Magic going to sleep now for 10 hours -- please kill me.\n"); - sleep(3600); + sleep(3600); } TxPrintf("Magic has encountered a major internal inconsistency:\n\n"); diff --git a/utils/parser.c b/utils/parser.c index 7019cd1b..6c89224a 100644 --- a/utils/parser.c +++ b/utils/parser.c @@ -3,16 +3,16 @@ * * Handles textual parsing. * - * ********************************************************************* - * * Copyright (C) 1985, 1990 Regents of the University of California. * - * * Permission to use, copy, modify, and distribute this * - * * software and its documentation for any purpose and without * - * * fee is hereby granted, provided that the above copyright * - * * notice appear in all copies. The University of California * - * * makes no representations about the suitability of this * - * * software for any purpose. It is provided "as is" without * - * * express or implied warranty. Export of this software outside * - * * of the United States of America may require an export license. * + * ********************************************************************* + * * Copyright (C) 1985, 1990 Regents of the University of California. * + * * Permission to use, copy, modify, and distribute this * + * * software and its documentation for any purpose and without * + * * fee is hereby granted, provided that the above copyright * + * * notice appear in all copies. The University of California * + * * makes no representations about the suitability of this * + * * software for any purpose. It is provided "as is" without * + * * express or implied warranty. Export of this software outside * + * * of the United States of America may require an export license. * * ********************************************************************* * */ @@ -29,7 +29,7 @@ static char rcsid[] __attribute__ ((unused)) = "$Header: /usr/cvsroot/magic-8.0/ #define ISEND(ch) ((ch == '\0') || (ch == ';')) - + /* * ---------------------------------------------------------------------------- * ParsSplit: @@ -89,7 +89,7 @@ ParsSplit(str, maxArgc, argc, argv, remainder) *newstrp++ = *strp++; strp++; } - /* + /* * rajit@cs.caltech.edu * keep " " around strings to distinguish symbols from strings. * the lisp evaluator strips these quotes after parsing the @@ -145,7 +145,7 @@ ParsSplit(str, maxArgc, argc, argv, remainder) { *++largv = newstrp; } - else + else { TxError("Too many arguments.\n"); *remainder = NULL; @@ -153,7 +153,7 @@ ParsSplit(str, maxArgc, argc, argv, remainder) } } } - + ASSERT(remainder != (char **) NULL, "ParsSplit"); if (terminator != '\0') diff --git a/utils/parsetest.c b/utils/parsetest.c index 112c28f6..03e5f03f 100644 --- a/utils/parsetest.c +++ b/utils/parsetest.c @@ -21,7 +21,7 @@ main() int i; TxPrintf("-->"); - TxGetLine(str, 99); + TxGetLine(str, 99); TxPrintf("Line is '%s'\n", str); if (!ParsSplit(str, 3, &argCount, args)) TxError("Parser failed\n"); diff --git a/utils/path.c b/utils/path.c index b7f315ad..cce6896f 100644 --- a/utils/path.c +++ b/utils/path.c @@ -1,15 +1,15 @@ /* path.c * - * ********************************************************************* - * * Copyright (C) 1985, 1990 Regents of the University of California. * - * * Permission to use, copy, modify, and distribute this * - * * software and its documentation for any purpose and without * - * * fee is hereby granted, provided that the above copyright * - * * notice appear in all copies. The University of California * - * * makes no representations about the suitability of this * - * * software for any purpose. It is provided "as is" without * - * * express or implied warranty. Export of this software outside * - * * of the United States of America may require an export license. * + * ********************************************************************* + * * Copyright (C) 1985, 1990 Regents of the University of California. * + * * Permission to use, copy, modify, and distribute this * + * * software and its documentation for any purpose and without * + * * fee is hereby granted, provided that the above copyright * + * * notice appear in all copies. The University of California * + * * makes no representations about the suitability of this * + * * software for any purpose. It is provided "as is" without * + * * express or implied warranty. Export of this software outside * + * * of the United States of America may require an export license. * * ********************************************************************* * * This file contains routines that implement a path mechanism, whereby @@ -55,7 +55,7 @@ static bool noTable = TRUE; * Add a string to the designated path variable. * * pathptr is a pointer to the path variable; srcptr is the - * newstring is the new string to append to the path. + * newstring is the new string to append to the path. */ void PaAppend(char **pathptr, char *newstring) @@ -73,7 +73,7 @@ PaAppend(char **pathptr, char *newstring) *pathptr = new; } - + /*------------------------------------------------------------------- * PaExpand -- * This routine converts tilde notation and environment variable @@ -157,7 +157,7 @@ PaExpand(psource, pdest, size) * home directory. */ - if (strcmp(expandName, "") == 0) + if (strcmp(expandName, "") == 0) string = getenv("HOME"); else { @@ -284,7 +284,7 @@ noexpand: return size; } - + /* ---------------------------------------------------------------------------- * nextName -- * This local procedure is used to step through a path, adding a @@ -358,7 +358,7 @@ nextName(ppath, file, dest, size) * the given file name. If the first character of the * file name is "~" or "/" or if nosearch is TRUE, then we try * to look up the file with the original name, doing tilde - * expansion of course and returning that result. If none of + * expansion of course and returning that result. If none of * these conditions is met, we go through the path trying to * look up the file once for each path entry by prepending the * path entry to the original file name. This concatenated name @@ -598,7 +598,7 @@ char *newWD; /* New working directory to be used. Must /* Scan through the old path, copying separators to the new * path until getting the first character of the directory. */ - + while (isspace(*pOld) || (*pOld == ':')) { if (spaceLeft <= 0) goto subsDone; @@ -609,7 +609,7 @@ char *newWD; /* New working directory to be used. Must /* If the first character of the directory isn't a "/", "$", or "~", * then add in the new directory name in front of it in newPath. */ - + if ((*pOld != '/') && (*pOld != '~') && (*pOld != '$') && (*pOld != 0)) { pWD = newWD; @@ -639,7 +639,7 @@ char *newWD; /* New working directory to be used. Must else newPath[NEWPATHSIZE-1] = 0; return newPath; } - + /* * ---------------------------------------------------------------------------- * PaEnum -- diff --git a/utils/paths.h b/utils/paths.h index 345513ea..b4e07b95 100644 --- a/utils/paths.h +++ b/utils/paths.h @@ -4,16 +4,16 @@ * Definitions of Unix filename paths used by Magic and related utility * programs. * - * ********************************************************************* - * * Copyright (C) 1985, 1990 Regents of the University of California. * - * * Permission to use, copy, modify, and distribute this * - * * software and its documentation for any purpose and without * - * * fee is hereby granted, provided that the above copyright * - * * notice appear in all copies. The University of California * - * * makes no representations about the suitability of this * - * * software for any purpose. It is provided "as is" without * - * * express or implied warranty. Export of this software outside * - * * of the United States of America may require an export license. * + * ********************************************************************* + * * Copyright (C) 1985, 1990 Regents of the University of California. * + * * Permission to use, copy, modify, and distribute this * + * * software and its documentation for any purpose and without * + * * fee is hereby granted, provided that the above copyright * + * * notice appear in all copies. The University of California * + * * makes no representations about the suitability of this * + * * software for any purpose. It is provided "as is" without * + * * express or implied warranty. Export of this software outside * + * * of the United States of America may require an export license. * * ********************************************************************* * * diff --git a/utils/pathvisit.c b/utils/pathvisit.c index a56bd675..d9b87f78 100644 --- a/utils/pathvisit.c +++ b/utils/pathvisit.c @@ -1,16 +1,16 @@ /* * pathvisit.c * - * ********************************************************************* - * * Copyright (C) 1985, 1990 Regents of the University of California. * - * * Permission to use, copy, modify, and distribute this * - * * software and its documentation for any purpose and without * - * * fee is hereby granted, provided that the above copyright * - * * notice appear in all copies. The University of California * - * * makes no representations about the suitability of this * - * * software for any purpose. It is provided "as is" without * - * * express or implied warranty. Export of this software outside * - * * of the United States of America may require an export license. * + * ********************************************************************* + * * Copyright (C) 1985, 1990 Regents of the University of California. * + * * Permission to use, copy, modify, and distribute this * + * * software and its documentation for any purpose and without * + * * fee is hereby granted, provided that the above copyright * + * * notice appear in all copies. The University of California * + * * makes no representations about the suitability of this * + * * software for any purpose. It is provided "as is" without * + * * express or implied warranty. Export of this software outside * + * * of the United States of America may require an export license. * * ********************************************************************* * * This file contains several procedures to implement a means of scanning @@ -32,7 +32,7 @@ static char rcsid[] __attribute__ ((unused)) = "$Header: /usr/cvsroot/magic-8.0/ #include "utils/pathvisit.h" #include "utils/utils.h" - + /* * ------------------------------------------------------------------- * @@ -60,7 +60,7 @@ PaVisitInit() pv->pv_first = pv->pv_last = (PaVisitClient *) NULL; return (pv); } - + /* * ------------------------------------------------------------------- * @@ -92,7 +92,7 @@ PaVisitFree(pv) freeMagic((char *) pv); } - + /* * ------------------------------------------------------------------- * @@ -147,7 +147,7 @@ PaVisitAddClient(pv, keyword, proc, cdata) pv->pv_first = pv->pv_last = pvc; } } - + /* * ------------------------------------------------------------------- * diff --git a/utils/pathvisit.h b/utils/pathvisit.h index eeda3452..f05755a3 100644 --- a/utils/pathvisit.h +++ b/utils/pathvisit.h @@ -1,16 +1,16 @@ /* * pathvisit.h -- * - * ********************************************************************* - * * Copyright (C) 1985, 1990 Regents of the University of California. * - * * Permission to use, copy, modify, and distribute this * - * * software and its documentation for any purpose and without * - * * fee is hereby granted, provided that the above copyright * - * * notice appear in all copies. The University of California * - * * makes no representations about the suitability of this * - * * software for any purpose. It is provided "as is" without * - * * express or implied warranty. Export of this software outside * - * * of the United States of America may require an export license. * + * ********************************************************************* + * * Copyright (C) 1985, 1990 Regents of the University of California. * + * * Permission to use, copy, modify, and distribute this * + * * software and its documentation for any purpose and without * + * * fee is hereby granted, provided that the above copyright * + * * notice appear in all copies. The University of California * + * * makes no representations about the suitability of this * + * * software for any purpose. It is provided "as is" without * + * * express or implied warranty. Export of this software outside * + * * of the United States of America may require an export license. * * ********************************************************************* * * This file defines the PaVisit structure used by pathvisit.c. diff --git a/utils/port.c b/utils/port.c index 7b54fad4..1ce6c719 100644 --- a/utils/port.c +++ b/utils/port.c @@ -1,15 +1,15 @@ /* port.c * - * ********************************************************************* - * * Copyright (C) 1985, 1990 Regents of the University of California. * - * * Permission to use, copy, modify, and distribute this * - * * software and its documentation for any purpose and without * - * * fee is hereby granted, provided that the above copyright * - * * notice appear in all copies. The University of California * - * * makes no representations about the suitability of this * - * * software for any purpose. It is provided "as is" without * - * * express or implied warranty. Export of this software outside * - * * of the United States of America may require an export license. * + * ********************************************************************* + * * Copyright (C) 1985, 1990 Regents of the University of California. * + * * Permission to use, copy, modify, and distribute this * + * * software and its documentation for any purpose and without * + * * fee is hereby granted, provided that the above copyright * + * * notice appear in all copies. The University of California * + * * makes no representations about the suitability of this * + * * software for any purpose. It is provided "as is" without * + * * express or implied warranty. Export of this software outside * + * * of the United States of America may require an export license. * * ********************************************************************* * * This file contains routines that are needed when porting between machines. diff --git a/utils/runstats.c b/utils/runstats.c index 602618b5..f681fc52 100644 --- a/utils/runstats.c +++ b/utils/runstats.c @@ -5,16 +5,16 @@ * containing the amount of user and system time used so far, * as well as the size of the data area. * - * ********************************************************************* - * * Copyright (C) 1985, 1990 Regents of the University of California. * - * * Permission to use, copy, modify, and distribute this * - * * software and its documentation for any purpose and without * - * * fee is hereby granted, provided that the above copyright * - * * notice appear in all copies. The University of California * - * * makes no representations about the suitability of this * - * * software for any purpose. It is provided "as is" without * - * * express or implied warranty. Export of this software outside * - * * of the United States of America may require an export license. * + * ********************************************************************* + * * Copyright (C) 1985, 1990 Regents of the University of California. * + * * Permission to use, copy, modify, and distribute this * + * * software and its documentation for any purpose and without * + * * fee is hereby granted, provided that the above copyright * + * * notice appear in all copies. The University of California * + * * makes no representations about the suitability of this * + * * software for any purpose. It is provided "as is" without * + * * express or implied warranty. Export of this software outside * + * * of the United States of America may require an export license. * * ********************************************************************* */ @@ -41,7 +41,7 @@ extern void *sbrk(); int end; #endif #endif - + /* * ---------------------------------------------------------------------------- * diff --git a/utils/runstats.h b/utils/runstats.h index 219534bf..b6b865bb 100644 --- a/utils/runstats.h +++ b/utils/runstats.h @@ -3,16 +3,16 @@ * * Flags to RunStats() * - * ********************************************************************* - * * Copyright (C) 1985, 1990 Regents of the University of California. * - * * Permission to use, copy, modify, and distribute this * - * * software and its documentation for any purpose and without * - * * fee is hereby granted, provided that the above copyright * - * * notice appear in all copies. The University of California * - * * makes no representations about the suitability of this * - * * software for any purpose. It is provided "as is" without * - * * express or implied warranty. Export of this software outside * - * * of the United States of America may require an export license. * + * ********************************************************************* + * * Copyright (C) 1985, 1990 Regents of the University of California. * + * * Permission to use, copy, modify, and distribute this * + * * software and its documentation for any purpose and without * + * * fee is hereby granted, provided that the above copyright * + * * notice appear in all copies. The University of California * + * * makes no representations about the suitability of this * + * * software for any purpose. It is provided "as is" without * + * * express or implied warranty. Export of this software outside * + * * of the United States of America may require an export license. * * ********************************************************************* * * rcsid "$Header: /usr/cvsroot/magic-8.0/utils/runstats.h,v 1.1.1.1 2008/02/03 20:43:50 tim Exp $" diff --git a/utils/set.c b/utils/set.c index c91532da..ac684c8b 100644 --- a/utils/set.c +++ b/utils/set.c @@ -4,16 +4,16 @@ * parameter values. Error messages are printed for invalid * input strings. * - * ********************************************************************* - * * Copyright (C) 1985, 1990 Regents of the University of California. * - * * Permission to use, copy, modify, and distribute this * - * * software and its documentation for any purpose and without * - * * fee is hereby granted, provided that the above copyright * - * * notice appear in all copies. The University of California * - * * makes no representations about the suitability of this * - * * software for any purpose. It is provided "as is" without * - * * express or implied warranty. Export of this software outside * - * * of the United States of America may require an export license. * + * ********************************************************************* + * * Copyright (C) 1985, 1990 Regents of the University of California. * + * * Permission to use, copy, modify, and distribute this * + * * software and its documentation for any purpose and without * + * * fee is hereby granted, provided that the above copyright * + * * notice appear in all copies. The University of California * + * * makes no representations about the suitability of this * + * * software for any purpose. It is provided "as is" without * + * * express or implied warranty. Export of this software outside * + * * of the United States of America may require an export license. * * ********************************************************************* */ @@ -32,14 +32,14 @@ static char rcsid[] __attribute__ ((unused)) = "$Header: /usr/cvsroot/magic-8.0/ #include "database/database.h" #include "utils/list.h" - + /* * ---------------------------------------------------------------------------- * * SetNoisy -- * * Set parameter and print current value. - * + * * Results: * None. SetNoisyBool() now returns -2 on error, -1 ambiguous * (but what's ambiguous about true/false??), 0 on success. All @@ -55,7 +55,7 @@ static char rcsid[] __attribute__ ((unused)) = "$Header: /usr/cvsroot/magic-8.0/ * * If file is null, parameter value is written to magic text window via * TxPrintf - * + * * ---------------------------------------------------------------------------- */ @@ -116,14 +116,14 @@ SetNoisyBool(parm,valueS,file) "off", FALSE, 0 }; - + /* If value not null, set parm */ if (valueS) { /* Lookup value string in boolString table */ which = LookupStruct( - valueS, - (LookupTable *) boolStrings, + valueS, + (LookupTable *) boolStrings, sizeof boolStrings[0]); /* Process result of lookup */ @@ -136,11 +136,11 @@ SetNoisyBool(parm,valueS,file) else if (which == -1) { /* ambiguous boolean value - complain */ - TxError("Ambiguous boolean value: \"%s\"\n", + TxError("Ambiguous boolean value: \"%s\"\n", valueS); result = -1; } - else + else { TxError("Unrecognized boolean value: \"%s\"\n", valueS); TxError("Valid values are: "); @@ -150,7 +150,7 @@ SetNoisyBool(parm,valueS,file) result = -2; } } - + /* Print parm value */ if(file) fprintf(file,"%8.8s ", *parm ? "YES" : "NO"); @@ -182,7 +182,7 @@ SetNoisyDI(parm,valueS,file) *parm = (dlong)atoi(valueS); } } - + /* Print parm value */ { if(file) diff --git a/utils/show.c b/utils/show.c index 8d373d47..7d41223f 100644 --- a/utils/show.c +++ b/utils/show.c @@ -3,16 +3,16 @@ * Routines for displaying rects with highlights etc. Useful for * debugging. * - * ********************************************************************* - * * Copyright (C) 1985, 1990 Regents of the University of California. * - * * Permission to use, copy, modify, and distribute this * - * * software and its documentation for any purpose and without * - * * fee is hereby granted, provided that the above copyright * - * * notice appear in all copies. The University of California * - * * makes no representations about the suitability of this * - * * software for any purpose. It is provided "as is" without * - * * express or implied warranty. Export of this software outside * - * * of the United States of America may require an export license. * + * ********************************************************************* + * * Copyright (C) 1985, 1990 Regents of the University of California. * + * * Permission to use, copy, modify, and distribute this * + * * software and its documentation for any purpose and without * + * * fee is hereby granted, provided that the above copyright * + * * notice appear in all copies. The University of California * + * * makes no representations about the suitability of this * + * * software for any purpose. It is provided "as is" without * + * * express or implied warranty. Export of this software outside * + * * of the United States of America may require an export license. * * ********************************************************************* */ @@ -31,7 +31,7 @@ static char rcsid[] __attribute__ ((unused)) = "$Header: /usr/cvsroot/magic-8.0/ #include "database/database.h" #include "dbwind/dbwind.h" - + /* * ---------------------------------------------------------------------------- * diff --git a/utils/signals.c b/utils/signals.c index dcc547bd..974447ce 100644 --- a/utils/signals.c +++ b/utils/signals.c @@ -3,16 +3,16 @@ * * Handles signals, such as stop, start, interrupt. * - * ********************************************************************* - * * Copyright (C) 1985, 1990 Regents of the University of California. * - * * Permission to use, copy, modify, and distribute this * - * * software and its documentation for any purpose and without * - * * fee is hereby granted, provided that the above copyright * - * * notice appear in all copies. The University of California * - * * makes no representations about the suitability of this * - * * software for any purpose. It is provided "as is" without * - * * express or implied warranty. Export of this software outside * - * * of the United States of America may require an export license. * + * ********************************************************************* + * * Copyright (C) 1985, 1990 Regents of the University of California. * + * * Permission to use, copy, modify, and distribute this * + * * software and its documentation for any purpose and without * + * * fee is hereby granted, provided that the above copyright * + * * notice appear in all copies. The University of California * + * * makes no representations about the suitability of this * + * * software for any purpose. It is provided "as is" without * + * * express or implied warranty. Export of this software outside * + * * of the United States of America may require an export license. * * ********************************************************************* */ @@ -96,13 +96,13 @@ global bool SigIOReady = FALSE; global char SigInterruptOnSigIO; /* - * Set to true when we recieve a SIGWINCH/SIGWINDOW signal + * Set to true when we recieve a SIGWINCH/SIGWINDOW signal * (indicating that a window has changed size or otherwise needs attention). */ global bool SigGotSigWinch = FALSE; -/* +/* * Local data structures */ static bool sigInterruptReceived = FALSE; @@ -125,7 +125,7 @@ void SigSetTimer(int secs) { struct itimerval subsecond; /* one-quarter second interval */ - + /* if (GrDisplayStatus == DISPLAY_IDLE) fprintf(stderr, "Timer start\n"); @@ -133,7 +133,7 @@ SigSetTimer(int secs) fprintf(stderr, "Timer repeat\n"); fflush(stderr); */ - + subsecond.it_interval.tv_sec = 0; subsecond.it_interval.tv_usec = 0; subsecond.it_value.tv_sec = secs; @@ -150,7 +150,7 @@ void SigRemoveTimer() { struct itimerval zero; /* zero time to stop the timer */ - + /* fprintf(stderr, "Timer stop\n"); fflush(stderr); */ zero.it_value.tv_sec = 0; @@ -212,14 +212,14 @@ sigOnStop(int signo) /* restore the default action and resend the signal */ sigSetAction(SIGTSTP, SIG_DFL); - kill(getpid(), + kill(getpid(), #ifdef linux SIGSTOP #else SIGTSTP #endif - ); - + ); + /* -- we stop here -- */ /* NOTE: The following code really belongs in a routine that is @@ -316,7 +316,7 @@ SigDisableInterrupts() * ---------------------------------------------------------------------------- * SigWatchFile -- * - * Take interrupts on a given IO stream. + * Take interrupts on a given IO stream. * * Results: * None. @@ -355,17 +355,17 @@ SigWatchFile(filenum, filename) if (!iswindow) { if (fcntl(filenum, F_SETOWN, -getpid()) == -1) - perror("(Magic) SigWatchFile2"); + perror("(Magic) SigWatchFile2"); } #endif #endif /* SYSV */ #ifdef FASYNC - if (fcntl(filenum, F_SETFL, flags | FASYNC) == -1) + if (fcntl(filenum, F_SETFL, flags | FASYNC) == -1) perror("(Magic) SigWatchFile3"); #else # ifdef FIOASYNC flags = 1; - if (ioctl(filenum, FIOASYNC, &flags) == -1) + if (ioctl(filenum, FIOASYNC, &flags) == -1) perror("(Magic) SigWatchFile3a"); # endif #endif @@ -374,12 +374,12 @@ SigWatchFile(filenum, filename) { #ifdef FASYNC /* turn off FASYNC */ - if (fcntl(filenum, F_SETFL, flags & (~FASYNC)) == -1) + if (fcntl(filenum, F_SETFL, flags & (~FASYNC)) == -1) perror("(Magic) SigWatchFile4"); #else # ifdef FIOASYNC flags = 0; - if (ioctl(filenum, FIOASYNC, &flags) == -1) + if (ioctl(filenum, FIOASYNC, &flags) == -1) perror("(Magic) SigWatchFile3b"); # endif #endif @@ -391,13 +391,13 @@ SigWatchFile(filenum, filename) * ---------------------------------------------------------------------------- * SigUnWatchFile -- * - * Do not take interrupts on a given IO stream. + * Do not take interrupts on a given IO stream. * * Results: * None. * * Side effects: - * SigIOReady will be not set when the IO stream becomes ready. + * SigIOReady will be not set when the IO stream becomes ready. * ---------------------------------------------------------------------------- */ /*ARGSUSED*/ @@ -421,12 +421,12 @@ SigUnWatchFile(filenum, filename) #ifdef FASYNC /* turn off FASYNC */ - if (fcntl(filenum, F_SETFL, flags & (~FASYNC)) == -1) + if (fcntl(filenum, F_SETFL, flags & (~FASYNC)) == -1) perror("(Magic) SigUnWatchFile4"); #else # ifdef FIOASYNC flags = 0; - if (ioctl(filenum, FIOASYNC, &flags) == -1) + if (ioctl(filenum, FIOASYNC, &flags) == -1) perror("(Magic) SigWatchFile3"); # endif #endif diff --git a/utils/signals.h b/utils/signals.h index 41cf7929..b4d9cfc2 100644 --- a/utils/signals.h +++ b/utils/signals.h @@ -3,16 +3,16 @@ * * Routines to signals, such as handle keyboard interrupts * - * ********************************************************************* - * * Copyright (C) 1985, 1990 Regents of the University of California. * - * * Permission to use, copy, modify, and distribute this * - * * software and its documentation for any purpose and without * - * * fee is hereby granted, provided that the above copyright * - * * notice appear in all copies. The University of California * - * * makes no representations about the suitability of this * - * * software for any purpose. It is provided "as is" without * - * * express or implied warranty. Export of this software outside * - * * of the United States of America may require an export license. * + * ********************************************************************* + * * Copyright (C) 1985, 1990 Regents of the University of California. * + * * Permission to use, copy, modify, and distribute this * + * * software and its documentation for any purpose and without * + * * fee is hereby granted, provided that the above copyright * + * * notice appear in all copies. The University of California * + * * makes no representations about the suitability of this * + * * software for any purpose. It is provided "as is" without * + * * express or implied warranty. Export of this software outside * + * * of the United States of America may require an export license. * * ********************************************************************* * * @@ -25,7 +25,7 @@ #include "utils/magic.h" /* Some machines have signal handlers returning an int, while other machines - * have it returning a void. If you have a machine that requires ints put + * have it returning a void. If you have a machine that requires ints put * it in the list of machines in utils/magic.h. */ #ifdef SIG_RETURNS_INT diff --git a/utils/stack.c b/utils/stack.c index bcbd9697..ab54054a 100644 --- a/utils/stack.c +++ b/utils/stack.c @@ -3,16 +3,16 @@ * * General purpose stack manipulation routines. * - * ********************************************************************* - * * Copyright (C) 1985, 1990 Regents of the University of California. * - * * Permission to use, copy, modify, and distribute this * - * * software and its documentation for any purpose and without * - * * fee is hereby granted, provided that the above copyright * - * * notice appear in all copies. The University of California * - * * makes no representations about the suitability of this * - * * software for any purpose. It is provided "as is" without * - * * express or implied warranty. Export of this software outside * - * * of the United States of America may require an export license. * + * ********************************************************************* + * * Copyright (C) 1985, 1990 Regents of the University of California. * + * * Permission to use, copy, modify, and distribute this * + * * software and its documentation for any purpose and without * + * * fee is hereby granted, provided that the above copyright * + * * notice appear in all copies. The University of California * + * * makes no representations about the suitability of this * + * * software for any purpose. It is provided "as is" without * + * * express or implied warranty. Export of this software outside * + * * of the United States of America may require an export license. * * ********************************************************************* */ @@ -28,7 +28,7 @@ static char rcsid[] __attribute__ ((unused)) = "$Header: /usr/cvsroot/magic-8.0/ #include "utils/malloc.h" bool stackCopyStr; - + /* * ---------------------------------------------------------------------------- * StackNew -- @@ -59,7 +59,7 @@ StackNew(sincr) return (stack); } - + /* * ---------------------------------------------------------------------------- * StackFree -- @@ -89,7 +89,7 @@ StackFree(stack) freeMagic((char *) stack); } - + /* * ---------------------------------------------------------------------------- * StackPush -- @@ -122,7 +122,7 @@ StackPush(arg, stack) *(stack->st_ptr++) = arg; } - + /* * ---------------------------------------------------------------------------- * StackPop -- @@ -159,7 +159,7 @@ StackPop(stack) return (*--(stack->st_ptr)); } - + /* * ---------------------------------------------------------------------------- * StackLook -- @@ -192,7 +192,7 @@ StackLook(stack) return ( *(stack->st_ptr - 1) ); } - + /* * ---------------------------------------------------------------------------- * @@ -237,7 +237,7 @@ StackEnum(stack, func, cd) } } } - + /* * ---------------------------------------------------------------------------- * diff --git a/utils/stack.h b/utils/stack.h index 3e80dd58..73885500 100644 --- a/utils/stack.h +++ b/utils/stack.h @@ -3,16 +3,16 @@ * * General purpose stack manipulation routines. * - * ********************************************************************* - * * Copyright (C) 1985, 1990 Regents of the University of California. * - * * Permission to use, copy, modify, and distribute this * - * * software and its documentation for any purpose and without * - * * fee is hereby granted, provided that the above copyright * - * * notice appear in all copies. The University of California * - * * makes no representations about the suitability of this * - * * software for any purpose. It is provided "as is" without * - * * express or implied warranty. Export of this software outside * - * * of the United States of America may require an export license. * + * ********************************************************************* + * * Copyright (C) 1985, 1990 Regents of the University of California. * + * * Permission to use, copy, modify, and distribute this * + * * software and its documentation for any purpose and without * + * * fee is hereby granted, provided that the above copyright * + * * notice appear in all copies. The University of California * + * * makes no representations about the suitability of this * + * * software for any purpose. It is provided "as is" without * + * * express or implied warranty. Export of this software outside * + * * of the United States of America may require an export license. * * ********************************************************************* * * Needs to include magic.h diff --git a/utils/strdup.c b/utils/strdup.c index 54cee6d2..e1087081 100644 --- a/utils/strdup.c +++ b/utils/strdup.c @@ -3,16 +3,16 @@ * * Return a malloc'd copy of a string. * - * ********************************************************************* - * * Copyright (C) 1985, 1990 Regents of the University of California. * - * * Permission to use, copy, modify, and distribute this * - * * software and its documentation for any purpose and without * - * * fee is hereby granted, provided that the above copyright * - * * notice appear in all copies. The University of California * - * * makes no representations about the suitability of this * - * * software for any purpose. It is provided "as is" without * - * * express or implied warranty. Export of this software outside * - * * of the United States of America may require an export license. * + * ********************************************************************* + * * Copyright (C) 1985, 1990 Regents of the University of California. * + * * Permission to use, copy, modify, and distribute this * + * * software and its documentation for any purpose and without * + * * fee is hereby granted, provided that the above copyright * + * * notice appear in all copies. The University of California * + * * makes no representations about the suitability of this * + * * software for any purpose. It is provided "as is" without * + * * express or implied warranty. Export of this software outside * + * * of the United States of America may require an export license. * * ********************************************************************* */ @@ -28,7 +28,7 @@ static char rcsid[] __attribute__ ((unused)) = "$Header: /usr/cvsroot/magic-8.0/ #include "utils/magic.h" #include "utils/malloc.h" - + /* * ---------------------------------------------------------------------------- * StrDup -- @@ -73,7 +73,7 @@ StrDup(oldstr, str) return (newstr); } - + /* * ---------------------------------------------------------------------------- * StrIsWhite: @@ -104,7 +104,7 @@ StrIsWhite(line, commentok) return TRUE; } - + /* * ---------------------------------------------------------------------------- * @@ -156,7 +156,7 @@ StrIsNumeric(s) { double result; char *endptr; - + result = strtod(s, &endptr); if (endptr == s) return FALSE; diff --git a/utils/styles.h b/utils/styles.h index 31cecb1b..ce0b8105 100644 --- a/utils/styles.h +++ b/utils/styles.h @@ -3,16 +3,16 @@ * * Definitions of styles used for system purposes. * - * ********************************************************************* - * * Copyright (C) 1985, 1990 Regents of the University of California. * - * * Permission to use, copy, modify, and distribute this * - * * software and its documentation for any purpose and without * - * * fee is hereby granted, provided that the above copyright * - * * notice appear in all copies. The University of California * - * * makes no representations about the suitability of this * - * * software for any purpose. It is provided "as is" without * - * * express or implied warranty. Export of this software outside * - * * of the United States of America may require an export license. * + * ********************************************************************* + * * Copyright (C) 1985, 1990 Regents of the University of California. * + * * Permission to use, copy, modify, and distribute this * + * * software and its documentation for any purpose and without * + * * fee is hereby granted, provided that the above copyright * + * * notice appear in all copies. The University of California * + * * makes no representations about the suitability of this * + * * software for any purpose. It is provided "as is" without * + * * express or implied warranty. Export of this software outside * + * * of the United States of America may require an export license. * * ********************************************************************* * * rcsid: $Header: /usr/cvsroot/magic-8.0/utils/styles.h,v 1.2 2008/12/11 04:20:14 tim Exp $ @@ -150,7 +150,7 @@ #define TECHBEGINSTYLES 52 - + /* * Here are the cursors defined in the standard styles file. * diff --git a/utils/tech.c b/utils/tech.c index 41b6d7fd..e64caacf 100644 --- a/utils/tech.c +++ b/utils/tech.c @@ -3,16 +3,16 @@ * * Read in a technology file. * - * ********************************************************************* - * * Copyright (C) 1985, 1990 Regents of the University of California. * - * * Permission to use, copy, modify, and distribute this * - * * software and its documentation for any purpose and without * - * * fee is hereby granted, provided that the above copyright * - * * notice appear in all copies. The University of California * - * * makes no representations about the suitability of this * - * * software for any purpose. It is provided "as is" without * - * * express or implied warranty. Export of this software outside * - * * of the United States of America may require an export license. * + * ********************************************************************* + * * Copyright (C) 1985, 1990 Regents of the University of California. * + * * Permission to use, copy, modify, and distribute this * + * * software and its documentation for any purpose and without * + * * fee is hereby granted, provided that the above copyright * + * * notice appear in all copies. The University of California * + * * makes no representations about the suitability of this * + * * software for any purpose. It is provided "as is" without * + * * express or implied warranty. Export of this software outside * + * * of the United States of America may require an export license. * * ********************************************************************* */ @@ -105,7 +105,7 @@ techSection *techSectionFree; /* Pointer to next free section */ techSection *techCurrentSection; /* Pointer to current section */ techSection *techFindSection(); - + /* * ---------------------------------------------------------------------------- * @@ -372,7 +372,7 @@ TechAddClient(sectionName, init, proc, final, prevSections, pSectionID, opt) tcl->tc_next = tcp; } } - + /* * ---------------------------------------------------------------------------- * TechLoad -- @@ -526,8 +526,8 @@ TechLoad(filename, initmask) #endif ExtTechInit(); DRCTechInit(); - MZTechInit(); - + MZTechInit(); + /* Changing number of planes requires handling on every */ /* celldef. So we need to save the original number of */ /* planes to see if it shrinks or expands. */ @@ -762,7 +762,7 @@ skipsection: return (retval); } - + /* * ---------------------------------------------------------------------------- * @@ -805,7 +805,7 @@ TechError(char *fmt, ...) va_end(args); } - + /* ================== Functions local to this module ================== */ /* @@ -843,7 +843,7 @@ techFindSection(sectionName) } return ((techSection *) NULL); } - + /* * ---------------------------------------------------------------------------- * @@ -952,7 +952,7 @@ start: * Grab up characters to the end of the token. Any character * preceded by a backslash is taken literally. */ - + while (*get != '\0') { if (inquote) @@ -977,7 +977,7 @@ start: */ if (get == argv[argc]) break; - + /* Terminate the token and advance over the terminating character. */ if (*get != '\0') get++; /* Careful! could be at end of line! */ diff --git a/utils/tech.h b/utils/tech.h index 7c3a495f..bc22e4af 100644 --- a/utils/tech.h +++ b/utils/tech.h @@ -3,16 +3,16 @@ * * Interface to technology module. * - * ********************************************************************* - * * Copyright (C) 1985, 1990 Regents of the University of California. * - * * Permission to use, copy, modify, and distribute this * - * * software and its documentation for any purpose and without * - * * fee is hereby granted, provided that the above copyright * - * * notice appear in all copies. The University of California * - * * makes no representations about the suitability of this * - * * software for any purpose. It is provided "as is" without * - * * express or implied warranty. Export of this software outside * - * * of the United States of America may require an export license. * + * ********************************************************************* + * * Copyright (C) 1985, 1990 Regents of the University of California. * + * * Permission to use, copy, modify, and distribute this * + * * software and its documentation for any purpose and without * + * * fee is hereby granted, provided that the above copyright * + * * notice appear in all copies. The University of California * + * * makes no representations about the suitability of this * + * * software for any purpose. It is provided "as is" without * + * * express or implied warranty. Export of this software outside * + * * of the United States of America may require an export license. * * ********************************************************************* * * rcsid "$Header: /usr/cvsroot/magic-8.0/utils/tech.h,v 1.1.1.1 2008/02/03 20:43:50 tim Exp $" diff --git a/utils/touchingtypes.h b/utils/touchingtypes.h index d155dfb3..ccd3854a 100644 --- a/utils/touchingtypes.h +++ b/utils/touchingtypes.h @@ -1,18 +1,18 @@ /* * touchingtypes.h -- - * Header, types TouchingTypes() function. + * Header, types TouchingTypes() function. * (TouchingTypes() returns mask of types touching a given point.) * - * ********************************************************************* - * * Copyright (C) 1985, 1990 Regents of the University of California. * - * * Permission to use, copy, modify, and distribute this * - * * software and its documentation for any purpose and without * - * * fee is hereby granted, provided that the above copyright * - * * notice appear in all copies. The University of California * - * * makes no representations about the suitability of this * - * * software for any purpose. It is provided "as is" without * - * * express or implied warranty. Export of this software outside * - * * of the United States of America may require an export license. * + * ********************************************************************* + * * Copyright (C) 1985, 1990 Regents of the University of California. * + * * Permission to use, copy, modify, and distribute this * + * * software and its documentation for any purpose and without * + * * fee is hereby granted, provided that the above copyright * + * * notice appear in all copies. The University of California * + * * makes no representations about the suitability of this * + * * software for any purpose. It is provided "as is" without * + * * express or implied warranty. Export of this software outside * + * * of the United States of America may require an export license. * * ********************************************************************* * * rcsid $Header: /usr/cvsroot/magic-8.0/utils/touchingtypes.h,v 1.1.1.1 2008/02/03 20:43:50 tim Exp $ diff --git a/utils/touchtypes.c b/utils/touchtypes.c index e1b91cf3..93bb04ed 100644 --- a/utils/touchtypes.c +++ b/utils/touchtypes.c @@ -1,20 +1,20 @@ /* touchingtypes.c -- * - * ********************************************************************* - * * Copyright (C) 1985, 1990 Regents of the University of California. * - * * Permission to use, copy, modify, and distribute this * - * * software and its documentation for any purpose and without * - * * fee is hereby granted, provided that the above copyright * - * * notice appear in all copies. The University of California * - * * makes no representations about the suitability of this * - * * software for any purpose. It is provided "as is" without * - * * express or implied warranty. Export of this software outside * - * * of the United States of America may require an export license. * + * ********************************************************************* + * * Copyright (C) 1985, 1990 Regents of the University of California. * + * * Permission to use, copy, modify, and distribute this * + * * software and its documentation for any purpose and without * + * * fee is hereby granted, provided that the above copyright * + * * notice appear in all copies. The University of California * + * * makes no representations about the suitability of this * + * * software for any purpose. It is provided "as is" without * + * * express or implied warranty. Export of this software outside * + * * of the United States of America may require an export license. * * ********************************************************************* * Lawrence Livermore National Laboratory * All rights reserved. * - * Function to return mask of all tiletypes touching a given point. + * Function to return mask of all tiletypes touching a given point. */ #ifndef lint @@ -38,17 +38,17 @@ typedef struct touchingfuncparms TileTypeBitMask tfp_types; } TouchingFuncParms; - + /* * ---------------------------------------------------------------------------- * * TouchingTypes -- - * - * Generate mask of all types touching or covering a given point. + * + * Generate mask of all types touching or covering a given point. * * Results: * Mask of all types touching or covering a given point in cellUse or - * expanded subcell. If an unexpanded subcell is + * expanded subcell. If an unexpanded subcell is * covering or touching point TT_SUBCELL is included in the result as * well. * @@ -57,7 +57,7 @@ typedef struct touchingfuncparms * * ---------------------------------------------------------------------------- */ -TileTypeBitMask +TileTypeBitMask TouchingTypes(cellUse, expansionMask, point) CellUse *cellUse; int expansionMask; @@ -66,9 +66,9 @@ TouchingTypes(cellUse, expansionMask, point) int touchingTypesFunc(); int touchingSubcellsFunc(); TouchingFuncParms parms; - + /* Search unit radius rectangle around point for paint tiles - * (in cellUse or subcells expanded in cmd window) containing or + * (in cellUse or subcells expanded in cmd window) containing or * touching point */ { @@ -108,7 +108,7 @@ TouchingTypes(cellUse, expansionMask, point) scx.scx_trans = GeoIdentityTransform; scx.scx_use = cellUse; - + DBTreeSrCells( &scx, expansionMask, @@ -119,7 +119,7 @@ TouchingTypes(cellUse, expansionMask, point) return(parms.tfp_types); } - + /* * --------------------------------------------------------------------- * @@ -158,7 +158,7 @@ touchingTypesFunc(tile, cxp) return(0); } - + /* * --------------------------------------------------------------------- * diff --git a/utils/undo.c b/utils/undo.c index 7bd52672..cda117c4 100644 --- a/utils/undo.c +++ b/utils/undo.c @@ -9,16 +9,16 @@ * The current state may be rewound back toward the time the editing * session began, and it may be replayed forward as well. * - * ********************************************************************* - * * Copyright (C) 1985, 1990 Regents of the University of California. * - * * Permission to use, copy, modify, and distribute this * - * * software and its documentation for any purpose and without * - * * fee is hereby granted, provided that the above copyright * - * * notice appear in all copies. The University of California * - * * makes no representations about the suitability of this * - * * software for any purpose. It is provided "as is" without * - * * express or implied warranty. Export of this software outside * - * * of the United States of America may require an export license. * + * ********************************************************************* + * * Copyright (C) 1985, 1990 Regents of the University of California. * + * * Permission to use, copy, modify, and distribute this * + * * software and its documentation for any purpose and without * + * * fee is hereby granted, provided that the above copyright * + * * notice appear in all copies. The University of California * + * * makes no representations about the suitability of this * + * * software for any purpose. It is provided "as is" without * + * * express or implied warranty. Export of this software outside * + * * of the United States of America may require an export license. * * ********************************************************************* */ @@ -33,7 +33,7 @@ static char rcsid[] __attribute__ ((unused)) = "$Header: /usr/cvsroot/magic-8.0/ #include "utils/utils.h" #include "utils/malloc.h" #include "utils/undo.h" - + /* ------------------------------------------------------------------------ */ /* @@ -186,7 +186,7 @@ extern internalUndoEvent *undoGetForw(); extern internalUndoEvent *undoGetBack(); extern void undoFreeHead(); extern void undoMemTruncate(); - + /* * ---------------------------------------------------------------------------- * @@ -249,7 +249,7 @@ UndoInit(logFileName, mode) return (TRUE); } - + /* * ---------------------------------------------------------------------------- * @@ -344,7 +344,7 @@ UndoAddClient(init, done, readEvent, writeEvent, forwEvent, backEvent, name) return (undoNumClients++); } - + /* * ---------------------------------------------------------------------------- * @@ -379,7 +379,7 @@ UndoFlush() undoNumCommands = 0; undoNumRecentEvents = 0; } - + /* * ---------------------------------------------------------------------------- * @@ -404,7 +404,7 @@ UndoDisable() { UndoDisableCount++; } - + /* * ---------------------------------------------------------------------------- * @@ -428,7 +428,7 @@ UndoEnable() if (UndoDisableCount > 0) UndoDisableCount--; } - + /* * ---------------------------------------------------------------------------- * @@ -573,7 +573,7 @@ UndoBackward(n) /* DRCContinuous routine is implicated. Can't find the */ /* error source, but refusing to execute the undo command */ /* appears to prevent it. */ - + if (UndoDisableCount > 0) { TxError("Attempted undo with undo disabled. . . abort function.\n"); @@ -622,7 +622,7 @@ UndoBackward(n) (*undoClientTable[client].uc_done)(); return (count); } - + /* * ---------------------------------------------------------------------------- * @@ -686,7 +686,7 @@ done: (*undoClientTable[client].uc_done)(); return (count); } - + /* * ============================================================================ * @@ -696,7 +696,7 @@ done: * ============================================================================ */ - + /* * ---------------------------------------------------------------------------- * @@ -746,7 +746,7 @@ undoGetForw(iup) return ((internalUndoEvent *) NULL); } - + /* * ---------------------------------------------------------------------------- * @@ -775,7 +775,7 @@ undoGetBack(iup) if (iup->iue_back != (internalUndoEvent *) NULL) return (iup->iue_back); return ((internalUndoEvent *) NULL); } - + /* * ---------------------------------------------------------------------------- * @@ -824,7 +824,7 @@ undoFreeHead() undoLogHead = undoLogHead->iue_forw; undoLogHead->iue_back = (internalUndoEvent *) NULL; } - + /* * ---------------------------------------------------------------------------- * diff --git a/utils/undo.h b/utils/undo.h index 29bf4abb..d0166ae9 100644 --- a/utils/undo.h +++ b/utils/undo.h @@ -6,16 +6,16 @@ * as possible. Communication to and from clients is by means * of objects, allocated by the undo package, known as UndoEvents. * - * ********************************************************************* - * * Copyright (C) 1985, 1990 Regents of the University of California. * - * * Permission to use, copy, modify, and distribute this * - * * software and its documentation for any purpose and without * - * * fee is hereby granted, provided that the above copyright * - * * notice appear in all copies. The University of California * - * * makes no representations about the suitability of this * - * * software for any purpose. It is provided "as is" without * - * * express or implied warranty. Export of this software outside * - * * of the United States of America may require an export license. * + * ********************************************************************* + * * Copyright (C) 1985, 1990 Regents of the University of California. * + * * Permission to use, copy, modify, and distribute this * + * * software and its documentation for any purpose and without * + * * fee is hereby granted, provided that the above copyright * + * * notice appear in all copies. The University of California * + * * makes no representations about the suitability of this * + * * software for any purpose. It is provided "as is" without * + * * express or implied warranty. Export of this software outside * + * * of the United States of America may require an export license. * * ********************************************************************* * * rcsid "$Header: /usr/cvsroot/magic-8.0/utils/undo.h,v 1.2 2009/09/10 20:32:55 tim Exp $" @@ -47,7 +47,7 @@ typedef char UndoEvent; /* Externally visible undo event */ * UndoNewEvent -- returns a new UndoEvent which the client may load * with its own data. The event is appended to the * undo log. The client should not retain this - * new event past the next call to the undo package. + * new event past the next call to the undo package. * If undoing is disabled, returns NULL. * UndoNext -- used by a client to inform the undo package that * all events since the last call to UndoNext are @@ -70,7 +70,7 @@ extern int UndoBackward(int), UndoForward(int); extern void UndoDisable(void), UndoEnable(void); extern void UndoFlush(void); extern void UndoStackTrace(int); - + /* * ---------------------------------------------------------------------------- * diff --git a/utils/utils.h b/utils/utils.h index 94cc2b94..3f1b481c 100644 --- a/utils/utils.h +++ b/utils/utils.h @@ -1,15 +1,15 @@ /* utils.h -- * - * ********************************************************************* - * * Copyright (C) 1985, 1990 Regents of the University of California. * - * * Permission to use, copy, modify, and distribute this * - * * software and its documentation for any purpose and without * - * * fee is hereby granted, provided that the above copyright * - * * notice appear in all copies. The University of California * - * * makes no representations about the suitability of this * - * * software for any purpose. It is provided "as is" without * - * * express or implied warranty. Export of this software outside * - * * of the United States of America may require an export license. * + * ********************************************************************* + * * Copyright (C) 1985, 1990 Regents of the University of California. * + * * Permission to use, copy, modify, and distribute this * + * * software and its documentation for any purpose and without * + * * fee is hereby granted, provided that the above copyright * + * * notice appear in all copies. The University of California * + * * makes no representations about the suitability of this * + * * software for any purpose. It is provided "as is" without * + * * express or implied warranty. Export of this software outside * + * * of the United States of America may require an export license. * * ********************************************************************* * * This file just defines all the features available from the diff --git a/windows/windClient.c b/windows/windClient.c index 59469bb8..b92fc39d 100644 --- a/windows/windClient.c +++ b/windows/windClient.c @@ -3,16 +3,16 @@ * Send button pushes and commands to the window's command * interpreters. * - * ********************************************************************* - * * Copyright (C) 1985, 1990 Regents of the University of California. * - * * Permission to use, copy, modify, and distribute this * - * * software and its documentation for any purpose and without * - * * fee is hereby granted, provided that the above copyright * - * * notice appear in all copies. The University of California * - * * makes no representations about the suitability of this * - * * software for any purpose. It is provided "as is" without * - * * express or implied warranty. Export of this software outside * - * * of the United States of America may require an export license. * + * ********************************************************************* + * * Copyright (C) 1985, 1990 Regents of the University of California. * + * * Permission to use, copy, modify, and distribute this * + * * software and its documentation for any purpose and without * + * * fee is hereby granted, provided that the above copyright * + * * notice appear in all copies. The University of California * + * * makes no representations about the suitability of this * + * * software for any purpose. It is provided "as is" without * + * * express or implied warranty. Export of this software outside * + * * of the United States of America may require an export license. * * ********************************************************************* */ @@ -86,7 +86,7 @@ static int windCorner = WIND_ILG; /* Nearest corner when button went * down. */ - + /* * ---------------------------------------------------------------------------- * windButtonSetCursor -- @@ -137,7 +137,7 @@ windButtonSetCursor(button, corner) } } - + /* * ---------------------------------------------------------------------------- * windGetCorner -- @@ -146,7 +146,7 @@ windButtonSetCursor(button, corner) * * Results: * An integer value is returned, indicating the corner closest to - * the given screen location. + * the given screen location. * * Side effects: * None. @@ -172,14 +172,14 @@ windGetCorner(screenPoint, screenRect) { if (screenPoint->p_y < ((r.r_ybot + r.r_ytop)/2)) return WIND_BL; - else + else return WIND_TL; } else { if (screenPoint->p_y < ((r.r_ybot + r.r_ytop)/2)) return WIND_BR; - else + else return WIND_TR; } } @@ -195,7 +195,7 @@ windGetCorner(screenPoint, screenRect) * * Side effects: * The rectangle is changed so that the given corner is at the - * given position. + * given position. * ---------------------------------------------------------------------------- */ @@ -271,7 +271,7 @@ windMoveRect(wholeRect, corner, p, rect) /* If the movement turned the box inside out, turn it right * side out again. */ - + if (rect->r_xbot > rect->r_xtop) { tmp = rect->r_xtop; @@ -288,7 +288,7 @@ windMoveRect(wholeRect, corner, p, rect) } } - + /* * ---------------------------------------------------------------------------- * Button Routines -- @@ -327,12 +327,12 @@ windFrameDown(w, cmd) { windCorner = windGetCorner(&(cmd->tx_p), &(windFrameWindow->w_frameArea)); } - else if (cmd->tx_button == TX_LEFT_BUTTON) + else if (cmd->tx_button == TX_LEFT_BUTTON) { windCorner = WIND_BL; windButtonSetCursor(windButton, windCorner); } - else if (cmd->tx_button == TX_RIGHT_BUTTON) + else if (cmd->tx_button == TX_RIGHT_BUTTON) { windCorner = WIND_TR; windButtonSetCursor(windButton, windCorner); @@ -412,8 +412,8 @@ windFrameButtons(w, cmd) { /* move elevator */ p.p_x = 0; - p.p_y = w->w_bbox->r_ybot + - ((w->w_bbox->r_ytop - w->w_bbox->r_ybot) * + p.p_y = w->w_bbox->r_ybot + + ((w->w_bbox->r_ytop - w->w_bbox->r_ybot) * (cmd->tx_p.p_y - leftBar.r_ybot)) / (leftBar.r_ytop - leftBar.r_ybot) - (w->w_surfaceArea.r_ytop + w->w_surfaceArea.r_ybot)/2; @@ -424,7 +424,7 @@ windFrameButtons(w, cmd) { /* move elevator */ p.p_y = 0; - p.p_x = w->w_bbox->r_xbot + + p.p_x = w->w_bbox->r_xbot + ((w->w_bbox->r_xtop - w->w_bbox->r_xbot) * (cmd->tx_p.p_x - botBar.r_xbot)) / (botBar.r_xtop - botBar.r_xbot) - @@ -532,7 +532,7 @@ windClientButtons(w, cmd) /* Handle 'grow' for our window package. */ if (WindPackageType == WIND_MAGIC_WINDOWS) { - if ((cmd->tx_button == TX_MIDDLE_BUTTON) && + if ((cmd->tx_button == TX_MIDDLE_BUTTON) && GEO_ENCLOSE(&cmd->tx_p, &caption)) { WindFullScreen(w); @@ -540,7 +540,7 @@ windClientButtons(w, cmd) } } if (windFrameButtons(w, cmd)) return; - + /* Otherwise, continue onward */ } @@ -554,13 +554,13 @@ windClientButtons(w, cmd) { case WIND_X_WINDOWS: break; - + default: /* Magic Windows */ - if (cmd->tx_button == TX_MIDDLE_BUTTON) + if (cmd->tx_button == TX_MIDDLE_BUTTON) return; - if ((cmd->tx_buttonAction == TX_BUTTON_UP) && - (windFrameWindow == NULL)) + if ((cmd->tx_buttonAction == TX_BUTTON_UP) && + (windFrameWindow == NULL)) return; /* no special area or else an up push -- reframe window */ @@ -587,7 +587,7 @@ windClientButtons(w, cmd) * the window frame area (zoom and scroll) by calling windFrameButtons() * if it appears to be appropriate for this MagWindow structure. * This bypasses the key macro handler, thus hard-coding the button - * actions for the frame. + * actions for the frame. * * Results: * TRUE if the button was pushed in the frame and handled by one @@ -617,7 +617,7 @@ WindButtonInFrame(w, x, y, b) return FALSE; } - + /* * ---------------------------------------------------------------------------- * @@ -661,7 +661,7 @@ windCmdInterp(w, cmd) } } - + /* * ---------------------------------------------------------------------------- * windCmdInit -- @@ -680,7 +680,7 @@ void windClientInit() { windClientID = WindAddClient(WINDOW_CLIENT, ( bool (*)() ) NULL, - ( bool (*)() ) NULL, ( void (*)() ) NULL, windCmdInterp, + ( bool (*)() ) NULL, ( void (*)() ) NULL, windCmdInterp, ( void (*)() ) NULL, ( bool (*)() ) NULL, ( void (*)() ) NULL, (GrGlyph *) NULL); @@ -793,10 +793,10 @@ windClientInit() "view [get] zoom window out so everything is visible", windViewCmd, FALSE); WindAddCommand(windClientID, - "windowborder [on|off] toggle border drawing for new windows", + "windowborder [on|off] toggle border drawing for new windows", windBorderCmd, FALSE); WindAddCommand(windClientID, - "windowcaption [on|off] toggle title caption for new windows", + "windowcaption [on|off] toggle title caption for new windows", windCaptionCmd, FALSE); WindAddCommand(windClientID, "windowscrollbars [on|off]\n\ diff --git a/windows/windCmdAM.c b/windows/windCmdAM.c index 82e838fe..b8c96ca6 100644 --- a/windows/windCmdAM.c +++ b/windows/windCmdAM.c @@ -3,16 +3,16 @@ * This file contains Magic command routines for those commands * that are valid in all windows. * - * ********************************************************************* - * * Copyright (C) 1985, 1990 Regents of the University of California. * - * * Permission to use, copy, modify, and distribute this * - * * software and its documentation for any purpose and without * - * * fee is hereby granted, provided that the above copyright * - * * notice appear in all copies. The University of California * - * * makes no representations about the suitability of this * - * * software for any purpose. It is provided "as is" without * - * * express or implied warranty. Export of this software outside * - * * of the United States of America may require an export license. * + * ********************************************************************* + * * Copyright (C) 1985, 1990 Regents of the University of California. * + * * Permission to use, copy, modify, and distribute this * + * * software and its documentation for any purpose and without * + * * fee is hereby granted, provided that the above copyright * + * * notice appear in all copies. The University of California * + * * makes no representations about the suitability of this * + * * software for any purpose. It is provided "as is" without * + * * express or implied warranty. Export of this software outside * + * * of the United States of America may require an export license. * * ********************************************************************* */ @@ -190,7 +190,7 @@ windCaptionCmd(w, cmd) TxError("Usage: %s [on|off]\n", cmd->tx_argv[0]); return; } - + /* * ---------------------------------------------------------------------------- * @@ -209,7 +209,7 @@ windCaptionCmd(w, cmd) * * Side effects: * The view in the window underneath the cursor is changed - * to center the point underneath the cursor. + * to center the point underneath the cursor. * * ---------------------------------------------------------------------------- */ @@ -298,7 +298,7 @@ windCenterCmd(w, cmd) WindMove(w, &newArea); } - + /* * ---------------------------------------------------------------------------- * windCloseCmd -- @@ -363,7 +363,7 @@ windCloseCmd(w, cmd) * None. * * Side effects: - * + * * * ---------------------------------------------------------------------------- */ @@ -421,7 +421,7 @@ windCrashCmd(w, cmd) TxFlush(); niceabort(); } - + /* * ---------------------------------------------------------------------------- @@ -507,7 +507,7 @@ windCursorCmd(w, cmd) ToolSnapToGrid(w, &p_out, (Rect *)NULL); } - /* Transform the result to declared units with option "lambda" or "grid" */ + /* Transform the result to declared units with option "lambda" or "grid" */ switch (resulttype) { case -2: case -1: @@ -538,7 +538,7 @@ windCursorCmd(w, cmd) #ifdef MAGIC_WRAPPER listxy = Tcl_NewListObj(0, NULL); - if ((cursx == round(cursx)) && (cursy == round(cursy))) + if ((cursx == round(cursx)) && (cursy == round(cursy))) { Tcl_ListObjAppendElement(magicinterp, listxy, Tcl_NewIntObj((int)cursx)); Tcl_ListObjAppendElement(magicinterp, listxy, Tcl_NewIntObj((int)cursy)); @@ -575,14 +575,14 @@ windDebugCmd(w, cmd) { if (cmd->tx_argc != 1) goto usage; windPrintCommands = !windPrintCommands; - TxError("Window command debugging set to %s\n", + TxError("Window command debugging set to %s\n", (windPrintCommands ? "TRUE" : "FALSE")); return; usage: TxError("Usage: *winddebug\n"); } - + /* * ---------------------------------------------------------------------------- * windDumpCmd -- @@ -606,7 +606,7 @@ windDumpCmd(w, cmd) } #ifndef MAGIC_WRAPPER - + /* * ---------------------------------------------------------------------------- * @@ -640,7 +640,7 @@ windEchoCmd(w, cmd) else TxPrintf("%s", cmd->tx_argv[i]); } - + if (newline) TxPrintf("\n"); TxFlush(); @@ -648,7 +648,7 @@ windEchoCmd(w, cmd) #endif - + /* * ---------------------------------------------------------------------------- * @@ -695,7 +695,7 @@ windFilesCmd(w, cmd) case S_IFSOCK: {type = "socket"; break;} default: {type = "unknown"; break;} } - TxError("file descriptor %d: open (type: '%s', inode number %ld)\n", + TxError("file descriptor %d: open (type: '%s', inode number %ld)\n", fd, type, buf.st_ino); open++; } @@ -703,7 +703,7 @@ windFilesCmd(w, cmd) TxError("%d open files, %d unopened file descriptors left\n", open, unopen); } - + /* * ---------------------------------------------------------------------------- * @@ -734,7 +734,7 @@ windGrowCmd(w, cmd) WindFullScreen(w); } - + /* * ---------------------------------------------------------------------------- * windGrstatsCmd -- @@ -767,7 +767,7 @@ windGrstatsCmd(w, cmd) return; } - if (!StrIsInt(cmd->tx_argv[1]) || + if (!StrIsInt(cmd->tx_argv[1]) || (cmd->tx_argc == 3 && !StrIsInt(cmd->tx_argv[2]))) { TxError("Count & style must be numeric\n"); @@ -832,14 +832,14 @@ windGrstatsCmd(w, cmd) us = tdelta.tms_utime * (1000000 / 60); usPerRect = us / MAX(1, GrNumClipBoxes); rectsPerSec = 1000000 / MAX(1, usPerRect); - TxPrintf("[%s]\n%d rectangles, %d uS, %d uS/rectangle, %d rects/sec\n", + TxPrintf("[%s]\n%d rectangles, %d uS, %d uS/rectangle, %d rects/sec\n", rstatp, GrNumClipBoxes, us, usPerRect, rectsPerSec); if (style >= 0) GrUnlock(w); } - + /* * ---------------------------------------------------------------------------- * windHelpCmd -- @@ -895,7 +895,7 @@ windLogCommandsCmd(w, cmd) update = FALSE; - if (cmd->tx_argc == 1) + if (cmd->tx_argc == 1) fileName = NULL; else fileName = cmd->tx_argv[1]; @@ -1207,7 +1207,7 @@ windDoMacro(w, cmd, interactive) MacroDefineHelp(wc, ct, cmd->tx_argv[argstart]); else if (interactive) MacroDefine(wc, ct, cmd->tx_argv[argstart], NULL, TRUE); - else + else MacroDefine(wc, ct, cmd->tx_argv[argstart], NULL, FALSE); return; } diff --git a/windows/windCmdNR.c b/windows/windCmdNR.c index 84615eae..b550bd2e 100644 --- a/windows/windCmdNR.c +++ b/windows/windCmdNR.c @@ -3,16 +3,16 @@ * This file contains Magic command routines for those commands * that are valid in all windows. * - * ********************************************************************* - * * Copyright (C) 1985, 1990 Regents of the University of California. * - * * Permission to use, copy, modify, and distribute this * - * * software and its documentation for any purpose and without * - * * fee is hereby granted, provided that the above copyright * - * * notice appear in all copies. The University of California * - * * makes no representations about the suitability of this * - * * software for any purpose. It is provided "as is" without * - * * express or implied warranty. Export of this software outside * - * * of the United States of America may require an export license. * + * ********************************************************************* + * * Copyright (C) 1985, 1990 Regents of the University of California. * + * * Permission to use, copy, modify, and distribute this * + * * software and its documentation for any purpose and without * + * * fee is hereby granted, provided that the above copyright * + * * notice appear in all copies. The University of California * + * * makes no representations about the suitability of this * + * * software for any purpose. It is provided "as is" without * + * * express or implied warranty. Export of this software outside * + * * of the United States of America may require an export license. * * ********************************************************************* */ @@ -45,7 +45,7 @@ static char rcsid[] __attribute__ ((unused)) = "$Header: /usr/cvsroot/magic-8.0/ #include "textio/txcommands.h" #include "dbwind/dbwind.h" - + /* * ---------------------------------------------------------------------------- * windOpenCmd -- @@ -86,14 +86,14 @@ windOpenCmd(w, cmd) wc = WindGetClient(DEFAULT_CLIENT, TRUE); ASSERT(wc != (WindClient) NULL, "windOpenCmd"); - if (WindCreate(wc, &area, TRUE, cmd->tx_argc - 1, cmd->tx_argv + 1) == + if (WindCreate(wc, &area, TRUE, cmd->tx_argc - 1, cmd->tx_argv + 1) == (MagWindow *) NULL) { TxError("Could not create window\n"); } } - + /* * ---------------------------------------------------------------------------- * windOverCmd -- @@ -125,7 +125,7 @@ windOverCmd(w, cmd) WindOver(w); } - + /* * ---------------------------------------------------------------------------- * @@ -153,7 +153,7 @@ windPauseCmd(w, cmd) int i; static char ssline[TX_MAX_CMDLEN]; - WindUpdate(); + WindUpdate(); GrFlush(); for (i = 1; i < cmd->tx_argc; i++) @@ -162,12 +162,12 @@ windPauseCmd(w, cmd) TxPrintf(" "); if (i+1 == cmd->tx_argc) TxPrintf(" "); } - + TxPrintf("Pausing: type to continue: "); (void) TxGetLine(ssline, 98); } - + char *butTable[] = { "left", @@ -241,7 +241,7 @@ badusage: return; } - + /* * ---------------------------------------------------------------------------- * WindQuitCmd -- @@ -269,7 +269,7 @@ windQuitCmd(w, cmd) checkfirst = FALSE; if (checkfirst) - for (cr = windFirstClientRec; cr != (clientRec *) NULL; + for (cr = windFirstClientRec; cr != (clientRec *) NULL; cr = cr->w_nextClient) if (cr->w_exit != NULL) if (!(*(cr->w_exit))()) @@ -278,7 +278,7 @@ windQuitCmd(w, cmd) MainExit(0); } - + /* * ---------------------------------------------------------------------------- * @@ -360,7 +360,7 @@ windRedoCmd(w, cmd) } } - + /* * ---------------------------------------------------------------------------- * windRedrawCmd -- @@ -383,7 +383,7 @@ windRedrawCmd(w, cmd) WindAreaChanged((MagWindow *) NULL, (Rect *) NULL); } - + /* * ---------------------------------------------------------------------------- * windResetCmd -- diff --git a/windows/windCmdSZ.c b/windows/windCmdSZ.c index 70aed6d3..6810fc21 100644 --- a/windows/windCmdSZ.c +++ b/windows/windCmdSZ.c @@ -3,16 +3,16 @@ * This file contains Magic command routines for those commands * that are valid in all windows. * - * ********************************************************************* - * * Copyright (C) 1985, 1990 Regents of the University of California. * - * * Permission to use, copy, modify, and distribute this * - * * software and its documentation for any purpose and without * - * * fee is hereby granted, provided that the above copyright * - * * notice appear in all copies. The University of California * - * * makes no representations about the suitability of this * - * * software for any purpose. It is provided "as is" without * - * * express or implied warranty. Export of this software outside * - * * of the United States of America may require an export license. * + * ********************************************************************* + * * Copyright (C) 1985, 1990 Regents of the University of California. * + * * Permission to use, copy, modify, and distribute this * + * * software and its documentation for any purpose and without * + * * fee is hereby granted, provided that the above copyright * + * * notice appear in all copies. The University of California * + * * makes no representations about the suitability of this * + * * software for any purpose. It is provided "as is" without * + * * express or implied warranty. Export of this software outside * + * * of the United States of America may require an export license. * * ********************************************************************* */ @@ -43,7 +43,7 @@ static char rcsid[] __attribute__ ((unused)) = "$Header: /usr/cvsroot/magic-8.0/ #include "dbwind/dbwind.h" #include "graphics/graphics.h" - + /* * ---------------------------------------------------------------------------- * @@ -63,7 +63,7 @@ static char rcsid[] __attribute__ ((unused)) = "$Header: /usr/cvsroot/magic-8.0/ * parsed as a fractional scroll amount, "units" *must* be declared * as "w". Otherwise, no units implies that "amount" is an absolute * value. - * + * * * ---------------------------------------------------------------------------- */ @@ -190,7 +190,7 @@ windScrollCmd(w, cmd) return; } - + /* * ---------------------------------------------------------------------------- * windSetpointCmd -- @@ -218,7 +218,7 @@ windSetpointCmd(w, cmd) char *ptstr; #endif - if ((cmd->tx_argc != 4) && (cmd->tx_argc != 3) && (cmd->tx_argc != 1)) + if ((cmd->tx_argc != 4) && (cmd->tx_argc != 3) && (cmd->tx_argc != 1)) goto usage; if ((cmd->tx_argc != 1) && ! (StrIsInt(cmd->tx_argv[1]) && StrIsInt(cmd->tx_argv[2])) ) @@ -247,7 +247,7 @@ windSetpointCmd(w, cmd) if (cmd->tx_argc == 1) { - if (w != (MagWindow *) NULL) + if (w != (MagWindow *) NULL) { WindPointToSurface(w, &cmd->tx_p, &rootPoint, (Rect *) NULL); @@ -272,7 +272,7 @@ windSetpointCmd(w, cmd) yval = atoi(cmd->tx_argv[2]); - /* Reinterpret coordinates according to the graphics package */ + /* Reinterpret coordinates according to the graphics package */ switch (WindPackageType) { case WIND_X_WINDOWS: @@ -297,7 +297,7 @@ windSetPrintProc(name, val) return 0; } - + /* * ---------------------------------------------------------------------------- * windSleepCmd -- @@ -319,7 +319,7 @@ windSleepCmd(w, cmd) { int time; - if (cmd->tx_argc != 2) + if (cmd->tx_argc != 2) { TxError("Usage: %s seconds\n", cmd->tx_argv[0]); return; @@ -335,7 +335,7 @@ windSleepCmd(w, cmd) #ifndef MAGIC_WRAPPER - + /* * ---------------------------------------------------------------------------- * @@ -369,7 +369,7 @@ windSourceCmd(w, cmd) return; } - f = PaOpen(cmd->tx_argv[1], "r", (char *) NULL, ".", + f = PaOpen(cmd->tx_argv[1], "r", (char *) NULL, ".", SysLibPath, (char **) NULL); if (f == NULL) TxError("Couldn't read from %s.\n", cmd->tx_argv[1]); @@ -415,7 +415,7 @@ windSpecialOpenCmd(w, cmd) (cmd->tx_argc < 6) || !StrIsInt(cmd->tx_argv[2]) || !StrIsInt(cmd->tx_argv[3]) || - !StrIsInt(cmd->tx_argv[4]) + !StrIsInt(cmd->tx_argv[4]) )) goto usage; if (haveCoords) client = cmd->tx_argv[5]; @@ -572,7 +572,7 @@ windNamesCmd(w, cmd) #endif /* !MAGIC_WRAPPER */ } - + /* * ---------------------------------------------------------------------------- * windUnderCmd -- @@ -604,7 +604,7 @@ windUnderCmd(w, cmd) WindUnder(w); } - + /* * ---------------------------------------------------------------------------- * @@ -693,7 +693,7 @@ windUndoCmd(w, cmd) } } - + /* * ---------------------------------------------------------------------------- * windUpdateCmd -- @@ -768,7 +768,7 @@ windVersionCmd(w, cmd) TxPrintf("Version %s revision %s. Compiled on %s.\n", MagicVersion, MagicRevision, MagicCompileTime); } - + /* * ---------------------------------------------------------------------------- * @@ -811,14 +811,14 @@ windViewCmd(w, cmd) { #ifdef MAGIC_WRAPPER Tcl_Obj *listxy, *fval; - + listxy = Tcl_NewListObj(0, NULL); #endif if (!strncmp(cmd->tx_argv[1], "get", 3)) { #ifndef MAGIC_WRAPPER - TxPrintf("(%d, %d) to (%d, %d)\n", + TxPrintf("(%d, %d) to (%d, %d)\n", w->w_surfaceArea.r_xbot, w->w_surfaceArea.r_ybot, w->w_surfaceArea.r_xtop, w->w_surfaceArea.r_ytop); #else @@ -836,7 +836,7 @@ windViewCmd(w, cmd) else if (!strncmp(cmd->tx_argv[1], "bbox", 4)) { #ifndef MAGIC_WRAPPER - TxPrintf("(%d, %d) to (%d, %d)\n", + TxPrintf("(%d, %d) to (%d, %d)\n", w->w_bbox->r_xbot, w->w_bbox->r_ybot, w->w_bbox->r_xtop, w->w_bbox->r_ytop); #else @@ -897,7 +897,7 @@ windViewCmd(w, cmd) } } - + /* * ---------------------------------------------------------------------------- * @@ -961,7 +961,7 @@ ViewUnexpandFunc(use, windowMask) return 0; } - + /* * ---------------------------------------------------------------------------- * @@ -1014,7 +1014,7 @@ windScrollBarsCmd(w, cmd) #ifndef MAGIC_WRAPPER - + /* * ---------------------------------------------------------------------------- * @@ -1051,7 +1051,7 @@ windSendCmd(w, cmd) client = WindGetClient(cmd->tx_argv[1], FALSE); if (client == (WindClient) NULL) goto usage; toWindow = (MagWindow *) NULL; - (void) WindSearch(client, (ClientData) NULL, (Rect *) NULL, + (void) WindSearch(client, (ClientData) NULL, (Rect *) NULL, windSendCmdFunc, (ClientData) &toWindow); { int i; @@ -1091,8 +1091,8 @@ typedef struct _cdwpos { FILE *file; bool doFrame; } cdwpos; - - + + /* * ---------------------------------------------------------------------------- * @@ -1147,11 +1147,11 @@ windPositionsCmd(w, cmd) return; }; } - (void) WindSearch((WindClient) NULL, (ClientData) NULL, (Rect *) NULL, + (void) WindSearch((WindClient) NULL, (ClientData) NULL, (Rect *) NULL, windPositionsFunc, (ClientData) &windpos); if (filename) (void) fclose(windpos.file); return; - + usage: TxError("Usage: windowpositions [file]\n"); return; @@ -1187,18 +1187,18 @@ windPositionsFunc(w, cdata) Tcl_SetObjResult(magicinterp, lobj); } #else - TxPrintf("specialopen %d %d %d %d %s\n", + TxPrintf("specialopen %d %d %d %d %s\n", r.r_xbot, r.r_ybot, r.r_xtop, r.r_ytop, ((clientRec *) w->w_client)->w_clientName); #endif else - fprintf((FILE *)cdata, "specialopen %d %d %d %d %s\n", + fprintf((FILE *)cdata, "specialopen %d %d %d %d %s\n", r.r_xbot, r.r_ybot, r.r_xtop, r.r_ytop, ((clientRec *) w->w_client)->w_clientName); return 0; } - + /* * ---------------------------------------------------------------------------- * diff --git a/windows/windDebug.c b/windows/windDebug.c index ef024466..ab584d60 100644 --- a/windows/windDebug.c +++ b/windows/windDebug.c @@ -3,16 +3,16 @@ * * Print out the window package's internal data structures. * - * ********************************************************************* - * * Copyright (C) 1985, 1990 Regents of the University of California. * - * * Permission to use, copy, modify, and distribute this * - * * software and its documentation for any purpose and without * - * * fee is hereby granted, provided that the above copyright * - * * notice appear in all copies. The University of California * - * * makes no representations about the suitability of this * - * * software for any purpose. It is provided "as is" without * - * * express or implied warranty. Export of this software outside * - * * of the United States of America may require an export license. * + * ********************************************************************* + * * Copyright (C) 1985, 1990 Regents of the University of California. * + * * Permission to use, copy, modify, and distribute this * + * * software and its documentation for any purpose and without * + * * fee is hereby granted, provided that the above copyright * + * * notice appear in all copies. The University of California * + * * makes no representations about the suitability of this * + * * software for any purpose. It is provided "as is" without * + * * express or implied warranty. Export of this software outside * + * * of the United States of America may require an export license. * * ********************************************************************* */ @@ -31,7 +31,7 @@ static char rcsid[] __attribute__ ((unused)) = "$Header: /usr/cvsroot/magic-8.0/ #include "textio/txcommands.h" - + /* * ---------------------------------------------------------------------------- * windPrintWindow -- @@ -48,7 +48,7 @@ static char rcsid[] __attribute__ ((unused)) = "$Header: /usr/cvsroot/magic-8.0/ void windPrintWindow(w) - MagWindow *w; + MagWindow *w; { LinkedRect *lr; @@ -75,13 +75,13 @@ windPrintWindow(w) lr->r_r.r_xtop, lr->r_r.r_ytop); } - TxPrintf(" Surface area (%d, %d) (%d, %d) \n", + TxPrintf(" Surface area (%d, %d) (%d, %d) \n", w->w_surfaceArea.r_xbot, w->w_surfaceArea.r_ybot, w->w_surfaceArea.r_xtop, w->w_surfaceArea.r_ytop); TxPrintf(" Origin (%d, %d)\n", w->w_origin.p_x, w->w_origin.p_y); TxPrintf(" Scale %d\n", w->w_scale); } - + /* * ---------------------------------------------------------------------------- * windDump -- @@ -103,10 +103,10 @@ windDump() clientRec *rc; TxPrintf("\n\n------------ Clients ----------\n"); - for (rc = windFirstClientRec; rc != (clientRec * ) NULL; + for (rc = windFirstClientRec; rc != (clientRec * ) NULL; rc = rc->w_nextClient) { - TxPrintf("'%10s' %x %x %x %x\n", rc->w_clientName, + TxPrintf("'%10s' %x %x %x %x\n", rc->w_clientName, rc->w_create, rc->w_delete, rc->w_redisplay, rc->w_command); } @@ -116,10 +116,10 @@ windDump() { windPrintWindow(w); } - + } - + /* * ---------------------------------------------------------------------------- * windPrintCommand -- diff --git a/windows/windDisp.c b/windows/windDisp.c index 47643959..2f8b52a1 100644 --- a/windows/windDisp.c +++ b/windows/windDisp.c @@ -2,16 +2,16 @@ * * Display the borders of the window, including the caption area. * - * ********************************************************************* - * * Copyright (C) 1985, 1990 Regents of the University of California. * - * * Permission to use, copy, modify, and distribute this * - * * software and its documentation for any purpose and without * - * * fee is hereby granted, provided that the above copyright * - * * notice appear in all copies. The University of California * - * * makes no representations about the suitability of this * - * * software for any purpose. It is provided "as is" without * - * * express or implied warranty. Export of this software outside * - * * of the United States of America may require an export license. * + * ********************************************************************* + * * Copyright (C) 1985, 1990 Regents of the University of California. * + * * Permission to use, copy, modify, and distribute this * + * * software and its documentation for any purpose and without * + * * fee is hereby granted, provided that the above copyright * + * * notice appear in all copies. The University of California * + * * makes no representations about the suitability of this * + * * software for any purpose. It is provided "as is" without * + * * express or implied warranty. Export of this software outside * + * * of the United States of America may require an export license. * * ********************************************************************* */ @@ -66,7 +66,7 @@ bool windSomeSeparateRedisplay = FALSE; * * windCheckOnlyWindow -- * - * Check if the TopWindow is the only window---if so, we shouldn't + * Check if the TopWindow is the only window---if so, we shouldn't * generate bothersome messages about the cursor not being in a window, * because there is no confusion. * @@ -99,7 +99,7 @@ windCheckOnlyWindow(MagWindow **w, WindClient client) return 0; } - + /* * ---------------------------------------------------------------------------- * windFreeList -- @@ -120,7 +120,7 @@ windFreeList(llr) { LinkedRect *lr, *freelr; - lr = *llr; + lr = *llr; while (lr != (LinkedRect *) NULL) { freelr = lr; @@ -132,7 +132,7 @@ windFreeList(llr) } - + /* * ---------------------------------------------------------------------------- * windReClip -- @@ -175,7 +175,7 @@ windReClip() * windows. */ if (WindPackageType == WIND_MAGIC_WINDOWS) { - for (w2 = w1->w_prevWindow; w2 != (MagWindow *) NULL; + for (w2 = w1->w_prevWindow; w2 != (MagWindow *) NULL; w2 = w2->w_prevWindow) { if ( GEO_TOUCH( &(w1->w_frameArea), &(w2->w_frameArea) )) @@ -197,7 +197,7 @@ windReClip() * WindSeparateRedisplay -- * * Tells the window manager to record redisplay areas for this window - * separately -- probably because the window has its own separate + * separately -- probably because the window has its own separate * coordinate system. (Used on the Sun with Suntools or X.) * * Results: @@ -218,7 +218,7 @@ WindSeparateRedisplay(w) w->w_redrawAreas = (ClientData) DBNewPlane((ClientData) TT_SPACE); } - + /* * ---------------------------------------------------------------------------- * WindIconChanged -- @@ -241,7 +241,7 @@ WindIconChanged(w) w->w_flags |= WIND_REDRAWICON; } - + /* * ---------------------------------------------------------------------------- * WindAreaChanged -- @@ -283,7 +283,7 @@ WindAreaChanged(w, area) } else windCurRedrawPlane = windRedisplayArea; } else { - if (w->w_redrawAreas != (ClientData)NULL) + if (w->w_redrawAreas != (ClientData)NULL) windCurRedrawPlane = (Plane *) w->w_redrawAreas; else windCurRedrawPlane = windRedisplayArea; @@ -310,7 +310,7 @@ WindAreaChanged(w, area) * hacks in WindUpdate and windBackgroundFunc, little slivers * get left lying around. */ - + biggerArea = *area; biggerArea.r_xtop += 1; biggerArea.r_ytop += 1; @@ -351,7 +351,7 @@ windChangedFunc(area, next) * tile to mark what's to be redisplayed. Otherwise, * clip against the next obscuring area. */ - + if (next == NULL) DBPaintPlane(windCurRedrawPlane, area, DBStdPaintTbl(TT_ERROR_P, PL_DRC_ERROR), (PaintUndoInfo *) NULL); @@ -362,7 +362,7 @@ windChangedFunc(area, next) - + /* * ---------------------------------------------------------------------------- * windBarLocations -- @@ -390,7 +390,7 @@ windBarLocations(w, leftBar, botBar, up, down, right, left, zoom) * bar itself). */ Rect *botBar; /* The location of the bottom scrollbar area. */ - Rect *up; /* The location of the 'up arrow' icon above the + Rect *up; /* The location of the 'up arrow' icon above the * left scroll bar. */ Rect *down; /* The location of the 'down arrow' icon below the @@ -408,7 +408,7 @@ windBarLocations(w, leftBar, botBar, up, down, right, left, zoom) { /* left scroll bar area */ leftBar->r_xbot = w->w_allArea.r_xbot + THIN_LINE; - leftBar->r_ybot = w->w_allArea.r_ybot + THIN_LINE + WindScrollBarWidth + + leftBar->r_ybot = w->w_allArea.r_ybot + THIN_LINE + WindScrollBarWidth + BOT_BORDER(w); leftBar->r_xtop = leftBar->r_xbot + WindScrollBarWidth - GrPixelCorrect; leftBar->r_ytop = w->w_allArea.r_ytop - THIN_LINE - WindScrollBarWidth - @@ -416,7 +416,7 @@ windBarLocations(w, leftBar, botBar, up, down, right, left, zoom) /* bottom scroll bar area */ botBar->r_ybot = w->w_allArea.r_ybot + THIN_LINE; - botBar->r_xbot = w->w_allArea.r_xbot + THIN_LINE + WindScrollBarWidth + + botBar->r_xbot = w->w_allArea.r_xbot + THIN_LINE + WindScrollBarWidth + LEFT_BORDER(w); botBar->r_ytop = botBar->r_ybot + WindScrollBarWidth - GrPixelCorrect; botBar->r_xtop = w->w_allArea.r_xtop - THIN_LINE - WindScrollBarWidth - @@ -443,7 +443,7 @@ windBarLocations(w, leftBar, botBar, up, down, right, left, zoom) zoom->r_ytop = zoom->r_ybot + WindScrollBarWidth - 1; } - + /* * ---------------------------------------------------------------------------- * WindDrawBorder -- @@ -484,7 +484,7 @@ WindDrawBorder(w, clip) if (w->w_flags & WIND_BORDER) GrClipBox(&capr, STYLE_BORDER); if ((w->w_flags & WIND_CAPTION) && (w->w_caption != NULL)) { - (void) GrPutText(w->w_caption, STYLE_CAPTION, &capp, + (void) GrPutText(w->w_caption, STYLE_CAPTION, &capp, GEO_CENTER, GR_TEXT_DEFAULT, FALSE, &capr, (Rect *) NULL); } @@ -568,7 +568,7 @@ WindDrawBorder(w, clip) r.r_ytop = leftBar.r_ybot - GrPixelCorrect; if (GEO_TOUCH(&r, clip)) GrClipBox(&r, STYLE_BORDER); r.r_ybot = leftBar.r_ytop + GrPixelCorrect; - r.r_ytop = leftBar.r_ytop + THIN_LINE; + r.r_ytop = leftBar.r_ytop + THIN_LINE; if (GEO_TOUCH(&r, clip)) GrClipBox(&r, STYLE_BORDER); @@ -609,7 +609,7 @@ leave: } - + /* * ---------------------------------------------------------------------------- * WindCaption -- @@ -647,7 +647,7 @@ WindCaption(w, caption) } - + /* * ---------------------------------------------------------------------------- * windNewView -- @@ -676,7 +676,7 @@ windNewView(w) } } - + /* * ---------------------------------------------------------------------------- * WindRedisplay -- @@ -698,7 +698,7 @@ WindRedisplay(w) { WindAreaChanged(w, &(w->w_allArea)); } - + /* * ---------------------------------------------------------------------------- * windRedrawIcon -- @@ -746,7 +746,7 @@ windRedrawIcon(w) GrUnlock(w); } - + /* * ---------------------------------------------------------------------------- * WindUpdate -- @@ -826,10 +826,10 @@ WindUpdate() r.r_xtop += 1; r.r_ytop += 1; DBPaintPlane(windRedisplayArea, &r, - DBStdEraseTbl(TT_ERROR_P, PL_DRC_ERROR), + DBStdEraseTbl(TT_ERROR_P, PL_DRC_ERROR), (PaintUndoInfo *) NULL); } else { - /* We are finished with this window's redisplay plane. Clear + /* We are finished with this window's redisplay plane. Clear * any remaining redisplay tiles, as we may have interrupted * the redislay and don't want this stuff any more. */ @@ -852,11 +852,11 @@ WindUpdate() */ DBClearPaintPlane(windRedisplayArea); }; - + UndoEnable(); /* Now give the clients a chance to update anything that they wish */ - for (cr = windFirstClientRec; cr != (clientRec *) NULL; + for (cr = windFirstClientRec; cr != (clientRec *) NULL; cr = cr->w_nextClient) { if (cr->w_update != NULL) @@ -872,7 +872,7 @@ WindUpdate() /* See comment in windows.h */ if (WindAnotherUpdatePlease) WindUpdate(); } - + /* * ---------------------------------------------------------------------------- * @@ -925,7 +925,7 @@ windUpdateFunc(tile, w) }; /* Now call the client to redisplay the interior of the window. */ - if (GEO_TOUCH(&(w->w_screenArea), &area)) + if (GEO_TOUCH(&(w->w_screenArea), &area)) { Rect clientArea; @@ -939,7 +939,7 @@ windUpdateFunc(tile, w) } return 0; } - + /* * ---------------------------------------------------------------------------- * diff --git a/windows/windInt.h b/windows/windInt.h index 3585afbc..96b2c082 100644 --- a/windows/windInt.h +++ b/windows/windInt.h @@ -3,16 +3,16 @@ * * Internal definitions for the window package. * - * ********************************************************************* - * * Copyright (C) 1985, 1990 Regents of the University of California. * - * * Permission to use, copy, modify, and distribute this * - * * software and its documentation for any purpose and without * - * * fee is hereby granted, provided that the above copyright * - * * notice appear in all copies. The University of California * - * * makes no representations about the suitability of this * - * * software for any purpose. It is provided "as is" without * - * * express or implied warranty. Export of this software outside * - * * of the United States of America may require an export license. * + * ********************************************************************* + * * Copyright (C) 1985, 1990 Regents of the University of California. * + * * Permission to use, copy, modify, and distribute this * + * * software and its documentation for any purpose and without * + * * fee is hereby granted, provided that the above copyright * + * * notice appear in all copies. The University of California * + * * makes no representations about the suitability of this * + * * software for any purpose. It is provided "as is" without * + * * express or implied warranty. Export of this software outside * + * * of the United States of America may require an export license. * * ********************************************************************* * * rcsid $Header: /usr/cvsroot/magic-8.0/windows/windInt.h,v 1.1.1.1 2008/02/03 20:43:50 tim Exp $ @@ -62,7 +62,7 @@ extern MagWindow *windSearchPoint(); /* the width of window borders */ extern int windCaptionPixels; #define THIN_LINE ((((w == NULL) ? WindDefaultFlags \ - : (w)->w_flags) & WIND_BORDER) ? 2 : 0) + : (w)->w_flags) & WIND_BORDER) ? 2 : 0) #define TOP_BORDER(w) ((((w == NULL) ? WindDefaultFlags \ : (w)->w_flags) & WIND_CAPTION) \ ? windCaptionPixels : 2*THIN_LINE) diff --git a/windows/windMain.c b/windows/windMain.c index ca9adb93..d8e0c7f5 100644 --- a/windows/windMain.c +++ b/windows/windMain.c @@ -30,16 +30,16 @@ * screen background color) is ignored by us. * * - * ********************************************************************* - * * Copyright (C) 1985, 1990 Regents of the University of California. * - * * Permission to use, copy, modify, and distribute this * - * * software and its documentation for any purpose and without * - * * fee is hereby granted, provided that the above copyright * - * * notice appear in all copies. The University of California * - * * makes no representations about the suitability of this * - * * software for any purpose. It is provided "as is" without * - * * express or implied warranty. Export of this software outside * - * * of the United States of America may require an export license. * + * ********************************************************************* + * * Copyright (C) 1985, 1990 Regents of the University of California. * + * * Permission to use, copy, modify, and distribute this * + * * software and its documentation for any purpose and without * + * * fee is hereby granted, provided that the above copyright * + * * notice appear in all copies. The University of California * + * * makes no representations about the suitability of this * + * * software for any purpose. It is provided "as is" without * + * * express or implied warranty. Export of this software outside * + * * of the United States of America may require an export license. * * ********************************************************************* */ @@ -73,20 +73,20 @@ int WindPackageType = WIND_MAGIC_WINDOWS; int WindScrollBarWidth = 7; /* ------ Internal variables that are global within the window package ----- */ -clientRec *windFirstClientRec = NULL; /* the head of the linked list - * of clients +clientRec *windFirstClientRec = NULL; /* the head of the linked list + * of clients */ MagWindow *windTopWindow = NULL; /* the topmost window */ MagWindow *windBottomWindow = NULL; /* ...and the bottom window */ extern Plane *windRedisplayArea; /* See windDisplay.c for details. */ - + /* * ---------------------------------------------------------------------------- * WindInit -- * * Initialize the window package. No windows are created, but the - * package will be initialized so that it can do these things in the + * package will be initialized so that it can do these things in the * future. * * Results: @@ -116,7 +116,7 @@ WindInit() WindAreaChanged((MagWindow *) NULL, (Rect *) NULL); } - + /* * ---------------------------------------------------------------------------- * WindAddClient -- @@ -126,7 +126,7 @@ WindInit() * * Results: * A unique ID (of type WindClient) is returned. - * This is used to identify the client in future calls to the window + * This is used to identify the client in future calls to the window * package. * * Routines supplied: @@ -173,12 +173,12 @@ WindInit() * * * ( The window is about to be moved or resized. This procedure will - * be called twice. + * be called twice. * - * The first time (with 'final' == FALSE), the window - * will be passed in 'w' as it is now and a suggested new w_screenarea + * The first time (with 'final' == FALSE), the window + * will be passed in 'w' as it is now and a suggested new w_screenarea * is passed in 'newpos'. The client is free to modify 'newpos' to - * be whatever screen location it desires. The routine should not + * be whatever screen location it desires. The routine should not * pass 'w' to any window procedure such as windMove since 'w' has * the old transform, etc. instead of the new one. * @@ -217,7 +217,7 @@ WindInit() */ WindClient -WindAddClient(clientName, create, delete, redisplay, command, update, +WindAddClient(clientName, create, delete, redisplay, command, update, exitproc, reposition, icon) char *clientName; /* A textual name for the client. This * name will be visable in the user @@ -266,7 +266,7 @@ WindAddClient(clientName, create, delete, redisplay, command, update, return (WindClient) res; } - + /* * ---------------------------------------------------------------------------- * WindGetClient -- @@ -294,7 +294,7 @@ WindGetClient(clientName, exact) if (exact) { - for (cr = windFirstClientRec; cr != (clientRec *) NULL; + for (cr = windFirstClientRec; cr != (clientRec *) NULL; cr = cr->w_nextClient) if (!strcmp(clientName, cr->w_clientName)) return (WindClient)cr; @@ -305,7 +305,7 @@ WindGetClient(clientName, exact) found = NULL; length = strlen(clientName); - for (cr = windFirstClientRec; cr != (clientRec *) NULL; + for (cr = windFirstClientRec; cr != (clientRec *) NULL; cr = cr->w_nextClient) { if (!strncmp(clientName, cr->w_clientName, length)) @@ -370,7 +370,7 @@ WindPrintClientList(wizard) { clientRec *cr; - for (cr = windFirstClientRec; cr != (clientRec *) NULL; + for (cr = windFirstClientRec; cr != (clientRec *) NULL; cr = cr->w_nextClient) { if (wizard || (cr->w_clientName[0] != '*')) TxError(" %s\n", cr->w_clientName); @@ -465,7 +465,7 @@ WindAddCommand(rc, text, func, dynamic) /* Copy the old values, inserting the new command in alphabetical */ /* order. */ - for (cidx = 0; (commandTable[cidx] != NULL) && + for (cidx = 0; (commandTable[cidx] != NULL) && (strcmp(commandTable[cidx], text) < 0); cidx++) { newcmdTable[cidx] = commandTable[cidx]; @@ -549,7 +549,7 @@ WindReplaceCommand(rc, command, newfunc) /* * ---------------------------------------------------------------------------- * WindGetCommandTable -- - * + * * For functions wishing to parse the command table of a client * directly, this routine returns a pointer to the top of the * table. The only purpose of this routine is to export the diff --git a/windows/windMove.c b/windows/windMove.c index d1420ef8..f2229f43 100644 --- a/windows/windMove.c +++ b/windows/windMove.c @@ -4,16 +4,16 @@ * the screen. It does not contain the functions that change the * contents of the windows. * - * ********************************************************************* - * * Copyright (C) 1985, 1990 Regents of the University of California. * - * * Permission to use, copy, modify, and distribute this * - * * software and its documentation for any purpose and without * - * * fee is hereby granted, provided that the above copyright * - * * notice appear in all copies. The University of California * - * * makes no representations about the suitability of this * - * * software for any purpose. It is provided "as is" without * - * * express or implied warranty. Export of this software outside * - * * of the United States of America may require an export license. * + * ********************************************************************* + * * Copyright (C) 1985, 1990 Regents of the University of California. * + * * Permission to use, copy, modify, and distribute this * + * * software and its documentation for any purpose and without * + * * fee is hereby granted, provided that the above copyright * + * * notice appear in all copies. The University of California * + * * makes no representations about the suitability of this * + * * software for any purpose. It is provided "as is" without * + * * express or implied warranty. Export of this software outside * + * * of the United States of America may require an export license. * * ********************************************************************* */ @@ -59,7 +59,7 @@ int windWindowMask = 0; /* One bit per window ID */ int windMaxWindows = 32; /* May be decreased via the WIND_MAX_WINDOWS() macro */ int windCurNumWindows = 0; - + /* * ---------------------------------------------------------------------------- * windUnlink -- @@ -108,7 +108,7 @@ windUnlink(w) w->w_nextWindow = (MagWindow *) NULL; w->w_prevWindow = (MagWindow *) NULL; } - + /* * ---------------------------------------------------------------------------- * @@ -141,13 +141,13 @@ windFree(w) } freeMagic( (char *) w); } - + /* * ---------------------------------------------------------------------------- * WindSetWindowAreas -- * * Given the location of the window on the screen, compute w->w_allArea - * and w->w_screenArea in the window's own coordinate system. + * and w->w_screenArea in the window's own coordinate system. * * Results: * None. @@ -169,7 +169,7 @@ WindSetWindowAreas(w) w->w_allArea.r_xtop = w->w_frameArea.r_xtop - w->w_frameArea.r_xbot; w->w_allArea.r_ytop = w->w_frameArea.r_ytop - w->w_frameArea.r_ybot; break; - + default: /* Windows are all in the same coordinate system */ w->w_allArea = w->w_frameArea; @@ -177,7 +177,7 @@ WindSetWindowAreas(w) WindOutToIn(w, &w->w_allArea, &w->w_screenArea); } - + /* * ---------------------------------------------------------------------------- * windSetWindowPosition -- @@ -197,7 +197,7 @@ windSetWindowPosition(w) MagWindow *w; { } - + /* * ---------------------------------------------------------------------------- * WindDelete -- @@ -208,7 +208,7 @@ windSetWindowPosition(w) * TRUE if the window was deleted, FALSE otherwise. * * Side effects: - * The window disappears from the sreen. The window's client is notified + * The window disappears from the sreen. The window's client is notified * that this is about to happen, and it may refuse to let it happen. * ---------------------------------------------------------------------------- */ @@ -235,7 +235,7 @@ WindDelete(w) return FALSE; } - + /* * ---------------------------------------------------------------------------- * WindCreate -- @@ -256,7 +256,7 @@ MagWindow * WindCreate(client, frameArea, isHint, argc, argv) WindClient client; /* The client that will control this window */ Rect *frameArea; /* The area that the window is to occupy */ - bool isHint; /* TRUE if the above rectangle is only a + bool isHint; /* TRUE if the above rectangle is only a * hint and it is OK for a window package to * override it to maintain a consistent * user interface. @@ -313,7 +313,7 @@ WindCreate(client, frameArea, isHint, argc, argv) w->w_frameArea.r_ybot = (GrScreenRect.r_ytop - GrScreenRect.r_ybot) / 2; break; - + default: w->w_frameArea = GrScreenRect; } @@ -362,7 +362,7 @@ WindCreate(client, frameArea, isHint, argc, argv) return w; } - + /* * ---------------------------------------------------------------------------- * @@ -418,13 +418,13 @@ void WindInToOut(w, in, out) out->r_ytop += TOP_BORDER(w); } - + /* * ---------------------------------------------------------------------------- * WindUnder -- * * Move a window underneath the rest. - * + * * Results: * None. * @@ -451,7 +451,7 @@ WindUnder(w) /* Mark for redisplay all the areas that this window * currently obscures. */ - + for (w2 = w->w_nextWindow; w2 != NULL; w2 = w2->w_nextWindow) { area = w2->w_allArea; @@ -475,7 +475,7 @@ WindUnder(w) } } - + /* * ---------------------------------------------------------------------------- * WindOver -- @@ -504,12 +504,12 @@ WindOver(w) if ( GrOverWindowPtr ) (*GrOverWindowPtr)(w); break; - + default: /* Mark for redisplay all of the areas of the screen that * currently obscure this window. */ - + for (r = w->w_clipAgainst; r != NULL; r = r->r_next) { area = r->r_r; @@ -532,7 +532,7 @@ WindOver(w) windReClip(); } } - + /* * ---------------------------------------------------------------------------- * @@ -571,11 +571,11 @@ windFindUnobscured(area, okArea) return FALSE; } sharedW = w->w_prevWindow; - (void) GeoDisjoint(area, &w->w_frameArea, + (void) GeoDisjoint(area, &w->w_frameArea, windFindUnobscured, (ClientData) okArea); return FALSE; } - + /* * ---------------------------------------------------------------------------- * WindReframe -- @@ -614,7 +614,7 @@ WindReframe(w, r, inside, move) cr = (clientRec *) w->w_client; - /* Ensure that the new window size is not inside out and has some size to + /* Ensure that the new window size is not inside out and has some size to * it. Compute the new w_frameArea (in newFrameArea). */ @@ -623,9 +623,9 @@ WindReframe(w, r, inside, move) if ((w->w_flags & WIND_ISICONIC) == 0) { /* Not iconic -- enforce a minimum size */ - newFrameArea.r_xtop = MAX(newFrameArea.r_xtop, + newFrameArea.r_xtop = MAX(newFrameArea.r_xtop, newFrameArea.r_xbot + WIND_MIN_WIDTH); - newFrameArea.r_ytop = MAX(newFrameArea.r_ytop, + newFrameArea.r_ytop = MAX(newFrameArea.r_ytop, newFrameArea.r_ybot + WIND_MIN_HEIGHT); } @@ -653,7 +653,7 @@ WindReframe(w, r, inside, move) { case WIND_X_WINDOWS: break; - + default: /* Now comes the tricky part: figuring out what to redisplay. * The simple way out is to force redisplay at both the old and @@ -668,7 +668,7 @@ WindReframe(w, r, inside, move) if (!move) { - /* Compute the intersection of the old and new areas in + /* Compute the intersection of the old and new areas in * dontRedisplay. Mark old areas outside of this common area as * needing to be redisplayed. */ @@ -685,7 +685,7 @@ WindReframe(w, r, inside, move) dontRedisplay = w->w_allArea; } } - + /* At this point, we've recorded any old area that needs to be * redisplayed. */ @@ -704,10 +704,10 @@ WindReframe(w, r, inside, move) (!(w->w_flags & WIND_OBSCURED))) (*GrCreateBackingStorePtr)(w); break; - + default: /* Now that the window has been moved, record any of the new area that - * has to be redisplayed. + * has to be redisplayed. */ (void) GeoDisjoint(&w->w_allArea, &dontRedisplay, windReframeFunc, @@ -729,7 +729,7 @@ windReframeFunc(area, w) WindAreaChanged(w, area); return 0; } - + /* * ---------------------------------------------------------------------------- * @@ -772,8 +772,8 @@ WindFullScreen(w) if (cr->w_reposition != NULL) (*(cr->w_reposition))(w, &newFrameArea, FALSE); - /* - * Now, actually modify the window and its position. + /* + * Now, actually modify the window and its position. */ /* Compute new stuff. */ @@ -829,9 +829,9 @@ WindFullScreen(w) w->w_nextWindow = w2->w_nextWindow; w->w_prevWindow = w2; w2->w_nextWindow = w; - if (w->w_nextWindow == NULL) + if (w->w_nextWindow == NULL) windBottomWindow = w; - else + else w->w_nextWindow->w_prevWindow = w; windReClip(); } diff --git a/windows/windSearch.c b/windows/windSearch.c index 33734a73..3862252c 100644 --- a/windows/windSearch.c +++ b/windows/windSearch.c @@ -3,16 +3,16 @@ * * Functions to find & enumerate windows. * - * ********************************************************************* - * * Copyright (C) 1985, 1990 Regents of the University of California. * - * * Permission to use, copy, modify, and distribute this * - * * software and its documentation for any purpose and without * - * * fee is hereby granted, provided that the above copyright * - * * notice appear in all copies. The University of California * - * * makes no representations about the suitability of this * - * * software for any purpose. It is provided "as is" without * - * * express or implied warranty. Export of this software outside * - * * of the United States of America may require an export license. * + * ********************************************************************* + * * Copyright (C) 1985, 1990 Regents of the University of California. * + * * Permission to use, copy, modify, and distribute this * + * * software and its documentation for any purpose and without * + * * fee is hereby granted, provided that the above copyright * + * * notice appear in all copies. The University of California * + * * makes no representations about the suitability of this * + * * software for any purpose. It is provided "as is" without * + * * express or implied warranty. Export of this software outside * + * * of the United States of America may require an export license. * * ********************************************************************* */ @@ -28,7 +28,7 @@ static char rcsid[] __attribute__ ((unused)) = "$Header: /usr/cvsroot/magic-8.0/ #include "graphics/glyphs.h" #include "windows/windInt.h" - + /* * ---------------------------------------------------------------------------- * windSearchPoint -- @@ -41,8 +41,8 @@ static char rcsid[] __attribute__ ((unused)) = "$Header: /usr/cvsroot/magic-8.0/ * window packages more that one window may contain that point. In * particular, under Sun Windows ALL windows contain the point (0, 0). * - * If 'inside' is non-NULL, it points to a boolean variable which will be - * set to TRUE if the point is in the interior of the window, and FALSE + * If 'inside' is non-NULL, it points to a boolean variable which will be + * set to TRUE if the point is in the interior of the window, and FALSE * if it is in the border of the window. * * Side effects: @@ -65,7 +65,7 @@ windSearchPoint(p, inside) { if (GEO_ENCLOSE(p, &(w->w_allArea) )) { - if (inside != (bool *) NULL) + if (inside != (bool *) NULL) *inside = GEO_ENCLOSE(p, &(w->w_screenArea) ); return w; } @@ -128,7 +128,7 @@ WindSearchData(grdata) } return NULL; } - + /* * ---------------------------------------------------------------------------- * WindSearch -- @@ -144,7 +144,7 @@ WindSearchData(grdata) * be of the form * * int func(window, clientData) - * MagWindow *window; + * MagWindow *window; * ClientData clientData; * { * } @@ -183,7 +183,7 @@ WindSearch(client, surfaceID, surfaceArea, func, clientData) for (w = windTopWindow; w != (MagWindow *) NULL; w = w->w_nextWindow) { if ( ((client == (WindClient) NULL) || (w->w_client == client)) && - ((surfaceID == (ClientData) NULL) || + ((surfaceID == (ClientData) NULL) || (w->w_surfaceID == surfaceID)) ) { if (surfaceArea == (Rect *) NULL) diff --git a/windows/windSend.c b/windows/windSend.c index 9cde9d96..7fe7fe16 100644 --- a/windows/windSend.c +++ b/windows/windSend.c @@ -3,16 +3,16 @@ * Send button pushes and commands to the window's command * interpreters. * - * ********************************************************************* - * * Copyright (C) 1985, 1990 Regents of the University of California. * - * * Permission to use, copy, modify, and distribute this * - * * software and its documentation for any purpose and without * - * * fee is hereby granted, provided that the above copyright * - * * notice appear in all copies. The University of California * - * * makes no representations about the suitability of this * - * * software for any purpose. It is provided "as is" without * - * * express or implied warranty. Export of this software outside * - * * of the United States of America may require an export license. * + * ********************************************************************* + * * Copyright (C) 1985, 1990 Regents of the University of California. * + * * Permission to use, copy, modify, and distribute this * + * * software and its documentation for any purpose and without * + * * fee is hereby granted, provided that the above copyright * + * * notice appear in all copies. The University of California * + * * makes no representations about the suitability of this * + * * software for any purpose. It is provided "as is" without * + * * express or implied warranty. Export of this software outside * + * * of the United States of America may require an export license. * * ********************************************************************* */ @@ -62,7 +62,7 @@ extern void WindGrabInput(); extern void WindReleaseInput(); extern void windHelp(); - + /* * ---------------------------------------------------------------------------- * WindSendCommand -- @@ -116,7 +116,7 @@ WindSendCommand(w, cmd, quiet) } inside = FALSE; - ASSERT( (cmd->tx_button == TX_NO_BUTTON) || (cmd->tx_argc == 0), + ASSERT( (cmd->tx_button == TX_NO_BUTTON) || (cmd->tx_argc == 0), "WindSendCommand"); WindOldButtons = WindNewButtons; @@ -155,7 +155,7 @@ WindSendCommand(w, cmd, quiet) w = WindSearchWid(cmd->tx_wid); } - if (w != (MagWindow *) NULL) + if (w != (MagWindow *) NULL) { inside = GEO_ENCLOSE(&cmd->tx_p, &w->w_screenArea); if ((!inside) && (w->w_flags & WIND_COMMANDS)) @@ -185,7 +185,7 @@ WindSendCommand(w, cmd, quiet) WindCurrentCmd = cmd; WindCurrentWindow = w; - if (cmd->tx_button == TX_NO_BUTTON) + if (cmd->tx_button == TX_NO_BUTTON) { clientCmdNum = Lookup(cmd->tx_argv[0], rc->w_commandTable); @@ -204,13 +204,13 @@ WindSendCommand(w, cmd, quiet) { TxError("Unknown command:"); windPrintCommand(cmd); - if (WindNewButtons != 0) + if (WindNewButtons != 0) { char *bname = "unknown"; if (WindNewButtons & TX_LEFT_BUTTON) bname = "left"; else if (WindNewButtons & TX_RIGHT_BUTTON) bname = "right"; else if (WindNewButtons & TX_MIDDLE_BUTTON) bname = "middle"; - + TxError( "'%s' window is waiting for %s button to be released.\n", rc->w_clientName, bname); } @@ -229,8 +229,8 @@ WindSendCommand(w, cmd, quiet) } /* intercept 'help' */ - if ((windCmdNum >= 0) && - (strncmp(windClient->w_commandTable[windCmdNum], + if ((windCmdNum >= 0) && + (strncmp(windClient->w_commandTable[windCmdNum], "help", 4) == 0) ) { TxUseMore(); @@ -316,7 +316,7 @@ WindSendCommand(w, cmd, quiet) - + /* * ---------------------------------------------------------------------------- * WindGrabInput -- @@ -342,7 +342,7 @@ WindGrabInput(client) } - + /* * ---------------------------------------------------------------------------- * WindReleaseInput -- @@ -365,7 +365,7 @@ WindReleaseInput(client) windGrabber = (WindClient) StackPop(windGrabberStack); } - + /* * ---------------------------------------------------------------------------- * windHelp -- @@ -412,7 +412,7 @@ windHelp(cmd, name, table) TxPrintf("Wizard %s Commands\n", capName); TxPrintf("----------------------\n"); } - else + else { if (cmd->tx_argc == 2) { diff --git a/windows/windTrans.c b/windows/windTrans.c index d77e0e54..7158c06e 100644 --- a/windows/windTrans.c +++ b/windows/windTrans.c @@ -4,16 +4,16 @@ * Routines to transform from screen coords to surface coords and the * other way. * - * ********************************************************************* - * * Copyright (C) 1985, 1990 Regents of the University of California. * - * * Permission to use, copy, modify, and distribute this * - * * software and its documentation for any purpose and without * - * * fee is hereby granted, provided that the above copyright * - * * notice appear in all copies. The University of California * - * * makes no representations about the suitability of this * - * * software for any purpose. It is provided "as is" without * - * * express or implied warranty. Export of this software outside * - * * of the United States of America may require an export license. * + * ********************************************************************* + * * Copyright (C) 1985, 1990 Regents of the University of California. * + * * Permission to use, copy, modify, and distribute this * + * * software and its documentation for any purpose and without * + * * fee is hereby granted, provided that the above copyright * + * * notice appear in all copies. The University of California * + * * makes no representations about the suitability of this * + * * software for any purpose. It is provided "as is" without * + * * express or implied warranty. Export of this software outside * + * * of the United States of America may require an export license. * * ********************************************************************* */ @@ -28,7 +28,7 @@ static char rcsid[] __attribute__ ((unused)) = "$Header: /usr/cvsroot/magic-8.0/ #include "graphics/glyphs.h" #include "windows/windInt.h" - + /* * ---------------------------------------------------------------------------- * WindScreenToSurface -- @@ -52,7 +52,7 @@ WindScreenToSurface(w, screen, surface) Rect *screen; /* A rectangle in screen coordinates */ Rect *surface; /* A pointer to a rectangle to be filled * in with a rectangle in surface coords that - * is big enough to contain everything + * is big enough to contain everything * displayed within the screen rectangle. */ { @@ -62,7 +62,7 @@ WindScreenToSurface(w, screen, surface) surface->r_ur = r.r_ur; } - + /* * ---------------------------------------------------------------------------- * WindPointToSurface -- @@ -105,7 +105,7 @@ WindPointToSurface(w, screenPoint, surfacePoint, surfaceBox) /* Do the inverse transformation twice, once with rounding for * the point and once with truncation for the box. */ - + unitsPerPixel = SUBPIXEL/w->w_scale; if (surfaceBox != NULL) @@ -114,7 +114,7 @@ WindPointToSurface(w, screenPoint, surfacePoint, surfaceBox) if (tmp < 0) tmp -= w->w_scale-1; surfaceBox->r_xbot = w->w_surfaceArea.r_xbot + tmp/w->w_scale; surfaceBox->r_xtop = surfaceBox->r_xbot + unitsPerPixel + 1; - + tmp = (SUBPIXEL*screenPoint->p_y) - w->w_origin.p_y; if (tmp < 0) tmp -= w->w_scale-1; surfaceBox->r_ybot = w->w_surfaceArea.r_ybot + tmp/w->w_scale; @@ -135,7 +135,7 @@ WindPointToSurface(w, screenPoint, surfacePoint, surfaceBox) surfacePoint->p_y = w->w_surfaceArea.r_ybot + tmp/w->w_scale; } } - + /* * ---------------------------------------------------------------------------- * @@ -187,7 +187,7 @@ WindSurfaceToScreen(w, surface, screen) int tmp; /* Do the four coordinates one at a time. */ - + /* The apparently redundant clipping (also done later by the box */ /* drawing routine) is necessary for two reasons: 1) it prevents */ /* having to do a multiply and shift function for any box extending */ @@ -204,7 +204,7 @@ WindSurfaceToScreen(w, surface, screen) screen->r_xbot = w->w_screenArea.r_xbot - 1; else screen->r_xbot = (w->w_origin.p_x + (tmp * w->w_scale)) >> SUBPIXELBITS; } - + tmp = surface->r_ybot; if (tmp > w->w_surfaceArea.r_ytop) screen->r_ybot = w->w_screenArea.r_ytop + 1; @@ -215,7 +215,7 @@ WindSurfaceToScreen(w, surface, screen) screen->r_ybot = w->w_screenArea.r_ybot - 1; else screen->r_ybot = (w->w_origin.p_y + (tmp * w->w_scale)) >> SUBPIXELBITS; } - + tmp = surface->r_xtop; if (tmp > w->w_surfaceArea.r_xtop) screen->r_xtop = w->w_screenArea.r_xtop + 1; @@ -226,7 +226,7 @@ WindSurfaceToScreen(w, surface, screen) screen->r_xtop = w->w_screenArea.r_xbot - 1; else screen->r_xtop = (w->w_origin.p_x + (tmp * w->w_scale)) >> SUBPIXELBITS; } - + tmp = surface->r_ytop; if (tmp > w->w_surfaceArea.r_ytop) screen->r_ytop = w->w_screenArea.r_ytop + 1; @@ -239,7 +239,7 @@ WindSurfaceToScreen(w, surface, screen) } } -/* +/* * ---------------------------------------------------------------------------- * * WindSurfaceToScreenNoClip -- @@ -263,7 +263,7 @@ WindSurfaceToScreen(w, surface, screen) * * ---------------------------------------------------------------------------- */ - + void WindSurfaceToScreenNoClip(w, surface, screen) MagWindow *w; @@ -286,7 +286,7 @@ WindSurfaceToScreenNoClip(w, surface, screen) screen->r_ytop = (int)(dval >> SUBPIXELBITS); } - + /* * ---------------------------------------------------------------------------- * @@ -318,14 +318,14 @@ WindPointToScreen(w, surface, screen) int tmp; /* Do the coordinates one at a time. */ - + tmp = surface->p_x; if (tmp > w->w_surfaceArea.r_xtop) tmp = w->w_surfaceArea.r_xtop; tmp -= w->w_surfaceArea.r_xbot; if (tmp < 0) tmp = 0; screen->p_x = (w->w_origin.p_x + (tmp*w->w_scale)) >> SUBPIXELBITS; - + tmp = surface->p_y; if (tmp > w->w_surfaceArea.r_ytop) tmp = w->w_surfaceArea.r_ytop; @@ -333,7 +333,7 @@ WindPointToScreen(w, surface, screen) if (tmp < 0) tmp = 0; screen->p_y = (w->w_origin.p_y + (tmp*w->w_scale)) >> SUBPIXELBITS; } - + /* * ---------------------------------------------------------------------------- * @@ -366,7 +366,7 @@ windScreenToFrame(w, screen, frame) frame->p_x = screen->p_x + w->w_frameArea.r_xbot; frame->p_y = screen->p_y + w->w_frameArea.r_ybot; break; - + default: /* WIND_MAGIC_WINDOWS */ *frame = *screen; diff --git a/windows/windView.c b/windows/windView.c index eb87d6b9..c08102b3 100644 --- a/windows/windView.c +++ b/windows/windView.c @@ -4,16 +4,16 @@ * of the windows. This includes things like pan, zoom, and loading * of windows. * - * ********************************************************************* - * * Copyright (C) 1985, 1990 Regents of the University of California. * - * * Permission to use, copy, modify, and distribute this * - * * software and its documentation for any purpose and without * - * * fee is hereby granted, provided that the above copyright * - * * notice appear in all copies. The University of California * - * * makes no representations about the suitability of this * - * * software for any purpose. It is provided "as is" without * - * * express or implied warranty. Export of this software outside * - * * of the United States of America may require an export license. * + * ********************************************************************* + * * Copyright (C) 1985, 1990 Regents of the University of California. * + * * Permission to use, copy, modify, and distribute this * + * * software and its documentation for any purpose and without * + * * fee is hereby granted, provided that the above copyright * + * * notice appear in all copies. The University of California * + * * makes no representations about the suitability of this * + * * software for any purpose. It is provided "as is" without * + * * express or implied warranty. Export of this software outside * + * * of the United States of America may require an export license. * * ********************************************************************* */ @@ -33,7 +33,7 @@ static char rcsid[] __attribute__ ((unused)) = "$Header: /usr/cvsroot/magic-8.0/ extern void windNewView(); - + /* * ---------------------------------------------------------------------------- * @@ -69,7 +69,7 @@ windFixSurfaceArea(w) w->w_origin.p_y += (newArea.r_ybot - w->w_surfaceArea.r_ybot) * w->w_scale; w->w_surfaceArea = newArea; } - + /* * ---------------------------------------------------------------------------- @@ -129,7 +129,7 @@ WindLoad(w, client, surfaceID, surfaceArea) return TRUE; } - + /* * ---------------------------------------------------------------------------- * WindMove -- @@ -141,7 +141,7 @@ WindLoad(w, client, surfaceID, surfaceArea) * None. * * Side effects: - * The window will be now view a different portion of the clients area. + * The window will be now view a different portion of the clients area. * The client may be called to redisplay the areas that moved. * ---------------------------------------------------------------------------- */ @@ -159,13 +159,13 @@ WindMove(w, surfaceArea) * window, compute the scale twice, once using the y-dimension * alone, and once using x alone. Then use the smaller scale factor. */ - + size = (surfaceArea->r_xtop - surfaceArea->r_xbot + 1); - xscale = ((dlong)(w->w_screenArea.r_xtop - + xscale = ((dlong)(w->w_screenArea.r_xtop - w->w_screenArea.r_xbot + 1) * SUBPIXEL) / size; size = (surfaceArea->r_ytop - surfaceArea->r_ybot + 1); - yscale = ((w->w_screenArea.r_ytop - + yscale = ((w->w_screenArea.r_ytop - w->w_screenArea.r_ybot + 1) * SUBPIXEL) / size; w->w_scale = MIN(xscale, yscale); @@ -208,7 +208,7 @@ WindMove(w, surfaceArea) windNewView(w); } - + /* * ---------------------------------------------------------------------------- * WindZoom -- @@ -222,7 +222,7 @@ WindMove(w, surfaceArea) * None. * * Side effects: - * The window will be now view a different portion of the client's area. + * The window will be now view a different portion of the client's area. * The client may be called to redisplay part of the screen. * ---------------------------------------------------------------------------- */ @@ -264,7 +264,7 @@ WindZoom(w, factor) * None. * * Side effects: - * All windows will be now view a different portion of the client's area. + * All windows will be now view a different portion of the client's area. * * ---------------------------------------------------------------------------- */ @@ -304,7 +304,7 @@ WindScale(scalen, scaled) * None. * * Side effects: - * All windows will be now view a different portion of the client's area. + * All windows will be now view a different portion of the client's area. * * ---------------------------------------------------------------------------- */ @@ -329,8 +329,8 @@ WindTranslate(origx, origy) } } - - + + /* * ---------------------------------------------------------------------------- * @@ -348,7 +348,7 @@ WindTranslate(origx, origy) * * ---------------------------------------------------------------------------- */ - + /* ARGSUSED */ void @@ -356,7 +356,7 @@ WindView(w) MagWindow *w; { Rect bbox; -#define SLOP 10 /* Amount of border (in fraction of a screenfull) +#define SLOP 10 /* Amount of border (in fraction of a screenfull) * to add. */ if (w == NULL) @@ -376,7 +376,7 @@ WindView(w) WindMove(w, &bbox); } - + /* * ---------------------------------------------------------------------------- * @@ -440,7 +440,7 @@ WindScroll(w, surfaceOffset, screenOffset) * make sure that w->w_surfaceArea still overlaps the window area * on all sides. */ - + if (screenOffset != NULL) { int units, pixels; diff --git a/windows/windows.h b/windows/windows.h index 36f766a5..f9bf1f15 100644 --- a/windows/windows.h +++ b/windows/windows.h @@ -4,16 +4,16 @@ * Interface definitions for Magic's window manager. This * package manages a set of overlapping windows. * - * ********************************************************************* - * * Copyright (C) 1985, 1990 Regents of the University of California. * - * * Permission to use, copy, modify, and distribute this * - * * software and its documentation for any purpose and without * - * * fee is hereby granted, provided that the above copyright * - * * notice appear in all copies. The University of California * - * * makes no representations about the suitability of this * - * * software for any purpose. It is provided "as is" without * - * * express or implied warranty. Export of this software outside * - * * of the United States of America may require an export license. * + * ********************************************************************* + * * Copyright (C) 1985, 1990 Regents of the University of California. * + * * Permission to use, copy, modify, and distribute this * + * * software and its documentation for any purpose and without * + * * fee is hereby granted, provided that the above copyright * + * * notice appear in all copies. The University of California * + * * makes no representations about the suitability of this * + * * software for any purpose. It is provided "as is" without * + * * express or implied warranty. Export of this software outside * + * * of the United States of America may require an export license. * * ********************************************************************* * * rcsid $Header: /usr/cvsroot/magic-8.0/windows/windows.h,v 1.1.1.1 2008/02/03 20:43:50 tim Exp $ @@ -47,14 +47,14 @@ typedef ClientData WindClient; /* A unique ID of a client of the * by a client of the window package. The client is responsible for redrawing * the surface when requested. The window package maintains the transform * from surface coordinates to screen coordinates and also controls which - * portion of the surface is currently visable in the window. See the + * portion of the surface is currently visable in the window. See the * comments in windMain.c and above the proc 'WindAddClient' for more info. * - * To see an example of a simple window client, look at the colormap window + * To see an example of a simple window client, look at the colormap window * located in 'cmwind/CMWmain.c'. A more complex window is the layout window, * located in 'dbwind/DBWprocs.c'. * - * The following key letters in parens after a field indicate who should + * The following key letters in parens after a field indicate who should * read & write it: * * P - Private (window package use only). @@ -68,7 +68,7 @@ typedef ClientData WindClient; /* A unique ID of a client of the * * The comments below often mention a procedure that sets a given field. This * is the normal procedure used to set the field, but there may be other seldom - * used procs in the window package that set the field. + * used procs in the window package that set the field. */ typedef struct WIND_S1 { struct WIND_S1 *w_nextWindow; /* A doubly-linked list (P) */ @@ -83,7 +83,7 @@ typedef struct WIND_S1 { * Set via WindLoad(). */ Rect w_allArea; /* The entire area of the window in the screen - * coordinates for the window, including the + * coordinates for the window, including the * border and obscured areas. (R) * * If we are using Magic's window package, @@ -98,8 +98,8 @@ typedef struct WIND_S1 { * This field is recomputed by WindReframe(). */ Rect w_frameArea; /* The location of the window on the screen (C) - * If a window's create proc modifies this, it - * needs to set w_allArea and w_screenArea by + * If a window's create proc modifies this, it + * needs to set w_allArea and w_screenArea by * calling WindSetWindowAreas(). * * Also, see comments for w_allArea. @@ -133,16 +133,16 @@ typedef struct WIND_S1 { * transform between surface and screen * coordinates. (R) */ - LinkedRect *w_clipAgainst; /* A linked list of areas which obscure + LinkedRect *w_clipAgainst; /* A linked list of areas which obscure * portions of this window. (R) - * Normally clients just pass this down to the + * Normally clients just pass this down to the * graphics package. * Changed via WindOver(), WindUnder(), and * WindFullScreen(). */ Point w_stippleOrigin; /* A point that serves as the origin (in screen * coordinates) of stipple patterns within - * this window. (R) + * this window. (R) * This field is maintained for the benifit of * device drivers, but is often unused. */ @@ -172,8 +172,8 @@ typedef struct WIND_S1 { * its old depth on the list of windows, so * it can be put back where it came from. (P) */ - Rect *w_bbox; /* A pointer to the bounding box of the stuff - * in this window. Used for WindView() and for + Rect *w_bbox; /* A pointer to the bounding box of the stuff + * in this window. Used for WindView() and for * scroll bars. (L) * This MUST be set if WIND_SCROLLABLE is set. */ @@ -198,7 +198,7 @@ typedef struct WIND_S1 { char *w_iconname; /* Short name for the icon. */ ClientData w_redrawAreas; /* List of areas that need to be redrawn. (P) * Set by WindAreaChanged(), cleared by - * WindUpdate(). Initialized by + * WindUpdate(). Initialized by * WindSeparateRedisplay(). */ } MagWindow; @@ -231,7 +231,7 @@ typedef struct WIND_S1 { * also accept one of these flags instead. */ #define WIND_UNKNOWN_WINDOW -2 /* We should pick one by looking at - * the location of the point. + * the location of the point. */ #define WIND_NO_WINDOW -3 /* Use NULL for the window */ @@ -313,7 +313,7 @@ extern bool WindAnotherUpdatePlease; /* Set by a client during redisplay if it #define WIND_MAX_WINDOWS(x) (windMaxWindows = MIN(windMaxWindows, (x))) extern int windMaxWindows; /* Use above macro, never increase this! */ -/* The type of windows that we will implement. This variable must be set by +/* The type of windows that we will implement. This variable must be set by * the graphics package before WindInit() is called. */ extern int WindPackageType; diff --git a/wiring/wireInt.h b/wiring/wireInt.h index 68a3c5c8..9306dc97 100644 --- a/wiring/wireInt.h +++ b/wiring/wireInt.h @@ -4,16 +4,16 @@ * Contains definitions for things that are used by more than * one file in the wiring module, but aren't exported. * - * ********************************************************************* - * * Copyright (C) 1985, 1990 Regents of the University of California. * - * * Permission to use, copy, modify, and distribute this * - * * software and its documentation for any purpose and without * - * * fee is hereby granted, provided that the above copyright * - * * notice appear in all copies. The University of California * - * * makes no representations about the suitability of this * - * * software for any purpose. It is provided "as is" without * - * * express or implied warranty. Export of this software outside * - * * of the United States of America may require an export license. * + * ********************************************************************* + * * Copyright (C) 1985, 1990 Regents of the University of California. * + * * Permission to use, copy, modify, and distribute this * + * * software and its documentation for any purpose and without * + * * fee is hereby granted, provided that the above copyright * + * * notice appear in all copies. The University of California * + * * makes no representations about the suitability of this * + * * software for any purpose. It is provided "as is" without * + * * express or implied warranty. Export of this software outside * + * * of the United States of America may require an export license. * * ********************************************************************* * * rcsid $Header: /usr/cvsroot/magic-8.0/wiring/wireInt.h,v 1.1.1.1 2008/02/03 20:43:50 tim Exp $ diff --git a/wiring/wireOps.c b/wiring/wireOps.c index 5a9e09b0..6df1fd32 100644 --- a/wiring/wireOps.c +++ b/wiring/wireOps.c @@ -5,16 +5,16 @@ * interface for Magic. The procedures do things like select a wiring * material and thickness, add a leg to a wire, etc. * - * ********************************************************************* - * * Copyright (C) 1985, 1990 Regents of the University of California. * - * * Permission to use, copy, modify, and distribute this * - * * software and its documentation for any purpose and without * - * * fee is hereby granted, provided that the above copyright * - * * notice appear in all copies. The University of California * - * * makes no representations about the suitability of this * - * * software for any purpose. It is provided "as is" without * - * * express or implied warranty. Export of this software outside * - * * of the United States of America may require an export license. * + * ********************************************************************* + * * Copyright (C) 1985, 1990 Regents of the University of California. * + * * Permission to use, copy, modify, and distribute this * + * * software and its documentation for any purpose and without * + * * fee is hereby granted, provided that the above copyright * + * * notice appear in all copies. The University of California * + * * makes no representations about the suitability of this * + * * software for any purpose. It is provided "as is" without * + * * express or implied warranty. Export of this software outside * + * * of the United States of America may require an export license. * * ********************************************************************* */ @@ -53,7 +53,7 @@ int WireLastDir; /* Last direction in which a wire was run. */ */ static CellDef *wireDesiredDef; - + /* * ---------------------------------------------------------------------------- * wireFindRootUse -- @@ -104,7 +104,7 @@ wireFindRootFunc(window, cellUsePtr) *cellUsePtr = use; return 1; } - + /* * ---------------------------------------------------------------------------- * WirePickType -- @@ -185,7 +185,7 @@ WirePickType(type, width) } /* Now select a chunk underneath the cursor of the particular type. */ - + SelectClear(); SelectChunk(&scx, WireType, crec->dbw_bitmask, &chunk, FALSE); WireWidth = chunk.r_xtop - chunk.r_xbot; @@ -195,7 +195,7 @@ WirePickType(type, width) /* Set the box and the selection to a square chunk that indicates the * wire width. */ - + if (WireWidth & 1) { GEO_EXPAND(&scx.scx_area, WireWidth/2, &box); @@ -234,7 +234,7 @@ WirePickType(type, width) DBWSetBox(scx.scx_use->cu_def, &box); TxPrintf("Using %s wires %d units wide.\n", DBTypeLongName(WireType), WireWidth); - + WireLastDir = -1; WireRememberForUndo(); } @@ -379,11 +379,11 @@ WireAddLeg(rect, point, direction) if (rect->r_ytop - rect->r_ybot != WireWidth) { int rmid = (rect->r_ytop + rect->r_ybot) / 2; - rect->r_ybot = rmid - hwidth; + rect->r_ybot = rmid - hwidth; rect->r_ytop = rect->r_ybot + WireWidth; rmid = (rect->r_xtop + rect->r_xbot) / 2; - rect->r_xbot = rmid - hwidth; + rect->r_xbot = rmid - hwidth; rect->r_xtop = rect->r_xbot + WireWidth; } @@ -425,11 +425,11 @@ WireAddLeg(rect, point, direction) if (rect->r_xtop - rect->r_xbot != WireWidth) { int rmid = (rect->r_xtop + rect->r_xbot) / 2; - rect->r_xbot = rmid - hwidth; + rect->r_xbot = rmid - hwidth; rect->r_xtop = rect->r_xbot + WireWidth; rmid = (rect->r_ytop + rect->r_ybot) / 2; - rect->r_ybot = rmid - hwidth; + rect->r_ybot = rmid - hwidth; rect->r_ytop = rect->r_ybot + WireWidth; } @@ -472,7 +472,7 @@ WireAddLeg(rect, point, direction) /* Select the new wire leg, if the edit cell is visible in any * windows. */ - + scx.scx_use = wireFindRootUse(EditRootDef); if (scx.scx_use != NULL) { @@ -735,7 +735,7 @@ WireAddContact(newType, newWidth) /* First of all, find out the location of the last wire leg, * which is marked by the box. */ - + if (!ToolGetBox(&boxRootDef, &oldLeg)) { TxError("No box! To place a contact, you must first use\n"); @@ -1009,7 +1009,7 @@ WireAddContact(newType, newWidth) GEO_EXPAND(&tmp, newOverlap, &tmp2); DBWSetBox(EditRootDef, &tmp2); } - + /* * ---------------------------------------------------------------------------- * @@ -1040,7 +1040,7 @@ WireButtonProc(w, cmd) if (cmd->tx_buttonAction != TX_BUTTON_DOWN) return; - + switch (cmd->tx_button) { case TX_LEFT_BUTTON: @@ -1054,7 +1054,7 @@ WireButtonProc(w, cmd) break; } } - + /* * ---------------------------------------------------------------------------- * diff --git a/wiring/wireTech.c b/wiring/wireTech.c index a8e4aa75..cc830e67 100644 --- a/wiring/wireTech.c +++ b/wiring/wireTech.c @@ -4,16 +4,16 @@ * This file contains procedures that parse the wiring sections of * technology files. * - * ********************************************************************* - * * Copyright (C) 1985, 1990 Regents of the University of California. * - * * Permission to use, copy, modify, and distribute this * - * * software and its documentation for any purpose and without * - * * fee is hereby granted, provided that the above copyright * - * * notice appear in all copies. The University of California * - * * makes no representations about the suitability of this * - * * software for any purpose. It is provided "as is" without * - * * express or implied warranty. Export of this software outside * - * * of the United States of America may require an export license. * + * ********************************************************************* + * * Copyright (C) 1985, 1990 Regents of the University of California. * + * * Permission to use, copy, modify, and distribute this * + * * software and its documentation for any purpose and without * + * * fee is hereby granted, provided that the above copyright * + * * notice appear in all copies. The University of California * + * * makes no representations about the suitability of this * + * * software for any purpose. It is provided "as is" without * + * * express or implied warranty. Export of this software outside * + * * of the United States of America may require an export license. * * ********************************************************************* */ @@ -39,7 +39,7 @@ static char rcsid[] __attribute__ ((unused)) = "$Header: /usr/cvsroot/magic-8.0/ Contact *WireContacts; int WireUnits; // Units per lambda for wiring sizes - + /* * ---------------------------------------------------------------------------- * WireTechInit -- @@ -68,7 +68,7 @@ WireTechInit() } WireUnits = 1; } - + /* * ---------------------------------------------------------------------------- * WireTechLine -- @@ -175,7 +175,7 @@ WireTechLine(sectionName, argc, argv) return TRUE; } - + /* * ---------------------------------------------------------------------------- * WireTechFinal -- diff --git a/wiring/wireUndo.c b/wiring/wireUndo.c index 75173110..665b30a5 100644 --- a/wiring/wireUndo.c +++ b/wiring/wireUndo.c @@ -4,16 +4,16 @@ * This file contains procedures that implement undo for wiring procedures * such as setting the current wire width. * - * ********************************************************************* - * * Copyright (C) 1985, 1990 Regents of the University of California. * - * * Permission to use, copy, modify, and distribute this * - * * software and its documentation for any purpose and without * - * * fee is hereby granted, provided that the above copyright * - * * notice appear in all copies. The University of California * - * * makes no representations about the suitability of this * - * * software for any purpose. It is provided "as is" without * - * * express or implied warranty. Export of this software outside * - * * of the United States of America may require an export license. * + * ********************************************************************* + * * Copyright (C) 1985, 1990 Regents of the University of California. * + * * Permission to use, copy, modify, and distribute this * + * * software and its documentation for any purpose and without * + * * fee is hereby granted, provided that the above copyright * + * * notice appear in all copies. The University of California * + * * makes no representations about the suitability of this * + * * software for any purpose. It is provided "as is" without * + * * express or implied warranty. Export of this software outside * + * * of the United States of America may require an export license. * * ********************************************************************* */ @@ -64,7 +64,7 @@ static TileType wireOldType = TT_SPACE; /* Last type that we remembered. */ static int wireOldWidth = 2; /* Last width that we remembered. */ static int wireOldDir = GEO_NORTH; /* Last direction */ - + /* * ---------------------------------------------------------------------------- * WireUndoInit -- @@ -90,7 +90,7 @@ WireUndoInit() if (WireUndoClientID < (UndoType) 0) TxError("Couldn't add wiring as an undo client!\n"); } - + /* * ---------------------------------------------------------------------------- * WireRememberForUndo -- @@ -125,7 +125,7 @@ WireRememberForUndo() wue->wue_oldDir = wireOldDir; wue->wue_newDir = wireOldDir = WireLastDir; } - + /* * ---------------------------------------------------------------------------- * WireUndoForw -- diff --git a/wiring/wiring.h b/wiring/wiring.h index 5f7254a0..2d1f3842 100644 --- a/wiring/wiring.h +++ b/wiring/wiring.h @@ -4,16 +4,16 @@ * Contains definitions for things that are exported by the * wiring module. * - * ********************************************************************* - * * Copyright (C) 1985, 1990 Regents of the University of California. * - * * Permission to use, copy, modify, and distribute this * - * * software and its documentation for any purpose and without * - * * fee is hereby granted, provided that the above copyright * - * * notice appear in all copies. The University of California * - * * makes no representations about the suitability of this * - * * software for any purpose. It is provided "as is" without * - * * express or implied warranty. Export of this software outside * - * * of the United States of America may require an export license. * + * ********************************************************************* + * * Copyright (C) 1985, 1990 Regents of the University of California. * + * * Permission to use, copy, modify, and distribute this * + * * software and its documentation for any purpose and without * + * * fee is hereby granted, provided that the above copyright * + * * notice appear in all copies. The University of California * + * * makes no representations about the suitability of this * + * * software for any purpose. It is provided "as is" without * + * * express or implied warranty. Export of this software outside * + * * of the United States of America may require an export license. * * ********************************************************************* * * rcsid $Header: /usr/cvsroot/magic-8.0/wiring/wiring.h,v 1.2 2008/09/05 13:56:25 tim Exp $