diff --git a/log/src/log.c b/log/src/log.c
index 15bfa2301cbf28c5b9348a03f2569547af4ec6c0..d2f9244647d7cb7d051b6cdb728646582fdfbea7 100644
--- a/log/src/log.c
+++ b/log/src/log.c
@@ -6099,7 +6099,7 @@ static void closehoriz()
 			trykbdscroll();
 			pen();
 		} while (!gg.t.dn && gg.stillnear && *gg.func == '\0');
-		
+
 		if (gg.incircuit && gg.stillnear && *gg.func == '\0')
 		{
 			x1 = gg.posx;
@@ -6136,7 +6136,7 @@ static void closehoriz()
 						flag = true;
 					vw = vw->next;
 				}
-				
+
 				if (!flag)
 				{
 					g = gg.gbase[gg.curpage - 1];
@@ -6153,7 +6153,7 @@ static void closehoriz()
 						g = g1;
 					}
 					s = gg.sbase[gg.curpage - 1];
-					
+
 					while (s != NULL)
 					{
 						s1 = s->next;
@@ -6166,7 +6166,7 @@ static void closehoriz()
 						s = s1;
 					}
 					hw = gg.hwbase[gg.curpage - 1];
-					
+
 					while (hw != NULL)
 					{
 						hw1 = hw->next;
@@ -6177,7 +6177,7 @@ static void closehoriz()
 						hw = hw1;
 					}
 					vw = gg.vwbase[gg.curpage - 1];
-					
+
 					while (vw != NULL)
 					{
 						vw1 = vw->next;
@@ -6187,7 +6187,7 @@ static void closehoriz()
 						vw = vw1;
 					}
 					hw = gg.hwbase[gg.curpage - 1];
-					
+
 					while (hw != NULL)
 					{
 						if (gg.posy <= hw->y && hw->y <= y1 && hw->x2 >= gg.posx)
@@ -6216,7 +6216,7 @@ static void closehoriz()
 						hw = hw->next;
 					}
 					vw = gg.vwbase[gg.curpage - 1];
-					
+
 					while (vw != NULL)
 					{
 						if (gg.posy <= vw->y2 && vw->y1 <= y1 && vw->x >= gg.posx)
@@ -6343,7 +6343,7 @@ static void closevert()
 			trykbdscroll();
 			pen();
 		} while (!gg.t.dn && gg.stillnear && *gg.func == '\0');
-		
+
 		if (gg.incircuit && gg.stillnear && *gg.func == '\0')
 		{
 			x1 = gg.posx;
@@ -6380,7 +6380,7 @@ static void closevert()
 						flag = true;
 					hw = hw->next;
 				}
-				
+
 				if (!flag)
 				{
 					g = gg.gbase[gg.curpage - 1];
@@ -6397,7 +6397,7 @@ static void closevert()
 						g = g1;
 					}
 					s = gg.sbase[gg.curpage - 1];
-					
+
 					while (s != NULL)
 					{
 						s1 = s->next;
@@ -6410,7 +6410,7 @@ static void closevert()
 						s = s1;
 					}
 					vw = gg.vwbase[gg.curpage - 1];
-					
+
 					while (vw != NULL)
 					{
 						vw1 = vw->next;
@@ -6422,7 +6422,7 @@ static void closevert()
 						vw = vw1;
 					}
 					hw = gg.hwbase[gg.curpage - 1];
-					
+
 					while (hw != NULL)
 					{
 						hw1 = hw->next;
@@ -6432,7 +6432,7 @@ static void closevert()
 						hw = hw1;
 					}
 					vw = gg.vwbase[gg.curpage - 1];
-					
+
 					while (vw != NULL)
 					{
 						if (gg.posx <= vw->x && vw->x <= x1 && vw->y2 >= gg.posy)
@@ -6461,7 +6461,7 @@ static void closevert()
 						vw = vw->next;
 					}
 					hw = gg.hwbase[gg.curpage - 1];
-					
+
 					while (hw != NULL)
 					{
 						if (gg.posx <= hw->x2 && hw->x1 <= x1 && hw->y >= gg.posy)
@@ -6469,7 +6469,7 @@ static void closevert()
 						hw = hw->next;
 					}
 					b = gg.bbase[gg.curpage - 1];
