diff --git a/Makefile b/Makefile
index c06ccf810cd1c0afafacf1f30c42bcebeb60a91a..b3faee0b2a619b3ce9f0f7bef1ab52991b73fba5 100644
--- a/Makefile
+++ b/Makefile
@@ -144,14 +144,14 @@ clean:
 	rm -rf docs
 	rm -rf $(TARGET_DIR)/*
 
-all: setup clean main
+all: setup main
 
 setup:
 	-if [ ! -d $(LIBDIR) ] ; then mkdir $(LIBDIR) ; fi
 
 main: $(TARGET_DIR)/log $(TARGET_DIR)/loged
 
-LOGOBJ = $(TARGET_DIR)/log.o $(TOOLOBJ) $(TARGET_DIR)/tooldir.o $(TARGET_DIR)/logdef.o $(TARGET_DIR)/logstuff.o
+LOGOBJ = $(TARGET_DIR)/log.o $(TOOLOBJ) $(TARGET_DIR)/tooldir.o $(TARGET_DIR)/logstuff.o
 LOGEDOBJ = $(TARGET_DIR)/loged.o $(TARGET_DIR)/simdir.o $(SIMOBJ) $(TARGET_DIR)/logstuff.o
 
 $(SRC_DIR)/tooldir.c: $(TOOLOBJ)
diff --git a/include/ana/capfloat.h b/include/ana/capfloat.h
index 12178f378b3ce8a5b2e904ba3be2e209bacfe2fa..d74c5baa5972a2a86cbd29898a47f5190f902547 100644
--- a/include/ana/capfloat.h
+++ b/include/ana/capfloat.h
@@ -1,16 +1,5 @@
-#ifndef CAPFLOAT_H
-#define CAPFLOAT_H
+#pragma once
 
-#include "logdef.h"
-#include "ana/nsolver.h"
 #include "ana/globals.h"
-#include <graphics/mylib.h>
-#include <utils/newasm.h>
-#include <utils/sysglobals.h>
-#include <graphics/newci.h>
 
 void Log_capfloat_initlib_32 (Analog_32_action *act);
-
-#endif /*CAPFLOAT_H*/
-
-
diff --git a/include/ana/devtechn.h b/include/ana/devtechn.h
index deefc4f92683b2d1baefd72e4e5289ed64d8b1e8..1995068ef2716a9a00f2a552218785ea0da84050 100644
--- a/include/ana/devtechn.h
+++ b/include/ana/devtechn.h
@@ -1,16 +1,5 @@
-#ifndef DEVTECHN_H
-#define DEVTECHN_H
+#pragma once
 
-#include "logdef.h"
-#include "ana/nsolver.h"
 #include "ana/globals.h"
-#include <graphics/mylib.h>
-#include <utils/newasm.h>
-#include <utils/sysglobals.h>
-#include <graphics/newci.h>
 
 extern void Log_DEVTECHN_initlib_32 (Analog_32_action *act);
-
-#endif /*DEVTECHN_H*/
-
-
diff --git a/include/ana/devtechp.h b/include/ana/devtechp.h
index 08252ac92f60d4fddf56a08a340c67bc3f210623..fe1b5c69662c0e094242d800dd1d57799f778fd3 100644
--- a/include/ana/devtechp.h
+++ b/include/ana/devtechp.h
@@ -1,17 +1,5 @@
-#ifndef DEVTECHP_H
-#define DEVTECHP_H
+#pragma once
 
-#include "logdef.h"
-#include "ana/nsolver.h"
 #include "ana/globals.h"
-#include <graphics/mylib.h>
-#include <utils/newasm.h>
-#include <utils/sysglobals.h>
-#include <graphics/newci.h>
 
 extern void Log_DEVTECHP_initlib_32 (Analog_32_action *act);
-
-
-#endif /*DEVTECHP_H*/
-
-
diff --git a/include/ana/diode1.h b/include/ana/diode1.h
index 68f57021232230f5454e902767489ee909697234..58c9ae973dcfdfc65f86a4731738b3de0a128d0a 100644
--- a/include/ana/diode1.h
+++ b/include/ana/diode1.h
@@ -1,15 +1,5 @@
-#ifndef DIODE1_H
-#define DIODE1_H
+#pragma once
 
-#include "logdef.h"
 #include "ana/globals.h"
-#include <graphics/mylib.h>
-#include <utils/newasm.h>
-#include <utils/sysglobals.h>
-#include <graphics/newci.h>
 
 extern void Log_Diode1_INITLIB_32 (Analog_32_action *act);
-
-#endif /*DIODE1_H*/
-
-
diff --git a/include/ana/ganglion.h b/include/ana/ganglion.h
index 57e3e6ab33b239383e368109112daf8892b8213c..a6a9de16aeb779199c0709d2b01197dec3a55724 100644
--- a/include/ana/ganglion.h
+++ b/include/ana/ganglion.h
@@ -1,16 +1,5 @@
-#ifndef GANGLION_H
-#define GANGLION_H
+#pragma once
 
-#include "logdef.h"
-#include "ana/nsolver.h"
 #include "ana/globals.h"
-#include <graphics/mylib.h>
-#include <utils/newasm.h>
-#include <utils/sysglobals.h>
-#include <graphics/newci.h>
 
 extern void Log_ganglion_initlib_32 (Analog_32_action *act);
-
-#endif /*GANGLION_H*/
-
-
diff --git a/include/ana/globals.h b/include/ana/globals.h
index 50499787c16396b33f10dc1fd1571a2c4a90f3c2..770299b6a48c27e091ef2e736c1d230a40742675 100644
--- a/include/ana/globals.h
+++ b/include/ana/globals.h
@@ -1,18 +1,6 @@
-#ifndef GLOBALS_H
-#define GLOBALS_H
-
+#pragma once
 
 #include "logdef.h"
-#include <graphics/newci.h>
-#include <graphics/mylib.h>
-#include <utils/newasm.h>
-
-#ifdef GLOBALS_G
-# define vextern
-#else
-# define vextern extern
-#endif
-
 
 /*T*/
 
@@ -399,78 +387,78 @@ typedef struct AnaKlistnode {
 /*******************************************************************************/
 /*System data structures*/
 
-vextern log_action_t *AnaLogglobals;   ///< Log's global variables
-vextern log_action_t *AnaLogIglobals;   ///< Log's global variables
-vextern AnaInt_rec *AnaInt_nodelist;   ///< List of current internal pointers
-vextern AnaAnalog_Colors AnaColormap;   ///< The color map
-vextern AnaAnalog_Levels AnaLevelmap;   ///< The glow mode level map
-vextern AnaCheckarray AnaLimits;   ///< Array for checking system parameters
-vextern AnaCommand_rec *AnaClist;   ///< Structure for holding cnf commands
-vextern AnaKlistnode *AnaKlist;   ///< Structure for tracking analog gates
-vextern log_sigrec *AnaVddsig, *Anagndsig;
+log_action_t *AnaLogglobals;   ///< Log's global variables
+log_action_t *AnaLogIglobals;   ///< Log's global variables
+AnaInt_rec *AnaInt_nodelist;   ///< List of current internal pointers
+AnaAnalog_Colors AnaColormap;   ///< The color map
+AnaAnalog_Levels AnaLevelmap;   ///< The glow mode level map
+AnaCheckarray AnaLimits;   ///< Array for checking system parameters
+AnaCommand_rec *AnaClist;   ///< Structure for holding cnf commands
+AnaKlistnode *AnaKlist;   ///< Structure for tracking analog gates
+log_sigrec *AnaVddsig, *Anagndsig;
     ///< Signal pointers for Vdd and Gnd
-vextern log_nrec *AnaVddnode, *Anagndnode;
+log_nrec *AnaVddnode, *Anagndnode;
     ///< Signal pointers for Vdd and Gnd
 
 
 
-vextern char AnaCh;   ///< Used for 'press any key' debugging
+char AnaCh;   ///< Used for 'press any key' debugging
 
 
 /*******************************************************************************/
 /*Variables that show the state of my simulation and state machine*/
 
-vextern int AnaReady;   ///< Says That a circuit is ready to simulate
-vextern int AnaChanged;   ///< Says That a change has been made
+int AnaReady;   ///< Says That a circuit is ready to simulate
+int AnaChanged;   ///< Says That a change has been made
 
 /*Holds state of simulation proper*/
 
-vextern int AnaStart;   ///< Indicates whether this is initial timestep
-vextern int AnaError;   ///< Simulation flag
-vextern int AnaDone;    ///< Simulation flags
-vextern int AnaOverflow;   ///< Simulation flags
-vextern int AnaToobig;   ///< Simulation flag
-vextern int AnaToosmall;   ///< Simulation flag
-vextern int AnaSuccess;   ///< Simulation flag
-vextern long AnaItercount; ///< Variables for adaptive iteration watchdog
-vextern long AnaItermax; ///< Variables for adaptive iteration watchdog
-vextern double AnaAccum;   ///< Total accumulated timed
-vextern double AnaDt; ///< Present timestep of system
-vextern double AnaDtlast;   ///< Last timestep of system
-vextern int AnaChangedDt;   ///< A new dt has happened
-vextern int AnaChangedP;   ///< A transistor parameter has changed
-vextern int AnaInuse;   ///< At least one analog gate exists
-vextern long AnaDtcount;   ///< Counting variable to prevent roundoff
-vextern long AnaRelaxcount;
+int AnaStart;   ///< Indicates whether this is initial timestep
+int AnaError;   ///< Simulation flag
+int AnaDone;    ///< Simulation flags
+int AnaOverflow;   ///< Simulation flags
+int AnaToobig;   ///< Simulation flag
+int AnaToosmall;   ///< Simulation flag
+int AnaSuccess;   ///< Simulation flag
+long AnaItercount; ///< Variables for adaptive iteration watchdog
+long AnaItermax; ///< Variables for adaptive iteration watchdog
+double AnaAccum;   ///< Total accumulated timed
+double AnaDt; ///< Present timestep of system
+double AnaDtlast;   ///< Last timestep of system
+int AnaChangedDt;   ///< A new dt has happened
+int AnaChangedP;   ///< A transistor parameter has changed
+int AnaInuse;   ///< At least one analog gate exists
+long AnaDtcount;   ///< Counting variable to prevent roundoff
+long AnaRelaxcount;
     ///< Comparison variable for Dtcount for relaxation
-vextern int AnaExact;   ///< Flag for doing accuracy checking
-vextern int AnaDifficult;   ///< Flag for a difficult simulation
-vextern int AnaToomany;   ///< Flag for too many iterations
-vextern int AnaErase;   ///< State of reset memory
-vextern int AnaOldmodel;   ///< Model selection when loading in gates
-vextern int AnaDebugset;   ///< Flag used in debugging mode
-vextern long AnaDebugsize;   ///< Number of significant digits for debug mode
-vextern int AnaTimermode;   ///< Mode selection for benchmarking
-vextern int AnaTimerstate;   ///< State bit for timer state machine
-vextern long AnaTimerval;   ///< Benchmark memory location
-vextern double AnaVshift;   ///< Smallest voltage not requiring a gearshift
-vextern int AnaDimgate;   ///< Switch for dimming unconnected gates
-
-vextern int AnaProbeOn;   ///< State of probe mode
-vextern char AnaLastnodeStr[256];   ///< last node voltage displayed
-vextern char AnaLastGate1Str[256];   ///< last gate1 message displayed
-vextern char AnaLastGate2Str[256];   ///< last gate2 message displayed
-vextern char AnaLastGate3Str[256];   ///< last gate3 message displayed
-vextern char AnaLastGate4Str[256];   ///< last gate3 message displayed
-vextern char AnaLastGate5Str[256];   ///< last gate3 message displayed
-
-vextern long AnaGateHystercount;   ///< Hysteresis counter for probemode
-vextern long AnaNodeHystercount;   ///< Hysteresis counter for probemode
-
-vextern Anaepochs_type AnaEpoch;   ///< Holds present epoch of simulator
-vextern long AnaLastpage;   ///< Lastpage evaluated;  0->Clear array
-vextern log_grec *AnaLastgate;   ///< Lastgate evaluated
-vextern Anatimetype AnaTimestate;   ///< Present time state of system
+int AnaExact;   ///< Flag for doing accuracy checking
+int AnaDifficult;   ///< Flag for a difficult simulation
+int AnaToomany;   ///< Flag for too many iterations
+int AnaErase;   ///< State of reset memory
+int AnaOldmodel;   ///< Model selection when loading in gates
+int AnaDebugset;   ///< Flag used in debugging mode
+long AnaDebugsize;   ///< Number of significant digits for debug mode
+int AnaTimermode;   ///< Mode selection for benchmarking
+int AnaTimerstate;   ///< State bit for timer state machine
+long AnaTimerval;   ///< Benchmark memory location
+double AnaVshift;   ///< Smallest voltage not requiring a gearshift
+int AnaDimgate;   ///< Switch for dimming unconnected gates
+
+int AnaProbeOn;   ///< State of probe mode
+char AnaLastnodeStr[256];   ///< last node voltage displayed
+char AnaLastGate1Str[256];   ///< last gate1 message displayed
+char AnaLastGate2Str[256];   ///< last gate2 message displayed
+char AnaLastGate3Str[256];   ///< last gate3 message displayed
+char AnaLastGate4Str[256];   ///< last gate3 message displayed
+char AnaLastGate5Str[256];   ///< last gate3 message displayed
+
+long AnaGateHystercount;   ///< Hysteresis counter for probemode
+long AnaNodeHystercount;   ///< Hysteresis counter for probemode
+
+Anaepochs_type AnaEpoch;   ///< Holds present epoch of simulator
+long AnaLastpage;   ///< Lastpage evaluated;  0->Clear array
+log_grec *AnaLastgate;   ///< Lastgate evaluated
+Anatimetype AnaTimestate;   ///< Present time state of system
 
 
 /*******************************************************************************/
@@ -481,92 +469,91 @@ vextern Anatimetype AnaTimestate;   ///< Present time state of system
     Quit:Boolean;              {Variable for watchdog}
 $end$*/
 
-vextern long AnaStoptime;   ///< Variable for 'slow' watchdog
+long AnaStoptime;   ///< Variable for 'slow' watchdog
 /*******************************************************************************/
 
 
 /*******************************************************************************/
 /*simulation variables open to the public*/
 
-vextern double AnaVdd;   ///< System Power
-vextern double AnaDtmax;   ///< largest allowable timestep
-vextern double AnaVstep;   ///< Maximum voltage step allowed in simulation
+double AnaVdd;   ///< System Power
+double AnaDtmax;   ///< largest allowable timestep
+double AnaVstep;   ///< Maximum voltage step allowed in simulation
 
-vextern double AnaHighest;   ///< Highest voltage allowed in simulation
-vextern double AnaLowest;   ///< Lowest voltage allowed in simulation
-vextern double AnaSmall;   ///< Guess on a capacitor when Vc=0
+double AnaHighest;   ///< Highest voltage allowed in simulation
+double AnaLowest;   ///< Lowest voltage allowed in simulation
+double AnaSmall;   ///< Guess on a capacitor when Vc=0
+double AnaTol;   ///< Maximum percentage difference for convergance
+double AnaEqn_Epsilon;   ///< epsilon for equation solver
+double AnaVardone_Epsilon;   ///< epsilon for eqn zer test
 
-vextern double AnaTol;   ///< Maximum percentage difference for convergance
-vextern double AnaEqn_Epsilon;   ///< epsilon for equation solver
-vextern double AnaVardone_Epsilon;   ///< epsilon for eqn zero test
+double AnaTimefactor;   ///< How much to scale timestep
+double AnaTimemin;   ///< lowest allowable timestep
+long AnaIterfirstmax;   ///< Number of iterations for first try
+long AnaTimeincrease;   ///< Factor to increase maximum interation by
+double AnaSrange;   ///< Range of optimal voltage steps in simulation
 
-vextern double AnaTimefactor;   ///< How much to scale timestep
-vextern double AnaTimemin;   ///< lowest allowable timestep
-vextern long AnaIterfirstmax;   ///< Number of iterations for first try
-vextern long AnaTimeincrease;   ///< Factor to increase maximum interation by
-vextern double AnaSrange;   ///< Range of optimal voltage steps in simulation
+double AnaTimerelax;   ///< Minimum time to relax accuracy checking
+double AnaNodecap;   ///< Capacitance on a node
 
-vextern double AnaTimerelax;   ///< Minimum time to relax accuracy checking
-vextern double AnaNodecap;   ///< Capacitance on a node
-
-vextern long AnaProbeprec;   ///< Precision of probe mode displays
-vextern long AnaHysteresis;   ///< Amount of Hysteresis in probe mode
+long AnaProbeprec;   ///< Precision of probe mode displays
+long AnaHysteresis;   ///< Amount of Hysteresis in probe mode
 
 /*******************************************************************************/
 
 /*******************************************************************************/
 /*Variables for equation solver*/
 
-vextern long AnaSysRow, AnaSysCol;
-vextern AnaMatRec *AnaSystem;
-vextern AnaSolve_Type AnaS_Section;
-vextern long AnaLastJ;
+long AnaSysRow, AnaSysCol;
+AnaMatRec *AnaSystem;
+AnaSolve_Type AnaS_Section;
+long AnaLastJ;
 
 /*******************************************************************************/
 
 
 
-extern void AnaAddcommand (char *Keyword, char *Arg);
-extern void AnaAnalog_ChangeReset (int Erase);
-extern void AnaCapattrinsert (long base, long attrnum, log_grec *inst,
+void AnaAddcommand (char *Keyword, char *Arg);
+void AnaAnalog_ChangeReset (int Erase);
+void AnaCapattrinsert (long base, long attrnum, log_grec *inst,
 				 int *Ok);
-extern void AnaCapattrload (long base, log_grec *inst, int first);
-extern void AnaCapattrread (long base, log_grec *inst);
-extern void AnaCapattrwrite (long base, log_grec *inst);
-extern void AnaCapCopy (log_grec *inst);
-extern void AnaCapDispose (log_grec *inst);
-extern void AnaCapex (log_grec *inst);
-extern void AnaCapIin (Analog_32_action *act);
-extern void AnaCapInit (log_grec *inst);
-extern void AnaCappass1 (log_grec *inst);
-extern void AnaCappass2 (log_grec *inst);
-extern void AnaCapReset (log_grec *inst);
-extern void AnaCapUpdate (log_grec *inst);
-extern void AnaDiffdump ();
-extern void AnaDummyGate (Analog_32_action *act);
-extern void AnaDummyInit (log_krec *dummykindptr);
-extern void AnaGetcommand (char *Keyword, char *Arg, int *Found);
-extern void AnaGetvar (char *Varname, double *Value);
-extern void AnaMatdump ();
-extern void AnaPopcommand ();
-extern void AnaTimeinit ();
-extern void AnaTimeReset ();
-extern void AnaParamUpdate ();
-
-extern void AnaScoreboard (char *Newmessage, long purpose);
-extern int AnaCrange (log_grec *Inst, long Attrnum, int OkZero);
-extern int AnaDisplayrange (log_grec *Inst, long Attrnum);
-extern double AnaExpo (double V);
-extern double AnaSqrt (double V);
-extern int AnaGate_On_Display (log_grec *Inst);
-extern long AnaGlowVal (long Intensity);
-extern int AnaQuit ();
-extern char *AnaProbeAmpStr (char *AnaResult, double Val);
-extern char *AnaProbeVoltStr (char *AnaResult, double Val);
-extern double AnaTanch (double V);
-
-
-extern int AnaVrange (log_grec *Inst, long Attrnum);
+void AnaCapattrload (long base, log_grec *inst, int first);
+void AnaCapattrread (long base, log_grec *inst);
+void AnaCapattrwrite (long base, log_grec *inst);
+void AnaCapCopy (log_grec *inst);
+void AnaCapDispose (log_grec *inst);
+void AnaCapex (log_grec *inst);
+void AnaCapIin (Analog_32_action *act);
+void AnaCapInit (log_grec *inst);
+void AnaCappass1 (log_grec *inst);
+void AnaCappass2 (log_grec *inst);
+void AnaCapReset (log_grec *inst);
+void AnaCapUpdate (log_grec *inst);
+void AnaDiffdump ();
+void AnaDummyGate (Analog_32_action *act);
+void AnaDummyInit (log_krec *dummykindptr);
+void AnaGetcommand (char *Keyword, char *Arg, int *Found);
+void AnaGetvar (char *Varname, double *Value);
+void AnaMatdump ();
+void AnaPopcommand ();
+void AnaTimeinit ();
+void AnaTimeReset ();
+void AnaParamUpdate ();
+
+void AnaScoreboard (char *Newmessage, long purpose);
+int AnaCrange (log_grec *Inst, long Attrnum, int OkZero);
+int AnaDisplayrange (log_grec *Inst, long Attrnum);
+double AnaExpo (double V);
+double AnaSqrt (double V);
+int AnaGate_On_Display (log_grec *Inst);
+long AnaGlowVal (long Intensity);
+int AnaQuit ();
+char *AnaProbeAmpStr (char *AnaResult, double Val);
+char *AnaProbeVoltStr (char *AnaResult, double Val);
+double AnaTanch (double V);
+
+
+int AnaVrange (log_grec *Inst, long Attrnum);
 
 /*=========================================================================*/
 /* These structures, and variables, hold physical and fab constants for    */
@@ -626,19 +613,15 @@ typedef struct AnaChannelParameters {
 }AnaChannelParameters;
 
 
-vextern AnaPhysicalConstants AnaPhysical;
-vextern AnaPhysicalConstants AnaMaxPhysical;
-vextern AnaPhysicalConstants AnaMinPhysical;
-vextern AnaFabParameters AnaGenFab;
-vextern AnaFabParameters AnaMaxGenFab;
-vextern AnaFabParameters AnaMinGenFab;
-vextern AnaChannelParameters AnaNFab;
-vextern AnaChannelParameters AnaMaxNFab;
-vextern AnaChannelParameters AnaMinNFab;
-vextern AnaChannelParameters AnaPFab;
-vextern AnaChannelParameters AnaMaxPFab;
-vextern AnaChannelParameters AnaMinPFab;
-
-#undef vextern
-
-#endif /*GLOBALS_H*/
+AnaPhysicalConstants AnaPhysical;
+AnaPhysicalConstants AnaMaxPhysical;
+AnaPhysicalConstants AnaMinPhysical;
+AnaFabParameters AnaGenFab;
+AnaFabParameters AnaMaxGenFab;
+AnaFabParameters AnaMinGenFab;
+AnaChannelParameters AnaNFab;
+AnaChannelParameters AnaMaxNFab;
+AnaChannelParameters AnaMinNFab;
+AnaChannelParameters AnaPFab;
+AnaChannelParameters AnaMaxPFab;
+AnaChannelParameters AnaMinPFab;
diff --git a/include/ana/hres.h b/include/ana/hres.h
index 62c6956f700c9193b32e856f05cdbde033a46aa0..a585d5f01e68a3f931ccb4088f77a24d47dea83e 100644
--- a/include/ana/hres.h
+++ b/include/ana/hres.h
@@ -1,16 +1,5 @@
-#ifndef HRES_H
-#define HRES_H
+#pragma once
 
-#include "logdef.h"
-#include "ana/nsolver.h"
 #include "ana/globals.h"
-#include <graphics/mylib.h>
-#include <utils/newasm.h>
-#include <utils/sysglobals.h>
-#include <graphics/newci.h>
 
 extern void Log_hres_initlib_32 (Analog_32_action *act);
-
-#endif /*HRES_H*/
-
-
diff --git a/include/ana/idiff.h b/include/ana/idiff.h
index 4fa185c778fbbaa5596d63ff44533b9edf2b3fad..530cbfa52d168d9c6f7d8ef2ce5fb1134d0eb477 100644
--- a/include/ana/idiff.h
+++ b/include/ana/idiff.h
@@ -1,18 +1,5 @@
-#ifndef IDIFF_H
-#define IDIFF_H
+#pragma once
 
-
-#include "logdef.h"
-#include "ana/nsolver.h"
 #include "ana/globals.h"
-#include <graphics/mylib.h>
-#include <utils/newasm.h>
-#include <utils/sysglobals.h>
-#include <graphics/newci.h>
 
 extern void Log_idiff_initlib_32 (Analog_32_action *act);
-
-
-#endif /*IDIFF_H*/
-
-
diff --git a/include/ana/inter.h b/include/ana/inter.h
index 371e3089333803e201a31438ce5cc7f1d20d247d..98d6af4506fce6af50dd887528f06f680128a241 100644
--- a/include/ana/inter.h
+++ b/include/ana/inter.h
@@ -1,21 +1,6 @@
-#ifndef INTER_H
-#define INTER_H
-
+#pragma once
 
 #include "logdef.h"
-#include <graphics/newkbd.h>
-#include <utils/sysglobals.h>
-#include <utils/newasm.h>
-#include <graphics/mylib.h>
-#include "main.h"
-#include "ana/globals.h"
-#include "ana/nsolver.h"
-#include <graphics/newci.h>
 
 extern void Log_32_proc (log_action_t *act);
 extern void Log_33_proc (log_action_t *act);
-
-
-#endif /*INTER_H*/
-
-
diff --git a/include/ana/iscope.h b/include/ana/iscope.h
index ece18ec138dcdaed9d526e96458959c49360e494..0c671ea7ea8c526c407c8dee03937969b7a8271e 100644
--- a/include/ana/iscope.h
+++ b/include/ana/iscope.h
@@ -1,6 +1,4 @@
-#ifndef ISCOPE_H
-#define ISCOPE_H
-
+#pragma once
 
 #include "logdef.h"
 #include "ana/nsolver.h"
@@ -11,7 +9,3 @@
 #include <graphics/newci.h>
 
 extern void Log_iscope_initlib_32 (Analog_32_action *act);
-
-#endif /*ISCOPE_H*/
-
-
diff --git a/include/ana/iswitch1.h b/include/ana/iswitch1.h
index 1ee226843c43dedbd1e4531d3662c1df1e71f9a3..4a18341a9933b355c70980cdeed1bace9d1430aa 100644
--- a/include/ana/iswitch1.h
+++ b/include/ana/iswitch1.h
@@ -1,6 +1,4 @@
-#ifndef ISWITCH1_H
-#define ISWITCH1_H
-
+#pragma once
 
 #include "logdef.h"
 #include "ana/nsolver.h"
@@ -11,7 +9,3 @@
 #include <graphics/newci.h>
 
 extern void Log_iswitch1_initlib_32 (Analog_32_action *act);
-
-#endif /*ISWITCH1_H*/
-
-
diff --git a/include/ana/iswitch2.h b/include/ana/iswitch2.h
index 4c7f11c5f8f380a9fd238eb440edddb6f96c76d9..e78c3fa9a65bd608b06ac345fd3d3d7bf9d13f33 100644
--- a/include/ana/iswitch2.h
+++ b/include/ana/iswitch2.h
@@ -1,6 +1,4 @@
-#ifndef ISWITCH2_H
-#define ISWITCH2_H
-
+#pragma once
 
 #include "logdef.h"
 #include "ana/nsolver.h"
@@ -11,7 +9,3 @@
 #include <graphics/newci.h>
 
 extern void Log_iswitch2_initlib_32 (Analog_32_action *act);
-
-#endif /*ISWITCH2_H*/
-
-
diff --git a/include/ana/main.h b/include/ana/main.h
index 833e21e9eb80b4b691a16238aef0afb7bd267aef..07da00dfd4437e730c274a3cf347dbc5c70e785c 100644
--- a/include/ana/main.h
+++ b/include/ana/main.h
@@ -1,5 +1,4 @@
-#ifndef MAIN_H
-#define MAIN_H
+#pragma once
 
 #include <graphics/newci.h>
 #include <graphics/newcrt.h>
@@ -23,8 +22,3 @@ extern void Analog_Systeminit ();
 extern void Analog_TechnologyCnf ();
 
 extern void Analog_Tstep ();
-
-
-#endif /*MAIN_H*/
-
-
diff --git a/include/ana/mmeter.h b/include/ana/mmeter.h
index 0d5960aade17c95bb6c6f9c49d5a8b04866c0405..ffa71bcac63436a43d868876c3ad57c2b4c4582a 100644
--- a/include/ana/mmeter.h
+++ b/include/ana/mmeter.h
@@ -1,6 +1,4 @@
-#ifndef MMETER_H
-#define MMETER_H
-
+#pragma once
 
 #include "logdef.h"
 #include "ana/nsolver.h"
@@ -11,8 +9,3 @@
 #include <graphics/newci.h>
 
 extern void Log_mmeter_initlib_32 (Analog_32_action *act);
-
-
-#endif /*MMETER_H*/
-
-
diff --git a/include/ana/moscap.h b/include/ana/moscap.h
index 1c4dd56d8c97b23d7cf575c5e3a0db772b457f62..dca44da98a5a543c6b9e8ff2100b6aa47ae79150 100644
--- a/include/ana/moscap.h
+++ b/include/ana/moscap.h
@@ -1,5 +1,4 @@
-#ifndef MOSCAP_H
-#define MOSCAP_H
+#pragma once
 
 #include "logdef.h"
 #include "ana/nsolver.h"
@@ -10,7 +9,3 @@
 #include <graphics/newci.h>
 
 extern void Log_moscap_initlib_32 (Analog_32_action *act);
-
-#endif /*MOSCAP_H*/
-
-
diff --git a/include/ana/nfet4.h b/include/ana/nfet4.h
index 3fe278b7cb3c524adac3a55e12c9de55441f6a12..aa3a2f4385b3cba5d91a9bb70918ed1179dc79b6 100644
--- a/include/ana/nfet4.h
+++ b/include/ana/nfet4.h
@@ -1,5 +1,4 @@
-#ifndef NFET4_H
-#define NFET4_H
+#pragma once
 
 #include "logdef.h"
 #include "ana/nsolver.h"
@@ -10,7 +9,3 @@
 #include <graphics/newci.h>
 
 extern void Log_nfet4_initlib_32 (Analog_32_action *act);
-
-#endif /*NFET4_H*/
-
-
diff --git a/include/ana/nfet5.h b/include/ana/nfet5.h
index fe853cd2d6e35660775c7dde8a68c091625f6055..334e27b66f3f46e16a078c88b864f0ab0f1123fc 100644
--- a/include/ana/nfet5.h
+++ b/include/ana/nfet5.h
@@ -1,6 +1,4 @@
-#ifndef NFET5_H
-#define NFET5_H
-
+#pragma once
 
 #include "logdef.h"
 #include "ana/nsolver.h"
@@ -11,7 +9,3 @@
 #include <graphics/newci.h>
 
 extern void Log_NFET5_INITLIB_32 (Analog_32_action *act);
-
-#endif /*NFET5_H*/
-
-
diff --git a/include/ana/nfet7f.h b/include/ana/nfet7f.h
index 3f9ee9f9a179409a1e3e53935f7f0c2ad6736db3..44f344e5bbf437dabc06156ef14a0c81a3f7c0d0 100644
--- a/include/ana/nfet7f.h
+++ b/include/ana/nfet7f.h
@@ -1,5 +1,4 @@
-#ifndef NFET7F_H
-#define NFET7F_H
+#pragma once
 
 #include "logdef.h"
 #include "ana/nsolver.h"
@@ -10,7 +9,3 @@
 #include <graphics/newci.h>
 
 extern void Log_NFET7F_INITLIB_32 (Analog_32_action *act);
-
-#endif /*NFET7F_H*/
-
-
diff --git a/include/ana/nfet7t.h b/include/ana/nfet7t.h
index 20ac96646886be834c228b66eb2b6fa924a0e0b7..1e32326aadf0d3a39f842aa071b676d4c5399aa9 100644
--- a/include/ana/nfet7t.h
+++ b/include/ana/nfet7t.h
@@ -1,16 +1,5 @@
-#ifndef NFET7T_H
-#define NFET7T_H
+#pragma once
 
-#include "logdef.h"
-#include "ana/nsolver.h"
 #include "ana/globals.h"
-#include <graphics/mylib.h>
-#include <utils/newasm.h>
-#include <utils/sysglobals.h>
-#include <graphics/newci.h>
 
 extern void Log_NFET7T_INITLIB_32 (Analog_32_action *act);
-
-#endif /*NFET7T_H*/
-
-
diff --git a/include/ana/npn1.h b/include/ana/npn1.h
index 87fc2a978822829b152b9784a082db3a5c6f429b..17403cdc72ff489764ee173a4a8c4c4a8ad7fdf0 100644
--- a/include/ana/npn1.h
+++ b/include/ana/npn1.h
@@ -1,16 +1,5 @@
-#ifndef NPN1_H
-#define NPN1_H
+#pragma once
 
-#include "logdef.h"
-#include "ana/nsolver.h"
 #include "ana/globals.h"
-#include <graphics/mylib.h>
-#include <utils/newasm.h>
-#include <utils/sysglobals.h>
-#include <graphics/newci.h>
 
 extern void Log_NPN1_INITLIB_32 (Analog_32_action *act);
-
-#endif /*NPN1_H*/
-
-
diff --git a/include/ana/npn2.h b/include/ana/npn2.h
index 32abe5adbb07fc4b025fba68a203fc98bb653248..3fb4a7717bf2a1faeda656795cefef21348bf282 100644
--- a/include/ana/npn2.h
+++ b/include/ana/npn2.h
@@ -1,16 +1,5 @@
-#ifndef NPN2_H
-#define NPN2_H
+#pragma once
 
-#include "logdef.h"
-#include "ana/nsolver.h"
 #include "ana/globals.h"
-#include <graphics/mylib.h>
-#include <utils/newasm.h>
-#include <utils/sysglobals.h>
-#include <graphics/newci.h>
 
 extern void Log_NPN2_INITLIB_32 (Analog_32_action *act);
-
-#endif /*NPN2_H*/
-
-
diff --git a/include/ana/nsolver.h b/include/ana/nsolver.h
index c2792fb828ab0c1ba561f836c90c952896ad6045..2f5e277a5e57b1d8abf53c96634d106f71bc7ef7 100644
--- a/include/ana/nsolver.h
+++ b/include/ana/nsolver.h
@@ -1,12 +1,3 @@
-#ifndef NSOLVER_H
-#define NSOLVER_H
-
-
-#include "ana/globals.h"
-#include "logdef.h"
+#pragma once
 
 void Solve ();
-
-#endif /*NSOLVER_H*/
-
-
diff --git a/include/ana/nspc1.h b/include/ana/nspc1.h
index bbbc4871b97890e2dd68cf1c8dbf38b417152fd7..db46d22737359a14f9eb806a04615830b5adc872 100644
--- a/include/ana/nspc1.h
+++ b/include/ana/nspc1.h
@@ -1,16 +1,5 @@
-#ifndef NSPC1_H
-#define NSPC1_H
+#pragma once
 
-#include "logdef.h"
-#include "ana/nsolver.h"
 #include "ana/globals.h"
-#include <graphics/mylib.h>
-#include <utils/newasm.h>
-#include <utils/sysglobals.h>
-#include <graphics/newci.h>
 
 extern void Log_NSPC1_INITLIB_32 (Analog_32_action *act);
-
-#endif /*NFET7_H*/
-
-
diff --git a/include/ana/numbers.h b/include/ana/numbers.h
index 313f841b2fa3d3f6628bd48403a3035df1ecacf5..cf22c15c3e03afd66c14ee4fc1650085be9533e9 100644
--- a/include/ana/numbers.h
+++ b/include/ana/numbers.h
@@ -1,18 +1,5 @@
-#ifndef NUMBERS_H
-#define NUMBERS_H
+#pragma once
 
-#include "logdef.h"
-#include "ana/nsolver.h"
 #include "ana/globals.h"
-#include <graphics/mylib.h>
-#include <utils/newasm.h>
-#include <utils/sysglobals.h>
-#include <graphics/newci.h>
-
 
 extern void Log_numbers_initlib_32 (Analog_32_action *act);
-
-
-#endif /*NUMBERS_H*/
-
-
diff --git a/include/ana/pfet4.h b/include/ana/pfet4.h
index 71b3e5e348c2e721b523068d87558bac541b0cf7..8f2c74e97b9a7678cf52ba5d3b220102f0a1309c 100644
--- a/include/ana/pfet4.h
+++ b/include/ana/pfet4.h
@@ -1,17 +1,5 @@
-#ifndef PFET4_H
-#define PFET4_H
+#pragma once
 
-
-#include "logdef.h"
-#include "ana/nsolver.h"
 #include "ana/globals.h"
-#include <graphics/mylib.h>
-#include <utils/newasm.h>
-#include <utils/sysglobals.h>
-#include <graphics/newci.h>
 
 extern void Log_pfet4_initlib_32 (Analog_32_action *act);
-
-#endif /*PFET4_H*/
-
-
diff --git a/include/ana/pfet5.h b/include/ana/pfet5.h
index c374d7247656bb4ff8b6fed97427b65ba8e0ca91..2ebf1a5e4614b510ec650af1293f691219aded3b 100644
--- a/include/ana/pfet5.h
+++ b/include/ana/pfet5.h
@@ -1,17 +1,5 @@
-#ifndef PFET5_H
-#define PFET5_H
+#pragma once
 
-#include "logdef.h"
-#include "ana/nsolver.h"
 #include "ana/globals.h"
-#include <graphics/mylib.h>
-#include <utils/newasm.h>
-#include <utils/sysglobals.h>
-#include <graphics/newci.h>
 
 extern void Log_PFET5_INITLIB_32 (Analog_32_action *act);
-
-
-#endif /*PFET5_H*/
-
-
diff --git a/include/ana/pfet6.h b/include/ana/pfet6.h
index c50d17e5296cf2a5d43769ae2bd5955069f833c3..cadb245ee537d5a8362f78b30e9fe27199c541ae 100644
--- a/include/ana/pfet6.h
+++ b/include/ana/pfet6.h
@@ -1,17 +1,5 @@
-#ifndef PFET6_H
-#define PFET6_H
+#pragma once
 
-
-#include "logdef.h"
-#include "ana/nsolver.h"
 #include "ana/globals.h"
-#include <graphics/mylib.h>
-#include <utils/newasm.h>
-#include <utils/sysglobals.h>
-#include <graphics/newci.h>
 
 extern void Log_PFET6_INITLIB_32 (Analog_32_action *act);
-
-#endif /*PFET6_H*/
-
-
diff --git a/include/ana/pfet7f.h b/include/ana/pfet7f.h
index 54fd124e6a0c0606bf8c2d130cfc677645cc3033..fe118c7cdaf949c5893f948547e33b21d64a8cfb 100644
--- a/include/ana/pfet7f.h
+++ b/include/ana/pfet7f.h
@@ -1,16 +1,5 @@
-#ifndef PFET7F_H
-#define PFET7F_H
+#pragma once
 
-#include "logdef.h"
-#include "ana/nsolver.h"
 #include "ana/globals.h"
-#include <graphics/mylib.h>
-#include <utils/newasm.h>
-#include <utils/sysglobals.h>
-#include <graphics/newci.h>
 
 extern void Log_PFET7F_INITLIB_32 (Analog_32_action *act);
-
-#endif /*PFET7F_H*/
-
-
diff --git a/include/ana/pfet7t.h b/include/ana/pfet7t.h
index 89bd72869e2421d52925112f6e37b2394db4d029..3bd8a1fd7ab3708d50265acf99faec9dbee0fb5b 100644
--- a/include/ana/pfet7t.h
+++ b/include/ana/pfet7t.h
@@ -1,16 +1,5 @@
-#ifndef PFET7T_H
-#define PFET7T_H
+#pragma once
 
-#include "logdef.h"
-#include "ana/nsolver.h"
 #include "ana/globals.h"
-#include <graphics/mylib.h>
-#include <utils/newasm.h>
-#include <utils/sysglobals.h>
-#include <graphics/newci.h>
 
 extern void Log_PFET7T_INITLIB_32 (Analog_32_action *act);
-
-#endif /*PFET7T_H*/
-
-
diff --git a/include/ana/physical.h b/include/ana/physical.h
index 4ad8180c703528700d141bc86d3465601c2c534d..d1170df5034b0c795c1b0746d083d145b6685691 100644
--- a/include/ana/physical.h
+++ b/include/ana/physical.h
@@ -1,16 +1,3 @@
-#ifndef PHYSICAL_H
-#define PHYSICAL_H
-
-#include "logdef.h"
-#include "ana/nsolver.h"
 #include "ana/globals.h"
-#include <graphics/mylib.h>
-#include <utils/newasm.h>
-#include <utils/sysglobals.h>
-#include <graphics/newci.h>
 
 extern void Log_PHYSICAL_initlib_32 (Analog_32_action *act);
-
-#endif /*PHYSICAL_H*/
-
-
diff --git a/include/ana/pnp1.h b/include/ana/pnp1.h
index b0add96d877cc262dcfbc0639b2b11cce1d5f65d..3468bf693163c1ce1e7562f2749a9e2a1a6983f1 100644
--- a/include/ana/pnp1.h
+++ b/include/ana/pnp1.h
@@ -1,16 +1,5 @@
-#ifndef PNP1_H
-#define PNP1_H
+#pragma once
 
-#include "logdef.h"
-#include "ana/nsolver.h"
 #include "ana/globals.h"
-#include <graphics/mylib.h>
-#include <utils/newasm.h>
-#include <utils/sysglobals.h>
-#include <graphics/newci.h>
 
 extern void Log_PNP1_INITLIB_32 (Analog_32_action *act);
-
-#endif /*PNP1_H*/
-
-
diff --git a/include/ana/pnp2.h b/include/ana/pnp2.h
index c1925b8cc415ba761f12155d2c403515f99ded47..6a963ef1c9831b12c64ad72431242e591cc0c79d 100644
--- a/include/ana/pnp2.h
+++ b/include/ana/pnp2.h
@@ -1,17 +1,5 @@
-#ifndef PNP2_H
-#define PNP2_H
+#pragma once
 
-#include "logdef.h"
-#include "ana/nsolver.h"
 #include "ana/globals.h"
-#include <graphics/mylib.h>
-#include <utils/newasm.h>
-#include <utils/sysglobals.h>
-#include <graphics/newci.h>
 
 extern void Log_PNP2_INITLIB_32 (Analog_32_action *act);
-
-
-#endif /*PNP2_H*/
-
-
diff --git a/include/ana/pspc1.h b/include/ana/pspc1.h
index 405124ed554ea288609b9cc5cb7bfb9ab1c718d5..9191f5db335edd282249771c64b833fc0eab4a8d 100644
--- a/include/ana/pspc1.h
+++ b/include/ana/pspc1.h
@@ -1,17 +1,5 @@
-#ifndef PSPC1_H
-#define PSPC1_H
+#pragma once
 
-#include "logdef.h"
-#include "ana/nsolver.h"
 #include "ana/globals.h"
-#include <graphics/mylib.h>
-#include <utils/newasm.h>
-#include <utils/sysglobals.h>
-#include <graphics/newci.h>
 
 extern void Log_PSPC1_INITLIB_32 (Analog_32_action *act);
-
-
-#endif /*PSPC1_H*/
-
-
diff --git a/include/ana/pwl.h b/include/ana/pwl.h
index 925655550acbaa7e6d78d3f99ec3f6c9bb334f8a..0025896280abef9eb9ea3e33455403def616b27e 100644
--- a/include/ana/pwl.h
+++ b/include/ana/pwl.h
@@ -1,16 +1,5 @@
-#ifndef PWL_H
-#define PWL_H
+#pragma once
 
-#include "logdef.h"
-#include "ana/nsolver.h"
 #include "ana/globals.h"
-#include <graphics/mylib.h>
-#include <utils/newasm.h>
-#include <utils/sysglobals.h>
-#include <graphics/newci.h>
 
 extern void Log_pwl_initlib_32 (Analog_32_action *act);
-
-#endif /*PWL_H*/
-
-
diff --git a/include/ana/resfloat.h b/include/ana/resfloat.h
index 27f288ee4da11626e7624b800218b809f164288b..99a4f03b1aff588946e44557cd6324c83ffd5e95 100644
--- a/include/ana/resfloat.h
+++ b/include/ana/resfloat.h
@@ -1,18 +1,5 @@
-#ifndef RESFLOAT_H
-#define RESFLOAT_H
+#pragma once
 
-
-#include "logdef.h"
-#include "ana/nsolver.h"
 #include "ana/globals.h"
-#include <graphics/mylib.h>
-#include <utils/newasm.h>
-#include <utils/sysglobals.h>
-#include <graphics/newci.h>
 
 extern void Log_resfloat_initlib_32 (Analog_32_action *act);
-
-
-#endif /*RESFLOAT_H*/
-
-
diff --git a/include/ana/rtd.h b/include/ana/rtd.h
index 801e97473e34d275d94225626629a0b4cad6a855..75b3d2fafd8af140522fc65526547591f3562419 100644
--- a/include/ana/rtd.h
+++ b/include/ana/rtd.h
@@ -1,16 +1,5 @@
-#ifndef RTD_H
-#define RTD_H
+#pragma once
 
-#include "logdef.h"
-#include "ana/nsolver.h"
 #include "ana/globals.h"
-#include <graphics/mylib.h>
-#include <utils/newasm.h>
-#include <utils/sysglobals.h>
-#include <graphics/newci.h>
 
 extern void Log_rtd_initlib_32 (Analog_32_action *act);
-
-#endif /*RTD_H*/
-
-
diff --git a/include/ana/runspec.h b/include/ana/runspec.h
index f8684ef0ff5f140e9152de8779c397746b9b7741..880bbb67c571cc8b7ec7646e7ce9096a832b7efa 100644
--- a/include/ana/runspec.h
+++ b/include/ana/runspec.h
@@ -1,16 +1,5 @@
-#ifndef RUNSPEC_H
-#define RUNSPEC_H
+#pragma once
 
-#include "logdef.h"
-#include "ana/nsolver.h"
 #include "ana/globals.h"
-#include <graphics/mylib.h>
-#include <utils/newasm.h>
-#include <utils/sysglobals.h>
-#include <graphics/newci.h>
 
 extern void Log_RUNSPEC_initlib_32 (Analog_32_action *act);
-
-#endif /*RUNSPEC_H*/
-
-
diff --git a/include/ana/stairs.h b/include/ana/stairs.h
index 4e6f71ec14d3480c5384484f3b60122dc7ef7462..846ce6b28fd573526fee095e472cc8fa156d846a 100644
--- a/include/ana/stairs.h
+++ b/include/ana/stairs.h
@@ -1,17 +1,5 @@
-#ifndef STAIRS_H
-#define STAIRS_H
+#pragma once
 
-
-#include "logdef.h"
-#include "ana/nsolver.h"
 #include "ana/globals.h"
-#include <graphics/mylib.h>
-#include <utils/newasm.h>
-#include <utils/sysglobals.h>
-#include <graphics/newci.h>
 
 extern void Log_stairs_initlib_32 (Analog_32_action *act);
-
-#endif /*STAIRS_H*/
-
-
diff --git a/include/ana/tc.h b/include/ana/tc.h
index 680a3dfefecd8e547e895f31e222132e7b20da4f..d88e24da9b82164817d34d4f28768f6700274b94 100644
--- a/include/ana/tc.h
+++ b/include/ana/tc.h
@@ -1,20 +1,8 @@
-#ifndef TC_H
-#define TC_H
+#pragma once
 
-#include "logdef.h"
-#include "ana/nsolver.h"
 #include "ana/globals.h"
-#include <graphics/mylib.h>
-#include <utils/newasm.h>
-#include <utils/sysglobals.h>
-#include <graphics/newci.h>
 
 extern void Log_opamp_initlib_32 (Analog_32_action *act);
 extern void Log_wramp_initlib_32 (Analog_32_action *act);
 extern void Log_hwr_initlib_32 (Analog_32_action *act);
 extern void Log_fwr_initlib_32 (Analog_32_action *act);
-
-
-#endif /*TC_H*/
-
-
diff --git a/include/ana/thermal.h b/include/ana/thermal.h
index d932f04ba3973c38bce1b5535a7594a713b39d05..3a1888db8e712e6d4fe89b8378898e3c22fb8146 100644
--- a/include/ana/thermal.h
+++ b/include/ana/thermal.h
@@ -1,16 +1,5 @@
-#ifndef THERMAL_H
-#define THERMAL_H
+#pragma once
 
-#include "logdef.h"
-#include "ana/nsolver.h"
 #include "ana/globals.h"
-#include <graphics/mylib.h>
-#include <utils/newasm.h>
-#include <utils/sysglobals.h>
-#include <graphics/newci.h>
 
 extern void Log_THERMAL_initlib_32 (Analog_32_action *act);
-
-#endif /*THERMAL_H*/
-
-
diff --git a/include/ana/vdiff.h b/include/ana/vdiff.h
index 267d61ba180630a1608ee73432d0ab96351fd23a..7c81f1f6b885e6172fd8cdf708958c0aa9c1885d 100644
--- a/include/ana/vdiff.h
+++ b/include/ana/vdiff.h
@@ -1,17 +1,5 @@
-#ifndef VDIFF_H
-#define VDIFF_H
+#pragma once
 
-
-#include "logdef.h"
-#include "ana/nsolver.h"
 #include "ana/globals.h"
-#include <graphics/mylib.h>
-#include <utils/newasm.h>
-#include <utils/sysglobals.h>
-#include <graphics/newci.h>
 
 extern void Log_vdiff_initlib_32 (Analog_32_action *act);
-
-#endif /*VDIFF_H*/
-
-
diff --git a/include/ana/vswitch.h b/include/ana/vswitch.h
index 5599b5c7149485b0cebf0a86946413dbfc96ded5..e6ce4be000594df7646cdb54c611840328a02705 100644
--- a/include/ana/vswitch.h
+++ b/include/ana/vswitch.h
@@ -1,17 +1,5 @@
-#ifndef VSWITCH_H
-#define VSWITCH_H
+#pragma once
 
-#include "logdef.h"
-#include "ana/nsolver.h"
 #include "ana/globals.h"
-#include <graphics/mylib.h>
-#include <utils/newasm.h>
-#include <utils/sysglobals.h>
-#include <graphics/newci.h>
-
 
 extern void Log_vswitch_initlib_32 (Analog_32_action *act);
-
-#endif /*VSWITCH_H*/
-
-
diff --git a/include/configreader.h b/include/configreader.h
index 271805e2718ea57eb1d21b3a03cfd58338926c88..dadb05dc387dc4f16c3fc0a8edd6eed20e5841bc 100644
--- a/include/configreader.h
+++ b/include/configreader.h
@@ -1,5 +1,4 @@
-#ifndef CONFIGREADER_H
-#define CONFIGREADER_H
+#pragma once
 
 #include "pagereader.h"
 
@@ -8,5 +7,3 @@ void endfatal(struct LOC_initialize *LINK);
 void sethomedirname(char *dir_, struct LOC_initialize *LINK);
 void addgatesfile(char *fn_, struct LOC_initialize *LINK);
 void readcnf(char *fn, struct LOC_initialize* LINK);
-
-#endif
diff --git a/include/gate.h b/include/gate.h
index 96bd11dbd0e5ccb7c5c28bc2ad12cfa81c58f63e..3bd7273cbda35d6ddc3ded7ef4d2b88a03deaf16 100644
--- a/include/gate.h
+++ b/include/gate.h
@@ -1,18 +1,18 @@
-#ifndef GATE_H
-#define GATE_H
+#pragma once
 
 #include <graphics/mylib.h>
 #include <utils/newasm.h>
 #include "logdef.h"
+#include "node.h"
 
 typedef struct log_grec {
   struct log_grec *next, *confnext;
   na_long info;
   log_nrec **pin;
-  log_pinposrec *pinpos;
-  log_gattrrec *attr;
+  struct log_pinposrec *pinpos;
+  struct log_gattrrec *attr;
   na_long vars;
-  log_krec *kind;
+  struct log_krec *kind;
   short g, x, y, gc, sig;
   na_long temp;
   uchar rot;
@@ -55,5 +55,3 @@ void initpinpos(log_grec *gate);
 void addgate2(short x, short y, short gtype, short sig, log_gattrrec *attrs);
 void movexorgate(short x, short y, short g, short sig, short yy);
 void reportgateconflict(log_grec *g);
-
-#endif
diff --git a/include/graphics/mylib.h b/include/graphics/mylib.h
index 8b81559f5a1dd9b7aa9e36959843b56a57785b60..2b123a5662e34d6299846032ac6874d5e8c383ca 100644
--- a/include/graphics/mylib.h
+++ b/include/graphics/mylib.h
@@ -1,5 +1,4 @@
-#ifndef MYLIB_H
-#define MYLIB_H
+#pragma once
 
 #include <X11/Xlib.h>
 
@@ -84,17 +83,109 @@ long m_maxcolor;
 Display *m_display;
 Window m_window;
 int m_initialized;
-int BlackAndWhite;
+int BlackAndWhite = False;
 int screennum;
 
 #define ColorsInSet           16
 #define ColorSets              4
-XColor m_colors[ColorSets+1][ColorsInSet];
+#define AllColors DoRed | DoGreen | DoBlue
+XColor m_colors[ColorSets+1][ColorsInSet] = {
+  {
+    { 0,     0,     0,     0, AllColors, 0 },
+    { 0, 65535,     0,     0, AllColors, 0 },
+    { 0,     0, 65535,     0, AllColors, 0 },
+    { 0, 65535, 65535,     0, AllColors, 0 },
+    { 0,     0,     0, 65535, AllColors, 0 },
+    { 0, 65535,     0, 65535, AllColors, 0 },
+    { 0,     0, 65535, 65535, AllColors, 0 },
+    { 0, 65535, 65535, 65535, AllColors, 0 },
+    { 0, 52428, 52428, 52428, AllColors, 0 },
+    { 0, 34952,     0,     0, AllColors, 0 },
+    { 0,     0, 34952,     0, AllColors, 0 },
+    { 0, 34952, 34952,     0, AllColors, 0 },
+    { 0,     0,     0, 34952, AllColors, 0 },
+    { 0, 34952,     0, 34952, AllColors, 0 },
+    { 0,     0, 34952, 34952, AllColors, 0 },
+    { 0, 44952, 44952, 44952, AllColors, 0 },
+  },
+  {
+    { 0,     0,     0,     0, AllColors, 0 },
+    { 0, 52428,     0,     0, AllColors, 0 },
+    { 0,     0, 52428,     0, AllColors, 0 },
+    { 0, 52428, 52428,     0, AllColors, 0 },
+    { 0,     0,     0, 52428, AllColors, 0 },
+    { 0, 52428,     0, 52428, AllColors, 0 },
+    { 0,     0, 52428, 52428, AllColors, 0 },
+    { 0, 65535, 65535, 65535, AllColors, 0 },
+    { 0, 52428, 52428, 26214, AllColors, 0 },
+    { 0, 21845, 39321, 34952, AllColors, 0 },
+    { 0, 34952, 30583, 43690, AllColors, 0 },
+    { 0, 43690, 21845, 30583, AllColors, 0 },
+    { 0, 52428, 26214, 21845, AllColors, 0 },
+    { 0, 65535, 39321,  8738, AllColors, 0 },
+    { 0, 48059, 34952, 26214, AllColors, 0 },
+    { 0, 44952, 44952, 44952, AllColors, 0 },
+  },
+  {
+    { 0,     0,     0,     0, AllColors, 0 },
+    { 0,  4369,  4369,  4369, AllColors, 0 },
+    { 0,  8738,  8738,  8738, AllColors, 0 },
+    { 0, 13107, 13107, 13107, AllColors, 0 },
+    { 0, 17496, 17496, 17496, AllColors, 0 },
+    { 0, 21845, 21845, 21845, AllColors, 0 },
+    { 0, 26214, 26214, 26214, AllColors, 0 },
+    { 0, 30583, 30583, 30583, AllColors, 0 },
+    { 0, 34952, 34952, 34952, AllColors, 0 },
+    { 0, 39321, 39321, 39321, AllColors, 0 },
+    { 0, 43690, 43690, 43690, AllColors, 0 },
+    { 0, 48059, 48059, 48059, AllColors, 0 },
+    { 0, 52428, 52428, 52428, AllColors, 0 },
+    { 0, 56797, 56797, 56797, AllColors, 0 },
+    { 0, 61166, 61166, 61166, AllColors, 0 },
+    { 0, 65535, 65535, 65535, AllColors, 0 },
+  },
+  {
+    { 0,     0,     0,     0, AllColors, 0 },
+    { 0, 26214, 26214, 26214, AllColors, 0 },
+    { 0, 43690, 43690, 43690, AllColors, 0 },
+    { 0, 65535, 65535, 65535, AllColors, 0 },
+    { 0, 21845,     0,     0, AllColors, 0 },
+    { 0, 34952,     0,     0, AllColors, 0 },
+    { 0, 48059,     0,     0, AllColors, 0 },
+    { 0, 65535,     0,     0, AllColors, 0 },
+    { 0,     0, 21845,     0, AllColors, 0 },
+    { 0,     0, 34952,     0, AllColors, 0 },
+    { 0,     0, 48059,     0, AllColors, 0 },
+    { 0,     0, 65535,     0, AllColors, 0 },
+    { 0,     0,     0, 21845, AllColors, 0 },
+    { 0,     0,     0, 34952, AllColors, 0 },
+    { 0,     0,     0, 48059, AllColors, 0 },
+    { 0,     0,     0, 65535, AllColors, 0 },
+  },
+  {
+    { 0,     0,     0,     0, AllColors, 0 },
+    { 0, 65535,     0,     0, AllColors, 0 },
+    { 0,     0, 65535,     0, AllColors, 0 },
+    { 0, 65535, 65535,     0, AllColors, 0 },
+    { 0,     0,     0, 65535, AllColors, 0 },
+    { 0, 65535,     0, 65535, AllColors, 0 },
+    { 0,     0, 65535, 65535, AllColors, 0 },
+    { 0, 65535, 65535, 65535, AllColors, 0 },
+    { 0, 52428, 52428, 52428, AllColors, 0 },
+    { 0, 34952,     0,     0, AllColors, 0 },
+    { 0,     0, 34952,     0, AllColors, 0 },
+    { 0, 34952, 34952,     0, AllColors, 0 },
+    { 0,     0,     0, 34952, AllColors, 0 },
+    { 0, 34952,     0, 34952, AllColors, 0 },
+    { 0,     0, 34952, 34952, AllColors, 0 },
+    { 0, 44952, 44952, 44952, AllColors, 0 },
+  },
+};
 
 /* Added X display name support.  stafford 7/17/91 */
 void m_set_display_name(char* display_name);
-char m_display_name[DISPLAY_NAME_LENGTH];
-int m_autoraise;
+char m_display_name[DISPLAY_NAME_LENGTH] = "";
+int m_autoraise = false;
 
 void m_init_screen ();
 void m_init_colors ();
@@ -103,7 +194,7 @@ void m_init_graphics ();
 void m_clear ();
 void m_clip (int, int, int, int);
 void m_noclip ();
-void m_unclip();	
+void m_unclip();
 void m_transform (int, int, int, int, int, int, int);
 void m_upside_down ();
 void m_rotscale (double, double, int, int);
@@ -117,7 +208,7 @@ void m_color (int);
 void m_colormode (int c);
 long m_curcolor ();
 long m_curcolormode ();
-void m_setcolor();
+void m_setcolor (int, int, int, int);
 void m_seecolor (int, int *, int *, int *);
 void m_setcolors (m_colorarray, m_colorarray, m_colorarray);
 void m_seecolors (m_colorarray, m_colorarray, m_colorarray);
@@ -159,7 +250,7 @@ void m_displaytext(char *str);
 #define m_graphics_off()
 #define m_alpha_off()
 
-void m_readpen();
+void m_readpen(m_tablet_info *pen);
 void m_trackpen();
 void m_waitpen();
 void m_clipxy();
@@ -167,8 +258,3 @@ int m_pollkbd();
 uchar m_inkey();
 uchar m_inkeyn();
 uchar m_testkey();
-
-#endif /*MYLIB_H*/
-
-
-
diff --git a/include/graphics/newci.h b/include/graphics/newci.h
index 966cac8d2903bf3c084a2fa9d440ac033777657b..88dc6c50cf121f5a812984df67f4f04e8871ad2c 100644
--- a/include/graphics/newci.h
+++ b/include/graphics/newci.h
@@ -1,6 +1,4 @@
-#ifndef NEWCI_H
-#define NEWCI_H
-#include <stddef.h>
+#pragma once
 
 typedef struct newci_parserec {
 	char switch_[4];
@@ -13,9 +11,6 @@ typedef struct newci_parserec {
 	} UU;
 } newci_parserec;
 
-int P_argc;
-char **P_argv;
-
 void newci_parseswitch (newci_parserec *tab, size_t size, char *bad);
 void newci_eatargument ();
 void newci_fixfname (char *s, char *ext, char *home);
@@ -30,8 +25,3 @@ void newci_inputunmap ();
 void newci_inputstring (char *s);
 long timers_sysclock ();
 long newci_fullseconds ();
-
-#endif /*NEWCI_H*/
-
-
-
diff --git a/include/graphics/newcrt.h b/include/graphics/newcrt.h
index 44a98b817490df6947f4d3ff0c7dd21897668754..5484c03b856e00ec7b473011ed1c51ce5e8ccaef 100644
--- a/include/graphics/newcrt.h
+++ b/include/graphics/newcrt.h
@@ -1,5 +1,5 @@
-#ifndef NEWCRT_H
-#define NEWCRT_H
+#pragma once
+
 #include <X11/Xlib.h>
 #include <utils/p2c.h>
 #include <stdio.h>
@@ -218,8 +218,3 @@ void nc_putchar (uchar c);
 void nc_puts (char * s);
 char *nc_fgets (char *s, int n, FILE *stream);
 void nc_printf (char * fmt, ...);
-
-#endif /*NEWCRT_H*/
-
-
-
diff --git a/include/graphics/newkbd.h b/include/graphics/newkbd.h
index 2ff50b8cd5153baa2327bb142b0330f634cdece7..7860845a3998dacb9646a050c5e460a5f608e6aa 100644
--- a/include/graphics/newkbd.h
+++ b/include/graphics/newkbd.h
@@ -1,5 +1,4 @@
-#ifndef NEWKBD_H
-#define NEWKBD_H
+#pragma once
 
 
 #include <utils/sysglobals.h>
@@ -51,8 +50,3 @@ void nk_ungetkey (uchar c);
 #define nk_getxy(x,y)       nc_getXY(x,y)
 int nk_setcapslock (int newcaps);
 void nk_settransarray (int opcode, nk_keytransinfo **table);
-
-#endif /*NEWKBD_H*/
-
-
-
diff --git a/include/help.h b/include/help.h
index 940702992bdfed418b35742ae1c998ed2326ae76..43a941c9861e56f43a5be466cc202662c2d0b192 100644
--- a/include/help.h
+++ b/include/help.h
@@ -1,6 +1,7 @@
+#pragma once
 
 #define help_init(x, y)
 #define help_index(x, y)
 #define help_do(x)
-#define help_show(x, y) 
+#define help_show(x, y)
 #define help_setus
diff --git a/include/label.h b/include/label.h
index 5c322dbad11e27937d8d83a090a3d1755c7c1fef..7b2ba4b7c8e754e5206eefdc221adbb30986534c 100644
--- a/include/label.h
+++ b/include/label.h
@@ -1,7 +1,7 @@
-#ifndef LABEL_H
-#define LABEL_H
+#pragma once
 
 #include "logdef.h"
+#define log_lablen      255   /* Maximum length of labels */
 
 typedef struct log_lrec {
   short x, y, w;
@@ -11,7 +11,7 @@ typedef struct log_lrec {
   na_long temp;
 } log_lrec;   /* Label */
 
-void parselabel(strlist_t **lbl, short *numattrs, log_kattrrec **attr);
+void parselabel(strlist_t **lbl, short *numattrs, struct log_kattrrec **attr);
 
 void eralabel(log_lrec *l);
 
@@ -30,5 +30,3 @@ void addlabelat(short x, short y, char *s);
 void addlabel(log_lrec **l, char *s);
 
 void editlabel(log_lrec *l);
-
-#endif
diff --git a/include/log.h b/include/log.h
index 3edf08992cf582009b59228fc30d540213c5cc1e..90c08df8ff670b8776870e709afa935caffa2743 100644
--- a/include/log.h
+++ b/include/log.h
@@ -1,5 +1,4 @@
-#ifndef LOG_H
-#define LOG_H
+#pragma once
 
 #include <utils/p2c.h>
 #include "logdef.h"
@@ -54,5 +53,3 @@ void frysolder(short x, short y);
 void unprobe();
 void checkprobe(short xx, short yy);
 void testprobe(short xx, short yy);
-
-#endif
diff --git a/include/log_action.h b/include/log_action.h
deleted file mode 100644
index 32e99247530f7651ec88df54db2cd003278e0e1b..0000000000000000000000000000000000000000
--- a/include/log_action.h
+++ /dev/null
@@ -1,342 +0,0 @@
-#ifndef LOG_ACTION_H
-#define LOG_ACTION_H
-
-#include "logdef.h"
-#include "gate.h"
-#include "wire.h"
-#include "page.h"
-#include "label.h"
-#include <limits.h>
-
-typedef enum
-{
-	act_init,
-	act_endinit,
-	act_exit,
-	act_clearmsg,
-	act_status,
-	act_cnf,
-	act_immed,
-	act_func,
-	act_color,
-	act_select,
-	act_clear,
-	act_edit,
-	act_pass,
-	act_tstep,
-	act_erasegate,
-	act_touchgate,
-	act_history,
-	act_histval,
-	act_histstr,
-	act_trigger,
-	act_glowcol,
-	act_newgate,
-	act_disposegate,
-	act_copygate,
-	act_writegate,
-	act_readgate,
-	act_connectgate,
-	act_disconnectgate,
-	act_configgate,
-	act_configchgate,
-	act_configrelgate,
-	act_confignode,
-	act_configchnode,
-	act_configrelnode,
-	act_confighist,
-	act_configchhist,
-	act_configrelhist,
-	act_newkind,
-	act_disposekind,
-	act_newnode,
-	act_disposenode,
-	act_copynode,
-	act_combinenodes,
-	act_combineintonode,
-	act_writenode,
-	act_readnode,
-	act_refnodes,
-	act_nodeval,
-	act_general,
-	act_gennode,
-	act_genkind,
-	act_gengate
-} log_actionkinds;
-
-typedef struct log_hooks_t
-{
-	void (*hidecursor) ();
-	void (*hidecursorrect) (long x1, long y1, long x2, long y2);
-	void (*unhidecursor) ();
-	void (*nodeconflict) (log_nrec *n);
-	void (*gateconflict) (log_grec *g);
-	void (*clearconflicts) (struct log_tool *tool);
-	void (*setdimgate) (log_grec *g, int dim);
-	void (*xform) (log_grec *g, short *x, short *y);
-	void (*getsig) (char *name, log_sigrec **sig);
-	void (*report) (int num, char *name);
-	void (*message) (char *msg);
-	void (*vmessage) (char *msg);
-	void (*vmessageflag) (char *msg, int b);
-	void (*trace) (char *msg);
-	void (*dump) (char *msg);
-	void (*setdump) (char *name);
-	void (*closefiles) ();
-	void (*clearalpha) ();
-	void (*drawstr) (int x, int y, char *s);
-	void (*rightstr) (int x, int y, char *s);
-	void (*centerstr) (int x, int y, char *s);
-	void (*clip) ();
-	void (*remcursor) ();
-	void (*clearwindow) ();
-	void (*setmode) (const char *s);
-	void (*getword) (char *buf, char *wrd);
-	void (*getint) (char *buf, long *i, long def);
-	void (*getreal) (char *buf, double *r, double def);
-	void (*getbool) (char *buf, int *b);
-	void (*pen) ();
-	void (*pass) ();
-	void (*trykbd) ();
-	void (*scroll) ();
-	void (*trykbdscroll) ();
-	void (*inkey) (char *ch);
-	void (*udrawgate) (int x, int y, int g, int c);
-	void (*gdrawgate) (int x, int y, int g, int c);
-	void (*drawgate) (log_grec *g);
-	void (*erasegate) (log_grec *g);
-	void (*drawnode) (log_nrec *n, int c);
-	void (*refresh) ();   /*quietly refresh drawing area*/
-	void (*refreshsoon) ();
-	void (*beginbottom) ();
-	void (*endbottom) ();
-	void (*beginerror) ();
-	void (*enderror) ();
-	void (*redraw) ();   /*redraw drawing area*/
-	void (*redrawwindow) ();   /*redraw entire window*/
-	void (*change) (log_page *page);
-	void (*newgate) (log_grec **g, short gt);
-	void (*copygate) (log_grec *old, log_grec **g);
-	void (*disposegate) (log_grec **g);
-	void (*newnode) (log_nrec **n, uchar st);
-	void (*copynode) (log_nrec *old, log_nrec **n);
-	void (*disposenode) (log_nrec **n);
-	void (*switchnode) (log_nrec **n, log_nrec *n2);
-	void (*dumpnodes) ();
-	void (*readlnpass) (char *s, short mode);
-	void (*clearfunc) ();
-	void (*refrfunc) ();
-	void (*assertfunc) (char *name);
-	void (*findobject) (short x, short y);
-	void (*findwire) (short x, short y);
-	void (*deletehw) (log_hwrec *hw);
-	void (*deletevw) (log_vwrec *vw);
-	void (*disconnectgate) (log_grec *g);
-	void (*deletegate) (log_grec *g);
-	void (*addhw) (short x1, short x2, short y);
-	void (*addvw) (short x, short y1, short y2);
-	void (*connectgate) (log_grec *g, int *success);
-	void (*waitnear) ();
-	void (*addgate) (short x, short y, short gtype);
-	void (*uaddgate) (short x, short y, short gtype);
-	void (*getgate) (char *name, short *gtype);
-	void (*realunit) (double r, short p, char *u, char *s);
-	void (*realunit2) (double r, short p, char *u, char *s);
-	void (*addlabel) (log_lrec **l, char *s);
-	void (*getcolor) (char *name, short *val, short def);
-	void (*setcmap) (short n, short r, short g, short b);
-	void (*parselabel) (strlist_t **lbl, short *numattrs, log_kattrrec **attr);
-	void (*editattrs) (log_gattrrec *gattr, short numattrs, log_kattrrec *kattr, strlist_t *lbl,
-			char *name, void (*proc) (), void (*chproc) (), void (*relproc) ());
-	void (*newattrs) (log_gattrrec **gattr, short numattrs, log_kattrrec *kattr);
-	void (*disposeattrs) (log_gattrrec **gattr, short numattrs, log_kattrrec *kattr);
-	void (*copyattrs) (log_gattrrec **gattr, log_gattrrec *oldattr, short numattrs, log_kattrrec *kattr);
-	void (*initwindow) ();
-	void (*clearshowalpha) ();
-	void (*setupregion) (log_regrec **r, short pagenum);
-	void (*stamp) (long *i);
-	void (*noclip) ();
-} log_hooks_t;
-
-typedef struct log_hook2_t
-{
-	void (*getnodeval) (log_nrec *n, double *val, char *opts);
-	void (*solderat) (short x, short y);
-	void (*unsolderwires) (log_hwrec *hw, log_vwrec *vw);
-	void (*settofrom) (log_grec **g, char *name);
-	void (*findattrnum) (log_krec *k, char *name, char *kinds, short *num);
-	void (*findattrname) (log_krec *k, short num, char *name);
-	void (*findpinnum) (log_krec *k, char *name, short *num);
-	void (*findpinname) (log_krec *k, short num, char *name);
-	void (*setgattr) (log_grec *g, short num, char *value);
-	void (*setnattr) (log_nrec *n, short num, char *value);
-	void (*findpointmarker) (log_krec *k, short num, short *x, short *y);
-	void (*findboxmarker) (log_krec *k, short num, short *x1, short *y1, short *x2, short *y2);
-	void (*send_general) (struct log_tool *sim, char *act);
-	void (*send_gennode) (log_nrec *n, char *act);
-	void (*send_genkind) (log_krec *k, char *act);
-	void (*send_gengate) (log_grec *g, char *act);
-	void (*send_all) (char *act);
-	void (*send_allnodes) (char *act);
-	void (*send_allkinds) (char *act);
-	void (*send_allgates) (char *act);
-	void (*addlabelat) (short x, short y, char *s);
-	void (*addboxat) (short x1, short y1, short x2, short y2);
-	void (*plainxform) (log_grec *g, short *x, short *y);
-	void (*findattrnum2) (short numattrs, log_kattrrec *kattr, strlist_t *lbl, char *name, char *kinds, short *num);
-	void (*findattrname2) (short numattrs, log_kattrrec *kattr, strlist_t *lbl, short num, char *name);
-	void (*showpinname) (log_grec *g, short i, short c, char *name);
-} log_hook2_t;
-
-typedef struct log_action_t
-{
-	log_actionkinds action;
-	log_krec *actkind;
-	log_grec *actgate;
-	log_grec *actgate2;
-	log_nrec *actnode;
-	log_nrec *actnode2;
-	long actx;
-	long acty;
-	int actflag;
-	int actflag2;
-	FILE **actfile;
-	struct log_tool *acttool;
-	char *actstr;
-	double actval;
-	double actval2;
-	double actval3;
-	log_gattrrec *actgattr;
-	log_kattrrec *actkattr;
-	unsigned char *actproc;
-
-	log_page *pages[log_maxpages]; /** \TODO use a variable size array or a list */
-	size_t numpages; ///< number of pages
-	log_nrec *nbase;
-	long curpage;  ///< current page number
-	long showpage; ///< currenctly displayed page number
-
-
-	log_sigrec *signaltab;
-	short maxsignal;
-	short lastsignal;
-
-	short scale;
-	short hscale;
-	long xoff;	   ///< screen_x = grid_x * scale - xoff
-	long yoff;
-
-	char func[17];
-	char *funcarg;
-
-	log_grec *neargate;
-	log_lrec *nearlabel;
-	log_brec *nearbox;
-	log_hwrec *nearhw;
-	log_hwrec *movinghw;
-	log_vwrec *nearvw;
-	log_vwrec *movingvw;
-
-	log_nrec *probenode;
-	log_grec *probegate;
-	short probepin;
-	struct log_tool *probesimtype;
-	short baselinecolor;
-
-	log_hnrec *hnbase;
-	log_htrec *htbase;
-	log_htrec *htlast;
-
-	long fastspeed;
-	long fastmin;
-	long fastmax;
-	long fastrate;
-
-	long singlestepcount;
-
-	double time;
-	double prevtimestep;
-
-	log_simstatekinds simstate;
-	log_simstatekinds oldsimstate;
-
-	struct log_tool *simstatetool;
-	struct log_tool *oldsimstatetool;
-
-	int histactive;      /** Scope mode is triggered */
-	int dumpopen;        /** Dump output file is open */
-	int traceopen;       /** Trace output is open */
-	int verbose;         /** Commands acknowledge with messages */
-	int traceflag;       /** Debuggin/trace mode on */
-	int quiet;           /** Suppress sound signals */
-	int glowmode;        /** Glowing-wires mode */
-	int probemode;       /** Probe-cursor mode */
-	int markers;         /** Printing markers are defined */
-	int invisible;       /** Gates and wires are invisible */
-	int textinvisible;   /** Lablels and boxes are invisible */
-	int pnuminvisible;   /** Pin numbers are invisible */
-	int dotsvisible;      /** Are "red dots" on or off normally? */
-	int showconflicts;   /** Show onlyconflict */
-	int resetflag;       /** "Reset" command has been given */
-	int pwrflag;         /** Simulator is turned on */
-	int initdone;       /** Done with program initialization */
-	int refrflag;        /** Refreshing all displays */
-
-	int busyflag;        /** Flag for idling simulations */
-
-	short markerx1;
-	short markery1;
-	short markerx2;
-	short markery2;
-
-	m_tablet_info t;
-	m_tablet_info t0;
-	int startpoint;
-	int stillnear;
-	int incircuit;
-
-	short gridx;
-	short gridy;
-	short posx;
-	short posy;
-	short oldx;
-	short oldy;
-	short cx_min;
-	short cy_min;
-	short cx_max;
-	short cy_max;
-	/** Area covered bu cyrsor */
-
-	FILE **tracefile;
-
-	char *homedirname;
-
-	struct log_tool *toolbase;
-
-	log_hooks_t hook;
-	log_colorrec color;
-
-	long curstamp;
-	long labelstamp;                /** Changes to labels */
-	long boxstamp;                  /** Changes to boxes */
-	long msgstamp;                  /** Clearing messages screen */
-	long refrstamp;                 /** Clearing graphics screen */
-	long nattrstamp;                /** Changes to note attributes */
-	long gattrstamp;                /** Changes to gate attributes */
-	long sigstamp;                  /** Changes to signal table */
-	long loadstamp;                 /** A page was loaded */
-	long colorstamp;                /** Color assignment have changes */
-	long resetstamp;   /* Simulation has been reset */
-	long markerstamp;               /** Page markers moved */
-
-	log_krec *probekind;
-	strlist_t *actstrlist;
-	log_hook2_t *hook2;
-	log_hwrec *probehwire;
-	log_vwrec *probevwire;
-	long actx2;
-	long acty2;
-	char genfunc [17];
-} log_action_t;
-
-#endif
diff --git a/include/logcom.h b/include/logcom.h
index c92bb24fd982c5513e2009d77855c2bb91340598..936f12b7a13c48511dec8b900d95bfca11c222d3 100644
--- a/include/logcom.h
+++ b/include/logcom.h
@@ -1,5 +1,4 @@
-#ifndef LOGCOM_H
-#define LOGCOM_H
+#pragma once
 
 #include "logdef.h"
 #include <graphics/mylib.h>
@@ -18,8 +17,3 @@ void Log_17_proc (log_action_t *act);
 
 
 void Log_7_time (log_action_t *act);
-
-
-#endif /*LOGCOM_H*/
-
-
diff --git a/include/logcurs_arr.h b/include/logcurs_arr.h
index 7c26728649e008b8a18717cff28e4dfa1e4e6eb7..137fbd60aaf6d8b3c9cb97d5eedcd651de1f9ba7 100644
--- a/include/logcurs_arr.h
+++ b/include/logcurs_arr.h
@@ -1,3 +1,4 @@
+#pragma once
 #define logcurs_arr_width 16
 #define logcurs_arr_height 16
 #define logcurs_arr_x_hot 0
diff --git a/include/logcurs_box.h b/include/logcurs_box.h
index 76d708bacb0a735cc60f04ed4b61ece229beb1fe..f41aa683945ac472333269e0c78144a87d327200 100644
--- a/include/logcurs_box.h
+++ b/include/logcurs_box.h
@@ -1,3 +1,4 @@
+#pragma once
 #define logcurs_box_width 16
 #define logcurs_box_height 16
 #define logcurs_box_x_hot 5
diff --git a/include/logcurs_cpy.h b/include/logcurs_cpy.h
index 7980fc2332b21484375e5fedee4f787089a31af9..e621ce895ca9b50f2c3de59fb0a3acbf76482ead 100644
--- a/include/logcurs_cpy.h
+++ b/include/logcurs_cpy.h
@@ -1,3 +1,4 @@
+#pragma once
 #define logcurs_cpy_width 16
 #define logcurs_cpy_height 16
 #define logcurs_cpy_x_hot 0
diff --git a/include/logcurs_del.h b/include/logcurs_del.h
index 5c24ece0b769e14e878d808f5b85b601032db1d1..f6676edec5ec94f28a8863b56c789e6c64696f06 100644
--- a/include/logcurs_del.h
+++ b/include/logcurs_del.h
@@ -1,3 +1,4 @@
+#pragma once
 #define logcurs_del_width 32
 #define logcurs_del_height 32
 #define logcurs_del_x_hot 9
diff --git a/include/logcurs_prb.h b/include/logcurs_prb.h
index c1ada4fe626b9da68928b2d1cbf79f089b6b7669..3e57fb731c65d8610661f81c5a6b473d9b7618ca 100644
--- a/include/logcurs_prb.h
+++ b/include/logcurs_prb.h
@@ -1,3 +1,4 @@
+#pragma once
 #define logcurs_prb_width 16
 #define logcurs_prb_height 16
 #define logcurs_prb_x_hot 0
diff --git a/include/logdef.h b/include/logdef.h
index d9bd78e3d462be8a3be5ec9ab6f199cbf106d767..ee1042f167e0d9e9d989e96bf0006fe80b0708ae 100644
--- a/include/logdef.h
+++ b/include/logdef.h
@@ -1,18 +1,14 @@
-#ifndef LOGDEF_H
-#define LOGDEF_H
+#pragma once
 
-#include <utils/p2c.h>
-#include <graphics/mylib.h>
-#include <utils/strlist.h>
-#include <utils/newasm.h>
+#include "utils/p2c.h"
+#include "utils/strlist.h"
+#include "utils/newasm.h"
 
-#ifdef LOGDEF_G
-# define vextern
-#else
-# define vextern extern
-#endif
+#include "node.h"
+#include "gate.h"
+#include "page.h"
+#include "wire.h"
 
-typedef struct log_action_t log_action_t;
 #define log_maxpages    9   /* Maximum page number */
 #define log_maxpins     255   /* Maximum number of pins on a gate */
 #define log_lablen      255   /* Maximum length of labels */
@@ -65,18 +61,43 @@ typedef struct log_action_t log_action_t;
 typedef short log_zoomtab[5];
 typedef short log_rottab[8];
 
-vextern const log_rottab log_rotxx;
-vextern const log_rottab log_rotxy;
-vextern const log_rottab log_rotyx;
-vextern const log_rottab log_rotyy;
-vextern const log_rottab log_irotxx;
-vextern const log_rottab log_irotxy;
-vextern const log_rottab log_irotyx;
-vextern const log_rottab log_irotyy;
-vextern const log_zoomtab zoomscales;
+const log_rottab log_rotxx = {
+  1, 0, -1, 0, -1, 0, 1, 0
+};
+
+const log_rottab log_rotxy = {
+  0, -1, 0, 1, 0, 1, 0, -1
+};
+
+const log_rottab log_rotyx = {
+  0, 1, 0, -1, 0, 1, 0, -1
+};
+
+const log_rottab log_rotyy = {
+  1, 0, -1, 0, 1, 0, -1, 0
+};
+
+const log_rottab log_irotxx = {
+  1, 0, -1, 0, -1, 0, 1, 0
+};
+
+const log_rottab log_irotxy = {
+  0, 1, 0, -1, 0, -1, 0, 1
+};
+
+const log_rottab log_irotyx = {
+  0, -1, 0, 1, 0, -1, 0, 1
+};
+
+const log_rottab log_irotyy = {
+  1, 0, -1, 0, 1, 0, -1, 0
+};
+
+const log_zoomtab zoomscales = {
+  2, 3, 5, 8, 12
+};
+
 
-typedef char log_pac4[4];
-typedef char log_pac8[8];
 
 typedef union log_kflags {
   short i;
@@ -158,7 +179,7 @@ typedef struct log_gattrrec {
     } U73;
     char *c;
     char *sp;
-    unsigned b : 1 ; 
+    unsigned b : 1 ;
     short nv;
   } UU;
 } log_gattrrec;   /* Gate attribute entry */
@@ -240,10 +261,350 @@ typedef struct log_colorrec {
 	popupsel, redword, blueword, vlsicut;
 } log_colorrec;
 
-
-#undef vextern
-
-#include <log_action.h>
-#endif /*LOGDEF_H*/
-
-
+typedef struct log_tool {
+  char name[17];
+  void (*proc) (struct log_action_t *act);
+  char *fname, *comment;
+  char *shortname;
+  unsigned ready : 1, simulator : 1, keep : 1, nostatus : 1, tstepflag : 1;
+  uchar simtype;
+  double nexttstep;
+  strlist_t *nlbl, *hlbl;
+  short nnumattrs, hnumattrs;
+  log_kattrrec *nattr, *hattr;
+  na_long info;
+  struct log_tool *next;
+  long netstamp;   /* Changes to circuit network */
+  double deltatime;
+} log_tool;
+
+typedef enum
+{
+	act_init,
+	act_endinit,
+	act_exit,
+	act_clearmsg,
+	act_status,
+	act_cnf,
+	act_immed,
+	act_func,
+	act_color,
+	act_select,
+	act_clear,
+	act_edit,
+	act_pass,
+	act_tstep,
+	act_erasegate,
+	act_touchgate,
+	act_history,
+	act_histval,
+	act_histstr,
+	act_trigger,
+	act_glowcol,
+	act_newgate,
+	act_disposegate,
+	act_copygate,
+	act_writegate,
+	act_readgate,
+	act_connectgate,
+	act_disconnectgate,
+	act_configgate,
+	act_configchgate,
+	act_configrelgate,
+	act_confignode,
+	act_configchnode,
+	act_configrelnode,
+	act_confighist,
+	act_configchhist,
+	act_configrelhist,
+	act_newkind,
+	act_disposekind,
+	act_newnode,
+	act_disposenode,
+	act_copynode,
+	act_combinenodes,
+	act_combineintonode,
+	act_writenode,
+	act_readnode,
+	act_refnodes,
+	act_nodeval,
+	act_general,
+	act_gennode,
+	act_genkind,
+	act_gengate
+} log_actionkinds;
+
+typedef struct log_hooks_t
+{
+	void (*hidecursor) ();
+	void (*hidecursorrect) (long x1, long y1, long x2, long y2);
+	void (*unhidecursor) ();
+	void (*nodeconflict) (struct log_nrec *n);
+	void (*gateconflict) (struct log_grec *g);
+	void (*clearconflicts) (struct log_tool *tool);
+	void (*setdimgate) (log_grec *g, int dim);
+	void (*xform) (log_grec *g, short *x, short *y);
+	void (*getsig) (char *name, log_sigrec **sig);
+	void (*report) (int num, char *name);
+	void (*message) (char *msg);
+	void (*vmessage) (char *msg);
+	void (*vmessageflag) (char *msg, int b);
+	void (*trace) (char *msg);
+	void (*dump) (char *msg);
+	void (*setdump) (char *name);
+	void (*closefiles) ();
+	void (*clearalpha) ();
+	void (*drawstr) (int x, int y, char *s);
+	void (*rightstr) (int x, int y, char *s);
+	void (*centerstr) (int x, int y, char *s);
+	void (*clip) ();
+	void (*remcursor) ();
+	void (*clearwindow) ();
+	void (*setmode) (const char *s);
+	void (*getword) (char *buf, char *wrd);
+	void (*getint) (char *buf, long *i, long def);
+	void (*getreal) (char *buf, double *r, double def);
+	void (*getbool) (char *buf, int *b);
+	void (*pen) ();
+	void (*pass) ();
+	void (*trykbd) ();
+	void (*scroll) ();
+	void (*trykbdscroll) ();
+	void (*inkey) (char *ch);
+	void (*udrawgate) (int x, int y, int g, int c);
+	void (*gdrawgate) (int x, int y, int g, int c);
+	void (*drawgate) (log_grec *g);
+	void (*erasegate) (log_grec *g);
+	void (*drawnode) (log_nrec *n, int c);
+	void (*refresh) ();   /*quietly refresh drawing area*/
+	void (*refreshsoon) ();
+	void (*beginbottom) ();
+	void (*endbottom) ();
+	void (*beginerror) ();
+	void (*enderror) ();
+	void (*redraw) ();   /*redraw drawing area*/
+	void (*redrawwindow) ();   /*redraw entire screen*/
+	void (*change) (log_page *page);
+	void (*newgate) (log_grec **g, short gt);
+	void (*copygate) (log_grec *old, log_grec **g);
+	void (*disposegate) (log_grec **g);
+	void (*newnode) (log_nrec **n, uchar st);
+	void (*copynode) (log_nrec *old, log_nrec **n);
+	void (*disposenode) (log_nrec **n);
+	void (*switchnode) (log_nrec **n, log_nrec *n2);
+	void (*dumpnodes) ();
+	void (*readlnpass) (char *s, short mode);
+	void (*clearfunc) ();
+	void (*refrfunc) ();
+	void (*assertfunc) (char *name);
+	void (*findobject) (short x, short y);
+	void (*findwire) (short x, short y);
+	void (*deletehw) (log_hwrec *hw);
+	void (*deletevw) (log_vwrec *vw);
+	void (*disconnectgate) (log_grec *g);
+	void (*deletegate) (log_grec *g);
+	void (*addhw) (short x1, short x2, short y);
+	void (*addvw) (short x, short y1, short y2);
+	void (*connectgate) (log_grec *g, int *success);
+	void (*waitnear) ();
+	void (*addgate) (short x, short y, short gtype);
+	void (*uaddgate) (short x, short y, short gtype);
+	void (*getgate) (char *name, short *gtype);
+	void (*realunit) (double r, short p, char *u, char *s);
+	void (*realunit2) (double r, short p, char *u, char *s);
+	void (*addlabel) (struct log_lrec **l, char *s);
+	void (*getcolor) (char *name, short *val, short def);
+	void (*setcmap) (short n, short r, short g, short b);
+	void (*parselabel) (strlist_t **lbl, short *numattrs, log_kattrrec **attr);
+	void (*editattrs) (log_gattrrec *gattr, short numattrs, log_kattrrec *kattr, strlist_t *lbl,
+			char *name, void (*proc) (), void (*chproc) (), void (*relproc) ());
+	void (*newattrs) (log_gattrrec **gattr, short numattrs, log_kattrrec *kattr);
+	void (*disposeattrs) (log_gattrrec **gattr, short numattrs, log_kattrrec *kattr);
+	void (*copyattrs) (log_gattrrec **gattr, log_gattrrec *oldattr, short numattrs, log_kattrrec *kattr);
+	void (*initwindow) ();
+	void (*clearshowalpha) ();
+	void (*setupregion) (struct log_regrec **r, short pagenum);
+	void (*stamp) (long *i);
+	void (*noclip) ();
+} log_hooks_t;
+
+typedef struct log_hook2_t
+{
+	void (*getnodeval) (log_nrec *n, double *val, char *opts);
+	void (*solderat) (short x, short y);
+	void (*unsolderwires) (struct log_hwrec *hw, struct log_vwrec *vw);
+	void (*settofrom) (log_grec **g, char *name);
+	void (*findattrnum) (log_krec *k, char *name, char *kinds, short *num);
+	void (*findattrname) (log_krec *k, short num, char *name);
+	void (*findpinnum) (log_krec *k, char *name, short *num);
+	void (*findpinname) (log_krec *k, short num, char *name);
+	void (*setgattr) (log_grec *g, short num, char *value);
+	void (*setnattr) (log_nrec *n, short num, char *value);
+	void (*findpointmarker) (log_krec *k, short num, short *x, short *y);
+	void (*findboxmarker) (log_krec *k, short num, short *x1, short *y1, short *x2, short *y2);
+	void (*send_general) (struct log_tool *sim, char *act);
+	void (*send_gennode) (log_nrec *n, char *act);
+	void (*send_genkind) (log_krec *k, char *act);
+	void (*send_gengate) (log_grec *g, char *act);
+	void (*send_all) (char *act);
+	void (*send_allnodes) (char *act);
+	void (*send_allkinds) (char *act);
+	void (*send_allgates) (char *act);
+	void (*addlabelat) (short x, short y, char *s);
+	void (*addboxat) (short x1, short y1, short x2, short y2);
+	void (*plainxform) (log_grec *g, short *x, short *y);
+	void (*findattrnum2) (short numattrs, log_kattrrec *kattr, strlist_t *lbl, char *name, char *kinds, short *num);
+	void (*findattrname2) (short numattrs, log_kattrrec *kattr, strlist_t *lbl, short num, char *name);
+	void (*showpinname) (log_grec *g, short i, short c, char *name);
+} log_hook2_t;
+
+typedef struct log_action_t
+{
+	log_actionkinds action;
+	log_krec *actkind;
+	log_grec *actgate;
+	log_grec *actgate2;
+	log_nrec *actnode;
+	log_nrec *actnode2;
+	long actx;
+	long acty;
+	int actflag;
+	int actflag2;
+	FILE **actfile;
+	struct log_tool *acttool;
+	char *actstr;
+	double actval;
+	double actval2;
+	double actval3;
+	log_gattrrec *actgattr;
+	log_kattrrec *actkattr;
+	unsigned char *actproc;
+
+	log_page *pages[log_maxpages]; /** \TODO use a variable size array or a list */
+	size_t numpages; ///< number of pages
+	log_nrec *nbase;
+	long curpage;  ///< current page number
+	long showpage; ///< currenctly displayed page number
+
+
+	log_sigrec *signaltab;
+	short maxsignal;
+	short lastsignal;
+
+	short scale;
+	short hscale;
+	long xoff;	   ///< screen_x = grid_x * scale - xoff
+	long yoff;
+
+	char func[17];
+	char *funcarg;
+
+	log_grec *neargate;
+	log_lrec *nearlabel;
+	log_brec *nearbox;
+	log_hwrec *nearhw;
+	log_hwrec *movinghw;
+	log_vwrec *nearvw;
+	log_vwrec *movingvw;
+
+	log_nrec *probenode;
+	log_grec *probegate;
+	short probepin;
+	struct log_tool *probesimtype;
+	short baselinecolor;
+
+	log_hnrec *hnbase;
+	log_htrec *htbase;
+	log_htrec *htlast;
+
+	long fastspeed;
+	long fastmin;
+	long fastmax;
+	long fastrate;
+
+	long singlestepcount;
+
+	double time;
+	double prevtimestep;
+
+	log_simstatekinds simstate;
+	log_simstatekinds oldsimstate;
+
+	struct log_tool *simstatetool;
+	struct log_tool *oldsimstatetool;
+
+	int histactive;      /** Scope mode is triggered */
+	int dumpopen;        /** Dump output file is open */
+	int traceopen;       /** Trace output is open */
+	int verbose;         /** Commands acknowledge with messages */
+	int traceflag;       /** Debuggin/trace mode on */
+	int quiet;           /** Suppress sound signals */
+	int glowmode;        /** Glowing-wires mode */
+	int probemode;       /** Probe-cursor mode */
+	int markers;         /** Printing markers are defined */
+	int invisible;       /** Gates and wires are invisible */
+	int textinvisible;   /** Lablels and boxes are invisible */
+	int pnuminvisible;   /** Pin numbers are invisible */
+	int dotsvisible;      /** Are "red dots" on or off normally? */
+	int showconflicts;   /** Show onlyconflict */
+	int resetflag;       /** "Reset" command has been given */
+	int pwrflag;         /** Simulator is turned on */
+	int initdone;       /** Done with program initialization */
+	int refrflag;        /** Refreshing all displays */
+
+	int busyflag;        /** Flag for idling simulations */
+
+	short markerx1;
+	short markery1;
+	short markerx2;
+	short markery2;
+
+	m_tablet_info t;
+	m_tablet_info t0;
+	int startpoint;
+	int stillnear;
+	int incircuit;
+
+	short gridx;
+	short gridy;
+	short posx;
+	short posy;
+	short oldx;
+	short oldy;
+	short cx_min;
+	short cy_min;
+	short cx_max;
+	short cy_max;
+	/** Area covered bu cyrsor */
+
+	FILE **tracefile;
+
+	char *homedirname;
+
+	struct log_tool *toolbase;
+
+	log_hooks_t hook;
+	log_colorrec color;
+
+	long curstamp;
+	long labelstamp;                /** Changes to labels */
+	long boxstamp;                  /** Changes to boxes */
+	long msgstamp;                  /** Clearing messages screen */
+	long refrstamp;                 /** Clearing graphics screen */
+	long nattrstamp;                /** Changes to note attributes */
+	long gattrstamp;                /** Changes to gate attributes */
+	long sigstamp;                  /** Changes to signal table */
+	long loadstamp;                 /** A page was loaded */
+	long colorstamp;                /** Color assignment have changes */
+	long resetstamp;   /* Simulation has been reset */
+	long markerstamp;               /** Page markers moved */
+
+	log_krec *probekind;
+	strlist_t *actstrlist;
+	log_hook2_t *hook2;
+	log_hwrec *probehwire;
+	log_vwrec *probevwire;
+	long actx2;
+	long acty2;
+	char genfunc [17];
+} log_action_t;
diff --git a/include/logdig.h b/include/logdig.h
index e928c0a20ca7c7d23e48a1b78a02a8d7345af35d..314c7106cf214fa5f9209cab14b1465ce5c177fd 100644
--- a/include/logdig.h
+++ b/include/logdig.h
@@ -1,5 +1,4 @@
-#ifndef LOGDIG_H
-#define LOGDIG_H
+#pragma once
 
 #include "logdef.h"
 #include <utils/sysglobals.h>
@@ -40,20 +39,17 @@ typedef struct log_16_action {
 } log_16_action;
 
 const log_16_viarr log_16_vi = {
-								0, 1, 3
+  0, 1, 3
 };
 
 const log_16_ivarr log_16_iv = {
-								log_none, log_zero, log_one, log_one
+  log_none, log_zero, log_one, log_one
 };
 
 const log_16_vbarr log_16_vb = {
-								false, false, true
+  false, false, true
 };
 
 const log_16_bvarr log_16_bv = {
-								log_zero, log_one
+  log_zero, log_one
 };
-
-
-#endif /*LOGDIG_H*/
diff --git a/include/logfont.h b/include/logfont.h
index 4a456c05323b55bf0f24fe899fe6da7220300933..2a7bfa39f39c695785d57bf8e52604d39dc0f024 100644
--- a/include/logfont.h
+++ b/include/logfont.h
@@ -1,3 +1,3 @@
+#pragma once
 
 #define logfont_lfont NULL
-
diff --git a/include/logglobals.h b/include/logglobals.h
index 03014474158f7b56bfe73d4c2d67d89588cd8461..fce54ac6188b5d81d43c3a41fb5b33e0d4d3b0a7 100644
--- a/include/logglobals.h
+++ b/include/logglobals.h
@@ -1,5 +1,4 @@
-#ifndef LOGGLOBALS
-#define LOGGLOBALS
+#pragma once
 
 #include <utils/p2c.h>
 #include <graphics/newkbd.h>
@@ -68,7 +67,7 @@ extern uchar *loadedgates;   /* Tells whether a gate is in the catalog */
 extern log_krec *kind[maxmaxkinds];   /* Kind of gate in each catalog space */
 extern kindgrouptype kindgroup;   /* Kind of gate in each menu-area space */
 extern kindgrouptype kindsig;
-extern kindattrtype kindattr;
+extern struct kindattrtype kindattr;
 extern strlist_t *gatefilenames;
 extern short maxkinds, catwidth;
 extern catboxrec *catboxes;
@@ -199,4 +198,9 @@ extern int suppressdots;   /* Temporarily suppressing red dots */
 extern int glowsolder;   /* Display solder dots in Glow mode */
 extern int vlsi;   /* Current page is VLSI mode */
 
-#endif
+
+extern void m_saveclip ();
+
+extern void nc_cursor_on ();
+
+extern void nc_cursor_off ();
diff --git a/include/loghier.h b/include/loghier.h
index 2b527429f898b9da0788d7dee5b5227f3e31ac80..798441ca2d3212a95b5f3cc413055485783e682a 100644
--- a/include/loghier.h
+++ b/include/loghier.h
@@ -1,5 +1,4 @@
-#ifndef LOGHIER_H
-#define LOGHIER_H
+#pragma once
 
 #include "logdef.h"
 #include <utils/newasm.h>
@@ -28,7 +27,3 @@ void examinetemplate (log_grec *g, log_nrec **pp, long ppsize,
 
 
 void Log_7_ginst (log_action_t *act);
-
-#endif /*LOGHIER_H*/
-
-
diff --git a/include/logsim.h b/include/logsim.h
index 0c035768672ef061f5e54c0d1c6237f5ca780aee..ff5ed8c306b23a0809e2c1f64ae0eb179f258ed5 100644
--- a/include/logsim.h
+++ b/include/logsim.h
@@ -1,16 +1,8 @@
-#ifndef LOGSIM_H
-#define LOGSIM_H
+#pragma once
 
 
 #include "logdef.h"
 #include "logdig.h"
-#include "logsima.h"
-#include "logsimed.h"
-#include <graphics/newkbd.h>
-#include <utils/newasm.h>
-#include <graphics/newci.h>
-#include <graphics/newcrt.h>
-#include <graphics/mylib.h>
 
 extern void Log_16_proc (log_action_t *lact);
 extern void Log_16_7seg (log_16_action *act);
@@ -28,8 +20,3 @@ extern void log_16_conf (log_16_action *act, log_nrec *n);
 
 
 extern void log_16_noprog (log_16_action *act);
-
-
-#endif /*LOGSIM_H*/
-
-
diff --git a/include/logsima.h b/include/logsima.h
index 18faf6eab73997719c58d7f66d1dcf9276bf2cfd..7e97a86e1bd937cdb9a9cd7a723af0ddc0ca36ea 100644
--- a/include/logsima.h
+++ b/include/logsima.h
@@ -1,5 +1,4 @@
-#ifndef LOGSIMA_H
-#define LOGSIMA_H
+#pragma once
 
 #include "logsim.h"
 #include "logdef.h"
@@ -8,13 +7,6 @@
 #include "tool.h"
 
 
-#ifdef LOGSIMA_G
-#define vextern
-#else
-#define vextern extern
-#endif 
-
-
 typedef struct nodeinfo {
   log_16_value v, v0, v00, defv, truev;
 } nodeinfo;
@@ -33,19 +25,15 @@ typedef struct gateinfo {
 } gateinfo;
 
 
-vextern log_tool *logsima_tool_16;
-vextern log_16_action logsima_action;
-extern void (*logsima_dig_inst) (log_16_action *act);
+log_tool *logsima_tool_16;
+log_16_action logsima_action;
+void (*logsima_dig_inst) (log_16_action *act);
 
 
-extern void logsima_init ();
-extern void executegates (int *active, log_grec *g);
-extern void executeprog (uchar *pr, log_nrec **pins, gateinfo *ginfo,
+void logsima_init ();
+void executegates (int *active, log_grec *g);
+void executeprog (uchar *pr, log_nrec **pins, gateinfo *ginfo,
 			    na_long *vars);
-extern void clearnodes (log_nrec *n);
-extern void copynodes (log_nrec *n, int *stable);
-extern void callgate (log_16_actionkinds action);
-
-#endif /*LOGSIMA_H*/
-
-
+void clearnodes (log_nrec *n);
+void copynodes (log_nrec *n, int *stable);
+void callgate (log_16_actionkinds action);
diff --git a/include/logsimed.h b/include/logsimed.h
index e23246dac79d235300e1100e0d5fd2b75fb45194..cd78015079f85de02e3dd078bc9f1ab7f455a1b2 100644
--- a/include/logsimed.h
+++ b/include/logsimed.h
@@ -1,5 +1,5 @@
-#ifndef LOGSIMED_H
-#define LOGSIMED_H
+#pragma once
+
 
 
 #include "logdef.h"
@@ -18,5 +18,3 @@ extern long indent_16 (uchar *proc, long pc);
 extern long length_16 (uchar *proc, long pc);
 
 extern long assem_16 (char *buf, uchar *proc, long *pc);
-
-#endif /*LOGSIMED_H*/
diff --git a/include/logsimh.h b/include/logsimh.h
index 82164c853fa151f5f1acca1542bf0c6d95621968..3c1787d2a0c759e0216f90174282eba21d258e01 100644
--- a/include/logsimh.h
+++ b/include/logsimh.h
@@ -1,22 +1,9 @@
-#ifndef LOGSIMH_H
-#define LOGSIMH_H
+#pragma once
 
 #include "logdef.h"
-#include "loghier.h"
-#include "logdig.h"
-#include "logsima.h"
-#include "logsimed.h"
-#include <utils/newasm.h>
-#include <graphics/newci.h>
-#include <graphics/mylib.h>
 
 extern void Log_16_inst (log_16_action *act);
 extern void Log_dig_inst (log_16_action *act);
 
 
 extern void Log_16_digh (log_16_action *act);
-
-
-#endif /*LOGSIMH_H*/
-
-
diff --git a/include/logstructs.h b/include/logstructs.h
index 700d2c44374a8f7fd87b295e1e4faf3e32007829..74093cd5a02dcbcaa86588ccfe541cadf28cdc4f 100644
--- a/include/logstructs.h
+++ b/include/logstructs.h
@@ -1,5 +1,4 @@
-#ifndef LOGSTRUCTS
-#define LOGSTRUCTS
+#pragma once
 
 #include "settings.h"
 #include "logdef.h"
@@ -17,6 +16,9 @@ typedef struct ovectorrec {
         schar x1, y1, x2, y2;
 } ovectorrec;
 
+typedef char log_pac4[4];
+typedef char log_pac8[8];
+
 /** Union representing a pack of 256 bytes */
 typedef union filerec {
         uchar b[256];
@@ -26,8 +28,8 @@ typedef union filerec {
         int32_t i[64];
         log_pac8 ix[32];
         ovectorrec vec[64];
-        log_pinrec pin[64];
-        log_pnumrec pnum[64];
+        struct log_pinrec pin[64];
+        struct log_pnumrec pnum[64];
         descrec desc[16];
         log_pac4 c4[64];
 } filerec;
@@ -119,5 +121,3 @@ typedef struct baseptrs {
         short x1copy, y1copy, x2copy, y2copy, dxcopy, dycopy, pgnum;
         int valid;
 } baseptrs;
-
-#endif
diff --git a/include/logstuff.h b/include/logstuff.h
index 81568b462e079354753e856ce649dd148dcb8f85..676934206a62dad20d8c4c32aea8bea0ad1ed6ca 100644
--- a/include/logstuff.h
+++ b/include/logstuff.h
@@ -1,5 +1,4 @@
-#ifndef LOGSTUFF_H
-#define LOGSTUFF_H
+#pragma once
 
 void recolor_log_cursors(int color, int force);
 void choose_log_cursor(int curs);
@@ -13,4 +12,4 @@ struct ext_proc {
   void (*proc)();
 };
 
-#endif
+void m_bunny(int, int);
diff --git a/include/mygates.h b/include/mygates.h
index a4c03b94e49e2f67ccbc92631ce0dbad71babaf0..904988b08b0e9789e08c07167cf461855f8132b9 100644
--- a/include/mygates.h
+++ b/include/mygates.h
@@ -1,6 +1,4 @@
-#ifndef MYGATES_H
-#define MYGATES_H
-
+#pragma once
 
 #include "logdef.h"
 #include "logdig.h"
@@ -12,8 +10,3 @@ extern void Log_mygates_sram8k (log_16_action *act);
 extern void Log_mygates_ascdisp (log_16_action *act);
 
 extern void Log_mygates_asckbd (log_16_action *act);
-
-
-#endif /*MYGATES_H*/
-
-
diff --git a/include/node.h b/include/node.h
index 28b922c69400cfb69cd17ca12f556abe37bffbc5..fece1bc8d9c1c14bec602b31ba74b82b40e69bca 100644
--- a/include/node.h
+++ b/include/node.h
@@ -1,5 +1,4 @@
-#ifndef NODE_H
-#define NODE_H
+#pragma once
 
 #include "logdef.h"
 #include "logstructs.h"
@@ -51,5 +50,3 @@ void checknode(log_nrec *n, struct LOC_checkcombine *LINK);
 int trycombinenodes(log_nrec **n1, log_nrec **n2);
 void reportnodeconflict(log_nrec *n);
 void getnodeval(log_nrec *n, double *val, char *opts);
-
-#endif
diff --git a/include/page.h b/include/page.h
index 18b48698c7fcc723f5923e14fdcf61bd0b7b9334..d93093c811a5a81a126ea93edff1544758290679 100644
--- a/include/page.h
+++ b/include/page.h
@@ -1,5 +1,4 @@
-#ifndef PAGE_H
-#define PAGE_H
+#pragma once
 
 #include "logdef.h"
 #include "gate.h"
@@ -49,4 +48,3 @@ void pageFree(log_page **page);
 
 void pageClear(log_page *page);
 
-#endif
diff --git a/include/pagereader.h b/include/pagereader.h
index 3fc7b817fd7d8b118602634b8511f7ce52fab8cc..406c11d7acefb60d7707f943be3dae560d8ba567 100644
--- a/include/pagereader.h
+++ b/include/pagereader.h
@@ -1,5 +1,4 @@
-#ifndef PAGEREADER_H
-#define PAGEREADER_H
+#pragma once
 
 #include <stdio.h>
 #include "logdef.h"
@@ -47,5 +46,3 @@ void loadpage(char *filename_, char *reason_);
 void readattrs(FILE **f, log_gattrrec **gattr, short numattrs, log_kattrrec *kattr, strlist_t *lbl, short count);
 void loadlog30(FILE **f, short ver);
 void readpage(char *filename_, char *reason);
-
-#endif
diff --git a/include/pagewriter.h b/include/pagewriter.h
index 9889ff58bccfbc020eb4f928bf70bd25f245cccc..7f0ec3ece0a8a656f252a3db81b4e8095381834c 100644
--- a/include/pagewriter.h
+++ b/include/pagewriter.h
@@ -1,5 +1,4 @@
-#ifndef PAGEWRITER_H
-#define PAGEWRITER_H
+#pragma once
 
 #include <stdio.h>
 #include "logdef.h"
@@ -25,5 +24,3 @@ void writeattrs(FILE **f, log_gattrrec *gattr, short numattrs, log_kattrrec *kat
 void savepage(short pgnum, char *filename_);
 void emergencysave(short pgnum);
 void safesavepage(short pgnum, char *fn);
-
-#endif
diff --git a/include/settings.h b/include/settings.h
index f414c33a8fbd513f1b1b2a29a031993c3c7e9604..8f56050293f902c7eb1cbe0d48d16325ee9274a0 100644
--- a/include/settings.h
+++ b/include/settings.h
@@ -1,5 +1,4 @@
-#ifndef SETTINGS_H
-#define SETTINGS_H
+#pragma once
 
 #define debuglog        false
 #define debugprint      true
@@ -111,5 +110,3 @@
 #define NAMEGAP         (3 * gg.scale) /* signallabel horizontal offset */
 
 #define maxeditmodes    4
-
-#endif
diff --git a/include/swap.h b/include/swap.h
index 78d6c6f87545d05cc2742d04408e27f89e16f22b..81ccf17aeb0dd818b79cd1553178ca35fcc58c99 100644
--- a/include/swap.h
+++ b/include/swap.h
@@ -1,3 +1,4 @@
+#pragma once
 #include <stdio.h>
 #include <ctype.h>
 #include <utils/p2c.h>
@@ -18,5 +19,3 @@ extern short getshortsw(char * c);
 extern long getintsw(char * c);
 extern long intsw(long ii);
 extern short reverse(short s);
-
-
diff --git a/include/tool.h b/include/tool.h
index 7c64c49e46673a0907348c9f93bbceaac69c225c..1d4b054b2595bbd489f1b2ff9405e47e651da30c 100644
--- a/include/tool.h
+++ b/include/tool.h
@@ -1,5 +1,4 @@
-#ifndef LOG_TOOL_H
-#define LOG_TOOL_H
+#pragma once
 
 #include "logdef.h"
 
@@ -31,5 +30,3 @@ void calltools(log_actionkinds act);
 void callsimtools(log_actionkinds act);
 void closetool(log_tool *tp);
 void closetools();
-
-#endif
diff --git a/include/utils.h b/include/utils.h
index 090c254cdc0620f43c8c81d88ef08f36ac034c5d..b6b65e6d07f30b66ef652fbe6d5bd9250bf1decc 100644
--- a/include/utils.h
+++ b/include/utils.h
@@ -1,5 +1,4 @@
-#ifndef UTILS_H
-#define UTILS_H
+#pragma once
 
 void readreal(char s_[], double *r);
 void stamp(long *i);
@@ -12,5 +11,3 @@ void pgetint(char *buf, long *i, long def);
 double getreal(char *s, double def);
 void pgetreal(char *buf, double *r, double def);
 void getbool(char *buf, int *b);
-
-#endif
diff --git a/include/utils/filepack.h b/include/utils/filepack.h
index 98114a2fa4dff8b5a7645f0b669b5f9b3a34d5ac..2d0e22ae19f072587a827aaa097b754cafde141f 100644
--- a/include/utils/filepack.h
+++ b/include/utils/filepack.h
@@ -1,11 +1,7 @@
-#ifndef FILEPACK_H
-#define FILEPACK_H
+#pragma once
 
 #include <utils/sysglobals.h>
 
 void fp_change (char *filename1, char *filename2);
 void fp_remove (char *filename);
-
-#endif /*FILEPACK_H*/
-
-
+int fp_getwd (char *path, char *rootname);
diff --git a/include/utils/iodecl.h b/include/utils/iodecl.h
index f06c8a194c76448ffb5a882be6fda7946f6ce7d2..205535c3468c91e98a36d082ee8340ab29d7cb43 100644
--- a/include/utils/iodecl.h
+++ b/include/utils/iodecl.h
@@ -1,5 +1,4 @@
-#ifndef IODECLARATIONS_H
-#define IODECLARATIONS_H
+#pragma once
 
 #define P_iominisc      0
 #define P_iomaxisc      31
@@ -232,8 +231,3 @@ _PROCEDURE io_error_link;
 
 void io_escape (long my_code, long select_code);
 uchar io_find_isc (void* *iod_temp);
-
-#endif /*IODECLARATIONS_H*/
-
-
-
diff --git a/include/utils/misc.h b/include/utils/misc.h
index 4e8ee950d81f554806192df1bc19ddaaac790bfb..8f409b6fb9861af7ff2af349eed28318ad1bc89a 100644
--- a/include/utils/misc.h
+++ b/include/utils/misc.h
@@ -1,5 +1,4 @@
-#ifndef MISC_H
-#define MISC_H
+#pragma once
 
 /*homeless orphans*/
 #include <utils/sysglobals.h>
@@ -7,8 +6,3 @@
 /* idle character -- 3.0 bug jws 3/20/84 */
 void misc_getioerrmsg (char *s, long lastior);
 char *tilde_expand  (char *s);
-
-#endif /*MISC_H*/
-
-
-
diff --git a/include/utils/newasm.h b/include/utils/newasm.h
index 2a0418b2a40eac863f36d8bc1d021a91dea8dd27..6d2c08cdc72afb5b60a1f489232a1f781b9a21c0 100644
--- a/include/utils/newasm.h
+++ b/include/utils/newasm.h
@@ -1,5 +1,4 @@
-#ifndef NEWASM_H
-#define NEWASM_H
+#pragma once
 
 typedef void* na_long;
 
@@ -22,7 +21,3 @@ int P_ibetweenm (long min, long i, long max, long margin);
 
 void* na_rtosr (double r);
 double na_srtor (void* sr);
-
-#endif /*NEWASM_H*/
-
-
diff --git a/include/utils/p2c.h b/include/utils/p2c.h
index 671b8a2bead4889058696668c41748fc6b6f93a5..265f6e4649ccfa2cd3a676a441b104cd2c08136d 100644
--- a/include/utils/p2c.h
+++ b/include/utils/p2c.h
@@ -1,5 +1,4 @@
-#ifndef P2C_H
-#define P2C_H
+#pragma once
 
 #include <stdio.h>
 
@@ -143,7 +142,7 @@ char *GetChipmunkPath(char *ev, char *deft);
 			    (f##_BFLAGS = 0))
 
 /* Memory allocation */
-# define Malloc(n)  (malloc((n != 0) ? (n) : 1) ?: _OutMem())
+#define Malloc(n)  (malloc((n != 0) ? (n) : 1) ?: _OutMem())
 #define Free(p)     (free((void*)(p)), (p)=NULL)
 
 /* packed arrays */   /* BEWARE: these are untested! */
@@ -176,12 +175,9 @@ char *GetChipmunkPath(char *ev, char *deft);
 #define P_max(a,b)   ((a) > (b) ? (a) : (b))
 #define P_min(a,b)   ((a) < (b) ? (a) : (b))
 
-#endif    /* P2C_H */
-
-
 #if !defined(L_cuserid)
 #define L_cuserid 32
 char * cuserid(char *);
 #endif
 
-
+char *GetChipmunkPath(char *ev, char *deft);
diff --git a/include/utils/regex.h b/include/utils/regex.h
index e12adbb3b4eaab937a19ff4b483ad93f3219183b..9672a0d0f97cb8b539e38194bb13cf36f7ae933e 100644
--- a/include/utils/regex.h
+++ b/include/utils/regex.h
@@ -1,10 +1,8 @@
-#ifndef REGEX_H
-#define REGEX_H
-
+#pragma once
 
+#include <stdlib.h>
 #include <utils/newasm.h>
 
-
 #define re_defchars     "\\[]^-*?+$.|~(){}:=<>"
 #define re_shellchars   "\\[]^-    ?       *  "
 
@@ -18,9 +16,3 @@ void re_replace (char *s, char *rex, char *rpl, size_t *pos,
 int re_matchstr (char *s, char *pat);
 int re_matchsubstr (char *s, char *pat, size_t start, size_t *last);
 void re_grepl (char *s, char *pat, char *rpl);
-
-
-#endif /*REGEX_H*/
-
-
-
diff --git a/include/utils/strings.h b/include/utils/strings.h
index 5fd6bdbdf3652043dd3da836b718582449fc906e..0394e71dc1171bb41fed70734e403ceed38c88a0 100644
--- a/include/utils/strings.h
+++ b/include/utils/strings.h
@@ -1,5 +1,4 @@
-#ifndef P2C_STRING_H
-#define P2C_STRING_H
+#pragma once
 
 #include <utils/p2c.h>
 
@@ -57,5 +56,3 @@ void strwordx(char *buf, char *wrd);
  * \deprecated
  */
 char *strcpy_overlap(char *dst, char *src) DEPRECATED;
-
-#endif
diff --git a/include/utils/strlist.h b/include/utils/strlist.h
index bb270a2c23b39d9989fcb1021092fc9c28cde725..bea0ce6a7bc596edaa641ad4e91a1b0129f553ae 100644
--- a/include/utils/strlist.h
+++ b/include/utils/strlist.h
@@ -1,5 +1,4 @@
-#ifndef STRLIST_H
-#define STRLIST_H
+#pragma once
 
 typedef struct strlist_t
 {
@@ -25,7 +24,3 @@ strlist_t *strlist_append (strlist_t **base, char *s);
 strlist_t *strlist_insert (strlist_t **base, char *s);
 
 void strlist_dump (FILE *f, strlist_t *base);
-
-
-#endif
-
diff --git a/include/utils/sysdevs.h b/include/utils/sysdevs.h
index 51f4a331600145e99dd4b11be6a24539a3a9451d..62f38241132ee56f2f44b86e2150f0649ad497c8 100644
--- a/include/utils/sysdevs.h
+++ b/include/utils/sysdevs.h
@@ -1,5 +1,4 @@
-#ifndef SYSDEVS_H
-#define SYSDEVS_H
+#pragma once
 
 #include <utils/sysglobals.h>
 
@@ -8,8 +7,3 @@ void sysdate (daterec *thedate);
 void systime (timerec *thetime);
 void setsysdate (daterec thedate);
 void setsystime (timerec thetime);
-
-#endif /*SYSDEVS_H*/
-
-
-
diff --git a/include/utils/sysglobals.h b/include/utils/sysglobals.h
index 7769effd30cba5771698ef6d43bd73411b28f736..8f7991f39d115e72ab20957e1293cb6dfeea2775 100644
--- a/include/utils/sysglobals.h
+++ b/include/utils/sysglobals.h
@@ -1,5 +1,4 @@
-#ifndef SYSGLOBALS_H
-#define SYSGLOBALS_H
+#pragma once
 
 #define mminint         (-32768L) /*unused/ */
 
@@ -46,8 +45,3 @@ typedef struct datetimerec {
     daterec date;
     timerec time;
 } datetimerec;
-
-#endif /*SYSGLOBALS_H*/
-
-
-
diff --git a/include/window.h b/include/window.h
index 6a255a97932fbfc328f0cd2ee2d1dfd1afc4b11d..f935ae66b237fdf3d83727c714cd14cc671a8dad 100644
--- a/include/window.h
+++ b/include/window.h
@@ -1,5 +1,4 @@
-#ifndef WINDOW_H
-#define WINDOW_H
+#pragma once
 
 #include "logdef.h"
 
@@ -132,5 +131,3 @@ void xorcursor();
 int hvline(short x1, short y1, short *x2, short *y2);
 
 void init_X_window();
-
-#endif
diff --git a/include/wire.h b/include/wire.h
index 1d413227a1bf73baeb3220d5ea8073e9ec06eb1a..5ef47d0758e6b325a93fadd7b715a682eb92f824 100644
--- a/include/wire.h
+++ b/include/wire.h
@@ -1,5 +1,4 @@
-#ifndef WIRE_H
-#define WIRE_H
+#pragma once
 
 #include "logdef.h"
 
@@ -68,4 +67,8 @@ void soldernear();
 
 void solderat(short x, short y);
 
-#endif
+void newhw(log_hwrec **hw);
+
+void newvw(log_vwrec **vw);
+
+void newsolder(log_srec **s);
diff --git a/src/ana/devtechn.c b/src/ana/devtechn.c
index ff8dd6725856bcebf42b13c1774af4549dfe94d3..2b604578c9f58fa88516b660a1730ef8f32fdf80 100644
--- a/src/ana/devtechn.c
+++ b/src/ana/devtechn.c
@@ -62,8 +62,7 @@ the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
 /****************************************************************************/
 
 
-static void initlib_Devtechn(act)
-Analog_32_action *act;
+static void initlib_Devtechn(Analog_32_action *act)
 {
   AnaCell_rec *NewCell;
 
@@ -77,8 +76,7 @@ Analog_32_action *act;
 }  /*NFET4_Initlib*/
 
 
-static void Reload_Devtechn(act)
-Analog_32_action *act;
+static void Reload_Devtechn(Analog_32_action *act)
 {
   log_grec *WITH;
 
@@ -156,8 +154,7 @@ Analog_32_action *act;
 
 }
 
-static void Attr_Devtechn(act)
-Analog_32_action *act;
+static void Attr_Devtechn(Analog_32_action *act)
 {
   long Attrnum;
   log_grec *WITH;
@@ -386,16 +383,14 @@ Analog_32_action *act;
   }
 }
 
-static void Openconfig_Devtechn(act)
-Analog_32_action *act;
+static void Openconfig_Devtechn(Analog_32_action *act)
 {
   if (!act->ok)
     return;
   Reload_Devtechn(act);
 }
 
-static void Readgate_Devtechn(act)
-Analog_32_action *act;
+static void Readgate_Devtechn(Analog_32_action *act)
 {
   log_grec *WITH;
 
@@ -424,8 +419,7 @@ Analog_32_action *act;
 }
 
 
-static void Newgate_Devtechn(act)
-Analog_32_action *act;
+static void Newgate_Devtechn(Analog_32_action *act)
 {
   Analog_32_action Newact;
 
@@ -441,8 +435,7 @@ Analog_32_action *act;
 /*                 Library Listing For Cell Devtechn                        */
 /*==========================================================================*/
 
-void Log_DEVTECHN_initlib_32(act)
-Analog_32_action *act;
+void Log_DEVTECHN_initlib_32(Analog_32_action *act)
 {
   /*Body of procedure*/
 
@@ -496,9 +489,3 @@ Analog_32_action *act;
 #undef N_linCgs
 #undef N_aCgw
 #undef N_aCwell
-
-
-
-
-
-
diff --git a/src/ana/devtechp.c b/src/ana/devtechp.c
index 7959c597a63e8534ca9fc9a278a7a4bddca360e5..669a23340d7745d211fe2f1875e423bcdcca93d8 100644
--- a/src/ana/devtechp.c
+++ b/src/ana/devtechp.c
@@ -61,8 +61,7 @@ the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
 /****************************************************************************/
 
 
-static void initlib_Devtechp(act)
-Analog_32_action *act;
+static void initlib_Devtechp(Analog_32_action *act)
 {
   AnaCell_rec *NewCell;
 
@@ -76,8 +75,7 @@ Analog_32_action *act;
 }  /*NFET4_Initlib*/
 
 
-static void Reload_Devtechp(act)
-Analog_32_action *act;
+static void Reload_Devtechp(Analog_32_action *act)
 {
   log_grec *WITH;
 
@@ -155,8 +153,7 @@ Analog_32_action *act;
 
 }
 
-static void Attr_Devtechp(act)
-Analog_32_action *act;
+static void Attr_Devtechp(Analog_32_action *act)
 {
   long Attrnum;
   log_grec *WITH;
@@ -385,8 +382,7 @@ Analog_32_action *act;
   }
 }
 
-static void Openconfig_Devtechp(act)
-Analog_32_action *act;
+static void Openconfig_Devtechp(Analog_32_action *act)
 {
 
   if (!act->ok)
@@ -394,8 +390,7 @@ Analog_32_action *act;
   Reload_Devtechp(act);
 }
 
-static void Readgate_Devtechp(act)
-Analog_32_action *act;
+static void Readgate_Devtechp(Analog_32_action *act)
 {
   log_grec *WITH;
 
@@ -424,8 +419,7 @@ Analog_32_action *act;
 }
 
 
-static void Newgate_Devtechp(act)
-Analog_32_action *act;
+static void Newgate_Devtechp(Analog_32_action *act)
 {
   Analog_32_action Newact;
 
@@ -441,8 +435,7 @@ Analog_32_action *act;
 /*                 Library Listing For Cell Devtechp                        */
 /*==========================================================================*/
 
-void Log_DEVTECHP_initlib_32(act)
-Analog_32_action *act;
+void Log_DEVTECHP_initlib_32(Analog_32_action *act)
 {
   /*Body of procedure*/
 
@@ -496,9 +489,3 @@ Analog_32_action *act;
 #undef N_linCgs
 #undef N_aCgw
 #undef N_aCwell
-
-
-
-
-
-
diff --git a/src/ana/diode1.c b/src/ana/diode1.c
index e1787443dbfc35fa97cbd548b7012d1ba27907f7..2ce3671cb76244c0f06518883c54b0a019c7f099 100644
--- a/src/ana/diode1.c
+++ b/src/ana/diode1.c
@@ -52,9 +52,7 @@ typedef struct ICDiode1 {
 /****************************************************************************/
 
 
-static void Limitfill(Inst, Limitflag, Erase)
-log_grec *Inst;
-int Limitflag, Erase;
+static void Limitfill(log_grec *Inst, int Limitflag, int Erase)
 {
   short LLx, LLy, URx, URy;
 
@@ -83,8 +81,7 @@ int Limitflag, Erase;
 /*            Procedure To Simulate Cell In Algorithm                        */
 /****************************************************************************/
 
-static void Ex_Diode1(act)
-Analog_32_action *act;
+static void Ex_Diode1(Analog_32_action *act)
 {
   double MinI1, MinI2, dI1dV1, dI1dV2, dI2dV1, dI2dV2;
   AnaExt_rec *Pin1Ptr;
@@ -160,8 +157,7 @@ Analog_32_action *act;
 /****************************************************************************/
 
 
-static void Iin_Diode1(act)
-Analog_32_action *act;
+static void Iin_Diode1(Analog_32_action *act)
 {
   AnaExt_rec *Pin1Ptr;
   double VPin1;
@@ -208,8 +204,7 @@ Analog_32_action *act;
   }
 }  /*Iin_Diode1*/
 
-static void GetCnf_Diode1(NewIC)
-ICDiode1 *NewIC;
+static void GetCnf_Diode1(ICDiode1 *NewIC)
 {
   int Found;
   char Arg[256], Keyword[256];
@@ -265,8 +260,7 @@ ICDiode1 *NewIC;
 /*                          Installation Procedure                           */
 /****************************************************************************/
 
-static void initlib_Diode1(act)
-Analog_32_action *act;
+static void initlib_Diode1(Analog_32_action *act)
 {
   AnaCell_rec *NewCell;
   ICDiode1 *NewIC;
@@ -294,9 +288,7 @@ Analog_32_action *act;
 
 
 
-static int Diode1check(Inst, Attrnum)
-log_grec *Inst;
-long Attrnum;
+static int Diode1check(log_grec *Inst, long Attrnum)
 {
   int Result;
   Diode1Const *Diode1Var;
@@ -348,8 +340,7 @@ long Attrnum;
 }
 
 
-static void Attr_Diode1(act)
-Analog_32_action *act;
+static void Attr_Diode1(Analog_32_action *act)
 {
   long Attrnum;
 
@@ -361,8 +352,7 @@ Analog_32_action *act;
 }
 
 
-static void Newgate_Diode1(act)
-Analog_32_action *act;
+static void Newgate_Diode1(Analog_32_action *act)
 {
   Diode1Const *Diode1Var;
   Anainstlist *A_Gate;
@@ -398,8 +388,7 @@ Analog_32_action *act;
   WITH->attr[N_Vcrow - 1].changed = true;
 }
 
-static void Copygate_Diode1(act)
-Analog_32_action *act;
+static void Copygate_Diode1(Analog_32_action *act)
 {
   Diode1Const *Diode1Var, *Old_Diode1var;
   Anainstlist *A_Gate, *A_Oldgate;
@@ -415,8 +404,7 @@ Analog_32_action *act;
   AnaCapCopy(act->inst);
 }
 
-static void Dispose_Diode1(act)
-Analog_32_action *act;
+static void Dispose_Diode1(Analog_32_action *act)
 {
   Diode1Const *Diode1Var;
   Anainstlist *A_Gate;
@@ -427,8 +415,7 @@ Analog_32_action *act;
   AnaCapDispose(act->inst);   /*7*/
 }
 
-static void Readgate_Diode1(act)
-Analog_32_action *act;
+static void Readgate_Diode1(Analog_32_action *act)
 {
   Diode1Const *Diode1Var;
   Anainstlist *A_Gate;
@@ -464,8 +451,7 @@ Analog_32_action *act;
   Diode1Var->K2 = AnaExpo(-Diode1Var->lam * WITH->attr[N_Vcrow - 1].UU.r);
 }
 
-static void Probe_Diode1(act)
-Analog_32_action *act;
+static void Probe_Diode1(Analog_32_action *act)
 {
   Anainstlist *A_Gate;
   AnaExt_rec *Node1Ptr, *Node2Ptr;
@@ -519,8 +505,7 @@ Analog_32_action *act;
     AnaScoreboard("$", (long)AnaMessGate3);
 }
 
-static void Reset_Diode1(act)
-Analog_32_action *act;
+static void Reset_Diode1(Analog_32_action *act)
 {
   Diode1Const *Diode1Var;
   Anainstlist *A_Gate;
@@ -535,8 +520,7 @@ Analog_32_action *act;
     Limitfill(act->inst, Diode1Var->Limit, false);
 }
 
-static void PreUpdate_Diode1(act)
-Analog_32_action *act;
+static void PreUpdate_Diode1(Analog_32_action *act)
 {
   Diode1Const *Diode1Var;
   Anainstlist *A_Gate;
@@ -554,8 +538,7 @@ Analog_32_action *act;
   Diode1Var->NewLimit = (VPin1 - Vpin2 >= WITH1->attr[N_Vcrow - 1].UU.r);
 }
 
-static void Update_Diode1(act)
-Analog_32_action *act;
+static void Update_Diode1(Analog_32_action *act)
 {
   Diode1Const *Diode1Var;
   Anainstlist *A_Gate;
@@ -567,8 +550,7 @@ Analog_32_action *act;
   Diode1Var->Limit = Diode1Var->NewLimit;
 }
 
-static void Display_Diode1(act)
-Analog_32_action *act;
+static void Display_Diode1(Analog_32_action *act)
 {
   Diode1Const *Diode1Var;
   Anainstlist *A_Gate;
@@ -582,8 +564,7 @@ Analog_32_action *act;
 }
 
 
-static void Refresh_Diode1(act)
-Analog_32_action *act;
+static void Refresh_Diode1(Analog_32_action *act)
 {
   Diode1Const *Diode1Var;
   Anainstlist *A_Gate;
@@ -593,8 +574,7 @@ Analog_32_action *act;
   Limitfill(act->inst, Diode1Var->Limit, false);
 }
 
-static void Erase_Diode1(act)
-Analog_32_action *act;
+static void Erase_Diode1(Analog_32_action *act)
 {
   Diode1Const *Diode1Var;
   Anainstlist *A_Gate;
@@ -610,8 +590,7 @@ Analog_32_action *act;
 /*==========================================================================*/
 
 
-void Log_Diode1_INITLIB_32(act)
-Analog_32_action *act;
+void Log_Diode1_INITLIB_32(Analog_32_action *act)
 {
   /*Main Procedure*/
 
@@ -704,5 +683,3 @@ Analog_32_action *act;
 #undef N_Vcrow
 #undef Cstart
 #undef Gatename
-
-
diff --git a/src/ana/ganglion.c b/src/ana/ganglion.c
index 880a633c90c5c15f1ace68509551764526be450a..7df1bf43ca483aec5d62bd73da82a3192369ad3d 100644
--- a/src/ana/ganglion.c
+++ b/src/ana/ganglion.c
@@ -102,9 +102,7 @@ typedef enum {
 /****************************************************************************/
 
 
-static void Limitfill(Inst, Limitflag, Erase)
-log_grec *Inst;
-int Limitflag, Erase;
+static void Limitfill(log_grec *Inst, int Limitflag, int Erase)
 {
   short LLx, LLy, URx, URy;
 
@@ -132,8 +130,7 @@ int Limitflag, Erase;
 /*                   Cell Installation Procedures                           */
 /****************************************************************************/
 
-static void GetCnf_Ganglion(NewIC)
-ICGanglion *NewIC;
+static void GetCnf_Ganglion(ICGanglion *NewIC)
 {
   int Found;
   char Arg[256], Keyword[256];
@@ -241,8 +238,7 @@ ICGanglion *NewIC;
 }
 
 
-static void INITLIB_GANGLION(act)
-Analog_32_action *act;
+static void INITLIB_GANGLION(Analog_32_action *act)
 {
   AnaCell_rec *NewCell;
   ICGanglion *NewIC;
@@ -296,9 +292,7 @@ Analog_32_action *act;
 
 
 
-static int Ganglioncheck(Inst, Attrnum)
-log_grec *Inst;
-long Attrnum;
+static int Ganglioncheck(log_grec *Inst, long Attrnum)
 {
   int Result;
   GanglionConst *GanglionVar;
@@ -395,8 +389,7 @@ long Attrnum;
 }
 
 
-static void Attr_Ganglion(act)
-Analog_32_action *act;
+static void Attr_Ganglion(Analog_32_action *act)
 {
   long Attrnum;
 
@@ -414,8 +407,7 @@ Analog_32_action *act;
 }
 
 
-static void Newgate_Ganglion(act)
-Analog_32_action *act;
+static void Newgate_Ganglion(Analog_32_action *act)
 {
   GanglionConst *GanglionVar;
   Anainstlist *A_Gate;
@@ -486,8 +478,7 @@ Analog_32_action *act;
   WITH->attr[N_Ktqn - 1].changed = true;
 }
 
-static void Copygate_Ganglion(act)
-Analog_32_action *act;
+static void Copygate_Ganglion(Analog_32_action *act)
 {
   GanglionConst *GanglionVar, *Old_Ganglionvar;
   Anainstlist *A_Gate, *A_Oldgate;
@@ -502,8 +493,7 @@ Analog_32_action *act;
 }
 
 
-static void Dispose_Ganglion(act)
-Analog_32_action *act;
+static void Dispose_Ganglion(Analog_32_action *act)
 {
   GanglionConst *GanglionVar;
   Anainstlist *A_Gate;
@@ -515,8 +505,7 @@ Analog_32_action *act;
 }
 
 
-static void Readgate_Ganglion(act)
-Analog_32_action *act;
+static void Readgate_Ganglion(Analog_32_action *act)
 {
   GanglionConst *GanglionVar;
   Anainstlist *A_Gate;
@@ -588,8 +577,7 @@ Analog_32_action *act;
 }
 
 
-static void Reset_Ganglion(act)
-Analog_32_action *act;
+static void Reset_Ganglion(Analog_32_action *act)
 {
   GanglionConst *GanglionVar;
   Anainstlist *A_Gate;
@@ -604,8 +592,7 @@ Analog_32_action *act;
     Limitfill(act->inst, GanglionVar->Limit, false);
 }
 
-static void PreUpdate_Ganglion(act)
-Analog_32_action *act;
+static void PreUpdate_Ganglion(Analog_32_action *act)
 {
   GanglionConst *GanglionVar;
   Anainstlist *A_Gate;
@@ -622,8 +609,7 @@ Analog_32_action *act;
 }
 
 
-static void Update_Ganglion(act)
-Analog_32_action *act;
+static void Update_Ganglion(Analog_32_action *act)
 {
   GanglionConst *GanglionVar;
   Anainstlist *A_Gate;
@@ -636,8 +622,7 @@ Analog_32_action *act;
 }
 
 
-static void Display_Ganglion(act)
-Analog_32_action *act;
+static void Display_Ganglion(Analog_32_action *act)
 {
   GanglionConst *GanglionVar;
   Anainstlist *A_Gate;
@@ -651,8 +636,7 @@ Analog_32_action *act;
 }
 
 
-static void Refresh_Ganglion(act)
-Analog_32_action *act;
+static void Refresh_Ganglion(Analog_32_action *act)
 {
   GanglionConst *GanglionVar;
   Anainstlist *A_Gate;
@@ -663,8 +647,7 @@ Analog_32_action *act;
 }
 
 
-static void Erase_Ganglion(act)
-Analog_32_action *act;
+static void Erase_Ganglion(Analog_32_action *act)
 {
   GanglionConst *GanglionVar;
   Anainstlist *A_Gate;
@@ -680,8 +663,7 @@ Analog_32_action *act;
 /****************************************************************************/
 
 
-void Ex_Ganglion(act)
-Analog_32_action *act;
+void Ex_Ganglion(Analog_32_action *act)
 {
   double MinIin, dIindVin, dIindVout, dIindVleak, MinIout, dIoutdVin,
 	 dIoutdVout, dIoutdVleak, MinIleak, dIleakdVin, dIleakdVout,
@@ -856,8 +838,7 @@ Analog_32_action *act;
 /****************************************************************************/
 
 
-void Iin_Ganglion(act)
-Analog_32_action *act;
+void Iin_Ganglion(Analog_32_action *act)
 {
   AnaExt_rec *PinInPtr;
   double VPinIn, VMemIn;
@@ -953,8 +934,7 @@ Analog_32_action *act;
 }  /*Iin_Ganglion*/
 
 
-void Probe_Ganglion(act)
-Analog_32_action *act;
+void Probe_Ganglion(Analog_32_action *act)
 {
   Anainstlist *A_Gate;
   AnaExt_rec *NodeInPtr, *NodeOutPtr, *NodeLeakPtr;
@@ -1000,8 +980,7 @@ Analog_32_action *act;
 
 
 
-void Log_ganglion_initlib_32(act)
-Analog_32_action *act;
+void Log_ganglion_initlib_32(Analog_32_action *act)
 {
   /*Main Procedure*/
 
diff --git a/src/ana/globals.c b/src/ana/globals.c
index 3712aed80ea728afa5f884f968143fbd6af02992..192fc6ce557b4162966379cd63a3cda35edbf669 100644
--- a/src/ana/globals.c
+++ b/src/ana/globals.c
@@ -67,8 +67,7 @@ char *AnaProbeAmpStr(char *AnaResult, double Val)
 
 
 
-long AnaGlowVal(Intensity)
-long Intensity;
+long AnaGlowVal(long Intensity)
 {
   if (Intensity > AnaLevelmap.Level_c) {
     if (Intensity > AnaLevelmap.Level_d) {
@@ -120,8 +119,7 @@ void AnaTimeReset()
 /*Execution procedure for analog gates that cannot presently simulate*/
 
 
-void AnaDummyGate(act)
-Analog_32_action *act;
+void AnaDummyGate(Analog_32_action *act)
 {
   switch (act->action) {
 
@@ -147,8 +145,7 @@ Analog_32_action *act;
 }
 
 
-void AnaDummyInit(dummykindptr)
-log_krec *dummykindptr;
+void AnaDummyInit(log_krec *dummykindptr)
 {
   AnaCell_rec *NewCell;
   long Index, FORLIM;
@@ -174,8 +171,7 @@ log_krec *dummykindptr;
 /********************************************************************************/
 /*                   Procedure to set/clear reset memory                        */
 
-void AnaAnalog_ChangeReset(Erase)
-int Erase;
+void AnaAnalog_ChangeReset(int Erase)
 {
 
   /********************************************************************************/
@@ -226,9 +222,7 @@ int Erase;
 /*******************************************************************************/
 /*            Procedure For Changing Scoreboard Message                        */
 
-void AnaScoreboard(Newmessage_, purpose)
-char *Newmessage_;
-long purpose;
+void AnaScoreboard(char *Newmessage_, long purpose)
 {
 
   /*******************************************************************************/
@@ -265,10 +259,7 @@ long purpose;
 /********************************************************************************/
 /*     Procedure for handling LOG.CNF calls                                     */
 
-void AnaGetcommand(Keyword, Arg, Found)
-char *Keyword;
-char *Arg;
-int *Found;
+void AnaGetcommand(char *Keyword, char *Arg, int *Found)
 {
   /*Key to search under*/
   /*command if found*/
@@ -295,9 +286,7 @@ int *Found;
 }
 
 
-void AnaAddcommand(Keyword, Arg)
-char *Keyword;
-char *Arg;
+void AnaAddcommand(char *Keyword, char *Arg)
 {
   /*Key to search under*/
   /*command if found*/
@@ -328,9 +317,7 @@ void AnaPopcommand()
 /*         Utility procedure for data input                                   */
 /******************************************************************************/
 
-void AnaGetvar(Varname, Value)
-char *Varname;
-double *Value;
+void AnaGetvar(char *Varname, double *Value)
 {
   char Name[256];
   double Newval;
@@ -391,8 +378,7 @@ $end$*/
 /*   Mathmatical library of transcendental functions for cell library          */
 /*=============================================================================*/
 
-double AnaTanch(V)
-double V;
+double AnaTanch(double V)
 {
   double Temp;
 
@@ -413,8 +399,7 @@ double V;
 }
 
 
-double AnaExpo(V)
-double V;
+double AnaExpo(double V)
 {
   if (V < -700)
     return 0.0;
@@ -422,8 +407,7 @@ double V;
     return exp(V);
 }
 
-double AnaSqrt(V)
-double V;
+double AnaSqrt(double V)
 {
   if (V < 0)
     return 0.0;
@@ -436,9 +420,7 @@ double V;
 /*     General purpose procedures for attribute range checking                */
 /*=============================================================================*/
 
-int AnaVrange(Inst, Attrnum)
-log_grec *Inst;
-long Attrnum;
+int AnaVrange(log_grec *Inst, long Attrnum)
 {
   int AnaResult;
 
@@ -452,10 +434,7 @@ long Attrnum;
 }
 
 
-int AnaCrange(Inst, Attrnum, OkZero)
-log_grec *Inst;
-long Attrnum;
-int OkZero;
+int AnaCrange(log_grec *Inst, long Attrnum, int OkZero)
 {
   int AnaResult;
 
@@ -473,9 +452,7 @@ int OkZero;
 }
 
 
-int AnaDisplayrange(Inst, Attrnum)
-log_grec *Inst;
-long Attrnum;
+int AnaDisplayrange(log_grec *Inst, long Attrnum)
 {
   int AnaResult;
 
@@ -488,8 +465,7 @@ long Attrnum;
 
 
 
-int AnaGate_On_Display(Inst)
-log_grec *Inst;
+int AnaGate_On_Display(log_grec *Inst)
 {
   int AnaResult;
   log_grec *GCount;
@@ -517,8 +493,7 @@ log_grec *Inst;
 /*        General purpose library to handle pin to ground capacitance          */
 /*=============================================================================*/
 
-void AnaCapInit(inst)
-log_grec *inst;
+void AnaCapInit(log_grec *inst)
 {
   Anainstlist *A_Gate;
   long Index, Numpins;
@@ -538,8 +513,7 @@ log_grec *inst;
 
 
 
-void AnaCapCopy(inst)
-log_grec *inst;
+void AnaCapCopy(log_grec *inst)
 {
   Anainstlist *A_Gate, *A_Oldgate;
   long Index, Numpins;
@@ -559,8 +533,7 @@ log_grec *inst;
 }
 
 
-void AnaCapDispose(inst)
-log_grec *inst;
+void AnaCapDispose(log_grec *inst)
 {
   Anainstlist *A_Gate;
 
@@ -569,8 +542,7 @@ log_grec *inst;
 }
 
 
-void AnaCapReset(inst)
-log_grec *inst;
+void AnaCapReset(log_grec *inst)
 {
   Anainstlist *A_Gate;
   long Index, Numpins;
@@ -585,8 +557,7 @@ log_grec *inst;
 }
 
 
-void AnaCappass1(inst)
-log_grec *inst;
+void AnaCappass1(log_grec *inst)
 {
   Anainstlist *A_Gate;
   long Index, Numpins;
@@ -606,8 +577,7 @@ log_grec *inst;
 }
 
 
-void AnaCappass2(inst)
-log_grec *inst;
+void AnaCappass2(log_grec *inst)
 {
   Anainstlist *A_Gate;
   long Index, Numpins;
@@ -634,8 +604,7 @@ log_grec *inst;
 }
 
 
-void AnaCapUpdate(inst)
-log_grec *inst;
+void AnaCapUpdate(log_grec *inst)
 {
   Anainstlist *A_Gate;
   long Index, Numpins;
@@ -650,8 +619,7 @@ log_grec *inst;
 }
 
 
-void AnaCapex(inst)
-log_grec *inst;
+void AnaCapex(log_grec *inst)
 {
   Anainstlist *A_Gate;
   long Index, Numpins;
@@ -680,8 +648,7 @@ log_grec *inst;
 }
 
 
-void AnaCapIin(act)
-Analog_32_action *act;
+void AnaCapIin(Analog_32_action *act)
 {
   Anainstlist *A_Gate;
   AnaExt_rec *Extnodeptr;
@@ -694,10 +661,7 @@ Analog_32_action *act;
 }
 
 
-void AnaCapattrload(base, inst, first)
-long base;
-log_grec *inst;
-int first;
+void AnaCapattrload(long base, log_grec *inst, int first)
 {
   Anainstlist *A_Gate;
   long Index, Address, Numpins;
@@ -728,9 +692,7 @@ int first;
 }
 
 
-void AnaCapattrwrite(base, inst)
-long base;
-log_grec *inst;
+void AnaCapattrwrite(long base, log_grec *inst)
 {
   Anainstlist *A_Gate;
   long Index, Numpins;
@@ -747,9 +709,7 @@ log_grec *inst;
 }
 
 
-void AnaCapattrread(base, inst)
-long base;
-log_grec *inst;
+void AnaCapattrread(long base, log_grec *inst)
 {
   Anainstlist *A_Gate;
   long Index, Numpins;
@@ -769,10 +729,7 @@ log_grec *inst;
 }
 
 
-static void NodevalSet(Setnode, Value, ResetVal)
-log_nrec *Setnode;
-double Value;
-int ResetVal;
+static void NodevalSet(log_nrec *Setnode, double Value, int ResetVal)
 {
   AnaCell_rec *A_Kind;
   Anainstlist *A_Gate;
@@ -818,10 +775,7 @@ int ResetVal;
 
 
 
-void AnaCapattrinsert(base, attrnum, inst, Ok)
-long base, attrnum;
-log_grec *inst;
-int *Ok;
+void AnaCapattrinsert(long base, long attrnum, log_grec *inst, int *Ok)
 {
   Anainstlist *A_Gate;
   long Nodenum, Param;
@@ -885,8 +839,7 @@ int *Ok;
 }
 
 
-static void Dataout(data)
-char *data;
+static void Dataout(char *data)
 {
   if (AnaLogglobals->traceflag)
     fputs(data, *AnaLogglobals->tracefile);
@@ -959,8 +912,7 @@ void AnaMatdump()
 }
 
 
-static void PrintResult(Rownum)
-long Rownum;
+static void PrintResult(long Rownum)
 {
   log_nrec *Ext_Count;
   AnaExt_rec *A_Node;
@@ -1136,7 +1088,3 @@ void AnaParamUpdate()
   AnaPFab.mu = AnaPFab.del_mu*AnaPFab.mu0*pow((AnaPhysical.T/300),-2.30);
 
 }
-
-
-
-
diff --git a/src/ana/hres.c b/src/ana/hres.c
index 4fcde0fb9dff36a49e6bbf2debb35e15f9c7ecd8..d014f9b0c217a757f7756cec6760750598fb562f 100644
--- a/src/ana/hres.c
+++ b/src/ana/hres.c
@@ -111,9 +111,7 @@ typedef enum {
 /****************************************************************************/
 
 
-static void Limitfill(Inst, Limitflag, Erase)
-log_grec *Inst;
-int Limitflag, Erase;
+static void Limitfill(log_grec *Inst, int Limitflag, int Erase)
 {
   short LLx, LLy, URx, URy;
 
@@ -140,8 +138,7 @@ int Limitflag, Erase;
 /*                   Cell Installation Procedures                           */
 /****************************************************************************/
 
-static void GetCnf_Hres(NewIC)
-ICHres *NewIC;
+static void GetCnf_Hres(ICHres *NewIC)
 {
   int Found;
   char Arg[256], Keyword[256];
@@ -263,8 +260,7 @@ ICHres *NewIC;
 }
 
 
-static void INITLIB_Hres(act)
-Analog_32_action *act;
+static void INITLIB_Hres(Analog_32_action *act)
 {
   AnaCell_rec *NewCell;
   ICHres *NewIC;
@@ -320,9 +316,7 @@ Analog_32_action *act;
       TimeTooSmall=1e-60;*/
 
 
-static int Hrescheck(Inst, Attrnum)
-log_grec *Inst;
-long Attrnum;
+static int Hrescheck(log_grec *Inst, long Attrnum)
 {
   int Result;
   HresConst *HresVar;
@@ -427,8 +421,7 @@ long Attrnum;
 }
 
 
-static void Attr_Hres(act)
-Analog_32_action *act;
+static void Attr_Hres(Analog_32_action *act)
 {
   long Attrnum;
 
@@ -445,8 +438,7 @@ Analog_32_action *act;
 }
 
 
-static void Newgate_Hres(act)
-Analog_32_action *act;
+static void Newgate_Hres(Analog_32_action *act)
 {
   HresConst *HresVar;
   Anainstlist *A_Gate;
@@ -523,8 +515,7 @@ Analog_32_action *act;
   WITH->attr[N_CapVdiff - 1].changed = true;
 }
 
-static void Copygate_Hres(act)
-Analog_32_action *act;
+static void Copygate_Hres(Analog_32_action *act)
 {
   HresConst *HresVar, *Old_Hresvar;
   Anainstlist *A_Gate, *A_Oldgate;
@@ -539,8 +530,7 @@ Analog_32_action *act;
 }
 
 
-static void Dispose_Hres(act)
-Analog_32_action *act;
+static void Dispose_Hres(Analog_32_action *act)
 {
   HresConst *HresVar;
   Anainstlist *A_Gate;
@@ -552,8 +542,7 @@ Analog_32_action *act;
 }
 
 
-static void Readgate_Hres(act)
-Analog_32_action *act;
+static void Readgate_Hres(Analog_32_action *act)
 {
   HresConst *HresVar;
   Anainstlist *A_Gate;
@@ -631,8 +620,7 @@ Analog_32_action *act;
 }
 
 
-static void Reset_Hres(act)
-Analog_32_action *act;
+static void Reset_Hres(Analog_32_action *act)
 {
   HresConst *HresVar;
   Anainstlist *A_Gate;
@@ -647,8 +635,7 @@ Analog_32_action *act;
     Limitfill(act->inst, HresVar->Limit, false);
 }
 
-static void PreUpdate_Hres(act)
-Analog_32_action *act;
+static void PreUpdate_Hres(Analog_32_action *act)
 {
   HresConst *HresVar;
   Anainstlist *A_Gate;
@@ -670,8 +657,7 @@ Analog_32_action *act;
 }
 
 
-static void Update_Hres(act)
-Analog_32_action *act;
+static void Update_Hres(Analog_32_action *act)
 {
   HresConst *HresVar;
   Anainstlist *A_Gate;
@@ -684,8 +670,7 @@ Analog_32_action *act;
 }
 
 
-static void Display_Hres(act)
-Analog_32_action *act;
+static void Display_Hres(Analog_32_action *act)
 {
   HresConst *HresVar;
   Anainstlist *A_Gate;
@@ -699,8 +684,7 @@ Analog_32_action *act;
 }
 
 
-static void Refresh_Hres(act)
-Analog_32_action *act;
+static void Refresh_Hres(Analog_32_action *act)
 {
   HresConst *HresVar;
   Anainstlist *A_Gate;
@@ -711,8 +695,7 @@ Analog_32_action *act;
 }
 
 
-static void Erase_Hres(act)
-Analog_32_action *act;
+static void Erase_Hres(Analog_32_action *act)
 {
   HresConst *HresVar;
   Anainstlist *A_Gate;
@@ -728,8 +711,7 @@ Analog_32_action *act;
 /****************************************************************************/
 
 
-static void Ex_Hres(act)
-Analog_32_action *act;
+static void Ex_Hres(Analog_32_action *act)
 {
   double MinIin, dIindVin, dIindVout, dIindVlow, dIindVhigh, MinIout,
 	 dIoutdVin, dIoutdVout, dIoutdVlow, dIoutdVhigh, MinIlow, dIlowdVin,
@@ -1070,8 +1052,7 @@ Analog_32_action *act;
 /****************************************************************************/
 
 
-static void Iin_Hres(act)
-Analog_32_action *act;
+static void Iin_Hres(Analog_32_action *act)
 {
   AnaExt_rec *PinInPtr;
   double VPinIn, VMemIn;
@@ -1234,8 +1215,7 @@ Analog_32_action *act;
 
 
 
-static void Probe_Hres(act)
-Analog_32_action *act;
+static void Probe_Hres(Analog_32_action *act)
 {
   Anainstlist *A_Gate;
   AnaExt_rec *NodeInPtr, *NodeOutPtr, *NodeHighPtr, *NodeLowPtr;
@@ -1307,8 +1287,7 @@ Analog_32_action *act;
 
 
 
-void Log_hres_initlib_32(act)
-Analog_32_action *act;
+void Log_hres_initlib_32(Analog_32_action *act)
 {
   /*Main Procedure*/
 
@@ -1413,9 +1392,3 @@ Analog_32_action *act;
 #undef H_Vlow
 #undef H_Vhigh
 #undef Gatename
-
-
-
-
-
-
diff --git a/src/ana/idiff.c b/src/ana/idiff.c
index 63fb83391a8e3f0fedb6eea24c3e5d0b0fe23016..11b48e48df78a763b291617c924b0b913b35307c 100644
--- a/src/ana/idiff.c
+++ b/src/ana/idiff.c
@@ -87,9 +87,7 @@ typedef struct ICIDiff {
 
 
 
-static void Switchfill(Inst, Erase)
-log_grec *Inst;
-int Erase;
+static void Switchfill(log_grec *Inst, int Erase)
 {
   short LLx, LLy, URx, URy;
 
@@ -112,9 +110,7 @@ int Erase;
   (*AnaLogglobals->hook.unhidecursor)();
 }
 
-static void Limitfill(Inst, Limitflag, Erase)
-log_grec *Inst;
-int Limitflag, Erase;
+static void Limitfill(log_grec *Inst, int Limitflag, int Erase)
 {
   short LLx, LLy, URx, URy;
 
@@ -137,10 +133,7 @@ int Limitflag, Erase;
   (*AnaLogglobals->hook.unhidecursor)();
 }
 
-static double Pulsemaker(Inst, Ftime, First)
-log_grec *Inst;
-double Ftime;
-int First;
+static double Pulsemaker(log_grec *Inst, double Ftime, int First)
 {
   double Result;
   int Found;
@@ -196,8 +189,7 @@ int First;
 /*            Procedure To Simulate Cell In Algorithm                        */
 /****************************************************************************/
 
-static void Ex_IDiff(act)
-Analog_32_action *act;
+static void Ex_IDiff(Analog_32_action *act)
 {
   	/*IDifferent*/
   	double MinI1, MinI2, dI1dV1, dI1dV2, dI2dV1, dI2dV2;
@@ -293,8 +285,7 @@ Analog_32_action *act;
 /****************************************************************************/
 
 
-static void Iin_IDiff(act)
-Analog_32_action *act;
+static void Iin_IDiff(Analog_32_action *act)
 {
   	/*IDifferent*/
   	AnaExt_rec *Pin1Ptr, *Pin2Ptr;
@@ -404,8 +395,7 @@ Analog_32_action *act;
 }  /*Iin_IDiff*/
 
 
-static void GetCnf_IDiff(NewIC)
-ICIDiff *NewIC;
+static void GetCnf_IDiff(ICIDiff *NewIC)
 {
   int Found;
   char Arg[256], Keyword[256];
@@ -555,8 +545,7 @@ ICIDiff *NewIC;
 /*                          Installation Procedure                           */
 /****************************************************************************/
 
-static void initlib_IDiff(act)
-Analog_32_action *act;
+static void initlib_IDiff(Analog_32_action *act)
 {
   /*IDifferent*/
   AnaCell_rec *NewCell;
@@ -597,9 +586,7 @@ Analog_32_action *act;
 
 
 
-static int IDiffcheck(Inst, Attrnum)
-log_grec *Inst;
-long Attrnum;
+static int IDiffcheck(log_grec *Inst, long Attrnum)
 {
   int Result;
 
@@ -699,8 +686,7 @@ long Attrnum;
 }
 
 
-static void Attr_IDiff(act)
-Analog_32_action *act;
+static void Attr_IDiff(Analog_32_action *act)
 {
   long Attrnum;
 
@@ -712,8 +698,7 @@ Analog_32_action *act;
 }
 
 
-static void Newgate_IDiff(act)
-Analog_32_action *act;
+static void Newgate_IDiff(Analog_32_action *act)
 {
   IDiffConst *IDiffVar;
   Anainstlist *A_Gate;
@@ -760,8 +745,7 @@ Analog_32_action *act;
   }
 }
 
-static void Copygate_IDiff(act)
-Analog_32_action *act;
+static void Copygate_IDiff(Analog_32_action *act)
 {
   IDiffConst *IDiffVar, *Old_IDiffvar;
   Anainstlist *A_Gate, *A_Oldgate;
@@ -776,8 +760,7 @@ Analog_32_action *act;
 }
 
 
-static void Dispose_IDiff(act)
-Analog_32_action *act;
+static void Dispose_IDiff(Analog_32_action *act)
 {
   IDiffConst *IDiffVar;
   Anainstlist *A_Gate;
@@ -788,8 +771,7 @@ Analog_32_action *act;
   AnaCapDispose(act->inst);   /*7*/
 }
 
-static void Readgate_IDiff(act)
-Analog_32_action *act;
+static void Readgate_IDiff(Analog_32_action *act)
 {
   IDiffConst *IDiffVar;
   Anainstlist *A_Gate;
@@ -816,8 +798,7 @@ Analog_32_action *act;
   IDiffVar->Reset_Freeze = (*STR1 == 'T' || *STR1 == 't');
 }
 
-static void Writegate_IDiff(act)
-Analog_32_action *act;
+static void Writegate_IDiff(Analog_32_action *act)
 {
   IDiffConst *IDiffVar;
   Anainstlist *A_Gate;
@@ -838,8 +819,7 @@ Analog_32_action *act;
 }
 
 
-static void Reset_IDiff(act)
-Analog_32_action *act;
+static void Reset_IDiff(Analog_32_action *act)
 {
   IDiffConst *IDiffVar;
   Anainstlist *A_Gate;
@@ -859,8 +839,7 @@ Analog_32_action *act;
   }
 }
 
-static void Set_Idiff(act)
-Analog_32_action *act;
+static void Set_Idiff(Analog_32_action *act)
 {
   IDiffConst *IdiffVar;
   Anainstlist *A_Gate;
@@ -872,8 +851,7 @@ Analog_32_action *act;
   IdiffVar->Reset_Freeze = act->inst->attr[N_Freeze - 1].UU.b;
 }
 
-static void Clear_Idiff(act)
-Analog_32_action *act;
+static void Clear_Idiff(Analog_32_action *act)
 {
   IDiffConst *IdiffVar;
   Anainstlist *A_Gate;
@@ -889,8 +867,7 @@ Analog_32_action *act;
   IdiffVar->Reset_Freeze = ICptr->ICFreeze;
 }
 
-static void PreUpdate_IDiff(act)
-Analog_32_action *act;
+static void PreUpdate_IDiff(Analog_32_action *act)
 {
   IDiffConst *IDiffVar;
   Anainstlist *A_Gate;
@@ -908,8 +885,7 @@ Analog_32_action *act;
   IDiffVar->NewLimit = (VPin2 - VPin1 + WITH->attr[N_Crowbar - 1].UU.r > -0.0004);
 }
 
-static void Update_IDiff(act)
-Analog_32_action *act;
+static void Update_IDiff(Analog_32_action *act)
 {
   IDiffConst *IDiffVar;
   Anainstlist *A_Gate;
@@ -925,8 +901,7 @@ Analog_32_action *act;
     IDiffVar->Time += AnaDtlast;
 }
 
-static void Display_IDiff(act)
-Analog_32_action *act;
+static void Display_IDiff(Analog_32_action *act)
 {
   IDiffConst *IDiffVar;
   Anainstlist *A_Gate;
@@ -955,8 +930,7 @@ Analog_32_action *act;
 }
 
 
-static void Touch_IDiff(act)
-Analog_32_action *act;
+static void Touch_IDiff(Analog_32_action *act)
 {
   log_action_t *WITH;
   log_grec *WITH1;
@@ -972,8 +946,7 @@ Analog_32_action *act;
 }
 
 
-static void Erase_Idiff(Inst)
-log_grec *Inst;
+static void Erase_Idiff(log_grec *Inst)
 {
   IDiffConst *IDiffVar;
   Anainstlist *A_Gate;
@@ -984,8 +957,7 @@ log_grec *Inst;
   Limitfill(Inst, IDiffVar->Limit, true);
 }
 
-static void Refresh_Idiff(Inst)
-log_grec *Inst;
+static void Refresh_Idiff(log_grec *Inst)
 {
   IDiffConst *IDiffVar;
   Anainstlist *A_Gate;
@@ -997,8 +969,7 @@ log_grec *Inst;
 }
 
 
-static void Probe_Idiff(act)
-Analog_32_action *act;
+static void Probe_Idiff(Analog_32_action *act)
 {
   Anainstlist *A_Gate;
   IDiffConst *IdiffVar;
@@ -1061,8 +1032,7 @@ Analog_32_action *act;
 /*=============================================================================*/
 
 
-void Log_idiff_initlib_32(act)
-Analog_32_action *act;
+void Log_idiff_initlib_32(Analog_32_action *act)
 {
   /*Main Procedure*/
 
@@ -1180,13 +1150,3 @@ Analog_32_action *act;
 #undef N_sDelay
 #undef Cstart
 #undef Gatename
-
-
-
-
-
-
-
-
-
-
diff --git a/src/ana/iscope.c b/src/ana/iscope.c
index 2e2901026220d257516f31bd76d8fd88bd35f1a8..58f63589745a8f2a159ad2d940069d8a2c95fca4 100644
--- a/src/ana/iscope.c
+++ b/src/ana/iscope.c
@@ -62,10 +62,7 @@ typedef struct Imeterrec {
 /*              Procedure to correctly position labels                        */
 
 
-static void Iscope_Locate(rot, Tx, Ty, Left)
-long rot;
-short *Tx, *Ty;
-int *Left;
+static void Iscope_Locate(long rot, short *Tx, short *Ty, int *Left)
 {
 
   /******************************************************************************/
@@ -102,8 +99,7 @@ int *Left;
 }
 
 
-static double Itot(act)
-Analog_32_action *act;
+static double Itot(Analog_32_action *act)
 {
   Imeterrec *Intptr;
   Anainstlist *A_Gate;
@@ -137,8 +133,7 @@ Analog_32_action *act;
 /*                Procedure to update cell in algorithm                        */
 /*******************************************************************************/
 
-static void PreUpdate_Iscope(act)
-Analog_32_action *act;
+static void PreUpdate_Iscope(Analog_32_action *act)
 {
   AnaExt_rec *A_Node;
   AnaCell_rec *Cellptr;
@@ -188,8 +183,7 @@ Analog_32_action *act;
 /*                Procedure to update cell in algorithm                        */
 /*******************************************************************************/
 
-static void Update_Iscope(act)
-Analog_32_action *act;
+static void Update_Iscope(Analog_32_action *act)
 {
   Imeterrec *Intptr;
   Anainstlist *A_Gate;
@@ -219,8 +213,7 @@ Analog_32_action *act;
 /*                Procedure to update cell in algorithm                        */
 /*******************************************************************************/
 
-static void Display_Iscope(act)
-Analog_32_action *act;
+static void Display_Iscope(Analog_32_action *act)
 {
   short tx, ty;
   int Left;
@@ -254,8 +247,7 @@ Analog_32_action *act;
 }  /*Update_Iscope*/
 
 
-static void Pass1_Iscope(act)
-Analog_32_action *act;
+static void Pass1_Iscope(Analog_32_action *act)
 {
   long Mx, My;
   Imeterrec *Intptr;
@@ -304,8 +296,7 @@ Analog_32_action *act;
 /*                Procedure to update cell in algorithm                        */
 /*******************************************************************************/
 
-static void Refresh_Iscope(act)
-Analog_32_action *act;
+static void Refresh_Iscope(Analog_32_action *act)
 {
   short tx, ty;
   int Left;
@@ -343,8 +334,7 @@ Analog_32_action *act;
 /*                Procedure to give current into cell                          */
 /*******************************************************************************/
 
-static void Iin_Iscope(act)
-Analog_32_action *act;
+static void Iin_Iscope(Analog_32_action *act)
 {
 //  log_grec *WITH;
 
@@ -355,8 +345,7 @@ Analog_32_action *act;
 /*                Procedure to update meter display                            */
 /*******************************************************************************/
 
-static void Erase_Iscope(act)
-Analog_32_action *act;
+static void Erase_Iscope(Analog_32_action *act)
 {
   short tx, ty;
   int Left;
@@ -389,8 +378,7 @@ Analog_32_action *act;
 }  /*Erase_Iscope*/
 
 
-static void GetCnf_Iscope(NewIC)
-ICIscope *NewIC;
+static void GetCnf_Iscope(ICIscope *NewIC)
 {
   int Found;
   char Arg[256], Keyword[256];
@@ -441,8 +429,7 @@ ICIscope *NewIC;
 /*******************************************************************************/
 
 
-static void INITLIB_ISCOPE(act)
-Analog_32_action *act;
+static void INITLIB_ISCOPE(Analog_32_action *act)
 {
   AnaCell_rec *NewCell;
   ICIscope *NewIC;
@@ -465,8 +452,7 @@ Analog_32_action *act;
 }  /*Iscope_initlib*/
 
 
-static void Attr_Iscope(act)
-Analog_32_action *act;
+static void Attr_Iscope(Analog_32_action *act)
 {
   long Attrnum;
   char Oldout[256], Newout[256];
@@ -529,8 +515,7 @@ Analog_32_action *act;
 /*                Procedure to reset cell in algorithm                       */
 /*******************************************************************************/
 
-static void Reset_Iscope(act)
-Analog_32_action *act;
+static void Reset_Iscope(Analog_32_action *act)
 {
   short tx, ty;
   char Oldout[256];
@@ -585,8 +570,7 @@ Analog_32_action *act;
 /*                Procedure to disconnect a Iscope                             */
 /*******************************************************************************/
 
-static void Disconnect_Iscope(act)
-Analog_32_action *act;
+static void Disconnect_Iscope(Analog_32_action *act)
 {
   short tx, ty;
   char Oldout[256];
@@ -629,8 +613,7 @@ Analog_32_action *act;
 
 
 
-static void Newgate_Iscope(act)
-Analog_32_action *act;
+static void Newgate_Iscope(Analog_32_action *act)
 {
   AnaCell_rec *Cellptr;
   ICIscope *ICptr;
@@ -659,8 +642,7 @@ Analog_32_action *act;
   A_Gate->InstVar = (void *)NewIV;
 }
 
-static void Copygate_Iscope(act)
-Analog_32_action *act;
+static void Copygate_Iscope(Analog_32_action *act)
 {
   AnaCell_rec *Cellptr;
   ICIscope *ICptr;
@@ -682,8 +664,7 @@ Analog_32_action *act;
 }
 
 
-static void Probe_Iscope(act)
-Analog_32_action *act;
+static void Probe_Iscope(Analog_32_action *act)
 {
   AnaScoreboard(Gatename, (long)AnaMessGate1);
 }
@@ -694,8 +675,7 @@ Analog_32_action *act;
 /*                  Cell Library Entry   Iscope                                */
 /*=============================================================================*/
 
-void Log_iscope_initlib_32(act)
-Analog_32_action *act;
+void Log_iscope_initlib_32(Analog_32_action *act)
 {
   /*Body of procedure*/
 
@@ -767,12 +747,3 @@ Analog_32_action *act;
 #undef N_Format
 #undef N_Prec
 #undef Gatename
-
-
-
-
-
-
-
-
-
diff --git a/src/ana/iswitch1.c b/src/ana/iswitch1.c
index 3b0d13985cbd4c5b7a1d79deb2c693bc75ef8ca0..4782d58615b0715641fc3aa94fbc96503884ec6e 100644
--- a/src/ana/iswitch1.c
+++ b/src/ana/iswitch1.c
@@ -80,9 +80,7 @@ typedef struct ICIswitch1 {
 
 
 
-static void Iswitch1fill(Inst, State, Erase)
-log_grec *Inst;
-int State, Erase;
+static void Iswitch1fill(log_grec *Inst, int State, int Erase)
 {
   short LLx, LLy, URx, URy;
 
@@ -105,9 +103,7 @@ int State, Erase;
   (*AnaLogglobals->hook.unhidecursor)();
 }
 
-static void Limitfill(Inst, Limitflag, Erase)
-log_grec *Inst;
-int Limitflag, Erase;
+static void Limitfill(log_grec *Inst, int Limitflag, int Erase)
 {
   short LLx, LLy, URx, URy;
 
@@ -131,11 +127,7 @@ int Limitflag, Erase;
 }
 
 
-static double Bistablemaker(Inst, time, State, Ex, OldIideal)
-log_grec *Inst;
-double time;
-int State, Ex;
-double OldIideal;
+static double Bistablemaker(log_grec *Inst, double time, int State, int Ex, double OldIideal)
 {
   double Newtime, Ratio;
 
@@ -161,11 +153,7 @@ double OldIideal;
 }
 
 
-static double Monostablemaker(Inst, time, State, Ex, OldIideal)
-log_grec *Inst;
-double time;
-int State, Ex;
-double OldIideal;
+static double Monostablemaker(log_grec *Inst, double time, int State, int Ex, double OldIideal)
 {
   double Newtime, Ratio;
 
@@ -201,8 +189,7 @@ double OldIideal;
 /*            Procedure To Simulate Cell In Algorithm                        */
 /****************************************************************************/
 
-static void Ex_Iswitch1(act)
-Analog_32_action *act;
+static void Ex_Iswitch1(Analog_32_action *act)
 {
   	double MinI1, dI1dV1;
   	AnaExt_rec *Pin1Ptr;
@@ -268,8 +255,7 @@ Analog_32_action *act;
 /****************************************************************************/
 
 
-static void Iin_Iswitch1(act)
-Analog_32_action *act;
+static void Iin_Iswitch1(Analog_32_action *act)
 {
   	AnaExt_rec *Pin1Ptr;
   	double VPin1;
@@ -320,8 +306,7 @@ Analog_32_action *act;
 }  /*Iin_Iswitch1*/
 
 
-static void GetCnf_Iswitch1(NewIC)
-ICIswitch1 *NewIC;
+static void GetCnf_Iswitch1 (ICIswitch1 *NewIC)
 {
   int Found;
   char Arg[256], Keyword[256];
@@ -432,8 +417,7 @@ ICIswitch1 *NewIC;
 /*                          Installation Procedure                           */
 /****************************************************************************/
 
-static void initlib_Iswitch1(act)
-Analog_32_action *act;
+static void initlib_Iswitch1(Analog_32_action *act)
 {
   AnaCell_rec *NewCell;
   ICIswitch1 *NewIC;
@@ -465,8 +449,7 @@ Analog_32_action *act;
 }  /*Iswitch1_Initlib*/
 
 
-static void ResetInit_Iswitch1(act)
-Analog_32_action *act;
+static void ResetInit_Iswitch1(Analog_32_action *act)
 {
   Iswitch1Const *Iswitch1Var;
   Anainstlist *A_Gate;
@@ -491,10 +474,7 @@ Analog_32_action *act;
 }
 
 
-static int Iswitch1check(Inst, Attrnum, act)
-log_grec *Inst;
-long Attrnum;
-Analog_32_action *act;
+static int Iswitch1check(log_grec *Inst, long Attrnum, Analog_32_action *act)
 {
   int Result;
   Iswitch1Const *Iswitch1Var;
@@ -560,8 +540,7 @@ Analog_32_action *act;
 }
 
 
-static void Attr_Iswitch1(act)
-Analog_32_action *act;
+static void Attr_Iswitch1(Analog_32_action *act)
 {
   long Attrnum;
 
@@ -573,8 +552,7 @@ Analog_32_action *act;
 }
 
 
-static void Newgate_Iswitch1(act)
-Analog_32_action *act;
+static void Newgate_Iswitch1(Analog_32_action *act)
 {
   Iswitch1Const *Iswitch1Var;
   Anainstlist *A_Gate;
@@ -616,8 +594,7 @@ Analog_32_action *act;
   }
 }
 
-static void Copygate_Iswitch1(act)
-Analog_32_action *act;
+static void Copygate_Iswitch1(Analog_32_action *act)
 {
   Iswitch1Const *Iswitch1Var, *Old_Iswitch1var;
   Anainstlist *A_Gate, *A_Oldgate;
@@ -632,8 +609,7 @@ Analog_32_action *act;
 }
 
 
-static void Dispose_Iswitch1(act)
-Analog_32_action *act;
+static void Dispose_Iswitch1(Analog_32_action *act)
 {
   Iswitch1Const *Iswitch1Var;
   Anainstlist *A_Gate;
@@ -644,8 +620,7 @@ Analog_32_action *act;
   AnaCapDispose(act->inst);   /*7*/
 }
 
-static void Readgate_Iswitch1(act)
-Analog_32_action *act;
+static void Readgate_Iswitch1(Analog_32_action *act)
 {
   Iswitch1Const *Iswitch1Var;
   Anainstlist *A_Gate;
@@ -676,8 +651,7 @@ Analog_32_action *act;
   Iswitch1Var->Iideal = Iswitch1Var->OldIideal;
 }
 
-static void Writegate_Iswitch1(act)
-Analog_32_action *act;
+static void Writegate_Iswitch1(Analog_32_action *act)
 {
   Iswitch1Const *Iswitch1Var;
   Anainstlist *A_Gate;
@@ -698,8 +672,7 @@ Analog_32_action *act;
 }
 
 
-static void Reset_Iswitch1(act)
-Analog_32_action *act;
+static void Reset_Iswitch1(Analog_32_action *act)
 {
   Iswitch1Const *Iswitch1Var;
   Anainstlist *A_Gate;
@@ -720,8 +693,7 @@ Analog_32_action *act;
   }
 }
 
-static void Set_Iswitch1(act)
-Analog_32_action *act;
+static void Set_Iswitch1(Analog_32_action *act)
 {
   Iswitch1Const *Iswitch1Var;
   Anainstlist *A_Gate;
@@ -734,8 +706,7 @@ Analog_32_action *act;
 }
 
 
-static void PreUpdate_Iswitch1(act)
-Analog_32_action *act;
+static void PreUpdate_Iswitch1(Analog_32_action *act)
 {
   Iswitch1Const *Iswitch1Var;
   Anainstlist *A_Gate;
@@ -761,8 +732,7 @@ Analog_32_action *act;
 }
 
 
-static void Update_Iswitch1(act)
-Analog_32_action *act;
+static void Update_Iswitch1(Analog_32_action *act)
 {
   Iswitch1Const *Iswitch1Var;
   Anainstlist *A_Gate;
@@ -780,8 +750,7 @@ Analog_32_action *act;
 }
 
 
-static void Display_Iswitch1(act)
-Analog_32_action *act;
+static void Display_Iswitch1(Analog_32_action *act)
 {
   Iswitch1Const *Iswitch1Var;
   Anainstlist *A_Gate;
@@ -801,8 +770,7 @@ Analog_32_action *act;
 }
 
 
-static void Touch_Iswitch1(act)
-Analog_32_action *act;
+static void Touch_Iswitch1(Analog_32_action *act)
 {
   Iswitch1Const *Iswitch1Var;
   Anainstlist *A_Gate;
@@ -832,8 +800,7 @@ Analog_32_action *act;
 }
 
 
-static void Refresh_Iswitch1(act)
-Analog_32_action *act;
+static void Refresh_Iswitch1(Analog_32_action *act)
 {
   Iswitch1Const *Iswitch1Var;
   Anainstlist *A_Gate;
@@ -844,8 +811,7 @@ Analog_32_action *act;
   Limitfill(act->inst, Iswitch1Var->Limit, false);
 }
 
-static void Erase_Iswitch1(act)
-Analog_32_action *act;
+static void Erase_Iswitch1(Analog_32_action *act)
 {
   Iswitch1Const *Iswitch1Var;
   Anainstlist *A_Gate;
@@ -856,8 +822,7 @@ Analog_32_action *act;
   Limitfill(act->inst, Iswitch1Var->Limit, true);
 }
 
-static void Probe_Iswitch1(act)
-Analog_32_action *act;
+static void Probe_Iswitch1(Analog_32_action *act)
 {
   Anainstlist *A_Gate;
   Iswitch1Const *Iswitch1Var;
@@ -906,8 +871,7 @@ Analog_32_action *act;
 /*=============================================================================*/
 
 
-void Log_iswitch1_initlib_32(act)
-Analog_32_action *act;
+void Log_iswitch1_initlib_32(Analog_32_action *act)
 {
   /*Main Procedure*/
 
@@ -1024,13 +988,3 @@ Analog_32_action *act;
 #undef Off
 #undef On
 #undef GateName
-
-
-
-
-
-
-
-
-
-
diff --git a/src/ana/iswitch2.c b/src/ana/iswitch2.c
index 97d55d386335929ea2ac9a389cdfd241e0ac97a3..a4c864865e2269c00630ffa63f417e72893c88a4 100644
--- a/src/ana/iswitch2.c
+++ b/src/ana/iswitch2.c
@@ -80,9 +80,7 @@ typedef struct ICIswitch2 {
 } ICIswitch2;
 
 
-static void Iswitch2fill(Inst, State, Erase)
-log_grec *Inst;
-int State, Erase;
+static void Iswitch2fill(log_grec *Inst, int State, int Erase)
 {
   short LLx, LLy, URx, URy;
 
@@ -105,9 +103,7 @@ int State, Erase;
   (*AnaLogglobals->hook.unhidecursor)();
 }
 
-static void Limitfill(Inst, Limitflag, Erase)
-log_grec *Inst;
-int Limitflag, Erase;
+static void Limitfill(log_grec *Inst, int Limitflag, int Erase)
 {
   short LLx, LLy, URx, URy;
 
@@ -131,11 +127,7 @@ int Limitflag, Erase;
 }
 
 
-static double Bistablemaker(Inst, time, State, Ex, OldIideal)
-log_grec *Inst;
-double time;
-int State, Ex;
-double OldIideal;
+static double Bistablemaker(log_grec *Inst, double time, int State, int Ex, double OldIideal)
 {
   double Newtime, Ratio;
 
@@ -162,11 +154,7 @@ double OldIideal;
 
 
 
-static double Monostablemaker(Inst, time, State, Ex, OldIideal)
-log_grec *Inst;
-double time;
-int State, Ex;
-double OldIideal;
+static double Monostablemaker(log_grec *Inst, double time, int State, int Ex, double OldIideal)
 {
   double Newtime, Ratio;
 
@@ -202,8 +190,7 @@ double OldIideal;
 /*            Procedure To Simulate Cell In Algorithm                        */
 /****************************************************************************/
 
-static void Ex_Iswitch2(act)
-Analog_32_action *act;
+static void Ex_Iswitch2(Analog_32_action *act)
 {
   	double MinI1, dI1dV1;
   	AnaExt_rec *Pin1Ptr;
@@ -269,8 +256,7 @@ Analog_32_action *act;
 /****************************************************************************/
 
 
-static void Iin_Iswitch2(act)
-Analog_32_action *act;
+static void Iin_Iswitch2(Analog_32_action *act)
 {
   	AnaExt_rec *Pin1Ptr;
   	double VPin1;
@@ -321,8 +307,7 @@ Analog_32_action *act;
   	}
 }  /*Iin_Iswitch2*/
 
-static void GetCnf_Iswitch2(NewIC)
-ICIswitch2 *NewIC;
+static void GetCnf_Iswitch2(ICIswitch2 *NewIC)
 {
   int Found;
   char Arg[256], Keyword[256];
@@ -433,8 +418,7 @@ ICIswitch2 *NewIC;
 /*                          Installation Procedure                           */
 /****************************************************************************/
 
-static void initlib_Iswitch2(act)
-Analog_32_action *act;
+static void initlib_Iswitch2(Analog_32_action *act)
 {
   AnaCell_rec *NewCell;
   ICIswitch2 *NewIC;
@@ -467,8 +451,7 @@ Analog_32_action *act;
 
 
 
-static void ResetInit_Iswitch2(act)
-Analog_32_action *act;
+static void ResetInit_Iswitch2(Analog_32_action *act)
 {
   Iswitch2Const *Iswitch2Var;
   Anainstlist *A_Gate;
@@ -493,10 +476,7 @@ Analog_32_action *act;
 }
 
 
-static int Iswitch2check(Inst, Attrnum, act)
-log_grec *Inst;
-long Attrnum;
-Analog_32_action *act;
+static int Iswitch2check(log_grec *Inst, long Attrnum, Analog_32_action *act)
 {
   int Result;
   Iswitch2Const *Iswitch2Var;
@@ -562,8 +542,7 @@ Analog_32_action *act;
 }
 
 
-static void Attr_Iswitch2(act)
-Analog_32_action *act;
+static void Attr_Iswitch2(Analog_32_action *act)
 {
   long Attrnum;
 
@@ -575,8 +554,7 @@ Analog_32_action *act;
 }
 
 
-static void Newgate_Iswitch2(act)
-Analog_32_action *act;
+static void Newgate_Iswitch2(Analog_32_action *act)
 {
   Iswitch2Const *Iswitch2Var;
   Anainstlist *A_Gate;
@@ -618,8 +596,7 @@ Analog_32_action *act;
   }
 }
 
-static void Copygate_Iswitch2(act)
-Analog_32_action *act;
+static void Copygate_Iswitch2(Analog_32_action *act)
 {
   Iswitch2Const *Iswitch2Var, *Old_Iswitch2var;
   Anainstlist *A_Gate, *A_Oldgate;
@@ -634,8 +611,7 @@ Analog_32_action *act;
 }
 
 
-static void Dispose_Iswitch2(act)
-Analog_32_action *act;
+static void Dispose_Iswitch2(Analog_32_action *act)
 {
   Iswitch2Const *Iswitch2Var;
   Anainstlist *A_Gate;
@@ -646,8 +622,7 @@ Analog_32_action *act;
   AnaCapDispose(act->inst);   /*7*/
 }
 
-static void Readgate_Iswitch2(act)
-Analog_32_action *act;
+static void Readgate_Iswitch2(Analog_32_action *act)
 {
   Iswitch2Const *Iswitch2Var;
   Anainstlist *A_Gate;
@@ -678,8 +653,7 @@ Analog_32_action *act;
   Iswitch2Var->Iideal = Iswitch2Var->OldIideal;
 }
 
-static void Writegate_Iswitch2(act)
-Analog_32_action *act;
+static void Writegate_Iswitch2(Analog_32_action *act)
 {
   Iswitch2Const *Iswitch2Var;
   Anainstlist *A_Gate;
@@ -700,8 +674,7 @@ Analog_32_action *act;
 }
 
 
-static void Reset_Iswitch2(act)
-Analog_32_action *act;
+static void Reset_Iswitch2(Analog_32_action *act)
 {
   Iswitch2Const *Iswitch2Var;
   Anainstlist *A_Gate;
@@ -722,8 +695,7 @@ Analog_32_action *act;
   }
 }
 
-static void Set_Iswitch2(act)
-Analog_32_action *act;
+static void Set_Iswitch2(Analog_32_action *act)
 {
   Iswitch2Const *Iswitch2Var;
   Anainstlist *A_Gate;
@@ -735,8 +707,7 @@ Analog_32_action *act;
   Iswitch2Var->Reset_Time = Iswitch2Var->Time - AnaAccum;
 }
 
-static void PreUpdate_Iswitch2(act)
-Analog_32_action *act;
+static void PreUpdate_Iswitch2(Analog_32_action *act)
 {
   Iswitch2Const *Iswitch2Var;
   Anainstlist *A_Gate;
@@ -761,8 +732,7 @@ Analog_32_action *act;
 }
 
 
-static void Update_Iswitch2(act)
-Analog_32_action *act;
+static void Update_Iswitch2(Analog_32_action *act)
 {
   Iswitch2Const *Iswitch2Var;
   Anainstlist *A_Gate;
@@ -780,8 +750,7 @@ Analog_32_action *act;
 }
 
 
-static void Display_Iswitch2(act)
-Analog_32_action *act;
+static void Display_Iswitch2(Analog_32_action *act)
 {
   Iswitch2Const *Iswitch2Var;
   Anainstlist *A_Gate;
@@ -801,8 +770,7 @@ Analog_32_action *act;
 }
 
 
-static void Touch_Iswitch2(act)
-Analog_32_action *act;
+static void Touch_Iswitch2(Analog_32_action *act)
 {
   Iswitch2Const *Iswitch2Var;
   Anainstlist *A_Gate;
@@ -831,8 +799,7 @@ Analog_32_action *act;
   AnaChanged = true;
 }
 
-static void Refresh_Iswitch2(act)
-Analog_32_action *act;
+static void Refresh_Iswitch2(Analog_32_action *act)
 {
   Iswitch2Const *Iswitch2Var;
   Anainstlist *A_Gate;
@@ -843,8 +810,7 @@ Analog_32_action *act;
   Limitfill(act->inst, Iswitch2Var->Limit, false);
 }
 
-static void Erase_Iswitch2(act)
-Analog_32_action *act;
+static void Erase_Iswitch2(Analog_32_action *act)
 {
   Iswitch2Const *Iswitch2Var;
   Anainstlist *A_Gate;
@@ -856,8 +822,7 @@ Analog_32_action *act;
 }
 
 
-static void Probe_Iswitch2(act)
-Analog_32_action *act;
+static void Probe_Iswitch2(Analog_32_action *act)
 {
   Anainstlist *A_Gate;
   Iswitch2Const *Iswitch2Var;
@@ -906,8 +871,7 @@ Analog_32_action *act;
 /*=============================================================================*/
 
 
-void Log_iswitch2_initlib_32(act)
-Analog_32_action *act;
+void Log_iswitch2_initlib_32(Analog_32_action *act)
 {
   /*Main Procedure*/
 
@@ -1025,13 +989,3 @@ Analog_32_action *act;
 #undef Off
 #undef On
 #undef GateName
-
-
-
-
-
-
-
-
-
-
diff --git a/src/ana/main.c b/src/ana/main.c
index 96a2db3727c0a9c768484c62e073840405b33891..54e821a875ac66c019453ffc375b5694c8437e73 100644
--- a/src/ana/main.c
+++ b/src/ana/main.c
@@ -27,10 +27,11 @@ the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
 /*Version 1.5  Modular*/
 
 
-#include <utils/p2c.h>
+#include "utils/p2c.h"
 #include "ana/nsolver.h"
 #include "ana/main.h"
 #include "node.h"
+#include "logstuff.h"
 
 static void Update ();
 
@@ -1410,8 +1411,7 @@ void Analog_Refresh()
 /*         Procedure To Find A New Kind of Gate In  Symbol Table                */
 /*==============================================================================*/
 
-void Analog_Newkind(newkindptr)
-log_krec *newkindptr;
+void Analog_Newkind(log_krec *newkindptr)
 {
   char Procname[256];
   long Index;
@@ -1732,8 +1732,7 @@ static void Analog_Syntax_Check(int *Ok, long *Totnodes)
 /********************************************************************************/
 /*  Procedure To Allocate Internal Node List - Updates Totnodes Appropiately    */
 
-static void Internal_Number(Totnodes)
-long *Totnodes;
+static void Internal_Number(long *Totnodes)
 {
 
   /********************************************************************************/
@@ -1752,8 +1751,7 @@ long *Totnodes;
 /********************************************************************************/
 /* Procedure To Allocate The correct sized array For Simulation                 */
 
-static void Analog_Allocate(Totnodes)
-long Totnodes;
+static void Analog_Allocate(long Totnodes)
 {
 
   /********************************************************************************/
@@ -2672,9 +2670,3 @@ void Analog_Simulate()
   else
     Update();
 }
-
-
-
-
-
-
diff --git a/src/ana/mmeter.c b/src/ana/mmeter.c
index e6b4ce274c50a8415ecdf5551b94944aed1976f1..e3a5ced9e0348bcad5c9e5538c5dbb81660e4187 100644
--- a/src/ana/mmeter.c
+++ b/src/ana/mmeter.c
@@ -64,10 +64,7 @@ typedef struct Imeterrec {
 /*              Procedure to correctly position labels                        */
 
 
-static void Mmeter_Locate(rot, Tx, Ty, Left)
-long rot;
-short *Tx, *Ty;
-int *Left;
+static void Mmeter_Locate(long rot, short *Tx, short *Ty, int *Left)
 {
 
   /******************************************************************************/
@@ -104,8 +101,7 @@ int *Left;
 }
 
 
-static double Itot(act)
-Analog_32_action *act;
+static double Itot(Analog_32_action *act)
 {
   Imeterrec *Intptr;
   Anainstlist *A_Gate;
@@ -139,8 +135,7 @@ Analog_32_action *act;
 /*                Procedure to update cell in algorithm                        */
 /*******************************************************************************/
 
-static void PreUpdate_Mmeter(act)
-Analog_32_action *act;
+static void PreUpdate_Mmeter(Analog_32_action *act)
 {
   AnaExt_rec *A_Node;
   AnaCell_rec *Cellptr;
@@ -204,8 +199,7 @@ Analog_32_action *act;
 /*                Procedure to update cell in algorithm                        */
 /*******************************************************************************/
 
-static void Update_Mmeter(act)
-Analog_32_action *act;
+static void Update_Mmeter(Analog_32_action *act)
 {
   Imeterrec *Intptr;
   Anainstlist *A_Gate;
@@ -235,8 +229,7 @@ Analog_32_action *act;
 /*                Procedure to update cell in algorithm                        */
 /*******************************************************************************/
 
-static void Display_Mmeter(act)
-Analog_32_action *act;
+static void Display_Mmeter(Analog_32_action *act)
 {
   short tx, ty;
   int Left;
@@ -274,8 +267,7 @@ Analog_32_action *act;
 
 
 
-static void Pass1_Mmeter(act)
-Analog_32_action *act;
+static void Pass1_Mmeter(Analog_32_action *act)
 {
   long Mx, My;
   Imeterrec *Intptr;
@@ -323,8 +315,7 @@ Analog_32_action *act;
 /*                Procedure to update cell in algorithm                        */
 /*******************************************************************************/
 
-static void Refresh_Mmeter(act)
-Analog_32_action *act;
+static void Refresh_Mmeter(Analog_32_action *act)
 {
   short tx, ty;
   int Left;
@@ -365,8 +356,7 @@ Analog_32_action *act;
 /*                Procedure to give current into cell                          */
 /*******************************************************************************/
 
-static void Iin_Mmeter(act)
-Analog_32_action *act;
+static void Iin_Mmeter(Analog_32_action *act)
 {
 //  log_grec *WITH;
 
@@ -377,8 +367,7 @@ Analog_32_action *act;
 /*                Procedure to update meter display                            */
 /*******************************************************************************/
 
-static void Erase_Mmeter(act)
-Analog_32_action *act;
+static void Erase_Mmeter(Analog_32_action *act)
 {
   short tx, ty;
   int Left;
@@ -411,8 +400,7 @@ Analog_32_action *act;
 }  /*Erase_Mmeter*/
 
 
-static void GetCnf_Mmeter(NewIC)
-ICMmeter *NewIC;
+static void GetCnf_Mmeter(ICMmeter *NewIC)
 {
   int Found;
   char Arg[256], Keyword[256];
@@ -463,8 +451,7 @@ ICMmeter *NewIC;
 /*******************************************************************************/
 
 
-static void INITLIB_Mmeter(act)
-Analog_32_action *act;
+static void INITLIB_Mmeter(Analog_32_action *act)
 {
   AnaCell_rec *NewCell;
   ICMmeter *NewIC;
@@ -487,8 +474,7 @@ Analog_32_action *act;
 }  /*Mmeter_initlib*/
 
 
-static void Attr_Mmeter(act)
-Analog_32_action *act;
+static void Attr_Mmeter(Analog_32_action *act)
 {
   long Attrnum;
   char Oldout[256], Newout[256];
@@ -600,8 +586,7 @@ Analog_32_action *act;
 /*                Procedure to reset cell in algorithm                       */
 /*******************************************************************************/
 
-static void Reset_Mmeter(act)
-Analog_32_action *act;
+static void Reset_Mmeter(Analog_32_action *act)
 {
   short tx, ty;
   char Oldout[256];
@@ -659,8 +644,7 @@ Analog_32_action *act;
 /*                Procedure to disconnect a Mmeter                             */
 /*******************************************************************************/
 
-static void Disconnect_Mmeter(act)
-Analog_32_action *act;
+static void Disconnect_Mmeter(Analog_32_action *act)
 {
   short tx, ty;
   char Oldout[256];
@@ -703,8 +687,7 @@ Analog_32_action *act;
 
 
 
-static void Newgate_Mmeter(act)
-Analog_32_action *act;
+static void Newgate_Mmeter(Analog_32_action *act)
 {
   AnaCell_rec *Cellptr;
   ICMmeter *ICptr;
@@ -736,8 +719,7 @@ Analog_32_action *act;
   A_Gate->InstVar = (void *)NewIV;
 }
 
-static void Copygate_Mmeter(act)
-Analog_32_action *act;
+static void Copygate_Mmeter(Analog_32_action *act)
 {
   AnaCell_rec *Cellptr;
   ICMmeter *ICptr;
@@ -759,8 +741,7 @@ Analog_32_action *act;
 }
 
 
-static void Probe_Mmeter(act)
-Analog_32_action *act;
+static void Probe_Mmeter(Analog_32_action *act)
 {
   AnaScoreboard(Gatename, (long)AnaMessGate1);
 }
@@ -771,8 +752,7 @@ Analog_32_action *act;
 /*                  Cell Library Entry   Mmeter                                */
 /*=============================================================================*/
 
-void Log_mmeter_initlib_32(act)
-Analog_32_action *act;
+void Log_mmeter_initlib_32(Analog_32_action *act)
 {
   /*Body of procedure*/
 
@@ -847,8 +827,3 @@ Analog_32_action *act;
 #undef Vdisplay
 #undef Idisplay
 #undef Gatename
-
-
-
-
-
diff --git a/src/ana/moscap.c b/src/ana/moscap.c
index 972bf48f510fede6caa6e369b85613aa2d1cf429..2accdbfedf83a235ac75785e07d2c305c6c46699 100644
--- a/src/ana/moscap.c
+++ b/src/ana/moscap.c
@@ -62,8 +62,7 @@ typedef struct ICMoscap {
 /****************************************************************************/
 
 
-static void Ex_Moscap(act)
-Analog_32_action *act;
+static void Ex_Moscap(Analog_32_action *act)
 {
   double MinI1, dI1dV1;
   AnaExt_rec *Pin1Ptr;
@@ -125,8 +124,7 @@ Analog_32_action *act;
 /****************************************************************************/
 
 
-static void Iin_Moscap(act)
-Analog_32_action *act;
+static void Iin_Moscap(Analog_32_action *act)
 {
   AnaExt_rec *Pin1Ptr;
   double VPin1, VMem1;
@@ -166,8 +164,7 @@ Analog_32_action *act;
 }  /*Iin_Moscap*/
 
 
-static void GetCnf_Moscap(NewIC)
-ICMoscap *NewIC;
+static void GetCnf_Moscap(ICMoscap *NewIC)
 {
   int Found;
   char Arg[256], Keyword[256];
@@ -227,8 +224,7 @@ ICMoscap *NewIC;
 /*                          Installation Procedure                           */
 /****************************************************************************/
 
-static void initlib_Moscap(act)
-Analog_32_action *act;
+static void initlib_Moscap(Analog_32_action *act)
 {
   AnaCell_rec *NewCell;
   ICMoscap *NewIC;
@@ -270,9 +266,7 @@ Analog_32_action *act;
 
 
 
-static int Moscapcheck(Inst, Attrnum)
-log_grec *Inst;
-long Attrnum;
+static int Moscapcheck(log_grec *Inst, long Attrnum)
 {
   int Result;
   MoscapConst *MoscapVar;
@@ -329,8 +323,7 @@ long Attrnum;
 }
 
 
-static void Attr_Moscap(act)
-Analog_32_action *act;
+static void Attr_Moscap(Analog_32_action *act)
 {
   long Attrnum;
 
@@ -342,8 +335,7 @@ Analog_32_action *act;
 }
 
 
-static void Newgate_Moscap(act)
-Analog_32_action *act;
+static void Newgate_Moscap(Analog_32_action *act)
 {
   MoscapConst *MoscapVar;
   Anainstlist *A_Gate;
@@ -380,8 +372,7 @@ Analog_32_action *act;
   WITH->attr[N_Ktqn - 1].changed = true;
 }
 
-static void Copygate_Moscap(act)
-Analog_32_action *act;
+static void Copygate_Moscap(Analog_32_action *act)
 {
   MoscapConst *MoscapVar, *Old_Moscapvar;
   Anainstlist *A_Gate, *A_Oldgate;
@@ -395,8 +386,7 @@ Analog_32_action *act;
   AnaCapCopy(act->inst);   /*Initialize attributes 1 to 3*#*/
 }
 
-static void Dispose_Moscap(act)
-Analog_32_action *act;
+static void Dispose_Moscap(Analog_32_action *act)
 {
   MoscapConst *MoscapVar;
   Anainstlist *A_Gate;
@@ -407,8 +397,7 @@ Analog_32_action *act;
   AnaCapDispose(act->inst);   /*7*/
 }
 
-static void Readgate_Moscap(act)
-Analog_32_action *act;
+static void Readgate_Moscap(Analog_32_action *act)
 {
   MoscapConst *MoscapVar;
   Anainstlist *A_Gate;
@@ -447,8 +436,7 @@ Analog_32_action *act;
   MoscapVar->Kn2 = 1 / WITH->attr[N_Ktqn - 1].UU.r;
 }
 
-static void Probe_MosCap(act)
-Analog_32_action *act;
+static void Probe_MosCap(Analog_32_action *act)
 {
   Anainstlist *A_Gate;
   AnaExt_rec *Node1Ptr;
@@ -500,8 +488,7 @@ Analog_32_action *act;
 /*==========================================================================*/
 
 
-void Log_moscap_initlib_32(act)
-Analog_32_action *act;
+void Log_moscap_initlib_32(Analog_32_action *act)
 {
   /*Main Procedure*/
 
diff --git a/src/ana/nfet4.c b/src/ana/nfet4.c
index 1bcc6aa8c845aba92c082a1fea22dc34dda0797f..23494ef05cad7f3867f4e7fe19437d6c63efce38 100644
--- a/src/ana/nfet4.c
+++ b/src/ana/nfet4.c
@@ -69,8 +69,7 @@ typedef struct ICNfet {
 /****************************************************************************/
 
 
-static void Ex_NFET4(act)
-Analog_32_action *act;
+static void Ex_NFET4(Analog_32_action *act)
 {
   double MinI2, dI2dV1, dI2dV2, dI2dV3, MinI3, dI3dV1, dI3dV2, dI3dV3, MinI1,
 	 dI1dV1, dI1dV2, dI1dV3;
@@ -331,8 +330,7 @@ Analog_32_action *act;
 /*          Procedure To Supply Current  Out of a Cell To Current Meters    */
 /****************************************************************************/
 
-static void Iin_NFET4(act)
-Analog_32_action *act;
+static void Iin_NFET4(Analog_32_action *act)
 {
   AnaExt_rec *Pin1Ptr, *Pin2Ptr, *Pin3Ptr;
   double VPin1, VPin2, VPin3, VMem1, VMem2, VMem3;
@@ -456,8 +454,7 @@ Analog_32_action *act;
 }  /*Iin_NFET4*/
 
 
-static void GetCnf_Nfet4(NewIC)
-ICNfet *NewIC;
+static void GetCnf_Nfet4(ICNfet *NewIC)
 {
   int Found;
   char Arg[256], Keyword[256];
@@ -554,8 +551,7 @@ ICNfet *NewIC;
 /*                          Installation Procedure                           */
 /****************************************************************************/
 
-static void initlib_NFET4(act)
-Analog_32_action *act;
+static void initlib_NFET4(Analog_32_action *act)
 {
   AnaCell_rec *NewCell;
   ICNfet *NewIC;
@@ -591,9 +587,7 @@ Analog_32_action *act;
 
 
 
-static int Nfetcheck(Inst, Attrnum)
-log_grec *Inst;
-long Attrnum;
+static int Nfetcheck(log_grec *Inst, long Attrnum)
 {
   int Result;
   NfetConst *NfetVar;
@@ -682,8 +676,7 @@ long Attrnum;
 }
 
 
-static void Attr_Nfet4(act)
-Analog_32_action *act;
+static void Attr_Nfet4(Analog_32_action *act)
 {
   long Attrnum;
 
@@ -700,8 +693,7 @@ Analog_32_action *act;
 }
 
 
-static void Newgate_Nfet4(act)
-Analog_32_action *act;
+static void Newgate_Nfet4(Analog_32_action *act)
 {
   NfetConst *NfetVar;
   Anainstlist *A_Gate;
@@ -761,8 +753,7 @@ Analog_32_action *act;
   WITH->attr[N_Early - 1].changed = true;
 }
 
-static void Copygate_Nfet4(act)
-Analog_32_action *act;
+static void Copygate_Nfet4(Analog_32_action *act)
 {
   NfetConst *NfetVar, *Old_Nfetvar;
   Anainstlist *A_Gate, *A_Oldgate;
@@ -776,8 +767,7 @@ Analog_32_action *act;
   AnaCapCopy(act->inst);   /*6*/
 }
 
-static void Dispose_Nfet4(act)
-Analog_32_action *act;
+static void Dispose_Nfet4(Analog_32_action *act)
 {
   NfetConst *NfetVar;
   Anainstlist *A_Gate;
@@ -788,8 +778,7 @@ Analog_32_action *act;
   AnaCapDispose(act->inst);   /*7*/
 }
 
-static void Readgate_Nfet4(act)
-Analog_32_action *act;
+static void Readgate_Nfet4(Analog_32_action *act)
 {
   NfetConst *NfetVar;
   Anainstlist *A_Gate;
@@ -850,8 +839,7 @@ Analog_32_action *act;
   NfetVar->TauCgs = 0.0;
 }
 
-static void Probe_Nfet4(act)
-Analog_32_action *act;
+static void Probe_Nfet4(Analog_32_action *act)
 {
   Anainstlist *A_Gate;
   AnaExt_rec *Node1Ptr, *Node2Ptr, *Node3Ptr;
@@ -926,8 +914,7 @@ Analog_32_action *act;
 /*==========================================================================*/
 
 
-void Log_nfet4_initlib_32(act)
-Analog_32_action *act;
+void Log_nfet4_initlib_32(Analog_32_action *act)
 {
   /*Main Procedure*/
 
@@ -1009,8 +996,3 @@ Analog_32_action *act;
 #undef N_Ktqn
 #undef N_Early
 #undef Gatename
-
-
-
-
-
diff --git a/src/ana/nfet5.c b/src/ana/nfet5.c
index ec5b0ee68b5539f219d5af3cd851b376cc14fb27..82cb430961e19adfe0f733982d7c8de1d4d6dcef 100644
--- a/src/ana/nfet5.c
+++ b/src/ana/nfet5.c
@@ -67,8 +67,7 @@ typedef struct ICNfet {
 /****************************************************************************/
 
 
-static void Ex_NFET5(act)
-Analog_32_action *act;
+static void Ex_NFET5(Analog_32_action *act)
 {
   double MinI2, dI2dV1, dI2dV2, dI2dV3, MinI3, dI3dV1, dI3dV2, dI3dV3, MinI1,
 	 dI1dV1, dI1dV2, dI1dV3;
@@ -243,8 +242,7 @@ Analog_32_action *act;
 /*          Procedure To Supply Current  Out of a Cell To Current Meters    */
 /****************************************************************************/
 
-static void Iin_NFET5(act)
-Analog_32_action *act;
+static void Iin_NFET5(Analog_32_action *act)
 {
   AnaExt_rec *Pin1Ptr, *Pin2Ptr, *Pin3Ptr;
   double VPin1, VPin2, VPin3, VMem1, VMem2, VMem3;
@@ -359,8 +357,7 @@ Analog_32_action *act;
 }  /*Iin_NFET5*/
 
 
-static void GetCnf_Nfet5(NewIC)
-ICNfet *NewIC;
+static void GetCnf_Nfet5(ICNfet *NewIC)
 {
   int Found;
   char Arg[256], Keyword[256];
@@ -457,8 +454,7 @@ ICNfet *NewIC;
 /*                          Installation Procedure                           */
 /****************************************************************************/
 
-static void initlib_NFET5(act)
-Analog_32_action *act;
+static void initlib_NFET5(Analog_32_action *act)
 {
   AnaCell_rec *NewCell;
   ICNfet *NewIC;
@@ -493,9 +489,7 @@ Analog_32_action *act;
 }  /*NFET5_Initlib*/
 
 
-static int Nfetcheck(Inst, Attrnum)
-log_grec *Inst;
-long Attrnum;
+static int Nfetcheck(log_grec *Inst, long Attrnum)
 {
   int Result;
   NfetConst *NfetVar;
@@ -590,8 +584,7 @@ long Attrnum;
 }
 
 
-static void Attr_Nfet5(act)
-Analog_32_action *act;
+static void Attr_Nfet5(Analog_32_action *act)
 {
   long Attrnum;
 
@@ -608,8 +601,7 @@ Analog_32_action *act;
 }
 
 
-static void Newgate_Nfet5(act)
-Analog_32_action *act;
+static void Newgate_Nfet5(Analog_32_action *act)
 {
   NfetConst *NfetVar;
   Anainstlist *A_Gate;
@@ -666,8 +658,7 @@ Analog_32_action *act;
   WITH->attr[N_Early - 1].changed = true;
 }
 
-static void Copygate_Nfet5(act)
-Analog_32_action *act;
+static void Copygate_Nfet5(Analog_32_action *act)
 {
   NfetConst *NfetVar, *Old_Nfetvar;
   Anainstlist *A_Gate, *A_Oldgate;
@@ -681,8 +672,7 @@ Analog_32_action *act;
   AnaCapCopy(act->inst);   /*6*/
 }
 
-static void Dispose_Nfet5(act)
-Analog_32_action *act;
+static void Dispose_Nfet5(Analog_32_action *act)
 {
   NfetConst *NfetVar;
   Anainstlist *A_Gate;
@@ -693,8 +683,7 @@ Analog_32_action *act;
   AnaCapDispose(act->inst);   /*7*/
 }
 
-static void Readgate_Nfet5(act)
-Analog_32_action *act;
+static void Readgate_Nfet5(Analog_32_action *act)
 {
   NfetConst *NfetVar;
   Anainstlist *A_Gate;
@@ -753,8 +742,7 @@ Analog_32_action *act;
   NfetVar->TauCgs = 0.0;
 }
 
-static void Probe_Nfet5(act)
-Analog_32_action *act;
+static void Probe_Nfet5(Analog_32_action *act)
 {
   Anainstlist *A_Gate;
   AnaExt_rec *Node1Ptr, *Node2Ptr, *Node3Ptr;
@@ -829,8 +817,7 @@ Analog_32_action *act;
 /*==========================================================================*/
 
 
-void Log_NFET5_INITLIB_32(act)
-Analog_32_action *act;
+void Log_NFET5_INITLIB_32(Analog_32_action *act)
 {
   /*Main Procedure*/
 
diff --git a/src/ana/nfet7f.c b/src/ana/nfet7f.c
index 41d7c4f16db4e88c712208088f4d7480a8cf8efe..7543e670c38f0c50474150624da4a1ed4d6124b5 100644
--- a/src/ana/nfet7f.c
+++ b/src/ana/nfet7f.c
@@ -87,8 +87,7 @@ typedef struct ICNfet {
 /****************************************************************************/
 
 
-static int Nfetconsts(Inst)
-log_grec *Inst;
+static int Nfetconsts(log_grec *Inst)
 {
   NfetConst *NfetVar;
   Anainstlist *A_Gate;
@@ -168,8 +167,7 @@ log_grec *Inst;
 /****************************************************************************/
 
 
-static void Ex_NFET7F(act)
-Analog_32_action *act;
+static void Ex_NFET7F(Analog_32_action *act)
 {
   log_grec *WITH;
   AnaMatRec *WITH1;
@@ -442,8 +440,7 @@ Analog_32_action *act;
 /*          Procedure To Supply Current  Out of a Cell To Current Meters    */
 /****************************************************************************/
 
-static void Iin_NFET7F(act)
-Analog_32_action *act;
+static void Iin_NFET7F(Analog_32_action *act)
 {
   AnaExt_rec *Pin1Ptr, *Pin2Ptr, *Pin3Ptr, *Pin4Ptr;
   double VPin1, VPin2, VPin3, VPin4, VMem1, VMem2, VMem3;
@@ -611,8 +608,7 @@ Analog_32_action *act;
 }  /*Iin_NFET7F*/
 
 
-static void GetCnf_Nfet7F(NewIC)
-ICNfet *NewIC;
+static void GetCnf_Nfet7F(ICNfet *NewIC)
 {
   int Found;
   char Arg[256], Keyword[256];
@@ -689,8 +685,7 @@ ICNfet *NewIC;
 /*                          Installation Procedure                           */
 /****************************************************************************/
 
-static void initlib_NFET7F(act)
-Analog_32_action *act;
+static void initlib_NFET7F(Analog_32_action *act)
 {
   AnaCell_rec *NewCell;
   ICNfet *NewIC;
@@ -726,9 +721,7 @@ Analog_32_action *act;
 
 
 
-static int Nfetcheck(Inst, Attrnum)
-log_grec *Inst;
-long Attrnum;
+static int Nfetcheck(log_grec *Inst, long Attrnum)
 {
   int Result;
 
@@ -822,8 +815,7 @@ long Attrnum;
 }
 
 
-static void Attr_Nfet7F(act)
-Analog_32_action *act;
+static void Attr_Nfet7F(Analog_32_action *act)
 {
   long Attrnum;
 
@@ -845,8 +837,7 @@ Analog_32_action *act;
 }
 
 
-static void Newgate_Nfet7F(act)
-Analog_32_action *act;
+static void Newgate_Nfet7F(Analog_32_action *act)
 {
   NfetConst *NfetVar;
   Anainstlist *A_Gate;
@@ -896,8 +887,7 @@ Analog_32_action *act;
   Nfetconsts(WITH);
 }
 
-static void Copygate_Nfet7F(act)
-Analog_32_action *act;
+static void Copygate_Nfet7F(Analog_32_action *act)
 {
   NfetConst *NfetVar, *Old_Nfetvar;
   Anainstlist *A_Gate, *A_Oldgate;
@@ -911,8 +901,7 @@ Analog_32_action *act;
   AnaCapCopy(act->inst);   /*6*/
 }
 
-static void Dispose_Nfet7F(act)
-Analog_32_action *act;
+static void Dispose_Nfet7F(Analog_32_action *act)
 {
   NfetConst *NfetVar;
   Anainstlist *A_Gate;
@@ -923,8 +912,7 @@ Analog_32_action *act;
   AnaCapDispose(act->inst);   /*7*/
 }
 
-static void Readgate_Nfet7F(act)
-Analog_32_action *act;
+static void Readgate_Nfet7F(Analog_32_action *act)
 {
   NfetConst *NfetVar;
   Anainstlist *A_Gate;
@@ -976,8 +964,7 @@ Analog_32_action *act;
   NfetVar->TauCgs = 0.0;
 }
 
-static void Probe_Nfet7F(act)
-Analog_32_action *act;
+static void Probe_Nfet7F(Analog_32_action *act)
 {
   Anainstlist *A_Gate;
   AnaExt_rec *Node1Ptr, *Node2Ptr, *Node3Ptr, *Node4Ptr;
@@ -1057,8 +1044,7 @@ Analog_32_action *act;
 }
 
 
-static void Update_Nfet7F(act)
-Analog_32_action *act;
+static void Update_Nfet7F(Analog_32_action *act)
 {
   Anainstlist *A_Gate;
   NfetConst *NfetVar;
@@ -1082,8 +1068,7 @@ Analog_32_action *act;
 /*==========================================================================*/
 
 
-void Log_NFET7F_INITLIB_32(act)
-Analog_32_action *act;
+void Log_NFET7F_INITLIB_32(Analog_32_action *act)
 {
   /*Main Procedure*/
 
diff --git a/src/ana/nfet7t.c b/src/ana/nfet7t.c
index 7126daf580403237980d1637a2f8e4725a878f8c..fce6f40c6b29090bd93849f3af2c8f968c82f1f1 100644
--- a/src/ana/nfet7t.c
+++ b/src/ana/nfet7t.c
@@ -87,9 +87,7 @@ typedef struct ICNfet {
 /****************************************************************************/
 
 
-static int Nfetconsts(Inst)
-log_grec *Inst;
-
+static int Nfetconsts(log_grec *Inst)
 {
   NfetConst *NfetVar;
   Anainstlist *A_Gate;
@@ -169,8 +167,7 @@ log_grec *Inst;
 /****************************************************************************/
 
 
-static void Ex_NFET7T(act)
-Analog_32_action *act;
+static void Ex_NFET7T(Analog_32_action *act)
 {
   log_grec *WITH;
   AnaMatRec *WITH1;
@@ -402,8 +399,7 @@ Analog_32_action *act;
 /*          Procedure To Supply Current  Out of a Cell To Current Meters    */
 /****************************************************************************/
 
-static void Iin_NFET7T(act)
-Analog_32_action *act;
+static void Iin_NFET7T(Analog_32_action *act)
 {
   AnaExt_rec *Pin1Ptr, *Pin2Ptr, *Pin3Ptr;
   double VPin1, VPin2, VPin3, VMem1, VMem2, VMem3;
@@ -548,8 +544,7 @@ Analog_32_action *act;
 }  /*Iin_NFET7T*/
 
 
-static void GetCnf_Nfet7T(NewIC)
-ICNfet *NewIC;
+static void GetCnf_Nfet7T(ICNfet *NewIC)
 {
   int Found;
   char Arg[256], Keyword[256];
@@ -618,8 +613,7 @@ ICNfet *NewIC;
 /*                          Installation Procedure                           */
 /****************************************************************************/
 
-static void initlib_NFET7T(act)
-Analog_32_action *act;
+static void initlib_NFET7T(Analog_32_action *act)
 {
   AnaCell_rec *NewCell;
   ICNfet *NewIC;
@@ -651,9 +645,7 @@ Analog_32_action *act;
 }  /*NFET7T_Initlib*/
 
 
-static int Nfetcheck(Inst, Attrnum)
-log_grec *Inst;
-long Attrnum;
+static int Nfetcheck(log_grec *Inst, long Attrnum)
 {
   int Result;
 
@@ -741,8 +733,7 @@ long Attrnum;
 }
 
 
-static void Attr_Nfet7T(act)
-Analog_32_action *act;
+static void Attr_Nfet7T(Analog_32_action *act)
 {
   long Attrnum;
 
@@ -764,8 +755,7 @@ Analog_32_action *act;
 }
 
 
-static void Newgate_Nfet7T(act)
-Analog_32_action *act;
+static void Newgate_Nfet7T(Analog_32_action *act)
 {
   NfetConst *NfetVar;
   Anainstlist *A_Gate;
@@ -815,8 +805,7 @@ Analog_32_action *act;
   Nfetconsts(WITH);
 }
 
-static void Copygate_Nfet7T(act)
-Analog_32_action *act;
+static void Copygate_Nfet7T(Analog_32_action *act)
 {
   NfetConst *NfetVar, *Old_Nfetvar;
   Anainstlist *A_Gate, *A_Oldgate;
@@ -830,8 +819,7 @@ Analog_32_action *act;
   AnaCapCopy(act->inst);   /*6*/
 }
 
-static void Dispose_Nfet7T(act)
-Analog_32_action *act;
+static void Dispose_Nfet7T(Analog_32_action *act)
 {
   NfetConst *NfetVar;
   Anainstlist *A_Gate;
@@ -842,8 +830,7 @@ Analog_32_action *act;
   AnaCapDispose(act->inst);   /*7*/
 }
 
-static void Readgate_Nfet7T(act)
-Analog_32_action *act;
+static void Readgate_Nfet7T(Analog_32_action *act)
 {
   NfetConst *NfetVar;
   Anainstlist *A_Gate;
@@ -895,8 +882,7 @@ Analog_32_action *act;
   NfetVar->TauCgs = 0.0;
 }
 
-static void Probe_Nfet7T(act)
-Analog_32_action *act;
+static void Probe_Nfet7T(Analog_32_action *act)
 {
   Anainstlist *A_Gate;
   AnaExt_rec *Node1Ptr, *Node2Ptr, *Node3Ptr;
@@ -966,8 +952,7 @@ Analog_32_action *act;
 }
 
 
-static void Update_Nfet7T(act)
-Analog_32_action *act;
+static void Update_Nfet7T(Analog_32_action *act)
 {
   Anainstlist *A_Gate;
   NfetConst *NfetVar;
@@ -993,8 +978,7 @@ Analog_32_action *act;
 /*==========================================================================*/
 
 
-void Log_NFET7T_INITLIB_32(act)
-Analog_32_action *act;
+void Log_NFET7T_INITLIB_32(Analog_32_action *act)
 {
   /*Main Procedure*/
 
diff --git a/src/ana/npn1.c b/src/ana/npn1.c
index af7336d31d696b58ea96b7a0a64ee3955c2e5e1f..59bf534146df8c962a404b31bd11627b5952db43 100644
--- a/src/ana/npn1.c
+++ b/src/ana/npn1.c
@@ -60,9 +60,7 @@ typedef struct ICNPN1 {
 /****************************************************************************/
 
 
-static void Limitfill(Inst, Limitflag, Erase)
-log_grec *Inst;
-int Limitflag, Erase;
+static void Limitfill(log_grec *Inst, int Limitflag, int Erase)
 {
   short LLx, LLy, URx, URy;
 
@@ -104,8 +102,7 @@ int Limitflag, Erase;
 
 
 
-static void Ex_NPN1(act)
-Analog_32_action *act;
+static void Ex_NPN1(Analog_32_action *act)
 {
   double MinI1, MinI2, MinI3, dI1dV1, dI1dV2, dI1dV3, dI2dV1, dI2dV2, dI2dV3,
 	 dI3dV1, dI3dV2, dI3dV3;
@@ -274,8 +271,7 @@ Analog_32_action *act;
 /****************************************************************************/
 
 
-static void Iin_NPN1(act)
-Analog_32_action *act;
+static void Iin_NPN1(Analog_32_action *act)
 {
   AnaExt_rec *Pin1Ptr;
   double VPin1, VMem1;
@@ -386,8 +382,7 @@ Analog_32_action *act;
   }
 }  /*Iin_NPN1*/
 
-static void GetCnf_NPN1(NewIC)
-ICNPN1 *NewIC;
+static void GetCnf_NPN1(ICNPN1 *NewIC)
 {
   int Found;
   char Arg[256], Keyword[256];
@@ -478,8 +473,7 @@ ICNPN1 *NewIC;
 /*                          Installation Procedure                           */
 /****************************************************************************/
 
-static void initlib_NPN1(act)
-Analog_32_action *act;
+static void initlib_NPN1(Analog_32_action *act)
 {
   AnaCell_rec *NewCell;
   ICNPN1 *NewIC;
@@ -519,9 +513,7 @@ Analog_32_action *act;
    #define MAKE_IECO(n)	((n)->IECO=(n)->Is*(n)->betaR/((n)->betaR+(n)->betaF))
 */
 
-static int NPN1check(Inst, Attrnum)
-log_grec *Inst;
-long Attrnum;
+static int NPN1check(log_grec *Inst, long Attrnum)
 {
   int Result;
   NPN1Const *NPN1Var;
@@ -620,8 +612,7 @@ long Attrnum;
 }
 
 
-static void Attr_NPN1(act)
-Analog_32_action *act;
+static void Attr_NPN1(Analog_32_action *act)
 {
   long Attrnum;
 
@@ -638,8 +629,7 @@ Analog_32_action *act;
 }
 
 
-static void Newgate_NPN1(act)
-Analog_32_action *act;
+static void Newgate_NPN1(Analog_32_action *act)
 {
   NPN1Const *NPN1Var;
   Anainstlist *A_Gate;
@@ -697,8 +687,7 @@ Analog_32_action *act;
   WITH->attr[N_Vcrow - 1].changed = true;
 }
 
-static void Copygate_NPN1(act)
-Analog_32_action *act;
+static void Copygate_NPN1(Analog_32_action *act)
 {
   NPN1Const *NPN1Var, *Old_NPN1var;
   Anainstlist *A_Gate, *A_Oldgate;
@@ -714,8 +703,7 @@ Analog_32_action *act;
   AnaCapCopy(act->inst);
 }
 
-static void Dispose_NPN1(act)
-Analog_32_action *act;
+static void Dispose_NPN1(Analog_32_action *act)
 {
   NPN1Const *NPN1Var;
   Anainstlist *A_Gate;
@@ -726,8 +714,7 @@ Analog_32_action *act;
   AnaCapDispose(act->inst);   /*7*/
 }
 
-static void Readgate_Npn1(act)
-Analog_32_action *act;
+static void Readgate_Npn1(Analog_32_action *act)
 {
   NPN1Const *Npn1Var;
   Anainstlist *A_Gate;
@@ -786,8 +773,7 @@ Analog_32_action *act;
   Npn1Var->TauCbe = 0.0;
 }
 
-static void Probe_Npn1(act)
-Analog_32_action *act;
+static void Probe_Npn1(Analog_32_action *act)
 {
   Anainstlist *A_Gate;
   AnaExt_rec *Node1Ptr, *Node2Ptr, *Node3Ptr;
@@ -850,8 +836,7 @@ Analog_32_action *act;
   }
 }
 
-static void Reset_NPN1(act)
-Analog_32_action *act;
+static void Reset_NPN1(Analog_32_action *act)
 {
   NPN1Const *NPN1Var;
   Anainstlist *A_Gate;
@@ -866,8 +851,7 @@ Analog_32_action *act;
     Limitfill(act->inst, NPN1Var->Limit, false);
 }
 
-static void PreUpdate_NPN1(act)
-Analog_32_action *act;
+static void PreUpdate_NPN1(Analog_32_action *act)
 {
   NPN1Const *NPN1Var;
   Anainstlist *A_Gate;
@@ -888,8 +872,7 @@ Analog_32_action *act;
 		       VPin1 - Vpin2 >= WITH1->attr[N_Vcrow - 1].UU.r);
 }
 
-static void Update_NPN1(act)
-Analog_32_action *act;
+static void Update_NPN1(Analog_32_action *act)
 {
   NPN1Const *NPN1Var;
   Anainstlist *A_Gate;
@@ -901,8 +884,7 @@ Analog_32_action *act;
   NPN1Var->Limit = NPN1Var->NewLimit;
 }
 
-static void Display_NPN1(act)
-Analog_32_action *act;
+static void Display_NPN1(Analog_32_action *act)
 {
   NPN1Const *NPN1Var;
   Anainstlist *A_Gate;
@@ -916,8 +898,7 @@ Analog_32_action *act;
 }
 
 
-static void Refresh_NPN1(act)
-Analog_32_action *act;
+static void Refresh_NPN1(Analog_32_action *act)
 {
   NPN1Const *NPN1Var;
   Anainstlist *A_Gate;
@@ -927,8 +908,7 @@ Analog_32_action *act;
   Limitfill(act->inst, NPN1Var->Limit, false);
 }
 
-static void Erase_NPN1(act)
-Analog_32_action *act;
+static void Erase_NPN1(Analog_32_action *act)
 {
   NPN1Const *NPN1Var;
   Anainstlist *A_Gate;
@@ -944,8 +924,7 @@ Analog_32_action *act;
 /*==========================================================================*/
 
 
-void Log_NPN1_INITLIB_32(act)
-Analog_32_action *act;
+void Log_NPN1_INITLIB_32(Analog_32_action *act)
 {
   /*Main Procedure*/
 
diff --git a/src/ana/npn2.c b/src/ana/npn2.c
index 3da4acaba515a26086c7f9a5cd859dbbe48f93ec..4eb3a0be44d21a08f47c61e68a5ea1caa0c35bad 100644
--- a/src/ana/npn2.c
+++ b/src/ana/npn2.c
@@ -62,9 +62,7 @@ typedef struct ICNPN2 {
 /****************************************************************************/
 
 
-static void Limitfill(Inst, Limitflag, Erase)
-log_grec *Inst;
-int Limitflag, Erase;
+static void Limitfill(log_grec *Inst, int Limitflag, int Erase)
 {
   short LLx, LLy, URx, URy;
 
@@ -114,8 +112,7 @@ int Limitflag, Erase;
 /****************************************************************************/
 
 
-static void Ex_NPN2(act)
-Analog_32_action *act;
+static void Ex_NPN2(Analog_32_action *act)
 {
   double MinI1, MinI2, MinI3, dI1dV1, dI1dV2, dI1dV3, dI2dV1, dI2dV2, dI2dV3,
 	 dI3dV1, dI3dV2, dI3dV3;
@@ -287,8 +284,7 @@ Analog_32_action *act;
 /****************************************************************************/
 
 
-static void Iin_NPN2(act)
-Analog_32_action *act;
+static void Iin_NPN2(Analog_32_action *act)
 {
   AnaExt_rec *Pin1Ptr;
   double VPin1, VMem1;
@@ -402,8 +398,7 @@ Analog_32_action *act;
   }
 }  /*Iin_NPN2*/
 
-static void GetCnf_NPN2(NewIC)
-ICNPN2 *NewIC;
+static void GetCnf_NPN2(ICNPN2 *NewIC)
 {
   int Found;
   char Arg[256], Keyword[256];
@@ -501,8 +496,7 @@ ICNPN2 *NewIC;
 /*                          Installation Procedure                           */
 /****************************************************************************/
 
-static void initlib_NPN2(act)
-Analog_32_action *act;
+static void initlib_NPN2(Analog_32_action *act)
 {
   AnaCell_rec *NewCell;
   ICNPN2 *NewIC;
@@ -541,9 +535,7 @@ Analog_32_action *act;
 #define MAKE_IECO(n)	((n)->IECO=(n)->Is/(n)->betaR)
 
 
-static int NPN2check(Inst, Attrnum)
-log_grec *Inst;
-long Attrnum;
+static int NPN2check(log_grec *Inst, long Attrnum)
 {
   int Result;
   NPN2Const *NPN2Var;
@@ -649,8 +641,7 @@ long Attrnum;
 }
 
 
-static void Attr_NPN2(act)
-Analog_32_action *act;
+static void Attr_NPN2(Analog_32_action *act)
 {
   long Attrnum;
 
@@ -667,8 +658,7 @@ Analog_32_action *act;
 }
 
 
-static void Newgate_NPN2(act)
-Analog_32_action *act;
+static void Newgate_NPN2(Analog_32_action *act)
 {
   NPN2Const *NPN2Var;
   Anainstlist *A_Gate;
@@ -730,8 +720,7 @@ Analog_32_action *act;
   WITH->attr[N_Vcrow - 1].changed = true;
 }
 
-static void Copygate_NPN2(act)
-Analog_32_action *act;
+static void Copygate_NPN2(Analog_32_action *act)
 {
   NPN2Const *NPN2Var, *Old_NPN2var;
   Anainstlist *A_Gate, *A_Oldgate;
@@ -747,8 +736,7 @@ Analog_32_action *act;
   AnaCapCopy(act->inst);
 }
 
-static void Dispose_NPN2(act)
-Analog_32_action *act;
+static void Dispose_NPN2(Analog_32_action *act)
 {
   NPN2Const *NPN2Var;
   Anainstlist *A_Gate;
@@ -759,8 +747,7 @@ Analog_32_action *act;
   AnaCapDispose(act->inst);   /*7*/
 }
 
-static void Readgate_Npn2(act)
-Analog_32_action *act;
+static void Readgate_Npn2(Analog_32_action *act)
 {
   NPN2Const *Npn2Var;
   Anainstlist *A_Gate;
@@ -823,8 +810,7 @@ Analog_32_action *act;
   Npn2Var->TauCbe = 0.0;
 }
 
-static void Probe_Npn2(act)
-Analog_32_action *act;
+static void Probe_Npn2(Analog_32_action *act)
 {
   Anainstlist *A_Gate;
   AnaExt_rec *Node1Ptr, *Node2Ptr, *Node3Ptr;
@@ -887,8 +873,7 @@ Analog_32_action *act;
   }
 }
 
-static void Reset_NPN2(act)
-Analog_32_action *act;
+static void Reset_NPN2(Analog_32_action *act)
 {
   NPN2Const *NPN2Var;
   Anainstlist *A_Gate;
@@ -903,8 +888,7 @@ Analog_32_action *act;
     Limitfill(act->inst, NPN2Var->Limit, false);
 }
 
-static void PreUpdate_NPN2(act)
-Analog_32_action *act;
+static void PreUpdate_NPN2(Analog_32_action *act)
 {
   NPN2Const *NPN2Var;
   Anainstlist *A_Gate;
@@ -925,8 +909,7 @@ Analog_32_action *act;
 			   VPin1 - Vpin2 >= WITH1->attr[N_Vcrow - 1].UU.r);
 }
 
-static void Update_NPN2(act)
-Analog_32_action *act;
+static void Update_NPN2(Analog_32_action *act)
 {
   NPN2Const *NPN2Var;
   Anainstlist *A_Gate;
@@ -938,8 +921,7 @@ Analog_32_action *act;
   NPN2Var->Limit = NPN2Var->NewLimit;
 }
 
-static void Display_NPN2(act)
-Analog_32_action *act;
+static void Display_NPN2(Analog_32_action *act)
 {
   NPN2Const *NPN2Var;
   Anainstlist *A_Gate;
@@ -953,8 +935,7 @@ Analog_32_action *act;
 }
 
 
-static void Refresh_NPN2(act)
-Analog_32_action *act;
+static void Refresh_NPN2(Analog_32_action *act)
 {
   NPN2Const *NPN2Var;
   Anainstlist *A_Gate;
@@ -964,8 +945,7 @@ Analog_32_action *act;
   Limitfill(act->inst, NPN2Var->Limit, false);
 }
 
-static void Erase_NPN2(act)
-Analog_32_action *act;
+static void Erase_NPN2(Analog_32_action *act)
 {
   NPN2Const *NPN2Var;
   Anainstlist *A_Gate;
@@ -981,8 +961,7 @@ Analog_32_action *act;
 /*==========================================================================*/
 
 
-void Log_NPN2_INITLIB_32(act)
-Analog_32_action *act;
+void Log_NPN2_INITLIB_32(Analog_32_action *act)
 {
   /*Main Procedure*/
 
diff --git a/src/ana/nspc1.c b/src/ana/nspc1.c
index 7fdc5d195a3c9cd919c1b4fa94e838947f3a9838..2978fd67747c59581db8f6d170946d296c52bcfb 100644
--- a/src/ana/nspc1.c
+++ b/src/ana/nspc1.c
@@ -41,7 +41,7 @@ the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
 /* From input file "swiss.text" */
 
 
-#include <utils/p2c.h>
+#include "utils/p2c.h"
 #include "ana/nspc1.h"
 #include "node.h"
 
@@ -84,12 +84,26 @@ typedef struct ICNfet {
 } ICNfet;
 
 
-static void Show_W_L(Inst,erase)
-log_grec *Inst;
-int erase;
+void drawnum3(short x, short y, short n)
+{
+  char s[4];
+
+  m_move((long)x, (long)y);
+  strcpy(s, "   ");
+  m_displaytext(s);
+  if (n >= 100)
+  {
+      s[0] = n/100 + '0';
+      s[1] = (n%100)/10 + '0';
+  } else if (n >= 10 )
+    s[1] = n / 10 + '0';
+  s[2] = n % 10 + '0';
+  m_displaytext(s);
+}
+
+static void Show_W_L(log_grec *Inst, int erase)
 {
   short Lx, Ly, Wx, Wy;
-  void drawnum3();
   short oldWx,oldWy,oldLx,oldLy;
   int W,L;
   float scale;
@@ -193,31 +207,12 @@ int erase;
 }
 
 
-void drawnum3(x, y, n)
-short x, y, n;
-{
-  char s[4];
-
-  m_move((long)x, (long)y);
-  strcpy(s, "   ");
-  m_displaytext(s);
-  if (n >= 100)
-  {
-      s[0] = n/100 + '0';
-      s[1] = (n%100)/10 + '0';
-  } else if (n >= 10 )
-    s[1] = n / 10 + '0';
-  s[2] = n % 10 + '0';
-  m_displaytext(s);
-}
-
 /****************************************************************************/
 /*            Procedure To Simulate Cell In Algorithm                        */
 /****************************************************************************/
 
 
-static void Ex_NSPC1(act)
-Analog_32_action *act;
+static void Ex_NSPC1(Analog_32_action *act)
 {
   double MinI2, dI2dV1, dI2dV2, dI2dV3, dI2dV4,
          MinI3, dI3dV1, dI3dV2, dI3dV3, dI3dV4,
@@ -430,8 +425,7 @@ Analog_32_action *act;
 /*          Procedure To Supply Current  Out of a Cell To Current Meters    */
 /****************************************************************************/
 
-static void Iin_NSPC1(act)
-Analog_32_action *act;
+static void Iin_NSPC1(Analog_32_action *act)
 {
   AnaExt_rec *Pin1Ptr, *Pin2Ptr, *Pin3Ptr, *Pin4Ptr;
   double VPin1, VPin2, VPin3, VPin4, VMem1, VMem2, VMem3;
@@ -555,8 +549,7 @@ Analog_32_action *act;
 }  /*Iin_NSPC1*/
 
 
-static void GetCnf_Nspc1(NewIC)
-ICNfet *NewIC;
+static void GetCnf_Nspc1(ICNfet *NewIC)
 {
   int Found;
   char Arg[256], Keyword[256];
@@ -684,8 +677,7 @@ ICNfet *NewIC;
 /*                          Installation Procedure                           */
 /****************************************************************************/
 
-static void initlib_NSPC1(act)
-Analog_32_action *act;
+static void initlib_NSPC1(Analog_32_action *act)
 {
   AnaCell_rec *NewCell;
   ICNfet *NewIC;
@@ -725,9 +717,7 @@ Analog_32_action *act;
 }  /*NSPC1_Initlib*/
 
 
-static int Nfetcheck(Inst, Attrnum)
-log_grec *Inst;
-long Attrnum;
+static int Nfetcheck(log_grec *Inst, long Attrnum)
 {
   int Result;
   NfetConst *NfetVar;
@@ -865,8 +855,7 @@ long Attrnum;
 }
 
 
-static void Attr_Nspc1(act)
-Analog_32_action *act;
+static void Attr_Nspc1(Analog_32_action *act)
 {
   long Attrnum;
 
@@ -888,8 +877,7 @@ Analog_32_action *act;
 }
 
 
-static void Newgate_Nspc1(act)
-Analog_32_action *act;
+static void Newgate_Nspc1(Analog_32_action *act)
 {
   NfetConst *NfetVar;
   Anainstlist *A_Gate;
@@ -962,8 +950,7 @@ Analog_32_action *act;
   WITH->attr[N_Number - 1].changed = true;
 }
 
-static void Copygate_Nspc1(act)
-Analog_32_action *act;
+static void Copygate_Nspc1(Analog_32_action *act)
 {
   NfetConst *NfetVar, *Old_Nfetvar;
   Anainstlist *A_Gate, *A_Oldgate;
@@ -977,8 +964,7 @@ Analog_32_action *act;
   AnaCapCopy(act->inst);   /*6*/
 }
 
-static void Dispose_Nspc1(act)
-Analog_32_action *act;
+static void Dispose_Nspc1(Analog_32_action *act)
 {
   NfetConst *NfetVar;
   Anainstlist *A_Gate;
@@ -989,8 +975,7 @@ Analog_32_action *act;
   AnaCapDispose(act->inst);   /*7*/
 }
 
-static void Readgate_Nspc1(act)
-Analog_32_action *act;
+static void Readgate_Nspc1(Analog_32_action *act)
 {
   NfetConst *NfetVar;
   Anainstlist *A_Gate;
@@ -1071,8 +1056,7 @@ Analog_32_action *act;
   NfetVar->TauCgs = 0.0;
 }
 
-static void Probe_Nspc1(act)
-Analog_32_action *act;
+static void Probe_Nspc1(Analog_32_action *act)
 {
   Anainstlist *A_Gate;
   AnaExt_rec *Node1Ptr, *Node2Ptr, *Node3Ptr, *Node4Ptr;
@@ -1156,8 +1140,7 @@ Analog_32_action *act;
 /*==========================================================================*/
 
 
-void Log_NSPC1_INITLIB_32(act)
-Analog_32_action *act;
+void Log_NSPC1_INITLIB_32(Analog_32_action *act)
 {
   /*Main Procedure*/
 
@@ -1255,11 +1238,3 @@ Analog_32_action *act;
 #undef N_L
 #undef N_Number
 #undef Gatename
-
-
-
-
-
-
-
-
diff --git a/src/ana/pfet4.c b/src/ana/pfet4.c
index a123cb559be551b37014c773e0413de993cf2d7e..7713c2d378027f35dadf911d8afb392be0829f25 100644
--- a/src/ana/pfet4.c
+++ b/src/ana/pfet4.c
@@ -65,8 +65,7 @@ typedef struct ICPfet {
 /****************************************************************************/
 
 
-static void Ex_PFET4(act)
-Analog_32_action *act;
+static void Ex_PFET4(Analog_32_action *act)
 {
   double MinI2, dI2dV1, dI2dV2, dI2dV3, MinI3, dI3dV1, dI3dV2, dI3dV3, MinI1,
 	 dI1dV1, dI1dV2, dI1dV3;
@@ -325,8 +324,7 @@ Analog_32_action *act;
 /****************************************************************************/
 
 
-static void Iin_PFET4(act)
-Analog_32_action *act;
+static void Iin_PFET4(Analog_32_action *act)
 {
   AnaExt_rec *Pin1Ptr, *Pin2Ptr, *Pin3Ptr;
   double VPin1, VPin2, VPin3, VMem1, VMem2, VMem3;
@@ -449,8 +447,7 @@ Analog_32_action *act;
   }
 }  /*Iin_PFET4*/
 
-static void GetCnf_Pfet4(NewIC)
-ICPfet *NewIC;
+static void GetCnf_Pfet4(ICPfet *NewIC)
 {
   int Found;
   char Arg[256], Keyword[256];
@@ -547,8 +544,7 @@ ICPfet *NewIC;
 /*                          Installation Procedure                           */
 /****************************************************************************/
 
-static void initlib_PFET4(act)
-Analog_32_action *act;
+static void initlib_PFET4(Analog_32_action *act)
 {
   AnaCell_rec *NewCell;
   ICPfet *NewIC;
@@ -584,9 +580,7 @@ Analog_32_action *act;
 
 
 
-static int Pfetcheck(Inst, Attrnum)
-log_grec *Inst;
-long Attrnum;
+static int Pfetcheck(log_grec *Inst, long Attrnum)
 {
   int Result;
   PfetConst *PfetVar;
@@ -675,8 +669,7 @@ long Attrnum;
 }
 
 
-static void Attr_Pfet4(act)
-Analog_32_action *act;
+static void Attr_Pfet4(Analog_32_action *act)
 {
   long Attrnum;
 
@@ -693,8 +686,7 @@ Analog_32_action *act;
 }
 
 
-static void Newgate_Pfet4(act)
-Analog_32_action *act;
+static void Newgate_Pfet4(Analog_32_action *act)
 {
   PfetConst *PfetVar;
   Anainstlist *A_Gate;
@@ -754,8 +746,7 @@ Analog_32_action *act;
   WITH->attr[N_Early - 1].changed = true;
 }
 
-static void Copygate_Pfet4(act)
-Analog_32_action *act;
+static void Copygate_Pfet4(Analog_32_action *act)
 {
   PfetConst *PfetVar, *Old_Pfetvar;
   Anainstlist *A_Gate, *A_Oldgate;
@@ -769,8 +760,7 @@ Analog_32_action *act;
   AnaCapCopy(act->inst);   /*6*/
 }
 
-static void Dispose_Pfet4(act)
-Analog_32_action *act;
+static void Dispose_Pfet4(Analog_32_action *act)
 {
   PfetConst *PfetVar;
   Anainstlist *A_Gate;
@@ -781,8 +771,7 @@ Analog_32_action *act;
   AnaCapDispose(act->inst);   /*7*/
 }
 
-static void Readgate_Pfet4(act)
-Analog_32_action *act;
+static void Readgate_Pfet4(Analog_32_action *act)
 {
   PfetConst *PfetVar;
   Anainstlist *A_Gate;
@@ -843,8 +832,7 @@ Analog_32_action *act;
   PfetVar->TauCgd = 0.0;
 }
 
-static void Probe_Pfet4(act)
-Analog_32_action *act;
+static void Probe_Pfet4(Analog_32_action *act)
 {
   Anainstlist *A_Gate;
   AnaExt_rec *Node1Ptr, *Node2Ptr, *Node3Ptr;
@@ -920,8 +908,7 @@ Analog_32_action *act;
 /*==========================================================================*/
 
 
-void Log_pfet4_initlib_32(act)
-Analog_32_action *act;
+void Log_pfet4_initlib_32(Analog_32_action *act)
 {
   /*Main Procedure*/
 
diff --git a/src/ana/pfet5.c b/src/ana/pfet5.c
index 845ddbc820d485b0e0e5325ae29af822bac90a21..d0820cf5cd0ba2f1d0bacfac61d5d55a25d92659 100644
--- a/src/ana/pfet5.c
+++ b/src/ana/pfet5.c
@@ -67,8 +67,7 @@ typedef struct ICPfet {
 /****************************************************************************/
 
 
-static void Ex_PFET5(act)
-Analog_32_action *act;
+static void Ex_PFET5(Analog_32_action *act)
 {
   double MinI2, dI2dV1, dI2dV2, dI2dV3, MinI3, dI3dV1, dI3dV2, dI3dV3, MinI1,
 	 dI1dV1, dI1dV2, dI1dV3;
@@ -241,8 +240,7 @@ Analog_32_action *act;
 /*          Procedure To Supply Current  Out of a Cell To Current Meters    */
 /****************************************************************************/
 
-static void Iin_PFET5(act)
-Analog_32_action *act;
+static void Iin_PFET5(Analog_32_action *act)
 {
   AnaExt_rec *Pin1Ptr, *Pin2Ptr, *Pin3Ptr;
   double VPin1, VPin2, VPin3, VMem1, VMem2, VMem3;
@@ -357,8 +355,7 @@ Analog_32_action *act;
 }  /*Iin_PFET5*/
 
 
-static void GetCnf_Pfet5(NewIC)
-ICPfet *NewIC;
+static void GetCnf_Pfet5(ICPfet *NewIC)
 {
   int Found;
   char Arg[256], Keyword[256];
@@ -455,8 +452,7 @@ ICPfet *NewIC;
 /*                          Installation Procedure                           */
 /****************************************************************************/
 
-static void initlib_PFET5(act)
-Analog_32_action *act;
+static void initlib_PFET5(Analog_32_action *act)
 {
   AnaCell_rec *NewCell;
   ICPfet *NewIC;
@@ -491,9 +487,7 @@ Analog_32_action *act;
 }  /*PFET5_Initlib*/
 
 
-static int Pfetcheck(Inst, Attrnum)
-log_grec *Inst;
-long Attrnum;
+static int Pfetcheck(log_grec *Inst, long Attrnum)
 {
   int Result;
   PfetConst *PfetVar;
@@ -590,8 +584,7 @@ long Attrnum;
 }
 
 
-static void Attr_Pfet5(act)
-Analog_32_action *act;
+static void Attr_Pfet5(Analog_32_action *act)
 {
   long Attrnum;
 
@@ -608,8 +601,7 @@ Analog_32_action *act;
 }
 
 
-static void Newgate_Pfet5(act)
-Analog_32_action *act;
+static void Newgate_Pfet5(Analog_32_action *act)
 {
   PfetConst *PfetVar;
   Anainstlist *A_Gate;
@@ -667,8 +659,7 @@ Analog_32_action *act;
   WITH->attr[N_Early - 1].changed = true;
 }
 
-static void Copygate_Pfet5(act)
-Analog_32_action *act;
+static void Copygate_Pfet5(Analog_32_action *act)
 {
   PfetConst *PfetVar, *Old_Pfetvar;
   Anainstlist *A_Gate, *A_Oldgate;
@@ -682,8 +673,7 @@ Analog_32_action *act;
   AnaCapCopy(act->inst);   /*6*/
 }
 
-static void Dispose_Pfet5(act)
-Analog_32_action *act;
+static void Dispose_Pfet5(Analog_32_action *act)
 {
   PfetConst *PfetVar;
   Anainstlist *A_Gate;
@@ -694,8 +684,7 @@ Analog_32_action *act;
   AnaCapDispose(act->inst);   /*7*/
 }
 
-static void Readgate_Pfet5(act)
-Analog_32_action *act;
+static void Readgate_Pfet5(Analog_32_action *act)
 {
   PfetConst *PfetVar;
   Anainstlist *A_Gate;
@@ -755,8 +744,7 @@ Analog_32_action *act;
   PfetVar->TauCgs = 0.0;
 }
 
-static void Probe_Pfet5(act)
-Analog_32_action *act;
+static void Probe_Pfet5(Analog_32_action *act)
 {
   Anainstlist *A_Gate;
   AnaExt_rec *Node1Ptr, *Node2Ptr, *Node3Ptr;
@@ -830,8 +818,7 @@ Analog_32_action *act;
 /*==========================================================================*/
 
 
-void Log_PFET5_INITLIB_32(act)
-Analog_32_action *act;
+void Log_PFET5_INITLIB_32(Analog_32_action *act)
 {
   /*Main Procedure*/
 
diff --git a/src/ana/pfet6.c b/src/ana/pfet6.c
index 03ed6fe6eb05db333e77dd35f3cafcd28d07c5a1..1f81a77845cc2808016442882f02ab9b496f605d 100644
--- a/src/ana/pfet6.c
+++ b/src/ana/pfet6.c
@@ -68,8 +68,7 @@ typedef struct ICPfet {
 /****************************************************************************/
 
 
-static void Ex_PFET6(act)
-Analog_32_action *act;
+static void Ex_PFET6(Analog_32_action *act)
 {
   double MinI2, dI2dV1, dI2dV2, dI2dV3, dI2dV4,
          MinI3, dI3dV1, dI3dV2, dI3dV3, dI3dV4,
@@ -284,8 +283,7 @@ Analog_32_action *act;
 /*          Procedure To Supply Current  Out of a Cell To Current Meters    */
 /****************************************************************************/
 
-static void Iin_PFET6(act)
-Analog_32_action *act;
+static void Iin_PFET6(Analog_32_action *act)
 {
   AnaExt_rec *Pin1Ptr, *Pin2Ptr, *Pin3Ptr, *Pin4Ptr;
   double VPin1, VPin2, VPin3, VPin4, VMem1, VMem2, VMem3;
@@ -409,8 +407,7 @@ Analog_32_action *act;
 }  /*Iin_PFET6*/
 
 
-static void GetCnf_Pfet6(NewIC)
-ICPfet *NewIC;
+static void GetCnf_Pfet6(ICPfet *NewIC)
 {
   int Found;
   char Arg[256], Keyword[256];
@@ -514,8 +511,7 @@ ICPfet *NewIC;
 /*                          Installation Procedure                           */
 /****************************************************************************/
 
-static void initlib_PFET6(act)
-Analog_32_action *act;
+static void initlib_PFET6(Analog_32_action *act)
 {
   AnaCell_rec *NewCell;
   ICPfet *NewIC;
@@ -553,9 +549,7 @@ Analog_32_action *act;
 }  /*PFET6_Initlib*/
 
 
-static int Pfetcheck(Inst, Attrnum)
-log_grec *Inst;
-long Attrnum;
+static int Pfetcheck(log_grec *Inst, long Attrnum)
 {
   int Result;
   PfetConst *PfetVar;
@@ -665,8 +659,7 @@ long Attrnum;
 }
 
 
-static void Attr_Pfet6(act)
-Analog_32_action *act;
+static void Attr_Pfet6(Analog_32_action *act)
 {
   long Attrnum;
 
@@ -683,8 +676,7 @@ Analog_32_action *act;
 }
 
 
-static void Newgate_Pfet6(act)
-Analog_32_action *act;
+static void Newgate_Pfet6(Analog_32_action *act)
 {
   PfetConst *PfetVar;
   Anainstlist *A_Gate;
@@ -746,8 +738,7 @@ Analog_32_action *act;
   WITH->attr[N_Early - 1].changed = true;
 }
 
-static void Copygate_Pfet6(act)
-Analog_32_action *act;
+static void Copygate_Pfet6(Analog_32_action *act)
 {
   PfetConst *PfetVar, *Old_Pfetvar;
   Anainstlist *A_Gate, *A_Oldgate;
@@ -761,8 +752,7 @@ Analog_32_action *act;
   AnaCapCopy(act->inst);   /*6*/
 }
 
-static void Dispose_Pfet6(act)
-Analog_32_action *act;
+static void Dispose_Pfet6(Analog_32_action *act)
 {
   PfetConst *PfetVar;
   Anainstlist *A_Gate;
@@ -773,8 +763,7 @@ Analog_32_action *act;
   AnaCapDispose(act->inst);   /*7*/
 }
 
-static void Readgate_Pfet6(act)
-Analog_32_action *act;
+static void Readgate_Pfet6(Analog_32_action *act)
 {
   PfetConst *PfetVar;
   Anainstlist *A_Gate;
@@ -839,8 +828,7 @@ Analog_32_action *act;
   PfetVar->TauCgs = 0.0;
 }
 
-static void Probe_Pfet6(act)
-Analog_32_action *act;
+static void Probe_Pfet6(Analog_32_action *act)
 {
   Anainstlist *A_Gate;
   AnaExt_rec *Node1Ptr, *Node2Ptr, *Node3Ptr, *Node4Ptr;
@@ -925,8 +913,7 @@ Analog_32_action *act;
 /*==========================================================================*/
 
 
-void Log_PFET6_INITLIB_32(act)
-Analog_32_action *act;
+void Log_PFET6_INITLIB_32(Analog_32_action *act)
 {
   /*Main Procedure*/
 
diff --git a/src/ana/pfet7f.c b/src/ana/pfet7f.c
index 81065d251071d497fcac9fcf708c425a3982433d..8af0e1eca5dffcbe6e06122c8a3d81d621bd3c57 100644
--- a/src/ana/pfet7f.c
+++ b/src/ana/pfet7f.c
@@ -85,9 +85,7 @@ typedef struct ICPfet {
 /****************************************************************************/
 
 
-static int Pfetconsts(Inst)
-log_grec *Inst;
-
+static int Pfetconsts(log_grec *Inst)
 {
   PfetConst *PfetVar;
   Anainstlist *A_Gate;
@@ -165,8 +163,7 @@ log_grec *Inst;
 /****************************************************************************/
 
 
-static void Ex_PFET7F(act)
-Analog_32_action *act;
+static void Ex_PFET7F(Analog_32_action *act)
 {
   log_grec *WITH;
   AnaMatRec *WITH1;
@@ -447,8 +444,7 @@ Analog_32_action *act;
 /*          Procedure To Supply Current  Out of a Cell To Current Meters    */
 /****************************************************************************/
 
-static void Iin_PFET7F(act)
-Analog_32_action *act;
+static void Iin_PFET7F(Analog_32_action *act)
 {
   AnaExt_rec *Pin1Ptr, *Pin2Ptr, *Pin3Ptr, *Pin4Ptr;
   double VPin1, VPin2, VPin3, VPin4, VMem1, VMem2, VMem3;
@@ -616,8 +612,7 @@ Analog_32_action *act;
 }  /*Iin_PFET7F*/
 
 
-static void GetCnf_Pfet7F(NewIC)
-ICPfet *NewIC;
+static void GetCnf_Pfet7F(ICPfet *NewIC)
 {
   int Found;
   char Arg[256], Keyword[256];
@@ -694,8 +689,7 @@ ICPfet *NewIC;
 /*                          Installation Procedure                           */
 /****************************************************************************/
 
-static void initlib_PFET7F(act)
-Analog_32_action *act;
+static void initlib_PFET7F(Analog_32_action *act)
 {
   AnaCell_rec *NewCell;
   ICPfet *NewIC;
@@ -730,9 +724,7 @@ Analog_32_action *act;
 }  /*PFET7F_Initlib*/
 
 
-static int Pfetcheck(Inst, Attrnum)
-log_grec *Inst;
-long Attrnum;
+static int Pfetcheck(log_grec *Inst, long Attrnum)
 {
   int Result;
 
@@ -825,8 +817,7 @@ long Attrnum;
 }
 
 
-static void Attr_Pfet7F(act)
-Analog_32_action *act;
+static void Attr_Pfet7F(Analog_32_action *act)
 {
   long Attrnum;
 
@@ -848,8 +839,7 @@ Analog_32_action *act;
 }
 
 
-static void Newgate_Pfet7F(act)
-Analog_32_action *act;
+static void Newgate_Pfet7F(Analog_32_action *act)
 {
   PfetConst *PfetVar;
   Anainstlist *A_Gate;
@@ -899,8 +889,7 @@ Analog_32_action *act;
   Pfetconsts(WITH);
 }
 
-static void Copygate_Pfet7F(act)
-Analog_32_action *act;
+static void Copygate_Pfet7F(Analog_32_action *act)
 {
   PfetConst *PfetVar, *Old_Pfetvar;
   Anainstlist *A_Gate, *A_Oldgate;
@@ -914,8 +903,7 @@ Analog_32_action *act;
   AnaCapCopy(act->inst);   /*6*/
 }
 
-static void Dispose_Pfet7F(act)
-Analog_32_action *act;
+static void Dispose_Pfet7F(Analog_32_action *act)
 {
   PfetConst *PfetVar;
   Anainstlist *A_Gate;
@@ -926,8 +914,7 @@ Analog_32_action *act;
   AnaCapDispose(act->inst);   /*7*/
 }
 
-static void Readgate_Pfet7F(act)
-Analog_32_action *act;
+static void Readgate_Pfet7F(Analog_32_action *act)
 {
   PfetConst *PfetVar;
   Anainstlist *A_Gate;
@@ -979,8 +966,7 @@ Analog_32_action *act;
   PfetVar->TauCgs = 0.0;
 }
 
-static void Probe_Pfet7F(act)
-Analog_32_action *act;
+static void Probe_Pfet7F(Analog_32_action *act)
 {
   Anainstlist *A_Gate;
   AnaExt_rec *Node1Ptr, *Node2Ptr, *Node3Ptr, *Node4Ptr;
@@ -1060,8 +1046,7 @@ Analog_32_action *act;
 }
 
 
-static void Update_Pfet7F(act)
-Analog_32_action *act;
+static void Update_Pfet7F(Analog_32_action *act)
 {
   Anainstlist *A_Gate;
   PfetConst *PfetVar;
@@ -1084,8 +1069,7 @@ Analog_32_action *act;
 /*==========================================================================*/
 
 
-void Log_PFET7F_INITLIB_32(act)
-Analog_32_action *act;
+void Log_PFET7F_INITLIB_32(Analog_32_action *act)
 {
   /*Main Procedure*/
 
diff --git a/src/ana/pfet7t.c b/src/ana/pfet7t.c
index 153d8b3b43db935122acf1f12890a524cc8f458a..c65efedec8a3fa597f4459ccf1f062e63e01ee27 100644
--- a/src/ana/pfet7t.c
+++ b/src/ana/pfet7t.c
@@ -87,8 +87,7 @@ typedef struct ICPfet {
 /****************************************************************************/
 
 
-static int Pfetconsts(Inst)
-log_grec *Inst;
+static int Pfetconsts(log_grec *Inst)
 
 {
   PfetConst *PfetVar;
@@ -167,8 +166,7 @@ log_grec *Inst;
 /****************************************************************************/
 
 
-static void Ex_PFET7T(act)
-Analog_32_action *act;
+static void Ex_PFET7T(Analog_32_action *act)
 {
   log_grec *WITH;
   AnaMatRec *WITH1;
@@ -410,8 +408,7 @@ Analog_32_action *act;
 /*          Procedure To Supply Current  Out of a Cell To Current Meters    */
 /****************************************************************************/
 
-static void Iin_PFET7T(act)
-Analog_32_action *act;
+static void Iin_PFET7T(Analog_32_action *act)
 {
   AnaExt_rec *Pin1Ptr, *Pin2Ptr, *Pin3Ptr;
   double VPin1, VPin2, VPin3, VMem1, VMem2, VMem3;
@@ -556,8 +553,7 @@ Analog_32_action *act;
 }  /*Iin_PFET7T*/
 
 
-static void GetCnf_Pfet7T(NewIC)
-ICPfet *NewIC;
+static void GetCnf_Pfet7T(ICPfet *NewIC)
 {
   int Found;
   char Arg[256], Keyword[256];
@@ -627,8 +623,7 @@ ICPfet *NewIC;
 /*                          Installation Procedure                           */
 /****************************************************************************/
 
-static void initlib_PFET7T(act)
-Analog_32_action *act;
+static void initlib_PFET7T(Analog_32_action *act)
 {
   AnaCell_rec *NewCell;
   ICPfet *NewIC;
@@ -660,9 +655,7 @@ Analog_32_action *act;
 }  /*PFET7T_Initlib*/
 
 
-static int Pfetcheck(Inst, Attrnum)
-log_grec *Inst;
-long Attrnum;
+static int Pfetcheck(log_grec *Inst, long Attrnum)
 {
   int Result;
 
@@ -750,8 +743,7 @@ long Attrnum;
 }
 
 
-static void Attr_Pfet7T(act)
-Analog_32_action *act;
+static void Attr_Pfet7T(Analog_32_action *act)
 {
   long Attrnum;
 
@@ -773,8 +765,7 @@ Analog_32_action *act;
 }
 
 
-static void Newgate_Pfet7T(act)
-Analog_32_action *act;
+static void Newgate_Pfet7T(Analog_32_action *act)
 {
   PfetConst *PfetVar;
   Anainstlist *A_Gate;
@@ -824,8 +815,7 @@ Analog_32_action *act;
   Pfetconsts(WITH);
 }
 
-static void Copygate_Pfet7T(act)
-Analog_32_action *act;
+static void Copygate_Pfet7T(Analog_32_action *act)
 {
   PfetConst *PfetVar, *Old_Pfetvar;
   Anainstlist *A_Gate, *A_Oldgate;
@@ -839,8 +829,7 @@ Analog_32_action *act;
   AnaCapCopy(act->inst);   /*6*/
 }
 
-static void Dispose_Pfet7T(act)
-Analog_32_action *act;
+static void Dispose_Pfet7T(Analog_32_action *act)
 {
   PfetConst *PfetVar;
   Anainstlist *A_Gate;
@@ -851,8 +840,7 @@ Analog_32_action *act;
   AnaCapDispose(act->inst);   /*7*/
 }
 
-static void Readgate_Pfet7T(act)
-Analog_32_action *act;
+static void Readgate_Pfet7T(Analog_32_action *act)
 {
   PfetConst *PfetVar;
   Anainstlist *A_Gate;
@@ -904,8 +892,7 @@ Analog_32_action *act;
   PfetVar->TauCgs = 0.0;
 }
 
-static void Probe_Pfet7T(act)
-Analog_32_action *act;
+static void Probe_Pfet7T(Analog_32_action *act)
 {
   Anainstlist *A_Gate;
   AnaExt_rec *Node1Ptr, *Node2Ptr, *Node3Ptr;
@@ -975,8 +962,7 @@ Analog_32_action *act;
 }
 
 
-static void Update_Pfet7T(act)
-Analog_32_action *act;
+static void Update_Pfet7T(Analog_32_action *act)
 {
   Anainstlist *A_Gate;
   PfetConst *PfetVar;
@@ -1003,8 +989,7 @@ Analog_32_action *act;
 /*==========================================================================*/
 
 
-void Log_PFET7T_INITLIB_32(act)
-Analog_32_action *act;
+void Log_PFET7T_INITLIB_32(Analog_32_action *act)
 {
   /*Main Procedure*/
 
diff --git a/src/ana/physical.c b/src/ana/physical.c
index e2f96dfffbf380de23c10690b72fc194c6209744..94d1d3e68274353844919633e250c4d60b5cd253 100644
--- a/src/ana/physical.c
+++ b/src/ana/physical.c
@@ -48,8 +48,7 @@ the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
 /****************************************************************************/
 
 
-static void initlib_Physical(act)
-Analog_32_action *act;
+static void initlib_Physical(Analog_32_action *act)
 {
   AnaCell_rec *NewCell;
 
@@ -63,8 +62,7 @@ Analog_32_action *act;
 }  /*NFET4_Initlib*/
 
 
-static void Reload_Physical(act)
-Analog_32_action *act;
+static void Reload_Physical(Analog_32_action *act)
 {
   log_grec *WITH;
 
@@ -110,8 +108,7 @@ Analog_32_action *act;
 
 }
 
-static void Attr_Physical(act)
-Analog_32_action *act;
+static void Attr_Physical(Analog_32_action *act)
 {
   long Attrnum;
   log_grec *WITH;
@@ -215,8 +212,7 @@ Analog_32_action *act;
   }
 }
 
-static void Openconfig_Physical(act)
-Analog_32_action *act;
+static void Openconfig_Physical(Analog_32_action *act)
 {
 
   if (!act->ok)
@@ -224,8 +220,7 @@ Analog_32_action *act;
   Reload_Physical(act);
 }
 
-void Readgate_Physical(act)
-Analog_32_action *act;
+void Readgate_Physical(Analog_32_action *act)
 {
   log_grec *WITH;
 
@@ -243,8 +238,7 @@ Analog_32_action *act;
 }
 
 
-static void Newgate_Physical(act)
-Analog_32_action *act;
+static void Newgate_Physical(Analog_32_action *act)
 {
   Analog_32_action Newact;
 
@@ -260,8 +254,7 @@ Analog_32_action *act;
 /*                 Library Listing For Cell Physical                    */
 /*==========================================================================*/
 
-void Log_PHYSICAL_initlib_32(act)
-Analog_32_action *act;
+void Log_PHYSICAL_initlib_32(Analog_32_action *act)
 {
   /*Body of procedure*/
 
@@ -303,10 +296,3 @@ Analog_32_action *act;
 #undef N_phi_ms
 #undef N_Eg
 #undef N_ni
-
-
-
-
-
-
-
diff --git a/src/ana/pnp1.c b/src/ana/pnp1.c
index 7baa96f92833d754883846860e2b6f7d0a615caa..afacb645633b67eefa754df06d2a8dde7c26e483 100644
--- a/src/ana/pnp1.c
+++ b/src/ana/pnp1.c
@@ -60,9 +60,7 @@ typedef struct ICPNP1 {
 /****************************************************************************/
 
 
-static void Limitfill(Inst, Limitflag, Erase)
-log_grec *Inst;
-int Limitflag, Erase;
+static void Limitfill(log_grec *Inst, int Limitflag, int Erase)
 {
   short LLx, LLy, URx, URy;
 
@@ -104,8 +102,7 @@ int Limitflag, Erase;
 
 
 
-static void Ex_PNP1(act)
-Analog_32_action *act;
+static void Ex_PNP1(Analog_32_action *act)
 {
   double MinI1, MinI2, MinI3, dI1dV1, dI1dV2, dI1dV3, dI2dV1, dI2dV2, dI2dV3,
 	 dI3dV1, dI3dV2, dI3dV3;
@@ -274,8 +271,7 @@ Analog_32_action *act;
 /****************************************************************************/
 
 
-static void Iin_PNP1(act)
-Analog_32_action *act;
+static void Iin_PNP1(Analog_32_action *act)
 {
   AnaExt_rec *Pin1Ptr;
   double VPin1, VMem1;
@@ -386,8 +382,7 @@ Analog_32_action *act;
   }
 }  /*Iin_PNP1*/
 
-static void GetCnf_PNP1(NewIC)
-ICPNP1 *NewIC;
+static void GetCnf_PNP1(ICPNP1 *NewIC)
 {
   int Found;
   char Arg[256], Keyword[256];
@@ -478,8 +473,7 @@ ICPNP1 *NewIC;
 /*                          Installation Procedure                           */
 /****************************************************************************/
 
-static void initlib_PNP1(act)
-Analog_32_action *act;
+static void initlib_PNP1(Analog_32_action *act)
 {
   AnaCell_rec *NewCell;
   ICPNP1 *NewIC;
@@ -521,9 +515,7 @@ Analog_32_action *act;
    #define MAKE_IECO(n)	((n)->IECO=(n)->Is*(n)->betaR/((n)->betaR+(n)->betaF))
 */
 
-static int PNP1check(Inst, Attrnum)
-log_grec *Inst;
-long Attrnum;
+static int PNP1check(log_grec *Inst, long Attrnum)
 {
   int Result;
   PNP1Const *PNP1Var;
@@ -622,8 +614,7 @@ long Attrnum;
 }
 
 
-static void Attr_PNP1(act)
-Analog_32_action *act;
+static void Attr_PNP1(Analog_32_action *act)
 {
   long Attrnum;
 
@@ -640,8 +631,7 @@ Analog_32_action *act;
 }
 
 
-static void Newgate_PNP1(act)
-Analog_32_action *act;
+static void Newgate_PNP1(Analog_32_action *act)
 {
   PNP1Const *PNP1Var;
   Anainstlist *A_Gate;
@@ -699,8 +689,7 @@ Analog_32_action *act;
   WITH->attr[N_Vcrow - 1].changed = true;
 }
 
-static void Copygate_PNP1(act)
-Analog_32_action *act;
+static void Copygate_PNP1(Analog_32_action *act)
 {
   PNP1Const *PNP1Var, *Old_PNP1var;
   Anainstlist *A_Gate, *A_Oldgate;
@@ -716,8 +705,7 @@ Analog_32_action *act;
   AnaCapCopy(act->inst);
 }
 
-static void Dispose_PNP1(act)
-Analog_32_action *act;
+static void Dispose_PNP1(Analog_32_action *act)
 {
   PNP1Const *PNP1Var;
   Anainstlist *A_Gate;
@@ -728,8 +716,7 @@ Analog_32_action *act;
   AnaCapDispose(act->inst);   /*7*/
 }
 
-static void Readgate_PNP1(act)
-Analog_32_action *act;
+static void Readgate_PNP1(Analog_32_action *act)
 {
   PNP1Const *PNP1Var;
   Anainstlist *A_Gate;
@@ -788,8 +775,7 @@ Analog_32_action *act;
   PNP1Var->TauCbe = 0.0;
 }
 
-static void Probe_PNP1(act)
-Analog_32_action *act;
+static void Probe_PNP1(Analog_32_action *act)
 {
   Anainstlist *A_Gate;
   AnaExt_rec *Node1Ptr, *Node2Ptr, *Node3Ptr;
@@ -852,8 +838,7 @@ Analog_32_action *act;
   }
 }
 
-static void Reset_PNP1(act)
-Analog_32_action *act;
+static void Reset_PNP1(Analog_32_action *act)
 {
   PNP1Const *PNP1Var;
   Anainstlist *A_Gate;
@@ -868,8 +853,7 @@ Analog_32_action *act;
     Limitfill(act->inst, PNP1Var->Limit, false);
 }
 
-static void PreUpdate_PNP1(act)
-Analog_32_action *act;
+static void PreUpdate_PNP1(Analog_32_action *act)
 {
   PNP1Const *PNP1Var;
   Anainstlist *A_Gate;
@@ -890,8 +874,7 @@ Analog_32_action *act;
 			   Vpin2 - VPin1 >= WITH1->attr[N_Vcrow - 1].UU.r);
 }
 
-static void Update_PNP1(act)
-Analog_32_action *act;
+static void Update_PNP1(Analog_32_action *act)
 {
   PNP1Const *PNP1Var;
   Anainstlist *A_Gate;
@@ -903,8 +886,7 @@ Analog_32_action *act;
   PNP1Var->Limit = PNP1Var->NewLimit;
 }
 
-static void Display_PNP1(act)
-Analog_32_action *act;
+static void Display_PNP1(Analog_32_action *act)
 {
   PNP1Const *PNP1Var;
   Anainstlist *A_Gate;
@@ -918,8 +900,7 @@ Analog_32_action *act;
 }
 
 
-static void Refresh_PNP1(act)
-Analog_32_action *act;
+static void Refresh_PNP1(Analog_32_action *act)
 {
   PNP1Const *PNP1Var;
   Anainstlist *A_Gate;
@@ -929,8 +910,7 @@ Analog_32_action *act;
   Limitfill(act->inst, PNP1Var->Limit, false);
 }
 
-static void Erase_PNP1(act)
-Analog_32_action *act;
+static void Erase_PNP1(Analog_32_action *act)
 {
   PNP1Const *PNP1Var;
   Anainstlist *A_Gate;
@@ -946,8 +926,7 @@ Analog_32_action *act;
 /*==========================================================================*/
 
 
-void Log_PNP1_INITLIB_32(act)
-Analog_32_action *act;
+void Log_PNP1_INITLIB_32(Analog_32_action *act)
 {
   /*Main Procedure*/
 
diff --git a/src/ana/pnp2.c b/src/ana/pnp2.c
index 5108204f37db6f361248ad57faa562f4a5515c88..b19665f925847e1527ab5b14f59676c70580f718 100644
--- a/src/ana/pnp2.c
+++ b/src/ana/pnp2.c
@@ -62,9 +62,7 @@ typedef struct ICPNP2 {
 /****************************************************************************/
 
 
-static void Limitfill(Inst, Limitflag, Erase)
-log_grec *Inst;
-int Limitflag, Erase;
+static void Limitfill(log_grec *Inst, int Limitflag, int Erase)
 {
   short LLx, LLy, URx, URy;
 
@@ -115,8 +113,7 @@ int Limitflag, Erase;
 
 
 
-static void Ex_PNP2(act)
-Analog_32_action *act;
+static void Ex_PNP2(Analog_32_action *act)
 {
   double MinI1, MinI2, MinI3, dI1dV1, dI1dV2, dI1dV3, dI2dV1, dI2dV2, dI2dV3,
 	 dI3dV1, dI3dV2, dI3dV3;
@@ -290,8 +287,7 @@ Analog_32_action *act;
 /****************************************************************************/
 
 
-static void Iin_PNP2(act)
-Analog_32_action *act;
+static void Iin_PNP2(Analog_32_action *act)
 {
   AnaExt_rec *Pin1Ptr;
   double VPin1, VMem1;
@@ -406,8 +402,7 @@ Analog_32_action *act;
   }
 }  /*Iin_PNP2*/
 
-static void GetCnf_PNP2(NewIC)
-ICPNP2 *NewIC;
+static void GetCnf_PNP2(ICPNP2 *NewIC)
 {
   int Found;
   char Arg[256], Keyword[256];
@@ -505,8 +500,7 @@ ICPNP2 *NewIC;
 /*                          Installation Procedure                           */
 /****************************************************************************/
 
-static void initlib_PNP2(act)
-Analog_32_action *act;
+static void initlib_PNP2(Analog_32_action *act)
 {
   AnaCell_rec *NewCell;
   ICPNP2 *NewIC;
@@ -545,9 +539,7 @@ Analog_32_action *act;
 #define MAKE_IECO(n)	((n)->IECO=(n)->Is/(n)->betaR)
 
 
-static int PNP2check(Inst, Attrnum)
-log_grec *Inst;
-long Attrnum;
+static int PNP2check(log_grec *Inst, long Attrnum)
 {
   int Result;
   PNP2Const *PNP2Var;
@@ -653,8 +645,7 @@ long Attrnum;
 }
 
 
-static void Attr_PNP2(act)
-Analog_32_action *act;
+static void Attr_PNP2(Analog_32_action *act)
 {
   long Attrnum;
 
@@ -671,8 +662,7 @@ Analog_32_action *act;
 }
 
 
-static void Newgate_PNP2(act)
-Analog_32_action *act;
+static void Newgate_PNP2(Analog_32_action *act)
 {
   PNP2Const *PNP2Var;
   Anainstlist *A_Gate;
@@ -734,8 +724,7 @@ Analog_32_action *act;
   WITH->attr[N_Vcrow - 1].changed = true;
 }
 
-static void Copygate_PNP2(act)
-Analog_32_action *act;
+static void Copygate_PNP2(Analog_32_action *act)
 {
   PNP2Const *PNP2Var, *Old_PNP2var;
   Anainstlist *A_Gate, *A_Oldgate;
@@ -751,8 +740,7 @@ Analog_32_action *act;
   AnaCapCopy(act->inst);
 }
 
-static void Dispose_PNP2(act)
-Analog_32_action *act;
+static void Dispose_PNP2(Analog_32_action *act)
 {
   PNP2Const *PNP2Var;
   Anainstlist *A_Gate;
@@ -763,8 +751,7 @@ Analog_32_action *act;
   AnaCapDispose(act->inst);   /*7*/
 }
 
-static void Readgate_PNP2(act)
-Analog_32_action *act;
+static void Readgate_PNP2(Analog_32_action *act)
 {
   PNP2Const *PNP2Var;
   Anainstlist *A_Gate;
@@ -827,8 +814,7 @@ Analog_32_action *act;
   PNP2Var->TauCbe = 0.0;
 }
 
-static void Probe_PNP2(act)
-Analog_32_action *act;
+static void Probe_PNP2(Analog_32_action *act)
 {
   Anainstlist *A_Gate;
   AnaExt_rec *Node1Ptr, *Node2Ptr, *Node3Ptr;
@@ -891,8 +877,7 @@ Analog_32_action *act;
   }
 }
 
-static void Reset_PNP2(act)
-Analog_32_action *act;
+static void Reset_PNP2(Analog_32_action *act)
 {
   PNP2Const *PNP2Var;
   Anainstlist *A_Gate;
@@ -907,8 +892,7 @@ Analog_32_action *act;
     Limitfill(act->inst, PNP2Var->Limit, false);
 }
 
-static void PreUpdate_PNP2(act)
-Analog_32_action *act;
+static void PreUpdate_PNP2(Analog_32_action *act)
 {
   PNP2Const *PNP2Var;
   Anainstlist *A_Gate;
@@ -929,8 +913,7 @@ Analog_32_action *act;
 			   Vpin2 - VPin1 >= WITH1->attr[N_Vcrow - 1].UU.r);
 }
 
-static void Update_PNP2(act)
-Analog_32_action *act;
+static void Update_PNP2(Analog_32_action *act)
 {
   PNP2Const *PNP2Var;
   Anainstlist *A_Gate;
@@ -942,8 +925,7 @@ Analog_32_action *act;
   PNP2Var->Limit = PNP2Var->NewLimit;
 }
 
-static void Display_PNP2(act)
-Analog_32_action *act;
+static void Display_PNP2(Analog_32_action *act)
 {
   PNP2Const *PNP2Var;
   Anainstlist *A_Gate;
@@ -957,8 +939,7 @@ Analog_32_action *act;
 }
 
 
-static void Refresh_PNP2(act)
-Analog_32_action *act;
+static void Refresh_PNP2(Analog_32_action *act)
 {
   PNP2Const *PNP2Var;
   Anainstlist *A_Gate;
@@ -968,8 +949,7 @@ Analog_32_action *act;
   Limitfill(act->inst, PNP2Var->Limit, false);
 }
 
-static void Erase_PNP2(act)
-Analog_32_action *act;
+static void Erase_PNP2(Analog_32_action *act)
 {
   PNP2Const *PNP2Var;
   Anainstlist *A_Gate;
@@ -985,8 +965,7 @@ Analog_32_action *act;
 /*==========================================================================*/
 
 
-void Log_PNP2_INITLIB_32(act)
-Analog_32_action *act;
+void Log_PNP2_INITLIB_32(Analog_32_action *act)
 {
   /*Main Procedure*/
 
diff --git a/src/ana/pspc1.c b/src/ana/pspc1.c
index 9d4a1c1319661a579a38b94d8f0f78ca5b318dc1..a203405508c8ba7eb01b300e0489911610fb7843 100644
--- a/src/ana/pspc1.c
+++ b/src/ana/pspc1.c
@@ -42,7 +42,8 @@ the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
 /* From input file "swiss.text" */
 
 
-#include <utils/p2c.h>
+#include "utils/p2c.h"
+#include "graphics/mylib.h"
 #include "ana/pspc1.h"
 #include "node.h"
 
@@ -84,13 +85,26 @@ typedef struct ICPfet {
 	 InitCgb, InitCdb, InitCsb, InitEarly, InitW, InitL, InitNumber;
 } ICPfet;
 
+void drawnum3(short x, short y, short n)
+{
+  char s[4];
+
+  m_move((long)x, (long)y);
+  strcpy(s, "   ");
+  m_displaytext(s);
+  if (n >= 100)
+  {
+      s[0] = n/100 + '0';
+      s[1] = (n%100)/10 + '0';
+  } else if (n >= 10 )
+    s[1] = n / 10 + '0';
+  s[2] = n % 10 + '0';
+  m_displaytext(s);
+}
 
-static void Show_W_L(Inst,erase)
-log_grec *Inst;
-int erase;
+static void Show_W_L(log_grec *Inst, int erase)
 {
   short Lx, Ly, Wx, Wy;
-  void drawnum3();
   long oldWx,oldWy,oldLx,oldLy;
   int W,L;
   float scale;
@@ -174,8 +188,7 @@ int erase;
 /****************************************************************************/
 
 
-static void Ex_PSPC1(act)
-Analog_32_action *act;
+static void Ex_PSPC1(Analog_32_action *act)
 {
   double MinI2, dI2dV1, dI2dV2, dI2dV3, dI2dV4,
          MinI3, dI3dV1, dI3dV2, dI3dV3, dI3dV4,
@@ -392,8 +405,7 @@ Analog_32_action *act;
 /*          Procedure To Supply Current  Out of a Cell To Current Meters    */
 /****************************************************************************/
 
-static void Iin_PSPC1(act)
-Analog_32_action *act;
+static void Iin_PSPC1(Analog_32_action *act)
 {
   AnaExt_rec *Pin1Ptr, *Pin2Ptr, *Pin3Ptr, *Pin4Ptr;
   double VPin1, VPin2, VPin3, VPin4, VMem1, VMem2, VMem3;
@@ -514,8 +526,7 @@ Analog_32_action *act;
 }  /*Iin_Pspc1*/
 
 
-static void GetCnf_Pspc1(NewIC)
-ICPfet *NewIC;
+static void GetCnf_Pspc1(ICPfet *NewIC)
 {
   int Found;
   char Arg[256], Keyword[256];
@@ -643,8 +654,7 @@ ICPfet *NewIC;
 /*                          Installation Procedure                           */
 /****************************************************************************/
 
-static void initlib_PSPC1(act)
-Analog_32_action *act;
+static void initlib_PSPC1(Analog_32_action *act)
 {
   AnaCell_rec *NewCell;
   ICPfet *NewIC;
@@ -684,9 +694,7 @@ Analog_32_action *act;
 }  /*PSPC1_Initlib*/
 
 
-static int Pfetcheck(Inst, Attrnum)
-log_grec *Inst;
-long Attrnum;
+static int Pfetcheck(log_grec *Inst, long Attrnum)
 {
   int Result;
   PfetConst *PfetVar;
@@ -819,8 +827,7 @@ long Attrnum;
 }
 
 
-static void Attr_Pspc1(act)
-Analog_32_action *act;
+static void Attr_Pspc1(Analog_32_action *act)
 {
   long Attrnum;
 
@@ -847,8 +854,7 @@ Analog_32_action *act;
 }
 
 
-static void Newgate_Pspc1(act)
-Analog_32_action *act;
+static void Newgate_Pspc1(Analog_32_action *act)
 {
   PfetConst *PfetVar;
   Anainstlist *A_Gate;
@@ -921,8 +927,7 @@ Analog_32_action *act;
   WITH->attr[N_Number - 1].changed = true;
 }
 
-static void Copygate_Pspc1(act)
-Analog_32_action *act;
+static void Copygate_Pspc1(Analog_32_action *act)
 {
   PfetConst *PfetVar, *Old_Pfetvar;
   Anainstlist *A_Gate, *A_Oldgate;
@@ -936,8 +941,7 @@ Analog_32_action *act;
   AnaCapCopy(act->inst);   /*6*/
 }
 
-static void Dispose_Pspc1(act)
-Analog_32_action *act;
+static void Dispose_Pspc1(Analog_32_action *act)
 {
   PfetConst *PfetVar;
   Anainstlist *A_Gate;
@@ -948,8 +952,7 @@ Analog_32_action *act;
   AnaCapDispose(act->inst);   /*7*/
 }
 
-static void Readgate_Pspc1(act)
-Analog_32_action *act;
+static void Readgate_Pspc1(Analog_32_action *act)
 {
   PfetConst *PfetVar;
   Anainstlist *A_Gate;
@@ -1030,8 +1033,7 @@ Analog_32_action *act;
   PfetVar->TauCgs = 0.0;
 }
 
-static void Probe_Pspc1(act)
-Analog_32_action *act;
+static void Probe_Pspc1(Analog_32_action *act)
 {
   Anainstlist *A_Gate;
   AnaExt_rec *Node1Ptr, *Node2Ptr, *Node3Ptr, *Node4Ptr;
@@ -1116,8 +1118,7 @@ Analog_32_action *act;
 /*==========================================================================*/
 
 
-void Log_PSPC1_INITLIB_32(act)
-Analog_32_action *act;
+void Log_PSPC1_INITLIB_32(Analog_32_action *act)
 {
   /*Main Procedure*/
 
@@ -1216,11 +1217,3 @@ Analog_32_action *act;
 #undef N_L
 #undef N_Number
 #undef Gatename
-
-
-
-
-
-
-
-
diff --git a/src/ana/pwl.c b/src/ana/pwl.c
index f7c19d9c92ccf8bafc5cc00fbadd60995f0a5502..6ba9bfd633111abe2d7c648a2835d55e83bec378 100644
--- a/src/ana/pwl.c
+++ b/src/ana/pwl.c
@@ -129,10 +129,7 @@ typedef struct ICPWL {
 /****************************************************************************/
 
 
-static void Limitfill(Inst, Limitflag, Erase)
-log_grec *Inst;
-char Limitflag;
-int Erase;
+static void Limitfill(log_grec *Inst, char Limitflag, int Erase)
 {
   Anainstlist *A_Gate;
   PWLConst *PWLVar;
@@ -193,9 +190,7 @@ int Erase;
 /*            Procedure To Simulate Cell In Algorithm                        */
 /****************************************************************************/
 
-static void locate (x, n, v, j)
-double  x[], v;
-int     n, *j;
+static void locate (double x[], int n, double v, int *j)
 {
         int ascnd,ju,jm,jl;
 
@@ -214,10 +209,7 @@ int     n, *j;
 }
 
 
-static void interp (v, j, PWLVar, i, didv)
-  double        v, *i, *didv;
-  int           j;
-  PWLConst	*PWLVar;
+static void interp (double v, int j, PWLConst *PWLVar, double *i, double *didv)
 {
   double        s;
 
@@ -245,8 +237,7 @@ static void interp (v, j, PWLVar, i, didv)
 }
 
 
-static void Ex_PWL(act)
-Analog_32_action *act;
+static void Ex_PWL(Analog_32_action *act)
 {
   double MinI1, MinI2, dI1dV1, dI1dV2, dI2dV1, dI2dV2;
   AnaExt_rec *Pin1Ptr;
@@ -320,8 +311,7 @@ Analog_32_action *act;
 /****************************************************************************/
 
 
-static void Iin_PWL(act)
-Analog_32_action *act;
+static void Iin_PWL(Analog_32_action *act)
 {
   AnaExt_rec *Pin1Ptr;
   double VPin1;
@@ -385,10 +375,11 @@ Analog_32_action *act;
 }  /*Iin_PWL*/
 
 
-static void findcircle (x1, y1, x2, y2, x3, y3, rd,
-                       xc, yc, xl, xr, sd, ml, mr, bl, br)
-  double        x1, y1, x2, y2, x3, y3, *rd;
-  double        *xc, *yc, *xl, *xr, *sd, *ml, *mr, *bl, *br;
+static void findcircle (double x1, double y1, double x2, double y2,
+			double x3, double y3, double *rd,
+			double *xc, double *yc, double *xl,
+			double *xr, double *sd, double *ml,
+			double *mr, double *bl, double *br)
 {
   double        r;
   double        pxl, pyl, pxr, pyr;
@@ -451,10 +442,7 @@ retry:
 }
 
 
-static void pwl2c (x, y, n, radius, PWLVar)
-  double        x[], y[], radius;
-  int           n;
-  PWLConst      *PWLVar;
+static void pwl2c (double x[], double y[], int n, double radius, PWLConst *PWLVar)
 {
   double        r[MAX_PWL-2];
   double        xc[MAX_PWL-2], yc[MAX_PWL-2], xl[MAX_PWL-2], xr[MAX_PWL-2];
@@ -498,8 +486,7 @@ static void pwl2c (x, y, n, radius, PWLVar)
 }
 
 
-static char CheckPWLFile (datafile)
-  FILE		*datafile;
+static char CheckPWLFile (FILE *datafile)
 {
   int		n;
   double        x[MAX_PWL], y[MAX_PWL];
@@ -524,10 +511,7 @@ static char CheckPWLFile (datafile)
 }
 
 
-static void LoadPWLVar (PWLVar, datafileName, radius)
-  PWLConst	*PWLVar;
-  char		*datafileName;
-  double	radius;
+static void LoadPWLVar (PWLConst *PWLVar, char *datafileName, double radius)
 {
   double        x[MAX_PWL], y[MAX_PWL];
   int           n;
@@ -554,8 +538,7 @@ static void LoadPWLVar (PWLVar, datafileName, radius)
 }
 
 
-static void GetCnf_PWL(NewIC)
-ICPWL *NewIC;
+static void GetCnf_PWL(ICPWL *NewIC)
 {
   int Found;
   char Arg[256], Keyword[256];
@@ -609,8 +592,7 @@ ICPWL *NewIC;
 /*                          Installation Procedure                           */
 /****************************************************************************/
 
-static void initlib_PWL(act)
-Analog_32_action *act;
+static void initlib_PWL(Analog_32_action *act)
 {
   AnaCell_rec *NewCell;
   ICPWL *NewIC;
@@ -637,9 +619,7 @@ Analog_32_action *act;
 
 
 
-static int PWLcheck(Inst, Attrnum)
-log_grec *Inst;
-long Attrnum;
+static int PWLcheck(log_grec *Inst, long Attrnum)
 {
   int Result;
   PWLConst *PWLVar;
@@ -682,8 +662,7 @@ long Attrnum;
 }
 
 
-static void Attr_PWL(act)
-Analog_32_action *act;
+static void Attr_PWL(Analog_32_action *act)
 {
   long Attrnum;
 
@@ -695,8 +674,7 @@ Analog_32_action *act;
 }
 
 
-static void Newgate_PWL(act)
-Analog_32_action *act;
+static void Newgate_PWL(Analog_32_action *act)
 {
   PWLConst *PWLVar;
   Anainstlist *A_Gate;
@@ -735,8 +713,7 @@ Analog_32_action *act;
   }
 }
 
-static void Copygate_PWL(act)
-Analog_32_action *act;
+static void Copygate_PWL(Analog_32_action *act)
 {
   PWLConst *PWLVar, *Old_PWLvar;
   Anainstlist *A_Gate, *A_Oldgate;
@@ -752,8 +729,7 @@ Analog_32_action *act;
   AnaCapCopy(act->inst);
 }
 
-static void Dispose_PWL(act)
-Analog_32_action *act;
+static void Dispose_PWL(Analog_32_action *act)
 {
   PWLConst *PWLVar;
   Anainstlist *A_Gate;
@@ -764,8 +740,7 @@ Analog_32_action *act;
   AnaCapDispose(act->inst);   /*7*/
 }
 
-static void Readgate_PWL(act)
-Analog_32_action *act;
+static void Readgate_PWL(Analog_32_action *act)
 {
   PWLConst *PWLVar;
   Anainstlist *A_Gate;
@@ -781,8 +756,7 @@ Analog_32_action *act;
 }
 
 
-static void Probe_PWL(act)
-Analog_32_action *act;
+static void Probe_PWL(Analog_32_action *act)
 {
   Anainstlist *A_Gate;
   AnaExt_rec *Node1Ptr, *Node2Ptr;
@@ -837,8 +811,7 @@ Analog_32_action *act;
 }
 
 
-static void Reset_PWL(act)
-Analog_32_action *act;
+static void Reset_PWL(Analog_32_action *act)
 {
   PWLConst *PWLVar;
   Anainstlist *A_Gate;
@@ -854,8 +827,7 @@ Analog_32_action *act;
 }
 
 
-static void PreUpdate_PWL(act)
-Analog_32_action *act;
+static void PreUpdate_PWL(Analog_32_action *act)
 {
   PWLConst *PWLVar;
   Anainstlist *A_Gate;
@@ -880,8 +852,7 @@ Analog_32_action *act;
 }
 
 
-static void Update_PWL(act)
-Analog_32_action *act;
+static void Update_PWL(Analog_32_action *act)
 {
   PWLConst *PWLVar;
   Anainstlist *A_Gate;
@@ -894,8 +865,7 @@ Analog_32_action *act;
 }
 
 
-static void Display_PWL(act)
-Analog_32_action *act;
+static void Display_PWL(Analog_32_action *act)
 {
   PWLConst *PWLVar;
   Anainstlist *A_Gate;
@@ -909,8 +879,7 @@ Analog_32_action *act;
 }
 
 
-static void Refresh_PWL(act)
-Analog_32_action *act;
+static void Refresh_PWL(Analog_32_action *act)
 {
   PWLConst *PWLVar;
   Anainstlist *A_Gate;
@@ -920,8 +889,7 @@ Analog_32_action *act;
   Limitfill(act->inst, PWLVar->Limit, false);
 }
 
-static void Erase_PWL(act)
-Analog_32_action *act;
+static void Erase_PWL(Analog_32_action *act)
 {
   PWLConst *PWLVar;
   Anainstlist *A_Gate;
@@ -937,8 +905,7 @@ Analog_32_action *act;
 /*==========================================================================*/
 
 
-void Log_PWL_INITLIB_32(act)
-Analog_32_action *act;
+void Log_PWL_INITLIB_32(Analog_32_action *act)
 {
   /*Main Procedure*/
 
@@ -1029,7 +996,3 @@ Analog_32_action *act;
 
 #undef Cstart
 #undef Gatename
-
-
-
-
diff --git a/src/ana/resfloat.c b/src/ana/resfloat.c
index d798d1671808291bed384f69c33d7ec35d5f2ab2..84bf90d8c9c1f3e7992db7ff460730d2aa0b13e4 100644
--- a/src/ana/resfloat.c
+++ b/src/ana/resfloat.c
@@ -53,8 +53,7 @@ typedef struct ICResfloat {
 /****************************************************************************/
 
 
-static void Ex_Resfloat(act)
-Analog_32_action *act;
+static void Ex_Resfloat(Analog_32_action *act)
 {
   double MinI1, MinI2, dI1dV1, dI1dV2, dI2dV1, dI2dV2;
   AnaExt_rec *Pin1Ptr;
@@ -106,8 +105,7 @@ Analog_32_action *act;
 /****************************************************************************/
 
 
-static void Iin_Resfloat(act)
-Analog_32_action *act;
+static void Iin_Resfloat(Analog_32_action *act)
 {
   AnaExt_rec *Pin1Ptr;
   double VPin1;
@@ -146,8 +144,7 @@ Analog_32_action *act;
 }  /*Iin_Resfloat*/
 
 
-static void GetCnf_Resfloat(NewIC)
-ICResfloat *NewIC;
+static void GetCnf_Resfloat(ICResfloat *NewIC)
 {
   int Found;
   char Arg[256], Keyword[256];
@@ -175,8 +172,7 @@ ICResfloat *NewIC;
 /*                          Installation Procedure                           */
 /****************************************************************************/
 
-static void initlib_Resfloat(act)
-Analog_32_action *act;
+static void initlib_Resfloat(Analog_32_action *act)
 {
   AnaCell_rec *NewCell;
   ICResfloat *NewIC;
@@ -200,9 +196,7 @@ Analog_32_action *act;
 
 
 
-static int Resfloatcheck(Inst, Attrnum)
-log_grec *Inst;
-long Attrnum;
+static int Resfloatcheck(log_grec *Inst, long Attrnum)
 {
   int Result;
   ResfloatConst *ResfloatVar;
@@ -225,8 +219,7 @@ long Attrnum;
 }
 
 
-static void Attr_Resfloat(act)
-Analog_32_action *act;
+static void Attr_Resfloat(Analog_32_action *act)
 {
   long Attrnum;
 
@@ -238,8 +231,7 @@ Analog_32_action *act;
 }
 
 
-static void Newgate_Resfloat(act)
-Analog_32_action *act;
+static void Newgate_Resfloat(Analog_32_action *act)
 {
   ResfloatConst *ResfloatVar;
   Anainstlist *A_Gate;
@@ -260,8 +252,7 @@ Analog_32_action *act;
   WITH->attr[N_Res - 1].changed = true;
 }
 
-static void Copygate_Resfloat(act)
-Analog_32_action *act;
+static void Copygate_Resfloat(Analog_32_action *act)
 {
   ResfloatConst *ResfloatVar, *Old_Resfloatvar;
   Anainstlist *A_Gate, *A_Oldgate;
@@ -277,8 +268,7 @@ Analog_32_action *act;
   AnaCapCopy(act->inst);
 }
 
-static void Dispose_Resfloat(act)
-Analog_32_action *act;
+static void Dispose_Resfloat(Analog_32_action *act)
 {
   ResfloatConst *ResfloatVar;
   Anainstlist *A_Gate;
@@ -289,8 +279,7 @@ Analog_32_action *act;
   AnaCapDispose(act->inst);   /*7*/
 }
 
-static void Readgate_Resfloat(act)
-Analog_32_action *act;
+static void Readgate_Resfloat(Analog_32_action *act)
 {
   ResfloatConst *ResfloatVar;
   Anainstlist *A_Gate;
@@ -304,8 +293,7 @@ Analog_32_action *act;
 }
 
 
-static void Probe_Resfloat(act)
-Analog_32_action *act;
+static void Probe_Resfloat(Analog_32_action *act)
 {
   Anainstlist *A_Gate;
   AnaExt_rec *Node1Ptr, *Node2Ptr;
@@ -365,8 +353,7 @@ Analog_32_action *act;
 /*==========================================================================*/
 
 
-void Log_resfloat_initlib_32(act)
-Analog_32_action *act;
+void Log_resfloat_initlib_32(Analog_32_action *act)
 {
   /*Main Procedure*/
 
@@ -441,8 +428,3 @@ Analog_32_action *act;
 #undef N_Res
 #undef Cstart
 #undef Gatename
-
-
-
-
-
diff --git a/src/ana/rtd.c b/src/ana/rtd.c
index 7b21a289f4d4a120afc16d470f15f348badcecc5..fff2fbca7619b56a6e7708e7d9a36468f349b49f 100644
--- a/src/ana/rtd.c
+++ b/src/ana/rtd.c
@@ -120,8 +120,7 @@ typedef struct ICRTD {
 /*            Procedure To Simulate Cell In Algorithm                        */
 /****************************************************************************/
 
-static double SafeExp (x)
-double	x;
+static double SafeExp (double x)
 {
   if (x < -700.0)
     return (0.0);
@@ -131,8 +130,7 @@ double	x;
     return (exp (x));
 }
 
-static void Ex_RTD(act)
-Analog_32_action *act;
+static void Ex_RTD(Analog_32_action *act)
 {
   double MinI1, MinI2, dI1dV1, dI1dV2, dI2dV1, dI2dV2;
   AnaExt_rec *Pin1Ptr;
@@ -281,8 +279,7 @@ Analog_32_action *act;
 /****************************************************************************/
 
 
-static void Iin_RTD(act)
-Analog_32_action *act;
+static void Iin_RTD(Analog_32_action *act)
 {
 	AnaExt_rec *Pin1Ptr;
 	double VPin1;
@@ -431,8 +428,7 @@ Analog_32_action *act;
 }  /*Iin_RTD*/
 
 
-static void GetCnf_RTD(NewIC)
-ICRTD *NewIC;
+static void GetCnf_RTD(ICRTD *NewIC)
 {
   int Found;
   char Arg[256], Keyword[256];
@@ -555,8 +551,7 @@ ICRTD *NewIC;
 /*                          Installation Procedure                           */
 /****************************************************************************/
 
-static void initlib_RTD(act)
-Analog_32_action *act;
+static void initlib_RTD(Analog_32_action *act)
 {
   AnaCell_rec *NewCell;
   ICRTD *NewIC;
@@ -592,9 +587,7 @@ Analog_32_action *act;
 
 
 
-static int RTDcheck(Inst, Attrnum)
-log_grec *Inst;
-long Attrnum;
+static int RTDcheck(log_grec *Inst, long Attrnum)
 {
   int Result;
   RTDConst *RTDVar;
@@ -718,8 +711,7 @@ long Attrnum;
 }
 
 
-static void Attr_RTD(act)
-Analog_32_action *act;
+static void Attr_RTD(Analog_32_action *act)
 {
   long Attrnum;
 
@@ -731,8 +723,7 @@ Analog_32_action *act;
 }
 
 
-static void Newgate_RTD(act)
-Analog_32_action *act;
+static void Newgate_RTD(Analog_32_action *act)
 {
   RTDConst *RTDVar;
   Anainstlist *A_Gate;
@@ -788,8 +779,7 @@ Analog_32_action *act;
   }
 }
 
-static void Copygate_RTD(act)
-Analog_32_action *act;
+static void Copygate_RTD(Analog_32_action *act)
 {
   RTDConst *RTDVar, *Old_RTDvar;
   Anainstlist *A_Gate, *A_Oldgate;
@@ -805,8 +795,7 @@ Analog_32_action *act;
   AnaCapCopy(act->inst);
 }
 
-static void Dispose_RTD(act)
-Analog_32_action *act;
+static void Dispose_RTD(Analog_32_action *act)
 {
   RTDConst *RTDVar;
   Anainstlist *A_Gate;
@@ -817,8 +806,7 @@ Analog_32_action *act;
   AnaCapDispose(act->inst);   /*7*/
 }
 
-static void Readgate_RTD(act)
-Analog_32_action *act;
+static void Readgate_RTD(Analog_32_action *act)
 {
   RTDConst *RTDVar;
   Anainstlist *A_Gate;
@@ -855,8 +843,7 @@ Analog_32_action *act;
 }
 
 
-static void Probe_RTD(act)
-Analog_32_action *act;
+static void Probe_RTD(Analog_32_action *act)
 {
   Anainstlist *A_Gate;
   AnaExt_rec *Node1Ptr, *Node2Ptr;
@@ -916,8 +903,7 @@ Analog_32_action *act;
 /*==========================================================================*/
 
 
-void Log_rtd_initlib_32(act)
-Analog_32_action *act;
+void Log_rtd_initlib_32(Analog_32_action *act)
 {
   /*Main Procedure*/
 
diff --git a/src/ana/runspec.c b/src/ana/runspec.c
index cfecb5bf3a6cdd0a8e3c6bea0f207d8e5cdc161a..ac392ff3077565c767134e34a476079f5a00b0cc 100644
--- a/src/ana/runspec.c
+++ b/src/ana/runspec.c
@@ -49,8 +49,7 @@ the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
 /****************************************************************************/
 
 
-static void initlib_Runspec(act)
-Analog_32_action *act;
+static void initlib_Runspec(Analog_32_action *act)
 {
   AnaCell_rec *NewCell;
 
@@ -64,8 +63,7 @@ Analog_32_action *act;
 }  /*NFET4_Initlib*/
 
 
-static void Reload_Runspec(act)
-Analog_32_action *act;
+static void Reload_Runspec(Analog_32_action *act)
 {
   log_grec *WITH;
 
@@ -102,8 +100,7 @@ Analog_32_action *act;
 
 }
 
-static void Attr_Runspec(act)
-Analog_32_action *act;
+static void Attr_Runspec(Analog_32_action *act)
 {
   long Attrnum;
   log_grec *WITH;
@@ -215,16 +212,14 @@ Analog_32_action *act;
   }
 }
 
-static void Openconfig_Runspec(act)
-Analog_32_action *act;
+static void Openconfig_Runspec(Analog_32_action *act)
 {
   if (!act->ok)
     return;
   Reload_Runspec(act);
 }
 
-void Readgate_Runspec(act)
-Analog_32_action *act;
+void Readgate_Runspec(Analog_32_action *act)
 {
   log_grec *WITH;
 
@@ -243,8 +238,7 @@ Analog_32_action *act;
 }
 
 
-static void Newgate_Runspec(act)
-Analog_32_action *act;
+static void Newgate_Runspec(Analog_32_action *act)
 {
   Analog_32_action Newact;
 
@@ -260,8 +254,7 @@ Analog_32_action *act;
 /*                 Library Listing For Cell Runspec                          */
 /*==========================================================================*/
 
-void Log_RUNSPEC_initlib_32(act)
-Analog_32_action *act;
+void Log_RUNSPEC_initlib_32(Analog_32_action *act)
 {
   /*Body of procedure*/
 
@@ -301,5 +294,3 @@ Analog_32_action *act;
 #undef N_P_Na
 #undef N_P_Mu
 #undef N_P_Qss
-
-
diff --git a/src/ana/stairs.c b/src/ana/stairs.c
index c46abd5722b5fbefab20aff7f9e046cf608141c0..e4679aa11a1c33018584829347e0b8207803c0d2 100644
--- a/src/ana/stairs.c
+++ b/src/ana/stairs.c
@@ -68,9 +68,7 @@ typedef struct ICStairs {
 
 
 
-static void Switchfill(Inst, Erase)
-log_grec *Inst;
-int Erase;
+static void Switchfill(log_grec *Inst, int Erase)
 {
   short LLx, LLy, URx, URy;
 
@@ -93,9 +91,7 @@ int Erase;
   (*AnaLogglobals->hook.unhidecursor)();
 }
 
-static void Limitfill(Inst, Limitflag, Erase)
-log_grec *Inst;
-int Limitflag, Erase;
+static void Limitfill(log_grec *Inst, int Limitflag, int Erase)
 {
   short LLx, LLy, URx, URy;
 
@@ -120,10 +116,7 @@ int Limitflag, Erase;
 
 
 
-static double Stairmaker(Inst, Ftime, First)
-log_grec *Inst;
-double Ftime;
-int First;
+static double Stairmaker(log_grec *Inst, double Ftime, int First)
 {
   double Result;
   int Found;
@@ -177,8 +170,7 @@ int First;
 /*            Procedure To Simulate Cell In Algorithm                        */
 /****************************************************************************/
 
-static void Ex_Stairs(act)
-Analog_32_action *act;
+static void Ex_Stairs(Analog_32_action *act)
 {
   	/*Stairserent*/
   	double MinI1, MinI2, dI1dV1, dI1dV2, dI2dV1, dI2dV2;
@@ -244,8 +236,7 @@ Analog_32_action *act;
 /****************************************************************************/
 
 
-static void Iin_Stairs(act)
-Analog_32_action *act;
+static void Iin_Stairs(Analog_32_action *act)
 {
   	/*Stairserent*/
   	AnaExt_rec *Pin1Ptr, *Pin2Ptr;
@@ -311,8 +302,7 @@ Analog_32_action *act;
   	}
 }  /*Iin_Stairs*/
 
-static void GetCnf_Stairs(NewIC)
-ICStairs *NewIC;
+static void GetCnf_Stairs(ICStairs *NewIC)
 {
   int Found;
   char Arg[256], Keyword[256];
@@ -397,8 +387,7 @@ ICStairs *NewIC;
 /*                          Installation Procedure                           */
 /****************************************************************************/
 
-static void initlib_Stairs(act)
-Analog_32_action *act;
+static void initlib_Stairs(Analog_32_action *act)
 {
   /*Stairserent*/
   AnaCell_rec *NewCell;
@@ -430,9 +419,7 @@ Analog_32_action *act;
 }  /*Stairs_Initlib*/
 
 
-static int Stairscheck(Inst, Attrnum)
-log_grec *Inst;
-long Attrnum;
+static int Stairscheck(log_grec *Inst, long Attrnum)
 {
   int Result;
   StairsConst *StairsVar;
@@ -491,8 +478,7 @@ long Attrnum;
 
 
 
-static void Attr_Stairs(act)
-Analog_32_action *act;
+static void Attr_Stairs(Analog_32_action *act)
 {
   long Attrnum;
 
@@ -504,8 +490,7 @@ Analog_32_action *act;
 }
 
 
-static void Newgate_Stairs(act)
-Analog_32_action *act;
+static void Newgate_Stairs(Analog_32_action *act)
 {
   StairsConst *StairsVar;
   Anainstlist *A_Gate;
@@ -545,8 +530,7 @@ Analog_32_action *act;
   }
 }
 
-static void Copygate_Stairs(act)
-Analog_32_action *act;
+static void Copygate_Stairs(Analog_32_action *act)
 {
   StairsConst *StairsVar, *Old_Stairsvar;
   Anainstlist *A_Gate, *A_Oldgate;
@@ -561,8 +545,7 @@ Analog_32_action *act;
 }
 
 
-static void Dispose_Stairs(act)
-Analog_32_action *act;
+static void Dispose_Stairs(Analog_32_action *act)
 {
   StairsConst *StairsVar;
   Anainstlist *A_Gate;
@@ -573,8 +556,7 @@ Analog_32_action *act;
   AnaCapDispose(act->inst);   /*7*/
 }
 
-static void Readgate_Stairs(act)
-Analog_32_action *act;
+static void Readgate_Stairs(Analog_32_action *act)
 {
   StairsConst *StairsVar;
   Anainstlist *A_Gate;
@@ -606,8 +588,7 @@ Analog_32_action *act;
   StairsVar->Reset_Freeze = (*STR1 == 'T' || *STR1 == 't');
 }
 
-static void Writegate_Stairs(act)
-Analog_32_action *act;
+static void Writegate_Stairs(Analog_32_action *act)
 {
   StairsConst *StairsVar;
   Anainstlist *A_Gate;
@@ -630,8 +611,7 @@ Analog_32_action *act;
 
 
 
-static void Reset_Stairs(act)
-Analog_32_action *act;
+static void Reset_Stairs(Analog_32_action *act)
 {
   StairsConst *StairsVar;
   Anainstlist *A_Gate;
@@ -651,8 +631,7 @@ Analog_32_action *act;
   }
 }
 
-static void Set_Stairs(act)
-Analog_32_action *act;
+static void Set_Stairs(Analog_32_action *act)
 {
   StairsConst *StairsVar;
   Anainstlist *A_Gate;
@@ -664,8 +643,7 @@ Analog_32_action *act;
   StairsVar->Reset_Freeze = act->inst->attr[N_Freeze - 1].UU.b;
 }
 
-static void Clear_Stairs(act)
-Analog_32_action *act;
+static void Clear_Stairs(Analog_32_action *act)
 {
   StairsConst *StairsVar;
   Anainstlist *A_Gate;
@@ -681,8 +659,7 @@ Analog_32_action *act;
   StairsVar->Reset_Freeze = ICptr->ICFreeze;
 }
 
-static void PreUpdate_Stairs(act)
-Analog_32_action *act;
+static void PreUpdate_Stairs(Analog_32_action *act)
 {
   StairsConst *StairsVar;
   Anainstlist *A_Gate;
@@ -700,8 +677,7 @@ Analog_32_action *act;
   StairsVar->NewLimit = (fabs(VPin1 - VPin2 - StairsVar->Videal) > 0.1);
 }
 
-static void Update_Stairs(act)
-Analog_32_action *act;
+static void Update_Stairs(Analog_32_action *act)
 {
   StairsConst *StairsVar;
   Anainstlist *A_Gate;
@@ -717,8 +693,7 @@ Analog_32_action *act;
     StairsVar->Timez += AnaDtlast;
 }
 
-static void Display_Stairs(act)
-Analog_32_action *act;
+static void Display_Stairs(Analog_32_action *act)
 {
   StairsConst *StairsVar;
   Anainstlist *A_Gate;
@@ -750,8 +725,7 @@ Analog_32_action *act;
 }
 
 
-static void Touch_Stairs(act)
-Analog_32_action *act;
+static void Touch_Stairs(Analog_32_action *act)
 {
   log_action_t *WITH;
   log_grec *WITH1;
@@ -767,8 +741,7 @@ Analog_32_action *act;
 }
 
 
-static void Erase_Stairs(Inst)
-log_grec *Inst;
+static void Erase_Stairs(log_grec *Inst)
 {
   StairsConst *StairsVar;
   Anainstlist *A_Gate;
@@ -779,8 +752,7 @@ log_grec *Inst;
   Limitfill(Inst, StairsVar->Limit, true);
 }
 
-static void Refresh_Stairs(Inst)
-log_grec *Inst;
+static void Refresh_Stairs(log_grec *Inst)
 {
   StairsConst *StairsVar;
   Anainstlist *A_Gate;
@@ -791,8 +763,7 @@ log_grec *Inst;
   Limitfill(Inst, StairsVar->Limit, false);
 }
 
-static void Probe_Stairs(act)
-Analog_32_action *act;
+static void Probe_Stairs(Analog_32_action *act)
 {
   Anainstlist *A_Gate;
   StairsConst *StairsVar;
@@ -840,8 +811,7 @@ $End$*/
 /*=============================================================================*/
 
 
-void Log_stairs_initlib_32(act)
-Analog_32_action *act;
+void Log_stairs_initlib_32(Analog_32_action *act)
 {
   /*Main Procedure*/
 
@@ -951,9 +921,3 @@ Analog_32_action *act;
 #undef N_tRdelay
 #undef Cstart
 #undef Gatename
-
-
-
-
-
-
diff --git a/src/ana/tc.c b/src/ana/tc.c
index 3f5237b6955e1cbb57f4bd0ec4ff28b84a3722a8..d58c3bd162d1b232d4b3199b3c24e99e4d270580 100644
--- a/src/ana/tc.c
+++ b/src/ana/tc.c
@@ -131,9 +131,7 @@ static long AmpRange;
 /****************************************************************************/
 
 
-static void Limitfill(Inst, Limitflag, Erase)
-log_grec *Inst;
-int Limitflag, Erase;
+static void Limitfill(log_grec *Inst, int Limitflag, int Erase)
 {
   short LLx, LLy, URx, URy;
 
@@ -161,8 +159,7 @@ int Limitflag, Erase;
 /*                   Cell Installation Procedures                           */
 /****************************************************************************/
 
-static void GetCnf_TCAmp(NewIC)
-ICTCAmp *NewIC;
+static void GetCnf_TCAmp(ICTCAmp *NewIC)
 {
   int Found;
   char Arg[256], Keyword[256];
@@ -301,8 +298,7 @@ ICTCAmp *NewIC;
 }
 
 
-static void INITLIB_TCAMP(act)
-Analog_32_action *act;
+static void INITLIB_TCAMP(Analog_32_action *act)
 {
   AnaCell_rec *NewCell;
   ICTCAmp *NewIC;
@@ -376,9 +372,7 @@ Analog_32_action *act;
       TimeTooSmall=1e-60;*/
 
 
-static int TCAmpcheck(Inst, Attrnum)
-log_grec *Inst;
-long Attrnum;
+static int TCAmpcheck(log_grec *Inst, long Attrnum)
 {
   int Result;
   TCAmpConst *TCAmpVar;
@@ -484,8 +478,7 @@ long Attrnum;
 }
 
 
-static void Attr_TCAmp(act)
-Analog_32_action *act;
+static void Attr_TCAmp(Analog_32_action *act)
 {
   long Attrnum;
 
@@ -502,8 +495,7 @@ Analog_32_action *act;
 }
 
 
-static void Newgate_TCAmp(act)
-Analog_32_action *act;
+static void Newgate_TCAmp(Analog_32_action *act)
 {
   TCAmpConst *TCAmpVar;
   Anainstlist *A_Gate;
@@ -599,8 +591,7 @@ Analog_32_action *act;
 }
 
 
-static void Copygate_TCAmp(act)
-Analog_32_action *act;
+static void Copygate_TCAmp(Analog_32_action *act)
 {
   TCAmpConst *TCAmpVar, *Old_TCAmpvar;
   Anainstlist *A_Gate, *A_Oldgate;
@@ -615,8 +606,7 @@ Analog_32_action *act;
 }
 
 
-static void Dispose_TCAmp(act)
-Analog_32_action *act;
+static void Dispose_TCAmp(Analog_32_action *act)
 {
   TCAmpConst *TCAmpVar;
   Anainstlist *A_Gate;
@@ -628,8 +618,7 @@ Analog_32_action *act;
 }
 
 
-static void Readgate_TCAmp(act)
-Analog_32_action *act;
+static void Readgate_TCAmp(Analog_32_action *act)
 {
   TCAmpConst *TCAmpVar;
   Anainstlist *A_Gate;
@@ -725,8 +714,7 @@ Analog_32_action *act;
 }
 
 
-static void Reset_TCAmp(act)
-Analog_32_action *act;
+static void Reset_TCAmp(Analog_32_action *act)
 {
   TCAmpConst *TCAmpVar;
   Anainstlist *A_Gate;
@@ -742,8 +730,7 @@ Analog_32_action *act;
 }
 
 
-static void PreUpdate_TCAmp(act)
-Analog_32_action *act;
+static void PreUpdate_TCAmp(Analog_32_action *act)
 {
   	TCAmpConst *TCAmpVar;
   	Anainstlist *A_Gate;
@@ -790,8 +777,7 @@ Analog_32_action *act;
 }
 
 
-static void Update_TCAmp(act)
-Analog_32_action *act;
+static void Update_TCAmp(Analog_32_action *act)
 {
   TCAmpConst *TCAmpVar;
   Anainstlist *A_Gate;
@@ -804,8 +790,7 @@ Analog_32_action *act;
 }
 
 
-static void Display_TCAmp(act)
-Analog_32_action *act;
+static void Display_TCAmp(Analog_32_action *act)
 {
   TCAmpConst *TCAmpVar;
   Anainstlist *A_Gate;
@@ -819,8 +804,7 @@ Analog_32_action *act;
 }
 
 
-static void Refresh_TCAmp(act)
-Analog_32_action *act;
+static void Refresh_TCAmp(Analog_32_action *act)
 {
   TCAmpConst *TCAmpVar;
   Anainstlist *A_Gate;
@@ -832,8 +816,7 @@ Analog_32_action *act;
 
 
 
-static void Erase_TCAmp(act)
-Analog_32_action *act;
+static void Erase_TCAmp(Analog_32_action *act)
 {
   TCAmpConst *TCAmpVar;
   Anainstlist *A_Gate;
@@ -845,8 +828,7 @@ Analog_32_action *act;
 
 
 
-static void Probe_TCAmp(act)
-Analog_32_action *act;
+static void Probe_TCAmp(Analog_32_action *act)
 {
   	Anainstlist *A_Gate;
   	AnaExt_rec *Node1Ptr, *Node2Ptr, *Node3Ptr, *Node4Ptr;
@@ -1005,8 +987,7 @@ Analog_32_action *act;
 }
 
 
-void Ex_TCAmp(act)
-Analog_32_action *act;
+void Ex_TCAmp(Analog_32_action *act)
 {
   double MinI1, dI1dV1, dI1dV2, dI1dV3, dI1dV4, MinI2, dI2dV1, dI2dV2, dI2dV3,
 	 dI2dV4, MinI3, dI3dV1, dI3dV2, dI3dV3, dI3dV4, MinI4, dI4dV1, dI4dV2,
@@ -1569,8 +1550,7 @@ Analog_32_action *act;
 /****************************************************************************/
 
 
-void Iin_TCAmp(act)
-Analog_32_action *act;
+void Iin_TCAmp(Analog_32_action *act)
 {
   	AnaExt_rec *Pin1Ptr;
   	double VPin1, VMem1;
@@ -1819,8 +1799,7 @@ Analog_32_action *act;
 /*==========================================================================*/
 
 
-static void TC_System(act)
-Analog_32_action *act;
+static void TC_System(Analog_32_action *act)
 {
 
 
@@ -1916,8 +1895,7 @@ Analog_32_action *act;
 }
 
 
-void Ex_Abs(act)
-Analog_32_action *act;
+void Ex_Abs(Analog_32_action *act)
 {
   double MinI1, dI1dV1, dI1dV2, dI1dV3, dI1dV4, MinI2, dI2dV1, dI2dV2, dI2dV3,
 	 dI2dV4, MinI3, dI3dV1, dI3dV2, dI3dV3, dI3dV4, MinI4, dI4dV1, dI4dV2,
@@ -2313,8 +2291,7 @@ Analog_32_action *act;
 /****************************************************************************/
 
 
-void Iin_Abs(act)
-Analog_32_action *act;
+void Iin_Abs(Analog_32_action *act)
 {
   AnaExt_rec *Pin1Ptr;
   double VPin1, VMem1;
@@ -2489,8 +2466,7 @@ Analog_32_action *act;
 /*==========================================================================*/
 
 
-static void Abs_System(act)
-Analog_32_action *act;
+static void Abs_System(Analog_32_action *act)
 {
 
 
@@ -2587,32 +2563,28 @@ Analog_32_action *act;
 }
 
 
-void Log_opamp_initlib_32(act)
-Analog_32_action *act;
+void Log_opamp_initlib_32(Analog_32_action *act)
 {
   AmpRange = Normal;
   TC_System(act);
 }
 
 
-void Log_wramp_initlib_32(act)
-Analog_32_action *act;
+void Log_wramp_initlib_32(Analog_32_action *act)
 {
   AmpRange = Wide;
   TC_System(act);
 }
 
 
-void Log_hwr_initlib_32(act)
-Analog_32_action *act;
+void Log_hwr_initlib_32(Analog_32_action *act)
 {
   AmpRange = Hwr;
   Abs_System(act);
 }
 
 
-void Log_fwr_initlib_32(act)
-Analog_32_action *act;
+void Log_fwr_initlib_32(Analog_32_action *act)
 {
   AmpRange = Fwr;
   Abs_System(act);
diff --git a/src/ana/thermal.c b/src/ana/thermal.c
index 2962006ceaaa46a40c4e66afc17277e2f041006f..4122f7d90a8c2f8194ac96c9bc19dbe9194e5733 100644
--- a/src/ana/thermal.c
+++ b/src/ana/thermal.c
@@ -55,8 +55,7 @@ typedef struct ICThermal {
 
 
 
-static void GetCnf_Thermal(NewIC)
-ICThermal *NewIC;
+static void GetCnf_Thermal(ICThermal *NewIC)
 {
   int Found;
   char Arg[256], Keyword[256];
@@ -101,8 +100,7 @@ ICThermal *NewIC;
 /****************************************************************************/
 
 
-static void initlib_Thermal(act)
-Analog_32_action *act;
+static void initlib_Thermal(Analog_32_action *act)
 {
   AnaCell_rec *NewCell;
   ICThermal *NewIC;
@@ -120,8 +118,7 @@ Analog_32_action *act;
   act->kind->info = (void *)NewCell;
 }  /*NFET4_Initlib*/
 
-static void Refresh_Thermal(act)
-Analog_32_action *act;
+static void Refresh_Thermal(Analog_32_action *act)
 {
   short Tx, Ty;
   Anainstlist *A_Gate;
@@ -169,8 +166,7 @@ Analog_32_action *act;
 }
 
 
-static void Erase_Thermal(act)
-Analog_32_action *act;
+static void Erase_Thermal(Analog_32_action *act)
 {
   short Tx, Ty;
   Anainstlist *A_Gate;
@@ -192,8 +188,7 @@ Analog_32_action *act;
 
 
 
-static void Attr_Thermal(act)
-Analog_32_action *act;
+static void Attr_Thermal(Analog_32_action *act)
 {
   long Attrnum;
   log_grec *WITH;
@@ -287,8 +282,7 @@ Analog_32_action *act;
   }
 }
 
-static void Openconfig_Thermal(act)
-Analog_32_action *act;
+static void Openconfig_Thermal(Analog_32_action *act)
 {
   log_grec *WITH;
 
@@ -306,8 +300,7 @@ Analog_32_action *act;
   WITH->attr[N_Celsius - 1].changed = true;
 }
 
-static void Readgate_Thermal(act)
-Analog_32_action *act;
+static void Readgate_Thermal(Analog_32_action *act)
 {
   log_grec *WITH;
 
@@ -320,8 +313,7 @@ Analog_32_action *act;
 }
 
 
-static void Newgate_Thermal(act)
-Analog_32_action *act;
+static void Newgate_Thermal(Analog_32_action *act)
 {
   Anainstlist *A_Gate;
   AnaCell_rec *Cellptr;
@@ -371,8 +363,7 @@ Analog_32_action *act;
     }
 }
 
-static void Copygate_Thermal(act)
-Analog_32_action *act;
+static void Copygate_Thermal(Analog_32_action *act)
 {
   ThermalConst *ThermalVar, *Old_ThermalVar;
   Anainstlist *A_Gate, *A_Oldgate;
@@ -385,8 +376,7 @@ Analog_32_action *act;
   A_Gate->InstVar = (void *)ThermalVar;
 }
 
-static void Dispose_Thermal(act)
-Analog_32_action *act;
+static void Dispose_Thermal(Analog_32_action *act)
 {
   Anainstlist *A_Gate;
   ThermalConst *ThermalVar;
@@ -402,8 +392,7 @@ Analog_32_action *act;
 /*                 Library Listing For Cell Thermal                    */
 /*==========================================================================*/
 
-void Log_THERMAL_initlib_32(act)
-Analog_32_action *act;
+void Log_THERMAL_initlib_32(Analog_32_action *act)
 {
   /*Body of procedure*/
 
diff --git a/src/graphics/mylib.c b/src/graphics/mylib.c
index 0070194e427522c233596d657040f388d21c410d..08b7b0de53cd5481c22d32a319a728a4c51269b2 100644
--- a/src/graphics/mylib.c
+++ b/src/graphics/mylib.c
@@ -127,19 +127,6 @@ int nc_initialized;
 #define DefaultFont      "6x10"
 #endif
 
-
-/* Added for command line display specification. - stafford 7/17/91 */
-#define       DISPLAY_NAME_LENGTH 100
-char  m_display_name[DISPLAY_NAME_LENGTH] = "";
-
-/* Added flag for window pop-up mode -- jl */
-
-int m_autoraise = false;
-
-Display *m_display;
-Window m_window;
-int screennum;
-int BlackAndWhite = False;
 int m_events_received;
 
 /*int m_across, m_down, m_maxcolor;*/
@@ -184,100 +171,6 @@ static struct cursor {
   int xoff, yoff, w, h;
 } cursors[4];
 
-#define AllColors DoRed | DoGreen | DoBlue
-XColor m_colors[ColorSets+1][ColorsInSet] = {
-  {
-    { 0,     0,     0,     0, AllColors, 0 },
-    { 0, 65535,     0,     0, AllColors, 0 },
-    { 0,     0, 65535,     0, AllColors, 0 },
-    { 0, 65535, 65535,     0, AllColors, 0 },
-    { 0,     0,     0, 65535, AllColors, 0 },
-    { 0, 65535,     0, 65535, AllColors, 0 },
-    { 0,     0, 65535, 65535, AllColors, 0 },
-    { 0, 65535, 65535, 65535, AllColors, 0 },
-    { 0, 52428, 52428, 52428, AllColors, 0 },
-    { 0, 34952,     0,     0, AllColors, 0 },
-    { 0,     0, 34952,     0, AllColors, 0 },
-    { 0, 34952, 34952,     0, AllColors, 0 },
-    { 0,     0,     0, 34952, AllColors, 0 },
-    { 0, 34952,     0, 34952, AllColors, 0 },
-    { 0,     0, 34952, 34952, AllColors, 0 },
-    { 0, 44952, 44952, 44952, AllColors, 0 },
-  },
-  {
-    { 0,     0,     0,     0, AllColors, 0 },
-    { 0, 52428,     0,     0, AllColors, 0 },
-    { 0,     0, 52428,     0, AllColors, 0 },
-    { 0, 52428, 52428,     0, AllColors, 0 },
-    { 0,     0,     0, 52428, AllColors, 0 },
-    { 0, 52428,     0, 52428, AllColors, 0 },
-    { 0,     0, 52428, 52428, AllColors, 0 },
-    { 0, 65535, 65535, 65535, AllColors, 0 },
-    { 0, 52428, 52428, 26214, AllColors, 0 },
-    { 0, 21845, 39321, 34952, AllColors, 0 },
-    { 0, 34952, 30583, 43690, AllColors, 0 },
-    { 0, 43690, 21845, 30583, AllColors, 0 },
-    { 0, 52428, 26214, 21845, AllColors, 0 },
-    { 0, 65535, 39321,  8738, AllColors, 0 },
-    { 0, 48059, 34952, 26214, AllColors, 0 },
-    { 0, 44952, 44952, 44952, AllColors, 0 },
-  },
-  {
-    { 0,     0,     0,     0, AllColors, 0 },
-    { 0,  4369,  4369,  4369, AllColors, 0 },
-    { 0,  8738,  8738,  8738, AllColors, 0 },
-    { 0, 13107, 13107, 13107, AllColors, 0 },
-    { 0, 17496, 17496, 17496, AllColors, 0 },
-    { 0, 21845, 21845, 21845, AllColors, 0 },
-    { 0, 26214, 26214, 26214, AllColors, 0 },
-    { 0, 30583, 30583, 30583, AllColors, 0 },
-    { 0, 34952, 34952, 34952, AllColors, 0 },
-    { 0, 39321, 39321, 39321, AllColors, 0 },
-    { 0, 43690, 43690, 43690, AllColors, 0 },
-    { 0, 48059, 48059, 48059, AllColors, 0 },
-    { 0, 52428, 52428, 52428, AllColors, 0 },
-    { 0, 56797, 56797, 56797, AllColors, 0 },
-    { 0, 61166, 61166, 61166, AllColors, 0 },
-    { 0, 65535, 65535, 65535, AllColors, 0 },
-  },
-  {
-    { 0,     0,     0,     0, AllColors, 0 },
-    { 0, 26214, 26214, 26214, AllColors, 0 },
-    { 0, 43690, 43690, 43690, AllColors, 0 },
-    { 0, 65535, 65535, 65535, AllColors, 0 },
-    { 0, 21845,     0,     0, AllColors, 0 },
-    { 0, 34952,     0,     0, AllColors, 0 },
-    { 0, 48059,     0,     0, AllColors, 0 },
-    { 0, 65535,     0,     0, AllColors, 0 },
-    { 0,     0, 21845,     0, AllColors, 0 },
-    { 0,     0, 34952,     0, AllColors, 0 },
-    { 0,     0, 48059,     0, AllColors, 0 },
-    { 0,     0, 65535,     0, AllColors, 0 },
-    { 0,     0,     0, 21845, AllColors, 0 },
-    { 0,     0,     0, 34952, AllColors, 0 },
-    { 0,     0,     0, 48059, AllColors, 0 },
-    { 0,     0,     0, 65535, AllColors, 0 },
-  },
-  {
-    { 0,     0,     0,     0, AllColors, 0 },
-    { 0, 65535,     0,     0, AllColors, 0 },
-    { 0,     0, 65535,     0, AllColors, 0 },
-    { 0, 65535, 65535,     0, AllColors, 0 },
-    { 0,     0,     0, 65535, AllColors, 0 },
-    { 0, 65535,     0, 65535, AllColors, 0 },
-    { 0,     0, 65535, 65535, AllColors, 0 },
-    { 0, 65535, 65535, 65535, AllColors, 0 },
-    { 0, 52428, 52428, 52428, AllColors, 0 },
-    { 0, 34952,     0,     0, AllColors, 0 },
-    { 0,     0, 34952,     0, AllColors, 0 },
-    { 0, 34952, 34952,     0, AllColors, 0 },
-    { 0,     0,     0, 34952, AllColors, 0 },
-    { 0, 34952,     0, 34952, AllColors, 0 },
-    { 0,     0, 34952, 34952, AllColors, 0 },
-    { 0, 44952, 44952, 44952, AllColors, 0 },
-  },
-};
-
 static long WindowEventMask = ExposureMask | KeyPressMask |
                               ButtonPressMask | ButtonReleaseMask |
                               PointerMotionMask | StructureNotifyMask |
@@ -329,8 +222,7 @@ static XSizeHints WinSizeHints = {
 
 static char *progname = "mylib";
 
-void GeneralTransform(x, y)
-int *x, *y;
+void GeneralTransform(int *x, int *y)
 {
   int newx, newy;
 
@@ -341,8 +233,7 @@ int *x, *y;
   *y = newy;
 }
 
-void DeltaTransform(x, y)
-int *x, *y;
+void DeltaTransform(int *x, int *y)
 {
   int newx, newy;
 
@@ -353,8 +244,7 @@ int *x, *y;
   *y = newy;
 }
 
-void LimitedTransform(x, y)
-int *x, *y;
+void LimitedTransform(int *x, int *y)
 {
   int newx, newy;
 
@@ -365,8 +255,7 @@ int *x, *y;
   *y = newy;
 }
 
-void GeneralUnTransform(x, y)
-int *x, *y;
+void GeneralUnTransform(int *x, int *y)
 {
   int x1, y1, newx, newy, det;
 
@@ -381,8 +270,7 @@ int *x, *y;
   *y = newy;
 }
 
-void m_cache(newstate)
-int newstate;
+void m_cache(int newstate)
 {
   if (!newstate && !nocache) {
     Ffprintf(stderr, "XFlush()\n");
@@ -391,8 +279,7 @@ int newstate;
   nocache = !newstate;
 }
 
-void m_choosecolors(colorset)
-int colorset;
+void m_choosecolors(int colorset)
 {
   int i;
 
@@ -532,17 +419,17 @@ void DisplayInitialize()
 */
          for(j = 0; j < visual_table_len; j++) { visual_table[j] = -1; }
          for(j = 0; j < gritems_list; j++) {
-           if((grvisual_get[j].class == 0) && (grvisual_get[j].depth == 8))
+           if((grvisual_get[j].c_class == 0) && (grvisual_get[j].depth == 8))
              visual_table[1] = j;              /* StaticGrey */
-           if((grvisual_get[j].class == 1) && (grvisual_get[j].depth == 8))
+           if((grvisual_get[j].c_class == 1) && (grvisual_get[j].depth == 8))
              visual_table[2] = j;              /* GreyScale */
-           if((grvisual_get[j].class == 3) && (grvisual_get[j].depth == 8))
+           if((grvisual_get[j].c_class == 3) && (grvisual_get[j].depth == 8))
              visual_table[3] = j;              /* Psuedocolor */
-           if((grvisual_get[j].class == 4) && (grvisual_get[j].depth == 15))
+           if((grvisual_get[j].c_class == 4) && (grvisual_get[j].depth == 15))
              visual_table[4] = j;              /* TrueColor */
-           if((grvisual_get[j].class == 4) && (grvisual_get[j].depth == 16))
+           if((grvisual_get[j].c_class == 4) && (grvisual_get[j].depth == 16))
              visual_table[5] = j;              /* TrueColor */
-           if((grvisual_get[j].class == 4) && (grvisual_get[j].depth == 24))
+           if((grvisual_get[j].c_class == 4) && (grvisual_get[j].depth == 24))
              visual_table[6] = j;              /* TrueColor */
          }
          log_color = getenv("LOG_COLOR");
@@ -586,7 +473,7 @@ printf("log_color: %s visual_table: %d %d %d %d %d %d %d\n", log_color, visual_t
            printf("Using %s, depth %d\n", visual_type[grvisual_get[gritems].class],
             grvisual_get[gritems].depth); }
 #endif  /* HIRESDB */
-           grclass         = grvisual_get[gritems].class;
+           grclass         = grvisual_get[gritems].c_class;
            grvisual        = grvisual_get[gritems].visual;
            grcolorCount    = grvisual_get[gritems].colormap_size;
            grCurrent.depth = grvisual_get[gritems].depth;
@@ -1142,8 +1029,7 @@ static unsigned char lo_dashed[LINESTIPPLELENGTH] = {7, 1, 7, 1};
 
 static unsigned char *default_linestyle[ColorsInSet];
 
-static unsigned char *FigureOutBWLine(r, g, b)
-     int r, g, b;
+static unsigned char *FigureOutBWLine(int r, int g, int b)
 {
   /* This is just a matter of taste */
 
@@ -1161,8 +1047,7 @@ static unsigned char *FigureOutBWLine(r, g, b)
 }
 
 
-static void do_init_screen(full)
-int full;
+static void do_init_screen(int full)
 {
   Window root;
   int i, x, y;
@@ -1331,8 +1216,7 @@ int full;
 /* Added X display name support.  WES 7/17/91 */
 
 
-void m_set_display_name(display_name)
-char* display_name;
+void m_set_display_name(char* display_name)
 {
   Mfprintf(stderr, "m_set_display_name(\"%s\")\n", display_name);
 
@@ -1370,8 +1254,7 @@ void m_init_colors()
   m_choosecolors(0);
 }
 
-void m_init_pen(hpib_address)
-int hpib_address;
+void m_init_pen(int hpib_address)
 {
   Mfprintf(stderr, "m_init_pen(%d)\n", hpib_address);
 }
@@ -1385,8 +1268,7 @@ int hpib_address;
 static XPoint pointbuf[16][BUF_SIZE];
 static int pointbuf_size[16];
 
-static void buffer_point(color, x, y)
-int color, x, y;
+static void buffer_point(int color, int x, int y)
 {
   pointbuf[color][pointbuf_size[color]].x = x;
   pointbuf[color][pointbuf_size[color]].y = y;
@@ -1414,8 +1296,7 @@ static void flush_points()
 static XSegment linebuf[16][BUF_SIZE];
 static int linebuf_size[16];
 
-static void buffer_line(color, x1, y1, x2, y2)
-int color, x1, y1, x2, y2;
+static void buffer_line(int color, int x1, int y1, int x2, int y2)
 {
   linebuf[color][linebuf_size[color]].x1 = x1;
   linebuf[color][linebuf_size[color]].y1 = y1;
@@ -1445,8 +1326,7 @@ static void flush_lines()
 static XRectangle rectbuf[16][BUF_SIZE];
 static int rectbuf_size[16];
 
-static void buffer_rect(color, x, y, width, height)
-int color, x, y, width, height;
+static void buffer_rect(int color, int x, int y, int width, int height)
 {
   rectbuf[color][rectbuf_size[color]].x = x;
   rectbuf[color][rectbuf_size[color]].y = y;
@@ -1476,8 +1356,7 @@ static void flush_rects()
 static XRectangle fillrectbuf[16][BUF_SIZE];
 static int fillrectbuf_size[16];
 
-static void buffer_fillrect(color, x, y, width, height)
-int color, x, y, width, height;
+static void buffer_fillrect(int color, int x, int y, int width, int height)
 {
   fillrectbuf[color][fillrectbuf_size[color]].x = x;
   fillrectbuf[color][fillrectbuf_size[color]].y = y;
@@ -1531,8 +1410,7 @@ void m_clear()
 
 int m_clip_x1, m_clip_y1, m_clip_x2, m_clip_y2;
 
-void m_clip(x1, y1, x2, y2)
-int x1, y1, x2, y2;
+void m_clip(int x1, int y1, int x2, int y2)
 {
   XRectangle rect;
   int i;
@@ -1618,8 +1496,7 @@ void m_noclip()
   }
 }
 
-void m_transform(xx, yx, xy, yy, d, ax, ay)
-int xx, yx, xy, yy, d, ax, ay;
+void m_transform(int xx, int yx, int xy, int yy, int d, int ax, int ay)
 {
   flip = 0;
   trans = 1;
@@ -1652,9 +1529,7 @@ void m_upside_down()
   trans = 0;
 }
 
-void m_rotscale(rot, scale, ax, ay)
-double rot, scale;
-int ax, ay;
+void m_rotscale(double rot, double scale, int ax, int ay)
 {
   int s, c;
 
@@ -1666,9 +1541,7 @@ int ax, ay;
   m_transform(c, -s, -s, -c, 256, ax, m_down-ay);
 }
 
-void m_rotscaled(rot, scale, ax, ay)
-double rot, scale;
-int ax, ay;
+void m_rotscaled(double rot, double scale, int ax, int ay)
 {
   Mfprintf(stderr, "m_rotscaled(%f, %f, %d, %d)\n", rot, scale, ax, ay);
 
@@ -1736,8 +1609,7 @@ void m_nocursor()
 
 static m_tablet_info mouse;
 
-void m_cursor(x, y)
-int x, y;
+void m_cursor(int x, int y)
 {
   Mfprintf(stderr, "m_cursor(%d, %d)\n", x, y);
 /*  fprintf(stderr, "m_cursor(%d, %d)\n", x, y);  */
@@ -1783,8 +1655,7 @@ static struct {
   { XC_gobbler, m_yellow },
 };
 
-void m_choosecursor(n)
-int n;
+void m_choosecursor(int n)
 {
 /*  Cursor newcursor; */
 
@@ -1818,8 +1689,7 @@ int n;
   }
 }
 
-void m_colormode(c)
-int c;
+void m_colormode(int c)
 {
   int i;
 
@@ -1927,8 +1797,7 @@ int c;
   }
 }
 
-void m_color(newcolor)
-int newcolor;
+void m_color(int newcolor)
 {
   Mfprintf(stderr, "m_color(%d)\n", newcolor);
 
@@ -1957,8 +1826,7 @@ long m_curcolormode()
   return(currentmode);
 }
 
-void m_setcolor(c, r, g, b)
-int c, r, g, b;
+void m_setcolor(int c, int r, int g, int b)
 {
 
   unsigned char *d;
@@ -2032,8 +1900,7 @@ int c, r, g, b;
 
 
 
-void m_seecolor(c, r, g, b)
-int c, *r, *g, *b;
+void m_seecolor(int c, int *r, int *g, int *b)
 {
   Mfprintf(stderr, "m_seecolor(%d)\n", c);
 
@@ -2045,8 +1912,7 @@ int c, *r, *g, *b;
     *r = *g = *b = 0;
 }
 
-void m_setcolors(r, g, b)
-m_colorarray r, g, b;
+void m_setcolors(m_colorarray r, m_colorarray g, m_colorarray b)
 {
   int i;
   unsigned char *d;
@@ -2111,8 +1977,7 @@ m_colorarray r, g, b;
 #endif  /* HIRES */
 }
 
-void m_seecolors(r, g, b)
-m_colorarray r, g, b;
+void m_seecolors(m_colorarray r, m_colorarray g, m_colorarray b)
 {
   int i;
 
@@ -2125,9 +1990,7 @@ m_colorarray r, g, b;
   }
 }
 
-void m_vsetcolors(first, num, r, g, b)
-int first, num;
-m_vcolorarray r, g, b;
+void m_vsetcolors(int first, int num, m_vcolorarray r, m_vcolorarray g, m_vcolorarray b)
 {
   int i;
   unsigned char *d;
@@ -2202,9 +2065,7 @@ m_vcolorarray r, g, b;
 #endif  /* HIRES */
 }
 
-void m_vseecolors(first, num, r, g, b)
-int first, num;
-m_colorarray r, g, b;
+void m_vseecolors(int first, int num, m_colorarray r, m_colorarray g, m_colorarray b)
 {
   int i;
 
@@ -2238,8 +2099,7 @@ static int linestyles[16] = {
 static int currentlinestyle = 0;
 static int linewidth = 0;
 
-void m_linestyle(s)
-int s;
+void m_linestyle(int s)
 {
   int st, i, j, onoff, firstisoff = 0;
   char dashlist[16];
@@ -2346,8 +2206,7 @@ int s;
   }
 }
 
-void m_setlinestyle(s, mask)
-int s, mask;
+void m_setlinestyle(int s, int mask)
 {
   Mfprintf(stderr, "m_setlinestyle(%d, %d)\n", s, mask);
 
@@ -2363,8 +2222,7 @@ int s, mask;
 
 static int curx = 0, cury = 0;
 
-void m_move(x, y)
-int x, y;
+void m_move(int x, int y)
 {
   Mfprintf(stderr, "m_move(%d, %d)\n", x, y);
 
@@ -2375,8 +2233,7 @@ int x, y;
 }
 
 
-int hitdet_line(x1, y1, x2, y2)
-int x1, y1, x2, y2;
+int hitdet_line(int x1, int y1, int x2, int y2)
 {
   int oc1 = 0, oc2 = 0;
   int val;
@@ -2446,8 +2303,7 @@ int x1, y1, x2, y2;
   return 0;  /* should never occur */
 }
 
-void m_draw(x, y)
-int x, y;
+void m_draw(int x, int y)
 {
   Mfprintf(stderr, "m_draw(%d, %d)\n", x, y);
 
@@ -2485,8 +2341,7 @@ int x, y;
   }
 }
 
-void m_drawrel(dx, dy)
-int dx, dy;
+void m_drawrel(int dx, int dy)
 {
   Mfprintf(stderr, "m_drawrel(%d, %d)\n", dx, dy);
 
@@ -2524,8 +2379,7 @@ int dx, dy;
   }
 }
 
-void m_move2(x, y)
-int x, y;
+void m_move2(int x, int y)
 {
   Mfprintf(stderr, "m_move2(%d, %d)\n", x, y);
 
@@ -2535,8 +2389,7 @@ int x, y;
   cury = y;
 }
 
-void m_drawline(x1, y1, x2, y2)
-int x1, y1, x2, y2;
+void m_drawline(int x1, int y1, int x2, int y2)
 {
   Mfprintf(stderr, "m_drawline(%d, %d, %d, %d)\n", x1, y1, x2, y2);
 
@@ -2576,8 +2429,7 @@ int x1, y1, x2, y2;
   }
 }
 
-int hitdet_drawrect(x1, y1, x2, y2)
-int x1, y1, x2, y2;
+int hitdet_drawrect(int x1, int y1, int x2, int y2)
 {
   if (((x1 >= m_clip_x1 && x1 <= m_clip_x2) ||
        (x2 >= m_clip_x1 && x2 <= m_clip_x2)) &&
@@ -2592,8 +2444,7 @@ int x1, y1, x2, y2;
   return 0;
 }
 
-void m_drawrect(x1, y1, x2, y2)
-int x1, y1, x2, y2;
+void m_drawrect(int x1, int y1, int x2, int y2)
 {
   int x, y;
 
@@ -2652,8 +2503,7 @@ int x1, y1, x2, y2;
   }
 }
 
-int hitdet_fillrect(x1, y1, x2, y2)
-int x1, y1, x2, y2;
+int hitdet_fillrect(int x1, int y1, int x2, int y2)
 {
   return ((x1 >= m_clip_x1 || x2 >= m_clip_x1) &&
 	  (x1 <= m_clip_x2 || x2 <= m_clip_x2) &&
@@ -2661,8 +2511,7 @@ int x1, y1, x2, y2;
 	  (y1 <= m_clip_y2 || y2 <= m_clip_y2));
 }
 
-void m_fillrect(x1, y1, x2, y2)
-int x1, y1, x2, y2;
+void m_fillrect(int x1, int y1, int x2, int y2)
 {
   int x, y;
 
@@ -2723,8 +2572,7 @@ int x1, y1, x2, y2;
 
 
 
-void m_grid(x1, y1, x2, y2, dx, dy, ax, ay)
-int x1, y1, x2, y2, dx, dy, ax, ay;
+void m_grid(int x1, int y1, int x2, int y2, int dx, int dy, int ax, int ay)
 {
   struct grid *swapgrid;
   int x, y, wid, hei, i, j;
@@ -2897,15 +2745,13 @@ int x1, y1, x2, y2, dx, dy, ax, ay;
   }
 }
 
-int hitdet_point(x, y)
-int x, y;
+int hitdet_point(int x, int y)
 {
   return (x >= m_clip_x1 && x <= m_clip_x2 &&
 	  y >= m_clip_y1 && y <= m_clip_y2);
 }
 
-void m_drawpoint(x, y)
-int x, y;
+void m_drawpoint(int x, int y)
 {
   TRNSFRM(x, y);
 
@@ -2939,8 +2785,7 @@ int x, y;
   }
 }
 
-int hitdet_ellipse(x, y, rx, ry, filled)
-int x, y, rx, ry, filled;
+int hitdet_ellipse(int x, int y, int rx, int ry, int filled)
 {
   int clp_x1 = m_clip_x1, clp_x2 = m_clip_x2;
   int clp_y1 = m_clip_y1, clp_y2 = m_clip_y2;
@@ -3014,8 +2859,7 @@ int x, y, rx, ry, filled;
   }
 }
 
-void m_circle(x, y, r)
-int x, y, r;
+void m_circle(int x, int y, int r)
 {
   Mfprintf(stderr, "m_circle(%d, %d, %d)\n", x, y, r);
 
@@ -3046,8 +2890,7 @@ int x, y, r;
   }
 }
 
-void m_ellipse(x, y, rx, ry, c)
-int x, y, rx, ry, c;
+void m_ellipse(int x, int y, int rx, int ry, int c)
 {
   Mfprintf(stderr, "m_ellipse(%d, %d, %d, %d, %d)\n", x, y, rx, ry, c);
 
@@ -3086,8 +2929,7 @@ int x, y, rx, ry, c;
   }
 }
 
-void m_ellipse2(x, y, rx, ry, c1, c2)
-int x, y, rx, ry, c1, c2;
+void m_ellipse2(int x, int y, int rx, int ry, int c1, int c2)
 {
   Mfprintf(stderr, "m_ellipse2(%d, %d, %d, %d, %d, %d)\n", x, y, rx, ry, c1, c2);
 
@@ -3126,10 +2968,7 @@ int x, y, rx, ry, c1, c2;
   }
 }
 
-void m_drawarc(x, y, rx, ry, theta1, theta2, rotate, chord)
-long x, y, rx, ry;
-double theta1, theta2, rotate;
-long chord;
+void m_drawarc(long x, long y, long rx, long ry, double theta1, double theta2, double rotate, long chord)
 {
   double a, c1, s1, c2, s2, c3, s3, rc, rs, d, th1, th2, start, stop,
   rcc1, rcs1, rsc1, rss1, rcc2, rcs2, rsc2, rss2, temp;
@@ -3288,10 +3127,7 @@ long chord;
 
 typedef long pts[506];
 
-void m_fillarc(x, y, rx, ry, theta1, theta2, rotate, chord)
-long x, y, rx, ry;
-double theta1, theta2, rotate;
-long chord;
+void m_fillarc(long x, long y, long rx, long ry, double theta1, double theta2, double rotate, long chord)
 {
   pts xp, yp;
   double ss, cc, rs, rc, rsx, rsy, rcx, rcy, th, temp;
@@ -3376,8 +3212,7 @@ long chord;
 #endif
 }
 
-void m_roundrect(x1, y1, x2, y2, rx, ry, c)
-int x1, y1, x2, y2, rx, ry, c;
+void m_roundrect(int x1, int y1, int x2, int y2, int rx, int ry, int c)
 {
   int x, y, wid, hei;
 
@@ -3426,8 +3261,7 @@ int x1, y1, x2, y2, rx, ry, c;
   }
 }
 
-void m_roundrect2(x1, y1, x2, y2, rx, ry, c1, c2)
-int x1, y1, x2, y2, rx, ry, c1, c2;
+void m_roundrect2(int x1, int y1, int x2, int y2, int rx, int ry, int c1, int c2)
 {
   int x, y, wid, hei;
 
@@ -3515,8 +3349,7 @@ int hitdet_bezier(int x1, int y1, int x2, int y2, int x3, int y3, int x4, int y4
 			(x4+x3)>>1, (y4+y3)>>1, x4, y4));
 }
 
-void dobezier(x1, y1, x2, y2, x3, y3, x4, y4, fx, fy)
-int x1, y1, x2, y2, x3, y3, x4, y4, fx, fy;
+void dobezier(int x1, int y1, int x2, int y2, int x3, int y3, int x4, int y4, int fx, int fy)
 {
   if ((abs((y4-y3)*(x3-x1)-(y3-y1)*(x4-x3)) < bezthresh) &&
       (abs((y4-y2)*(x2-x1)-(y2-y1)*(x4-x2)) < bezthresh)) {
@@ -3536,8 +3369,7 @@ int x1, y1, x2, y2, x3, y3, x4, y4, fx, fy;
   }
 }
 
-void m_bezier(x1, y1, x2, y2, x3, y3, x4, y4)
-int x1, y1, x2, y2, x3, y3, x4, y4;
+void m_bezier(int x1, int y1, int x2, int y2, int x3, int y3, int x4, int y4)
 {
   Mfprintf(stderr, "m_bezier(%d, %d, %d, %d, %d, %d, %d, %d)\n",
                              x1, y1, x2, y2, x3, y3, x4, y4   );
@@ -3574,8 +3406,7 @@ int x1, y1, x2, y2, x3, y3, x4, y4;
   }
 }
 
-void m_bezier2(x1, y1, x2, y2, x3, y3, x4, y4, thresh)
-int x1, y1, x2, y2, x3, y3, x4, y4, thresh;
+void m_bezier2(int x1, int y1, int x2, int y2, int x3, int y3, int x4, int y4, int thresh)
 {
   Mfprintf(stderr, "m_bezier2(%d, %d, %d, %d, %d, %d, %d, %d, %d)\n",
                               x1, y1, x2, y2, x3, y3, x4, y4, thresh);
@@ -3613,8 +3444,7 @@ int x1, y1, x2, y2, x3, y3, x4, y4, thresh;
   }
 }
 
-void m_cbezier(x1, y1, x2, y2, x3, y3, x4, y4, thresh)
-int x1, y1, x2, y2, x3, y3, x4, y4, thresh;
+void m_cbezier(int x1, int y1, int x2, int y2, int x3, int y3, int x4, int y4, int thresh)
 {
   Mfprintf(stderr, "m_cbezier(%d, %d, %d, %d, %d, %d, %d, %d, %d)\n",
                               x1, y1, x2, y2, x3, y3, x4, y4, thresh);
@@ -3671,11 +3501,9 @@ struct LOC_polycurve {
     int meef;
 } ;
 
-static void polycurve_doit(x0, y0, x1, y1, x2, y2,
-                           x3, y3, x4, y4, x5, y5,
-                           LINK_polycurve)
-long x0, y0, x1, y1, x2, y2, x3, y3, x4, y4, x5, y5;
-struct LOC_polycurve *LINK_polycurve;
+static void polycurve_doit(long x0, long y0, long x1, long y1, long x2, long y2,
+                           long x3, long y3, long x4, long y4, long x5, long y5,
+                           struct LOC_polycurve *LINK_polycurve)
 {
     if (((x4 < 0) ? -x4 : x4) + ((x5 < 0) ? -x5 : x5) + ((y4 < 0) ? -y4 : y4) + ((y5
         < 0) ? -y5 : y5) < SCALE) {
@@ -3710,8 +3538,7 @@ struct LOC_polycurve *LINK_polycurve;
 		   LINK_polycurve);
 }
 
-void m_polycurve(x0, y0, x1, y1, x2, y2, x3, y3, x4, y4, x5, y5)
-double x0, y0, x1, y1, x2, y2, x3, y3, x4, y4, x5, y5;
+void m_polycurve(double x0, double y0, double x1, double y1, double x2, double y2, double x3, double y3, double x4, double y4, double x5, double y5)
 {
     struct LOC_polycurve V_polycurve;
 
@@ -3732,9 +3559,7 @@ double x0, y0, x1, y1, x2, y2, x3, y3, x4, y4, x5, y5;
 		   &V_polycurve);
 }
 
-int hitdet_drawpoly(n, points)
-int n;
-XPoint *points;
+int hitdet_drawpoly(int n, XPoint *points)
 {
   int i;
 
@@ -3748,8 +3573,7 @@ XPoint *points;
   return 0;
 }
 
-void m_drawpoly(n, x, y)
-int n, x[], y[];
+void m_drawpoly(int n, int x[], int y[])
 {
   XPoint *pointlist;
   int i, newx, newy;
@@ -3807,9 +3631,7 @@ int n, x[], y[];
    entirely outside polygon.  Thus, we can simply check if any one point
    in the rectangle is in the polygon. */
 
-int hitdet_fillpoly(n, points)
-int n;
-XPoint *points;
+int hitdet_fillpoly(int n, XPoint *points)
 {
   int i, y1, y2, count;
   XPoint *pt1, *pt2;
@@ -3964,8 +3786,7 @@ int n, x[], y[];
 #endif
 
 
-void m_fillpoly(n, x, y)
-int n, x[], y[];
+void m_fillpoly(int n, int x[], int y[])
 {
   XPoint *pointlist;
   int i, newx, newy;
@@ -4008,8 +3829,7 @@ int n, x[], y[];
   }
 }
 
-void m_displaytext(str)
-char *str;
+void m_displaytext(char *str)
 {
   int dir, desc, len;
   XCharStruct size;
@@ -4086,9 +3906,7 @@ void m_drawstr(int x, int y, char *f, char *str)
   }
 }
 
-void m_centerstr(x, y, f, str)
-int x, y;
-char *f, *str;
+void m_centerstr(int x, int y, char *f, char *str)
 {
   int dir, desc, len;
   XCharStruct size;
@@ -4127,9 +3945,7 @@ char *f, *str;
   }
 }
 
-void m_rightstr(x, y, f, str)
-int x, y;
-char *f, *str;
+void m_rightstr(int x, int y, char *f, char *str)
 {
   int dir, desc, len;
   XCharStruct size;
@@ -4168,8 +3984,7 @@ char *f, *str;
   }
 }
 
-long m_strwidth(f, str)      /* daveg, 10/6/89 */
-char *f, *str;
+long m_strwidth(char *f, char *str)      /* daveg, 10/6/89 */
 {
   Mfprintf(stderr, "m_strwidth(f, %s)\n", str);
 
@@ -4224,8 +4039,7 @@ void m_alpha_on()
 }
 
 
-void m_readpen(pen)
-m_tablet_info *pen;
+void m_readpen(m_tablet_info *pen)
 {
   XEvent event;
   int newx, newy;
@@ -4312,8 +4126,7 @@ m_tablet_info *pen;
   mouse.near_ = pen->near_;
 }
 
-void m_trackpen(pen)
-m_tablet_info *pen;
+void m_trackpen(m_tablet_info *pen)
 {
   Pfprintf(stderr, "m_trackpen(pen)\n");
 
@@ -4323,8 +4136,7 @@ m_tablet_info *pen;
   m_cursor(pen->x, pen->y);
 }
 
-void m_trackpen2(pen)
-m_tablet_info *pen;
+void m_trackpen2(m_tablet_info *pen)
 {
   XEvent event;
   int found = 0;
@@ -4455,8 +4267,7 @@ m_tablet_info *pen;
 }
 
 
-void m_waitpen(pen)
-m_tablet_info *pen;
+void m_waitpen(m_tablet_info *pen)
 {
   XEvent event;
   int x, y;
@@ -4700,8 +4511,7 @@ uchar m_testkey()
 #define popuph          70
 
 
-int m_yes_or_no(prompt)
-char *prompt;
+int m_yes_or_no(char *prompt)
 {
   Window root, popup, yesbutton, nobutton;
   char buf[10];
@@ -4900,4 +4710,3 @@ char *prompt;
   XDestroyWindow(m_display, popup);
   return(return_value);
 }
-
diff --git a/src/graphics/newci.c b/src/graphics/newci.c
index 02db92f6c443f4566c42012c7b55d94996776eaf..600559663a8456061d117aa01c43a273861997f4 100644
--- a/src/graphics/newci.c
+++ b/src/graphics/newci.c
@@ -4,8 +4,8 @@
 #include <ctype.h>
 
 /* UNIX specific */
-#include <sys/types.h> 
-#include <sys/wait.h> 
+#include <sys/types.h>
+#include <sys/wait.h>
 
 #include <time.h>
 
@@ -67,9 +67,9 @@ static void goodfixname(char *name, char *ext, char *home, int force)
 
 	if (name[i] == ':')
 		return;
-	
+
 	hassuffix = false;
-	
+
 	len = strlen(name);
 	for (i = 0; i < len; ++i)
 	{
@@ -152,7 +152,7 @@ void newci_parseswitch(newci_parserec* tab, size_t size, char *bad)
 	for (size_t i = 0; i < size; ++i)
 		tab[i].used = 0;
 	*bad = '\000';
-  
+
 	/* still args and arg start with '-' */
 	while (P_argc > 1 && P_argv[1][0] == '-')
 	{
@@ -162,7 +162,7 @@ void newci_parseswitch(newci_parserec* tab, size_t size, char *bad)
 		{
     		for (size_t j = 0; tab[i].switch_[j] != '\0' && !found; j++)
 			{
-				if (tab[i].switch_[j] == P_argv[1][1]) 
+				if (tab[i].switch_[j] == P_argv[1][1])
 					found = 1;
 			}
 		}
@@ -176,7 +176,7 @@ void newci_parseswitch(newci_parserec* tab, size_t size, char *bad)
 		else
 		{
 			tab[i].used = pos++;
-			
+
 			switch (toupper(tab[i].kind))
 			{
 				case 'B': /* boolean */
diff --git a/src/graphics/newcrt.c b/src/graphics/newcrt.c
index d33f1215212787cad5a9158d6445b2e963429137..2b3e7c374c20489788fd8283f44c2916de93c8cb 100644
--- a/src/graphics/newcrt.c
+++ b/src/graphics/newcrt.c
@@ -1,5 +1,5 @@
 /* As the name suggests, this is probably a CRT emulator */
-/* Should be rewritten with ncurses, at least. */ 
+/* Should be rewritten with ncurses, at least. */
 #define NEWCRT_G
 #define HIRES
 
@@ -114,7 +114,6 @@ nc_windowRec *nc_lastLineWindow = &__nc_mainWindow;
 nc_windowRec *nc_statusWindow = &__nc_mainWindow;
 nc_windowRec *nc_defaultWindow = &__nc_mainWindow;
 
-XColor m_colors[ColorSets+1][ColorsInSet];    /*   From mylib   */
 static int colortrans[8] = {
 	m_green, m_yellow, m_black, m_red, m_cyan, m_white, m_blue, m_purple,
 };
diff --git a/src/log.c b/src/log.c
index b85fc96a80f05ec396ca6fa014ff70987a2627f3..06f162080eb117516a3de86b5702eec9d4802a5e 100644
--- a/src/log.c
+++ b/src/log.c
@@ -40,25 +40,25 @@
 #include <string.h>
 
 
-#include <utils/p2c.h>
+#include "utils/p2c.h"
 
 #include "logdef.h"
-#include <utils/sysglobals.h>
-#include <utils/sysdevs.h>
+#include "utils/sysglobals.h"
+#include "utils/sysdevs.h"
 
-#include <utils/misc.h>
+#include "utils/misc.h"
 #include "help.h"
-#include <graphics/newci.h>
-#include <utils/filepack.h>
-#include <utils/iodecl.h>
-#include <graphics/mylib.h>
+#include "graphics/newci.h"
+#include "utils/filepack.h"
+#include "utils/iodecl.h"
+#include "graphics/mylib.h"
 #include "logfont.h"
 #include "logstuff.h"
 #include "swap.h"
-#include <graphics/newkbd.h>
-#include <utils/strings.h>
-#include <utils/newasm.h>
-#include <graphics/newcrt.h>
+#include "graphics/newkbd.h"
+#include "utils/strings.h"
+#include "utils/newasm.h"
+#include "graphics/newcrt.h"
 
 #include "settings.h"
 #include "logstructs.h"
@@ -12282,5 +12282,3 @@ int main(int argc, char * argv[])
 		fclose(tracefile);
 	exit(0);
 }
-
-
diff --git a/src/logdef.c b/src/logdef.c
deleted file mode 100644
index 34694bc459125ef968b767a9b137d3cf5ed66ea6..0000000000000000000000000000000000000000
--- a/src/logdef.c
+++ /dev/null
@@ -1,77 +0,0 @@
-/* "LOG", the circuit editing and simulation system,
-   "DigLOG", the digital simulator for LOG.
-   Copyright (C) 1985, 1990 David Gillespie.
-   Author's address: daveg@csvax.caltech.edu; 256-80 Caltech/Pasadena CA 91125.
-
-   "AnaLOG", the analog simulator for LOG.
-   Copyright (C) 1985, 1990 John Lazzaro.
-   Author's address: lazzaro@csvax.caltech.edu; 256-80 Caltech.
-
-This 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 (any version).
-
-This program is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-GNU General Public License for more details.
-
-You should have received a copy of the GNU General Public License
-along with this program; see the file COPYING.  If not, write to
-the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
-
-
-/*
-
-      LOG 4.1   Simulation interface module
-
-      David Gillespie  7/14/88
-
-      The following module is subject to change at any time.
-*/
-
-
-#include <utils/p2c.h>
-
-
-#define LOGDEF_G
-#include "logdef.h"
-
-
-const log_rottab log_rotxx = {
-  1, 0, -1, 0, -1, 0, 1, 0
-};
-
-const log_rottab log_rotxy = {
-  0, -1, 0, 1, 0, 1, 0, -1
-};
-
-const log_rottab log_rotyx = {
-  0, 1, 0, -1, 0, 1, 0, -1
-};
-
-const log_rottab log_rotyy = {
-  1, 0, -1, 0, 1, 0, -1, 0
-};
-
-const log_rottab log_irotxx = {
-  1, 0, -1, 0, -1, 0, 1, 0
-};
-
-const log_rottab log_irotxy = {
-  0, 1, 0, -1, 0, -1, 0, 1
-};
-
-const log_rottab log_irotyx = {
-  0, -1, 0, 1, 0, -1, 0, 1
-};
-
-const log_rottab log_irotyy = {
-  1, 0, -1, 0, 1, 0, -1, 0
-};
-
-const log_zoomtab zoomscales = {
-  2, 3, 5, 8, 12
-};
-
-
diff --git a/src/loghier.c b/src/loghier.c
index e94fbd2378ff4c8d5a21b222607a6578aeb192b3..7b7211e7c569b3c45a124a8a3e92fe84d469b990 100644
--- a/src/loghier.c
+++ b/src/loghier.c
@@ -349,7 +349,7 @@ void examinetemplate(log_grec *g, log_nrec **pp, long ppsize, int isgeneric, sho
 	xx1 = (kind->x1 + 1) / log_scale0;
 	xx2 = P_imax2((kind->x2 - 1L) / log_scale0, (long)xx1);
 	if (*pnum == NULL)
-		*pnum = (short int*) Malloc(kind->numpins * 2);
+		*pnum = (short *) Malloc(kind->numpins * 2);
 
 	numrefs = (short *)Malloc(kind->numpins * 2);
 	FORLIM = kind->numpins;
diff --git a/src/logsim.c b/src/logsim.c
index 82d54b10852a00ce43a4a780dbaefe0539a5df55..0240c5ab27959636ecb2842c950307a7c03b4e49 100644
--- a/src/logsim.c
+++ b/src/logsim.c
@@ -38,9 +38,10 @@
 /* $debug$ {*/
 
 
-#include <utils/p2c.h>
+#include "utils/p2c.h"
 #include <stdlib.h>
 #include "logsim.h"
+#include "logstuff.h"
 #include "node.h"
 #include "tool.h"
 #include "logstuff.h"
@@ -591,7 +592,7 @@ void Log_16_pulse(log_16_action *act)
 		return;
 	}
 	WITH1->info = (na_long)((long)WITH1->info - 1);
-	
+
 	if ((long)WITH1->info <= 0)
 		WITH1->vars = (na_long)(((unsigned long)WITH1->vars) & (~(1L << 0)));
 }
@@ -1964,6 +1965,3 @@ void Log_16_proc(log_action_t *lact)
 			break;
 	}
 }
-
-
-
diff --git a/src/logsimasm.c b/src/logsimasm.c
index cd4f3aa97d5c6f4fc0006322036f9f1db4a89150..10b5913ba1800cfeb356785effa803ac04afc2a2 100644
--- a/src/logsimasm.c
+++ b/src/logsimasm.c
@@ -364,7 +364,7 @@ static log_16_value g_expr()
 
 			case16(0xc0):  /* pin */
 				case16(0xd0):
-			    nip = (nodeinfo*) g_pins[ch & 0x1f]->info;
+					nip = (nodeinfo*) g_pins[ch & 0x1f]->info;
 			if (TRACE_VAL) nc_printf(" Value of %p is %d\n", nip, (int)nip->v - 1);
 			return nip->v;
 
diff --git a/src/logsimh.c b/src/logsimh.c
index 33ac4fa784fa7295071ed89a39f92338e098096b..aa98663d977cc1ccaebb3b65efe269b48a76fef8 100644
--- a/src/logsimh.c
+++ b/src/logsimh.c
@@ -2919,8 +2919,8 @@ static void trymoveif(struct LOC_simplstmt *LINK)
 
 			while (ip3 != LINK->ip && (good1 || good2))
 			{
-				checkdefvusev(ip3, defv1, usev1, &good1, LINK);
-				checkdefvusev(ip3, defv2, usev2, &good2, LINK);
+				checkdefvusev(ip3, defv1, usev1, (uint *) &good1, LINK);
+				checkdefvusev(ip3, defv2, usev2, (uint *) &good2, LINK);
 				ip3 = ip3->UU.U1.next;
 			}
 
@@ -4804,7 +4804,7 @@ static void updatehdef(hdefrec *hdef)
 				{
 					if (hdef->defreg != NULL)
 						(*WITH->hook.setupregion)(&hdef->defreg, 0);
-				} 
+				}
 				else
 				{
 					if (hdef->defreg == NULL)
@@ -5680,6 +5680,3 @@ void Log_16_digh(log_16_action *act)
 			break;
 	}
 }
-
-
-
diff --git a/src/page.c b/src/page.c
index ea531048ecd179743296ebcf2a6aed5863e4dfb4..4545797b8457cb7a0dcea965bfb99ba1559fce56 100644
--- a/src/page.c
+++ b/src/page.c
@@ -200,7 +200,7 @@ int pagembb(short pg, short *x1, short *y1, short *x2, short *y2)
 
 log_page *pageAlloc()
 {
-	log_page *newpage = Malloc(sizeof(log_page));
+	log_page *newpage = (log_page *) Malloc(sizeof(log_page));
 
 	newpage->gbase = NULL;
 	newpage->sbase = NULL;
diff --git a/src/pagereader.c b/src/pagereader.c
index 144ac3e669e8834d90e5e89239ccf30c99d39629..bb2e575df181fed1824a3a72899b6bb38ab58fb5 100644
--- a/src/pagereader.c
+++ b/src/pagereader.c
@@ -6,12 +6,12 @@
 #include "logfont.h"
 #include "node.h"
 #include "log.h"
-#include "page.h"
-#include "window.h"
+#include "graphics/newci.h"
 #include "tool.h"
 #include "utils.h"
-#include "box.h"
-#include "libraryreader.h"
+#include "wire.h"
+#include "utils/strings.h"
+#include "screen.h"
 
 void loadfail(char *msg, struct LOC_loadpage *LINK)
 {
diff --git a/src/pagewriter.c b/src/pagewriter.c
index 4ad95a0e38063e8ab80a6cfaba390fcc5b1e0fd3..55d3e0aecc36e78da47f0100de970463297a4b50 100644
--- a/src/pagewriter.c
+++ b/src/pagewriter.c
@@ -1,14 +1,13 @@
+#include <string.h>
 #include "pagewriter.h"
-
-#include "logfont.h"
-#include <utils/filepack.h>
-#include <graphics/newcrt.h>
-#include <graphics/newci.h>
-#include "log.h"
-#include "window.h"
 #include "tool.h"
-#include "utils.h"
-#include "box.h"
+#include "log.h"
+#include "logfont.h"
+#include "screen.h"
+#include "utils/filepack.h"
+#include "graphics/newcrt.h"
+#include "graphics/newci.h"
+
 
 short countnode(log_nrec *n, struct LOC_savepage *LINK)
 {
diff --git a/src/tool.c b/src/tool.c
index 3fe4950cd5f137852c781b8264091e5e8567520e..cf49a2bd6ae650f4aafb659bc8bab6256eb1805a 100644
--- a/src/tool.c
+++ b/src/tool.c
@@ -1,7 +1,7 @@
 
-#include <utils/p2c.h>
-#include <graphics/newkbd.h>
-#include <graphics/newci.h>
+#include "utils/p2c.h"
+#include "graphics/newkbd.h"
+#include "graphics/newci.h"
 #include "logdef.h"
 #include "logglobals.h"
 #include "logstuff.h"
@@ -204,4 +204,3 @@ void closetools()
 		tp = tp->next;
 	}
 }
-
diff --git a/src/utils/filepack.c b/src/utils/filepack.c
index e7e23caa1c7c1b0b037dd6f60e7b213f9020389f..7884dda889e1112b4955583e94122eb89b66ab3c 100644
--- a/src/utils/filepack.c
+++ b/src/utils/filepack.c
@@ -12,12 +12,12 @@ void fp_change(char* filename1, char *filename2)
 
 	if (strchr(filename2, '/'))
 	{
-		filename3 = malloc (sizeof(char) * (strlen(filename2) + 1));
+		filename3 = (char *) malloc (sizeof(char) * (strlen(filename2) + 1));
 		strcpy(filename3, filename2);
 	}
 	else
 	{
-		filename3 = malloc (sizeof(char) * (strlen(filename1) + 1));
+		filename3 = (char *) malloc (sizeof(char) * (strlen(filename1) + 1));
 		strcpy(filename3, filename1);
 		cp = (char *) strrchr(filename3, '/');
 		if (cp)
@@ -30,7 +30,7 @@ void fp_change(char* filename1, char *filename2)
 		unlink(filename3);
 	if (!link(filename1, filename3))
 		unlink(filename1);
-	
+
 	free(filename3);
 }
 
@@ -38,4 +38,3 @@ void fp_remove(char *filename)
 {
 	unlink(filename);
 }
-
diff --git a/src/utils/p2c.c b/src/utils/p2c.c
index 6d6cef2fe145b4ba866b2922674e9e7fd2fe5780..f98c5c3160c02beb74c89bd4c275aa9b4d07866d 100644
--- a/src/utils/p2c.c
+++ b/src/utils/p2c.c
@@ -12,20 +12,10 @@
 
 #include <utils/p2c.h>
 
-
-int P_argc;
-char **P_argv;
-
-short P_escapecode;
-int P_ioresult;
-int bigendian;
-
 long EXCP_LINE;    /* Used by Pascal workstation system */
 
 void* __MallocTemp__;
 
-__p2c_jmp_buf *__top_jb;
-
 
 /* determines endian-ness of machine */
 /* contributed by Marwan Jabri, U Sydney */
diff --git a/src/utils/strings.c b/src/utils/strings.c
index 8397f5c11295bb768c83220b5da65f615d062688..7ea7a3c5fd7a93cd8f76de58aa638507eeed9b0f 100644
--- a/src/utils/strings.c
+++ b/src/utils/strings.c
@@ -34,7 +34,7 @@ char *strlower(char *result, char *s)
 char *strreverse(char *result, char *s)
 {
 	size_t len = strlen(s);
-	char *tmp = malloc(sizeof(char) * (len + 1));
+	char *tmp = (char *) malloc(sizeof(char) * (len + 1));
 
 	tmp[len] = '\0';
 	for (size_t i = 0; i < len; i++)
diff --git a/src/window.c b/src/window.c
index 1649469f32b5886eda3f3cd916197745372dd156..ddbe37e32164e2434319a359510ed2a5e9e77be0 100644
--- a/src/window.c
+++ b/src/window.c
@@ -30,34 +30,18 @@
    David Gillespie
    */
 
-#include <utils/p2c.h>
-#include <utils/strings.h>
-#include <graphics/newkbd.h>
-#include <graphics/newcrt.h>
+#include "utils/p2c.h"
+#include "graphics/newkbd.h"
+#include "graphics/newcrt.h"
 #include "logglobals.h"
 #include "logfont.h"
 #include "logstuff.h"
 #include "utils.h"
-#include "window.h"
-#include "node.h"
+#include "screen.h"
+#include "logstuff.h"
 #include "log.h"
-#include "box.h"
-
-short cursx;   ///< Current X position of cursor
-short cursy;   ///< Current Y position of cursor
-short cursx1;  ///< X position of wire starting point
-short cursy1;  ///< Y position of wire starting point
-short cursx2;  ///< X position of wire end point
-short cursy2;  ///< Y position of wire end point
-short chairx;  ///< X position of crosshair
-short chairy;  ///< Y position of crosshair
-
-int cursorflag;   ///< If cursor is displayed
-int prevcursorflag; ///< If cursor was displayed before operation began
-
-int chairflag;   ///< If crosshair is on window
-int chairflag2;   ///< If crosshair will be on window
-int rbandflag;   ///< If Rubber-band wire is on window
+#include "node.h"
+#include "utils/strings.h"
 
 static rablistrec rabtable[rabtabsize];   ///< Positions of rabbits
 
@@ -103,7 +87,7 @@ void initwindow()
 	m_upside_down();
 	m_setlinestyle(1L, 0xf0f0L);
 	m_setlinestyle(2L, 0xaaaaL);
-	m_setfont(logfont_lfont);
+	// m_setfont(logfont_lfont);
 	init_X_window();
 	onescreen = nc_alphashared();
 	eightcolors = (m_maxcolor <= 7);
diff --git a/src/wire.c b/src/wire.c
index a5dfc6f894c225331e555f7fc86b1a061860645f..a70ce554ba5837da6a7e6e8d4fc4f1aa2a8f3563 100644
--- a/src/wire.c
+++ b/src/wire.c
@@ -1,11 +1,12 @@
 
-#include <utils/p2c.h>
-#include <graphics/newkbd.h>
-#include <utils/sysdevs.h>
+#include "utils/p2c.h"
+#include "graphics/newkbd.h"
+#include "graphics/newci.h"
 #include "logglobals.h"
 #include "logdef.h"
 #include "utils.h"
-#include "wire.h"
+#include "log.h"
+#include "screen.h"
 #include "node.h"
 #include "log.h"
 #include "window.h"