-					
+
 					while (b != NULL)
 					{
 						b1 = b->next;
@@ -6562,7 +6562,7 @@ static void centercommand()
 			g = g->next;
 		}
 		hw = gg.hwbase[gg.curpage - 1];
-		
+
 		while (hw != NULL)
 		{
 			hw->x1 += dx;
@@ -6854,7 +6854,7 @@ static short readlibrary_at(char *n_, short where, int loadit)
 				while (i <= maxkinds && kind[i - 1] != NULL)
 					i++;
 			}
-			
+
 			/* garbagge collection */
 			if (i > maxkinds)
 			{
@@ -6969,7 +6969,7 @@ static short readlibrary_at(char *n_, short where, int loadit)
 			WITH->bby2 = log_scale0;
 			bound(kind[i - 1], (long)WITH->x1, (long)WITH->y1, &V);
 			bound(kind[i - 1], (long)WITH->x2, (long)WITH->y2, &V);
-			
+
 			if (WITH->numvects != 0)
 			{
 				if (WITH->flag.U3.expanded)
@@ -6991,7 +6991,7 @@ static short readlibrary_at(char *n_, short where, int loadit)
 								ch2 = ch;
 								ch = (char)readnum(&V);
 							} while (ch >= '1' && ch <= '7');
-							
+
 							if (ch2 != curcol)
 							{
 								j++;
@@ -7147,7 +7147,7 @@ static short readlibrary_at(char *n_, short where, int loadit)
 					V.p++;
 				}
 			}
-			
+
 			if (WITH->numpnums != 0)
 			{
 				WITH->pnum = (log_pnumrec *)Malloc(WITH->numpnums *
@@ -7249,7 +7249,7 @@ static short readlibrary_at(char *n_, short where, int loadit)
 			P_putbits_UB(loadedgates, i0 - 1, 1, 0, 3);
 			RECOVER(try15);
 			kind[i - 1] = NULL;
-			
+
 			if (P_escapecode == -20)
 			{
 				_Escape(P_escapecode);
@@ -7322,7 +7322,7 @@ static void getgategroup(na_strlist_t *grp)
 		count += readlibrary_at(l1->s, 1, false);
 		l1 = l1->next;
 	}
-	
+
 	if (count != 0)
 	{
 		if (count > maxkinds)
@@ -7346,7 +7346,7 @@ static void getgategroup(na_strlist_t *grp)
 					done = false;
 			}
 		} while (!(done || pos + count > maxkinds));
-		
+
 		if (done)
 		{
 			if (count <= catwidth)
@@ -7490,7 +7490,7 @@ static void showgateinfo(na_strlist_t *info, log_grec *g)
 			mx = across - width;
 		else
 			mx = 0;
-		
+
 		if (gy2 + ydiff + height < baseline)
 			my = gy2 + ydiff;
 		else if (gy1 - ydiff - height > 0)
@@ -7571,10 +7571,10 @@ static void showgatedef(log_krec *k, log_grec *g)
 		gg.actflag = false;
 		send_gengate(g, "SHOWPINS");
 	}
-	
+
 	if (gg.actstrlist == NULL)
 		send_genkind(k, "DUMPKIND");
-	
+
 	if (gg.actstrlist == NULL)
 	{
 		sprintf(STR1, "No definition available for gate %s", k->name);
@@ -7739,7 +7739,7 @@ static void listlibrary()
 					stdout);
 		else
 			printf("%*c", txacross - 26, ' ');
-		
+
 		printf("Group%2d\n", curlistgroup);
 		FORLIM = V.maxi;
 		for (i = 0; i <= FORLIM; i++)
@@ -7824,13 +7824,13 @@ static void listlibrary()
 				nk_gotoxy(gg.t.ax, gg.t.ay);
 			else
 				noblink();
-			
+
 			do
 			{
 				pass();
 				pen();
 			} while (!(pollkbd2() || gg.t.dn || k != kfunc(&ii, &jj, &V)));
-			
+
 			remcursor();
 			if (k > 0)
 			{
@@ -8011,7 +8011,7 @@ static void gatecatalog(int librmode)
 					m_centerstr((x0 * 2L + 1) * gridcen, (long)y00, logfont_lfont, nm);
 					m_colormode((long)m_normal);
 					lp = k->lbl;
-					
+
 					while (lp != NULL && lp->kind != '\0')
 						lp = lp->next;
 
@@ -8025,7 +8025,7 @@ static void gatecatalog(int librmode)
 							strcpy(bot3, lp->s);
 						lp = lp->next;
 					}
-					
+
 					if (*bot1 == '\0')
 					{
 						lsp = findlibrstr(k->name);
@@ -8038,7 +8038,7 @@ static void gatecatalog(int librmode)
 				{
 					flag = false;
 				}
-				
+
 				do
 				{
 					x = gg.t.x;
@@ -8095,7 +8095,7 @@ static void gatecatalog(int librmode)
 					else
 						done = true;
 				}
-				
+
 				if (ch == 251 || ch == 250 || ch == ' ')
 				{
 					refrflag = true;
@@ -8229,7 +8229,7 @@ static char *realstr(char *Result, double r, short p)
 		{
 			i--;
 		} while (s[i - 1] == '0');
-		
+
 		if (s[i - 1] == '.')
 			i--;
 		s[i] = '\0';
@@ -8309,7 +8309,7 @@ static char *realunit(char *Result, double r, short p, char *u, int mu)
 		strcpy(s, "f");
 		r *= 1e15;
 	}
-	
+
 	sprintf(s, "%s%s", realstr(STR1, r, p), strcpy(STR2, s));
 	sprintf(Result, "%s%s", s, u);
 	/* zfprintf(stdout, "realunit Result: %s\n", Result); ***MDG** */
@@ -8358,12 +8358,12 @@ static void drawlabelline(long i, struct LOC_editattrs *LINK)
 		if (l1 != NULL)
 			l1 = l1->next;
 	}
-	
+
 	if (l1 != NULL)
 		nc_putStr(0, (int)i, l1->s);
 }
 
-static void eraselabelline(longi, struct LOC_editattrs *LINK)
+static void eraselabelline(long i, struct LOC_editattrs *LINK)
 {
 	remcursor();
 	nk_gotoxy(0, (int)i);
@@ -8395,7 +8395,7 @@ static void drawvalue(short i, int highlight, struct LOC_editattrs *LINK)
 	nk_gotoxy(WITH->x, WITH->y - LINK->ybase);
 	if (highlight)
 		putchar(129);
-	 * Note: WRITE statement contains color/attribute characters [203] */
+	/* Note: WRITE statement contains color/attribute characters [203] */
 	if (!LINK->gattr[i - 1].blnk)
 	{
 		switch (WITH->dtype)
@@ -8553,7 +8553,7 @@ static double scrnincr(short p, struct LOC_editattrs *LINK)
 		else if (isdigit(s[i - 1]))
 			s[i - 1] = '0';
 	} while (s[i - 1] == '.' || s[i - 1] == '+' || s[i - 1] == '0');
-	
+
 	if (i > 1)
 		s[i - 2] = '1';
 	r1 = 0.0;
@@ -8648,7 +8648,7 @@ static void editattrs(log_gattrrec *gattr_, short numattrs_, log_kattrrec *kattr
 				pass();
 				pen();
 			} while (!(pollkbd2() || gg.t.dn));
-			
+
 			if (pollkbd2())
 				ch = inkey2();
 			else
@@ -8679,17 +8679,17 @@ static void editattrs(log_gattrrec *gattr_, short numattrs_, log_kattrrec *kattr
 					if (V.p == V.numattrs)
 						V.ybase = P_imin2(ytotal - txdown - 1L, (long)V.kattr[V.p - 1].y);
 				}
-				
+
 				if (abs(V.ybase - i1) < txdown)
 					nc_scrollXY(0, V.ybase - i1);
 				else
 					clearshowalpha();
-				
+
 				drawlabel(&V);
 				FORLIM = V.numattrs;
 				for (i = 0; i < FORLIM; i++)
 					V.gattr[i].supr = false;
-				
+
 				maskvalues(&V);
 				FORLIM = V.numattrs;
 				for (i = 1; i <= FORLIM; i++)
@@ -8721,7 +8721,7 @@ static void editattrs(log_gattrrec *gattr_, short numattrs_, log_kattrrec *kattr
 
 							if (V.kattr[i - 1].dtype == 'V')
 								maskvalues(&V);
-							
+
 							if (V.gattr[V.p - 1].supr)
 								ch = '\037';
 							noblink();
@@ -8744,13 +8744,13 @@ end;  */
 					ch = inkey2();
 			} while (!(ch != '\0' || gg.t.dn));
 			drawvalue(V.p, false, &V);
-			
+
 			if (gg.t.dn)
 				ch = '\003';
 			p0 = V.p;
 			understood = true;
 			WITH = &V.gattr[V.p - 1];
-			
+
 			if (ch == '\003' || ch == ' ')
 			{
 				exitflag = true;
@@ -8763,7 +8763,7 @@ end;  */
 					{
 						V.p++;
 					} while (V.p <= V.numattrs && V.gattr[V.p - 1].supr);
-					
+
 					if (V.p > V.numattrs)
 						V.p = p0;
 				}
@@ -8773,7 +8773,7 @@ end;  */
 					{
 						V.p--;
 					} while (V.p >= 1 && V.gattr[V.p - 1].supr);
-					
+
 					if (V.p < 1)   /*should never happen!*/
 						V.p = p0;
 				}
@@ -8835,13 +8835,13 @@ end;  */
 								saveb2 = WITH->blnk;
 								WITH->UU.b = true;
 								WITH->blnk = false;
-								
+
 								if (!tryconfig(&V))
 								{
 									WITH->UU.b = saveb;
 									WITH->blnk = saveb2;
 								}
-								
+
 								if (WITH->UU.b != saveb || WITH->blnk != saveb2)
 								{
 									drawvalue(V.p, false, &V);
@@ -8853,10 +8853,10 @@ end;  */
 								savei = WITH->UU.nv;
 								if (WITH->UU.nv < V.kattr[V.p - 1].UU.U86.nv - 1)
 									WITH->UU.nv++;
-								
+
 								if (!tryconfig(&V))
 									WITH->UU.nv = savei;
-								
+
 								if (WITH->UU.nv != savei)
 								{
 									maskvalues(&V);
@@ -8931,7 +8931,7 @@ end;  */
 									WITH->UU.b = saveb;
 									WITH->blnk = saveb2;
 								}
-								
+
 								if (WITH->UU.b != saveb || WITH->blnk != saveb2)
 								{
 									drawvalue(V.p, false, &V);
@@ -8943,10 +8943,10 @@ end;  */
 								savei = WITH->UU.nv;
 								if (WITH->UU.nv > 0)
 									WITH->UU.nv--;
-								
+
 								if (!tryconfig(&V))
 									WITH->UU.nv = savei;
-								
+
 								if (WITH->UU.nv != savei)
 								{
 									maskvalues(&V);
@@ -9015,7 +9015,7 @@ end;  */
 							warning();
 							ENDTRY(try16);
 						}
-						
+
 						if (!tryconfig(&V))
 						{
 							WITH->UU.r = saver;
@@ -9102,7 +9102,7 @@ end;  */
 							warning();
 							ENDTRY(try18);
 						}
-						
+
 						if (!tryconfig(&V))
 						{
 							WITH->UU.U73.i1 = savei;
@@ -9192,10 +9192,10 @@ end;  */
 						l1 = V.kattr[V.p - 1].UU.U86.v;
 						while (l1 != NULL && strcicmp(l1->s, buf) != 0)
 							l1 = l1->next;
-						
+
 						if (l1 != NULL)
 							WITH->UU.nv = (long)l1->value;
-						
+
 						if (tryconfig(&V))
 						{
 							maskvalues(&V);
@@ -9220,8 +9220,7 @@ end;  */
 }
 
 
-static void editattrsx(log_fattrrec *gattr, short numattrs, log_kattrrec *kattr, na_strlist *lbl, char *name,
-		void (*proc) (), void (*chproc) (), void (*relproc())
+static void editattrsx(log_gattrrec *gattr, short numattrs, log_kattrrec *kattr, na_strlist_t *lbl, char *name, void (*proc) (), void (*chproc) (), void (*relproc) ())
 {
 	long stamp;
 
@@ -9392,7 +9391,7 @@ static int setattr(log_gattrrec *gattr_, log_kattrrec *kattr_, short p_, char *b
 					_Escape(P_escapecode);
 				ENDTRY(try19);
 			}
-			
+
 			if (!tryconfig_(&V))
 			{
 				WITH->UU.r = saver;
@@ -9433,7 +9432,7 @@ static int setattr(log_gattrrec *gattr_, log_kattrrec *kattr_, short p_, char *b
 					_Escape(P_escapecode);
 				ENDTRY(try20);
 			}
-			
+
 			if (!tryconfig_(&V))
 			{
 				WITH->UU.U73.i1 = savei;
@@ -9474,7 +9473,7 @@ static int setattr(log_gattrrec *gattr_, log_kattrrec *kattr_, short p_, char *b
 					_Escape(P_escapecode);
 				ENDTRY(try21);
 			}
-			
+
 			if (!tryconfig_(&V))
 			{
 				WITH->UU.U73.i1 = savei;
@@ -9542,7 +9541,7 @@ static int setattr(log_gattrrec *gattr_, log_kattrrec *kattr_, short p_, char *b
 				WITH->UU.b = !WITH->UU.b;
 				WITH->blnk = false;
 			}
-			
+
 			if (tryconfig_(&V))
 			{
 				touched = true;
@@ -9662,14 +9661,14 @@ static void flipgate(log_grec *g)
 		configgate(g);
 		return;
 	}
-	
+
 	WITH = g->kind;
-	
+
 	if (g->kind->flag.U3.toggle)
 		i = 0;
 	else
 		i = cureditmode;
-	
+
 	switch (i)
 	{
 
@@ -9880,7 +9879,7 @@ static void touchgate(log_grec *g)
 	gg.acty2 = log_irotxy[g->rot] * xx + log_irotyy[g->rot] * yy;
 	gg.actflag = false;
 	calltoolgate(g, act_touchgate);
-	
+
 	if (gg.actflag)
 		chpageplace((int)gg.curpage, g->x - g->kind->bbmax, g->y - g->kind->bbmax,
 				g->x + g->kind->bbmax, g->y + g->kind->bbmax);
@@ -9993,17 +9992,17 @@ static void findattrname2(short numattrs, log_kattrrec *kattr, na_strlist_t *lbl
 		return;
 	}
 	l1 = lbl;
-	
+
 	while (l1 != NULL && l1->kind != '\001')
 		l1 = l1->next;
-	
+
 	if (l1 != NULL)
 	{
 		l1 = (na_strlist_t *)l1->value;
 		while (l1 != NULL && (long)l1->value != num)
 			l1 = l1->next;
 	}
-	
+
 	if (l1 != NULL)
 		strcpy(name, l1->s);
 	else
@@ -10053,7 +10052,7 @@ static void findpinname(log_krec *k, short num, char *name)
 		strcpy(name, k->pinnames[num - 1]->s);
 		return;
 	}
-	
+
 	if (num == 0)
 		*name = '\0';
 	else
@@ -10266,7 +10265,7 @@ static void editlabel(log_lrec *l)
 			{
 				redraw = false;
 			}
-			
+
 			if (ch >= ' ' && ch != 250 && ch != 251 && strlen(name) < log_lablen)
 			{
 				if (i <= strlen(name))
@@ -10677,7 +10676,7 @@ static void haproc2()
 		case histstarttime:
 			if (WITH->UU.r <= 0)
 				WITH->blnk = true;
-			
+
 			if (!WITH->blnk && WITH->UU.r >= histgattr[histstoptime - 1].UU.r)
 			{
 				histgattr[histstoptime - 1].blnk = true;
@@ -10688,7 +10687,7 @@ static void haproc2()
 		case histstoptime:
 			if (WITH->UU.r < 0)
 				WITH->blnk = true;
-			
+
 			if (!WITH->blnk && WITH->UU.r <= histgattr[histstarttime - 1].UU.r)
 			{
 				histgattr[histstarttime - 1].blnk = true;
@@ -11026,13 +11025,13 @@ static void drawhistory(struct LOC_historycommand *LINK)
 			drawsigname(hn, 0, LINK);
 		hn = hn->next;
 	}
-	
+
 	if (histgridhn != NULL)
 		drawsigname(histgridhn, 0, LINK);
-	
+
 	if (gg.htbase == NULL)
 		return;
-	
+
 	V.ar = (short *)Malloc(hncount * 2);
 	FORLIM = hncount;
 	for (i = 0; i < FORLIM; i++)
@@ -11041,13 +11040,13 @@ static void drawhistory(struct LOC_historycommand *LINK)
 	m_clip((long)histleft, 0L, (long)across, (long)histdown);
 	V.ht = gg.htbase;
 	ht1 = gg.htbase;
-	
+
 	while (ht1 != NULL && ht1->time < histgattr[histfirsttime - 1].UU.r)
 	{
 		V.ht = ht1;
 		ht1 = ht1->next;
 	}
-	
+
 	do
 	{
 		historypointx(V.ht, &V.x);
@@ -11190,7 +11189,7 @@ static void dumpcmd(struct LOC_historycommand *LINK)
 	beginbottom();
 	m_alpha_on();
 	printf("Dump file name");
-	
+
 	if (*dumpfname != '\0')
 		printf(" [%s]", dumpfname);
 	printf(": ");
@@ -11198,12 +11197,12 @@ static void dumpcmd(struct LOC_historycommand *LINK)
 	endbottom();
 	beginbottom();
 	m_alpha_on();
-	
+
 	if (*fn != '\0')
 		setdumpname(fn);
 	else
 		printf("Dump file is %s\n", dumpfname);
-	
+
 	if (*dumpfname != '\0') {
 		TRY(try23);
 
@@ -11224,7 +11223,7 @@ static void dumpcmd(struct LOC_historycommand *LINK)
 		dumpmessage("(TITLE: TIME )");
 		dumpmessage("(POINTS:");
 		ht = gg.htbase;
-		
+
 		/* list of time values */
 		while (ht != NULL)
 		{
@@ -11244,7 +11243,7 @@ static void dumpcmd(struct LOC_historycommand *LINK)
 			dumpmessage(STR3);
 			dumpmessage("(POINTS:");
 			ht = gg.htbase;
-			
+
 			/* and list of values */
 			while (ht != NULL)
 			{
@@ -11308,10 +11307,10 @@ static void setaxis(char *expr, struct LOC_historycommand *LINK)
 		refraxes(LINK);
 		return;
 	}
-	
+
 	if (!LINK->yactive)
 		return;
-	
+
 	LINK->yactive = false;
 	strcpy(LINK->yexpr, expr);
 	if (*LINK->xexpr == '\0')
@@ -11581,7 +11580,7 @@ static void historycommand()
 			gg.showpage = log_page_history;
 			rmflag = true;
 		}
-		
+
 		if (rmflag)
 		{
 			uerase(0, histdown + 1, across, down);
@@ -11623,7 +11622,7 @@ static void historycommand()
 			drawhistdivisions(histleft, across);
 			drawhistory(&V);
 		}
-		
+
 		V.rflag = false;
 		rmflag = false;
 		refrgridmode(&V);
@@ -11778,7 +11777,7 @@ static void historycommand()
 					hn = hn1;
 					hn0 = hn1a;
 				}
-				
+
 				if (hn != NULL)
 				{
 					switch (V.whichmenu)
@@ -11884,7 +11883,7 @@ static void historycommand()
 				do
 				{
 				} while (!(timers_sysclock() > t || pollkbd2()));
-				
+
 				if (testkey2() == '<')
 					ch = inkey2();
 				else
@@ -12011,12 +12010,12 @@ static void historycommand()
 						}
 					} while (!((ch < 32 && ((1L << ch) & 0x2008) != 0) || gg.t.dn));
 					sprintf(STR2, "%c", ch);
-					
+
 					if (!strcmp(STR2, EXEC))
 						*name = '\0';
 					else
 						strcpy(name, strrtrim(strcpy(STR3, name)));
-					
+
 					remcursor();
 					clipoff();
 					i = getsignal(0, name);
@@ -12311,21 +12310,21 @@ static void savepage(short pgnum, char *filename_)
 			n1->flag = false;
 			n1 = n1->next;
 		}
-		
+
 		hw = gg.hwbase[pgnum - 1];
 		while (hw != NULL)
 		{
 			hw->node->flag = true;
 			hw = hw->next;
 		}
-		
+
 		vw = gg.vwbase[pgnum - 1];
 		while (vw != NULL)
 		{
 			vw->node->flag = true;
 			vw = vw->next;
 		}
-		
+
 		g = gg.gbase[pgnum - 1];
 		while (g != NULL)
 		{
@@ -12334,7 +12333,7 @@ static void savepage(short pgnum, char *filename_)
 				g->pin[i]->flag = true;
 			g = g->next;
 		}
-		
+
 		numnodes = 0;
 		V.firstnode = NULL;
 		lastnode = NULL;
@@ -12742,7 +12741,7 @@ static void loadlog30(FILE **f, short ver)
 		fscanf(*f, "%hd%hd%hd%hd%*[^\n]", &x1, &x2, &y, &i);
 		getc(*f);
 	}
-	
+
 	while (x1 != -9999)
 	{
 		addhwire(x1, x2, y, log_wcol_normal);
@@ -12768,7 +12767,7 @@ static void loadlog30(FILE **f, short ver)
 		fscanf(*f, "%hd%hd%hd%hd%*[^\n]", &x, &y1, &y2, &i);
 		getc(*f);
 	}
-	
+
 	while (x != -9999)
 	{
 		addvwire(x, y1, y2, log_wcol_normal);
@@ -12825,7 +12824,7 @@ static void loadlog30(FILE **f, short ver)
 		if (TEMP != NULL)
 			*TEMP = 0;
 	}
-	
+
 	while (x != -9999)
 	{
 		newlabel(&l);
@@ -12869,10 +12868,10 @@ static void loadlog30(FILE **f, short ver)
 		getc(*f);
 	}
 	fscanf(*f, "%hd%hd%hd%hd%hd%hd%hd%c", &i, &x, &y, &y1, &x1, &y2, &x2, &ch);
-	
+
 	if (ch == '\n')
 		ch = ' ';
-	
+
 	fgets(nam, 81, *f);
 	TEMP = (char *)strchr(nam, '\n');
 	if (TEMP != NULL)
@@ -12894,13 +12893,13 @@ static void loadlog30(FILE **f, short ver)
 			j = readlibrary(nam);
 			addgate1(x, y, j + i / 128 * 128);
 		}
-		
+
 		for (i = 1; i <= y2 + x2; i++)
 		{   /*ignore all pins, attributes!*/
 			fscanf(*f, "%*[^\n]");
 			getc(*f);
 		}
-		
+
 		fscanf(*f, "%hd%hd%hd%hd%hd%hd%hd%c", &i, &x, &y, &y1, &x1, &y2, &x2, &ch);
 		if (ch == '\n')
 			ch = ' ';
@@ -13227,7 +13226,7 @@ static void loadpage(char *filename_, char *reason_)
 			Free(hw);
 			hw = gg.hwbase[gg.curpage - 1];
 		}
-		
+
 		vw = gg.vwbase[gg.curpage - 1];
 		while (vw != NULL)
 		{
@@ -13236,7 +13235,7 @@ static void loadpage(char *filename_, char *reason_)
 			Free(vw);
 			vw = gg.vwbase[gg.curpage - 1];
 		}
-		
+
 		s = gg.sbase[gg.curpage - 1];
 		while (s != NULL)
 		{
@@ -13244,7 +13243,7 @@ static void loadpage(char *filename_, char *reason_)
 			Free(s);
 			s = gg.sbase[gg.curpage - 1];
 		}
-		
+
 		g = gg.gbase[gg.curpage - 1];
 		while (g != NULL)
 		{
@@ -13253,29 +13252,29 @@ static void loadpage(char *filename_, char *reason_)
 			disposegate(&g);
 			g = gg.gbase[gg.curpage - 1];
 		}
-		
+
 		l = gg.lbase[gg.curpage - 1];
 		if (l != NULL)
 			stamp(&gg.labelstamp);
-		
+
 		while (l != NULL)
 		{
 			gg.lbase[gg.curpage - 1] = l->next;
 			Free(l);
 			l = gg.lbase[gg.curpage - 1];
 		}
-		
+
 		b = gg.bbase[gg.curpage - 1];
 		if (b != NULL)
 			stamp(&gg.boxstamp);
-		
+
 		while (b != NULL)
 		{
 			gg.bbase[gg.curpage - 1] = b->next;
 			Free(b);
 			b = gg.bbase[gg.curpage - 1];
 		}
-		
+
 		garbagecoll();
 		stamp(&gg.loadstamp);
 		stamp(&gg.pagestamp[gg.curpage - 1]);
@@ -13412,7 +13411,7 @@ static void loadpage(char *filename_, char *reason_)
 						loadfail(STR3, &V);
 						break;
 				}
-				
+
 				n = countnode_(j, &V);
 				if (y1 == y2)
 				{
@@ -13714,7 +13713,7 @@ if gg.t.y < 46 then y := 0; */
 					nk_gotoxy(gg.t.ax, gg.t.ay);
 				else
 					nk_gotoxy((int)(strlen(filename) + 24), txdown - 2);
-				
+
 				nc_cursor_on();
 				do
 				{
@@ -13770,12 +13769,12 @@ if gg.t.y < 46 then y1 := 0; */
 			if (dirs[i] != NULL)
 				Free(dirs[i]);
 		}
-		
+
 		sprintf(STR3, "%c", ch);
 		if (!strcmp(STR3, EXEC))
 			*filename = '\0';
 		clearalpha();
-		
+
 		if (m_autoraise)
 		{
 		}
@@ -14022,7 +14021,7 @@ static void readlgf(FILE **f, char *reason_)
 						fscanf(*V.f, "%*[^\n]");
 						getc(*V.f);
 					}
-					
+
 					if (P_eof(*V.f))
 						loadfail_("End-of-file while reading gates", &V);
 					fscanf(*V.f, "%*[^\n]");
@@ -14253,7 +14252,7 @@ static void selecttool(char *name, struct LOC_toolcommand *LINK)
 		warning();
 		return;
 	}
-	
+
 	calltool(tp, act_select);
 	if (!tp->keep)
 		closetool(tp);
@@ -14308,29 +14307,29 @@ static void toolcommand()
 						describe(j, &V);
 						putchar(chrplain);
 					}
-					
+
 					if (gg.t.near_ && gg.t.inalpha)
 						nk_gotoxy(gg.t.ax, gg.t.ay);
 					else
 						noblink();
-					
+
 					do
 					{
 						pass();
 						pen();
 					} while (!(which(&V) != j || gg.t.dn || pollkbd2()));
-					
+
 					if (j >= 0)
 						describe(j, &V);
 				}
 				while (!(gg.t.dn || pollkbd2()));
 				nk_gotoxy(0, txdown);
-				
+
 				if (pollkbd2())
 					ch = toupper(inkey2());
 				else
 					ch = '\0';
-				
+
 				if (gg.t.dn)
 				{
 					switch (j)
@@ -14560,12 +14559,12 @@ static void status_mem()
 				b = b->next;
 			}
 			printf("%7ld     ", j);
-			
+
 			if (pagechanged((int)(i + 1)))
 				printf("Yes    ");
 			else
 				printf("No     ");
-			
+
 			if (curfilename[i] != NULL)
 				fputs(curfilename[i], stdout);
 		}
@@ -14741,7 +14740,7 @@ static void statusdisplay(char *name_)
 		tp = tp->next;
 	}
 	strupper(name, strcpy(STR2, strltrim(strrtrim(strcpy(STR3, name)))));
-	
+
 	if (!strcmp(name, "LOG"))
 		which = -2;
 	else if (!strcmp(name, "MEMORY"))