Description: Changes for gcc-15

Index: tkgate/src/tkgate/elements.h
===================================================================
--- tkgate.orig/src/tkgate/elements.h
+++ tkgate/src/tkgate/elements.h
@@ -333,7 +333,7 @@ GWire *GCElement_getPort(GCElement *g, c
 GGateInfo *GGateInfo_lookup(const char*);
 GGateInfo *GGateInfo_vlookup(const char*);
 int GGateInfo_variantNum(GGateInfo *gi,const char *func);
-GGateInfo *GGateInfo_codeLookup();
+GGateInfo *GGateInfo_codeLookup(int type);
 
 /*
  * Public comment methods.
Index: tkgate/src/tkgate/tkgate.h
===================================================================
--- tkgate.orig/src/tkgate/tkgate.h
+++ tkgate/src/tkgate/tkgate.h
@@ -497,10 +497,10 @@ void wm_SetCursor(int id);
 void SetModified(unsigned flags);		/* Flags are from the MF_ group */
 void ClearModified();
 void UpdateModifiedIndicator();
-void FlagRedraw();
+void FlagRedraw(int flag);
 void SynchronizeInterface();
 
-void SetBatCursor();
+void SetBatCursor(EditState * editstate);
 void ClearErrorMark();
 void DrawErrorPositionMark();
 void ReqScopeRedisplay();
Index: tkgate/src/tkgate/circuit.h
===================================================================
--- tkgate.orig/src/tkgate/circuit.h
+++ tkgate/src/tkgate/circuit.h
@@ -147,7 +147,7 @@ struct Circuit_str {
   int mode;			/* Current mode */
 };
 
-Circuit *new_Circuit();
+Circuit *new_Circuit(int n);
 void Circuit_setTitle(const char*);
 void Circuit_setLocale(Circuit *c,Locale *);
 void Circuit_setFileEncoding(Circuit *c,const char*);
Index: tkgate/src/tkgate/tkgate.c
===================================================================
--- tkgate.orig/src/tkgate/tkgate.c
+++ tkgate/src/tkgate/tkgate.c
@@ -98,7 +98,7 @@ char *tkgate_tutorialdir = 0;
  *****************************************************************************/
 static void catchInterrupt(int s)
 {
-  FlagRedraw();
+  FlagRedraw(MF_ALL);
   want_exit = 1;
 }
 
@@ -320,7 +320,7 @@ void doVerifyLoad()
   MSS_init();
   init_gates();
 
-  TkGate.circuit = new_Circuit();
+  TkGate.circuit = new_Circuit(0);
   TkGate.ed = (EditData*) malloc(sizeof(EditData));
   TkGate.errl = (ErrorList*) malloc(sizeof(ErrorList));
 
Index: tkgate/src/tkgate/tkgatewin.c
===================================================================
--- tkgate.orig/src/tkgate/tkgatewin.c
+++ tkgate/src/tkgate/tkgatewin.c
@@ -122,7 +122,7 @@ void tkgate_setMajorMode(MajorMode reque
   case MM_SIMULATE :
     if (TkGate.circuit->simulator.active) {
       SimInterface_end(&TkGate.circuit->simulator);
-      FlagRedraw();
+      FlagRedraw(MF_ALL);
     }
     break;
   case MM_ANALYZE :
@@ -618,7 +618,7 @@ void idleGateWin(ClientData data)
  * next time the tk event queue becomes empty.
  *
  *****************************************************************************/
-void FlagRedraw()
+void FlagRedraw(int flag)
 {
   TkGate.idle_ev.redraw = 1;
   TkGate.idle_ev.scroll_area = 0;
@@ -671,7 +671,7 @@ static void gateWinEvent(ClientData data
       XGraphicsExposeEvent *xE = &E->xgraphicsexpose;
       editstate_regionUpdate(TkGate.circuit->es,xE->x,xE->y,xE->x+xE->width,xE->y+xE->height);
     } else {
-      FlagRedraw();
+      FlagRedraw(MF_ALL);
     }
     break;
   case Expose :
@@ -679,13 +679,13 @@ static void gateWinEvent(ClientData data
       XExposeEvent *xE = &E->xexpose;
       editstate_regionUpdate(TkGate.circuit->es,xE->x,xE->y,xE->x+xE->width,xE->y+xE->height);
     } else {
-      FlagRedraw();
+      FlagRedraw(MF_ALL);
     }
     break;
   case NoExpose :
     break;
   default :
-    FlagRedraw();
+    FlagRedraw(MF_ALL);
   }
 #if TOUCH_XGATE_ED
   ob_end_frame();
@@ -924,7 +924,7 @@ static int gateWinCommand(ClientData dat
 	ob_begin_framef("Scroll",FF_TRANSPARENT);
 	TkGate_setOrigin(TkGate.idle_ev.scroll_new_x,TkGate.circuit->org_y);
 	ob_end_frame();
-	FlagRedraw();
+	FlagRedraw(MF_ALL);
       }
     }
   } else if (strcmp(argv[1],"yview") == 0) {
@@ -937,7 +937,7 @@ static int gateWinCommand(ClientData dat
 	ob_begin_framef("Scroll",FF_TRANSPARENT);
 	TkGate_setOrigin(TkGate.circuit->org_x, TkGate.idle_ev.scroll_new_y);
 	ob_end_frame();
-	FlagRedraw();
+	FlagRedraw(MF_ALL);
       }
     }
   } else if (argc == 3 && strcmp(argv[1],"cget") == 0) {
@@ -1494,7 +1494,7 @@ static int tkg_buttonRelease(ClientData
 
     if (es->isInterface && did_interface_resize) {
       modint_arrange(es);
-      FlagRedraw();
+      FlagRedraw(MF_ALL);
       did_interface_resize = 0;
     }
 
@@ -1637,7 +1637,7 @@ void init_mainWindow(Tcl_Interp *tcl)
   Tk_Window root = Tk_MainWindow(tcl);
   Tk_MakeWindowExist(root);
 
-  TkGate.circuit = new_Circuit();
+  TkGate.circuit = new_Circuit(0);
   TkGate.ed = (EditData*) ob_malloc(sizeof(EditData),"EditData");
   TkGate.ed->mark_vis = 0;
   TkGate.ed->mark_posted = 0;
Index: tkgate/src/verga/yybasic.h
===================================================================
--- tkgate.orig/src/verga/yybasic.h
+++ tkgate/src/verga/yybasic.h
@@ -75,7 +75,7 @@ const char *ycGetKeyword(int tokenCode);
 
 void yc_unputstring(char *s);
 
-int yc_bogochar();
+int yc_bogochar(char *yytext);
 void yc_lexjunk();
 
 #endif
Index: tkgate/src/verga/luthor.l
===================================================================
--- tkgate.orig/src/verga/luthor.l
+++ tkgate/src/verga/luthor.l
@@ -269,7 +269,7 @@ any	[^ \t\r\n]
 <PV>"//:"{white}*"endscript".*"\n"	{ Place_incLineno(&curPlace,1); return ENDSCRIPT; }
 
 
-.			{ FLEX_FIX_STAT return yc_bogochar(*yytext); }
+.			{ FLEX_FIX_STAT return yc_bogochar(&*yytext); }
 %%
 
 void BeginPV() { BEGIN PV; }
@@ -294,7 +294,7 @@ void yc_unputstring(char *s)
   free(s);
 }
 
-int yc_bogochar()
+int yc_bogochar(char *yytext)
 {
   char buf1[16], buf2[16];
 
Index: tkgate/src/tkgate/block.c
===================================================================
--- tkgate.orig/src/tkgate/block.c
+++ tkgate/src/tkgate/block.c
@@ -1311,7 +1311,7 @@ void block_explode(GCElement *g)
     XFlush(TkGate.D);
     usleep(1);
   }
-  FlagRedraw();
+  FlagRedraw(MF_ALL);
 }
 
 void block_setWireEnd(GCElement *g,GWire *w,int pad)
@@ -1617,7 +1617,7 @@ void block_newport(EditState *es,int iod
     SetModified(MF_INTERFACE|MF_NET);
     SynchronizeInterface();
   }
-  FlagRedraw();
+  FlagRedraw(MF_ALL);
 }
 
 void block_setdir(GWireNode *n,EditState *es,int dir)
Index: tkgate/src/tkgate/circuit.c
===================================================================
--- tkgate.orig/src/tkgate/circuit.c
+++ tkgate/src/tkgate/circuit.c
@@ -103,7 +103,7 @@ void Timescale_save(Timescale *ts, FILE
   fprintf(f,"`timescale %d%s/%d%s\n",n1,u1,n2,u2);
 }
 
-Circuit *new_Circuit()
+Circuit *new_Circuit(int n)
 {
   Circuit *c = OM_MALLOC(Circuit);
   extern Timescale defaultTimescale;
@@ -404,7 +404,7 @@ void Circuit_loadLibrary(Circuit *c,cons
   if (c->es->isInterface)
     modint_arrange(c->es);
 
-  FlagRedraw();
+  FlagRedraw(MF_ALL);
 }
 
 void Circuit_unloadLibrary(Circuit *c,const char *name)
Index: tkgate/src/tkgate/cpath.c
===================================================================
--- tkgate.orig/src/tkgate/cpath.c
+++ tkgate/src/tkgate/cpath.c
@@ -484,7 +484,7 @@ void cpath_show(int n,const char *pelems
     TkGate.cpath_pelems[i] = ob_strdup(pelems[i]);
   }
   cpath_show_aux(TkGate.cpath_len,TkGate.cpath_pelems);
-  FlagRedraw();
+  FlagRedraw(MF_ALL);
 }
 
 /*
@@ -496,7 +496,7 @@ void cpath_reshow()
 
   cpath_clear();
   cpath_show_aux(TkGate.cpath_len,TkGate.cpath_pelems);
-  FlagRedraw();
+  FlagRedraw(MF_ALL);
 }
 
 void cpath_draw(int x1,int y1,int x2,int y2)
Index: tkgate/src/tkgate/edit.c
===================================================================
--- tkgate.orig/src/tkgate/edit.c
+++ tkgate/src/tkgate/edit.c
@@ -204,7 +204,7 @@ void HandScroll_move(EditState *es)
     ob_touch(TkGate.circuit);
     TkGate.circuit->org_x = ox + dx;
     TkGate.circuit->org_y = oy + dy;
-    FlagRedraw();
+    FlagRedraw(MF_ALL);
   }
 }
 
@@ -284,7 +284,7 @@ void DoSnap(GWire *w)
  * Update the bat cursor if we are in move mode.
  *
  *****************************************************************************/
-void SetBatCursor()
+void SetBatCursor(EditState * es)
 {
   if (EditState_getMode() != MODE_MOVE) return;
   if (TkGate.circuit->wnsel) return;
@@ -750,7 +750,7 @@ void EditState_dropobject(EditState *es)
   case MODE_MOVE :
     if (!modifyOK(es,0x2)) {
       if (TkGate.batp) {
-	SetBatCursor();
+	SetBatCursor(0);
       } else
 	wm_SetCursor(ARROWCURSOR);
       return;
@@ -764,7 +764,7 @@ void EditState_dropobject(EditState *es)
 	  wire_snapgate(TkGate.circuit->select,1);
       }
     if (TkGate.batp) {
-      SetBatCursor();
+      SetBatCursor(0);
     } else
       wm_SetCursor(ARROWCURSOR);
 
@@ -1364,7 +1364,7 @@ void setEditCursor(int mode)
   case MODE_MOVE :
   default :
     if (TkGate.batp) {
-      SetBatCursor();
+      SetBatCursor(0);
     } else
       wm_SetCursor(ARROWCURSOR);
     break;
Index: tkgate/src/tkgate/editstate.c
===================================================================
--- tkgate.orig/src/tkgate/editstate.c
+++ tkgate/src/tkgate/editstate.c
@@ -454,7 +454,7 @@ int env_delete(EditState *es,const char
     return -1;
 
   SetModified(MF_MODULE);
-  FlagRedraw();
+  FlagRedraw(MF_ALL);
   return 0;
 }
 
@@ -489,7 +489,7 @@ int env_rename(const char *oldName,const
     hdl_replaceName(M,M->m_name);
   }
 
-  FlagRedraw();
+  FlagRedraw(MF_ALL);
 
   return 0;
 }
@@ -998,7 +998,7 @@ void editstate_makeRootAtTop(EditState *
     editstate_setCurrent(*es);
     ClearErrorMark();
     net_unselect(0);
-    FlagRedraw();
+    FlagRedraw(MF_ALL);
   }
 
 }
Index: tkgate/src/tkgate/error.c
===================================================================
--- tkgate.orig/src/tkgate/error.c
+++ tkgate/src/tkgate/error.c
@@ -250,7 +250,7 @@ void Error_purge()
   TkGate.errl->curerr = TkGate.errl->errlist = 0;
 
   TkGate.ErrorMarkTimeout = 0;
-  FlagRedraw();
+  FlagRedraw(MF_ALL);
 }
 
 /*****************************************************************************
@@ -301,7 +301,7 @@ EditState *Error_open(GateError *e,EditS
    */
   if (m->m_type == MT_TEXTHDL) {
     SynchronizeInterface();
-    FlagRedraw();
+    FlagRedraw(MF_ALL);
 
     DoTcl("HdlEditor::highlightLine %d",e->e_modLine);
     return es;
@@ -356,7 +356,7 @@ EditState *Error_open(GateError *e,EditS
   SetErrorPosition(x,y);
 
   SynchronizeInterface();
-  FlagRedraw();
+  FlagRedraw(MF_ALL);
 
   return es;
 }
Index: tkgate/src/tkgate/generic.c
===================================================================
--- tkgate.orig/src/tkgate/generic.c
+++ tkgate/src/tkgate/generic.c
@@ -822,7 +822,7 @@ int Generic_EditProps(GCElement *g,int i
     Generic_editPropsULBasics(g);
     Generic_editPropsULDelay(g);
 
-    FlagRedraw();
+    FlagRedraw(MF_ALL);
   }
   return 0;
 }
Index: tkgate/src/tkgate/igenerate.c
===================================================================
--- tkgate.orig/src/tkgate/igenerate.c
+++ tkgate/src/tkgate/igenerate.c
@@ -661,7 +661,7 @@ int igen_putIcon(GModuleDef *M,char *ana
 
 
   //  SetModified(MF_INTERFACE);
-  FlagRedraw();
+  FlagRedraw(MF_ALL);
 
   return 0;
 }
@@ -1041,7 +1041,7 @@ static int igen_generate_symbol(GModuleD
   modint_syncDisplay(M);
 
   SetModified(MF_INTERFACE);
-  FlagRedraw();
+  FlagRedraw(MF_ALL);
 
 
   igen_freePortList(portList,numPorts);
@@ -1276,7 +1276,7 @@ int igen_generate(GModuleDef *M,int argc
 
   if (editstate_getInterfaceMode() == INTFMODE_SINGLE) {
     modint_syncDisplay(M);
-    FlagRedraw();
+    FlagRedraw(MF_ALL);
   }
 
   if (portList) igen_freePortList(portList,numPorts);
@@ -1358,7 +1358,7 @@ int igen_changetype(GModuleDef *M,int ar
 
     SetModified(MF_INTERFACE);
     modint_syncDisplay(M);
-    FlagRedraw();
+    FlagRedraw(MF_ALL);
   } else {
     GCElement *g,*new_g;
 
Index: tkgate/src/tkgate/modint.c
===================================================================
--- tkgate.orig/src/tkgate/modint.c
+++ tkgate/src/tkgate/modint.c
@@ -148,7 +148,7 @@ void modint_deleteInterface(GModuleDef *
 
   if (TkGate.circuit->es && TkGate.circuit->es->isInterface) {
     modint_arrange(TkGate.circuit->es);
-    FlagRedraw();
+    FlagRedraw(MF_ALL);
   }
 }
 
@@ -180,7 +180,7 @@ void modint_renameInterface(GModuleDef *
 
   if (TkGate.circuit->es->isInterface) {
     modint_arrange(TkGate.circuit->es);
-    FlagRedraw();
+    FlagRedraw(MF_ALL);
   }
 }
 
@@ -362,7 +362,7 @@ void modint_center()
     ob_begin_framef("-Center",FF_TRANSPARENT);
     gate_moveTo(g,x,y);
     ob_end_frame();
-    FlagRedraw();
+    FlagRedraw(MF_ALL);
   }
 
   SetModified(MF_ENDSPEC);
@@ -447,7 +447,7 @@ void modint_edit(EditState **es,GModuleD
   SetModified(MF_MODULE|MF_SYNCONLY);
   SynchronizeInterface();
 
-  FlagRedraw();
+  FlagRedraw(MF_ALL);
 }
 
 /*****************************************************************************
@@ -479,7 +479,7 @@ void modint_close()
   editstate_setCurrent(TkGate.circuit->es);
   SetModified(MF_MODULE|MF_SYNCONLY);
   SynchronizeInterface();
-  FlagRedraw();
+  FlagRedraw(MF_ALL);
 }
 
 /*****************************************************************************
@@ -573,6 +573,6 @@ void modint_openSelected(const char *mod
     editstate_setCurrent(*es);
     SetModified(MF_MODULE|MF_SYNCONLY);
     SynchronizeInterface();
-    FlagRedraw();
+    FlagRedraw(MF_ALL);
   }
 }
Index: tkgate/src/tkgate/search.c
===================================================================
--- tkgate.orig/src/tkgate/search.c
+++ tkgate/src/tkgate/search.c
@@ -95,7 +95,7 @@ void GSearchContext_setPosition(GModuleD
   editstate_saveOrig(TkGate.circuit->es);
 
   SetErrorPosition(x,y);
-  FlagRedraw();
+  FlagRedraw(MF_ALL);
 }
 
 /*****************************************************************************
Index: tkgate/src/tkgate/selection.c
===================================================================
--- tkgate.orig/src/tkgate/selection.c
+++ tkgate/src/tkgate/selection.c
@@ -908,7 +908,7 @@ void sel_delete(EditState *es)
   sel_updateMenuState();
   TkGate.circuit->last = TkGate.circuit->select = 0;
 
-  FlagRedraw();
+  FlagRedraw(MF_ALL);
 }
 
 void sel_anchor(EditState *es,int isSet)
Index: tkgate/src/tkgate/simulate.c
===================================================================
--- tkgate.orig/src/tkgate/simulate.c
+++ tkgate/src/tkgate/simulate.c
@@ -1307,7 +1307,7 @@ void SimInterface_begin(SimInterface *si
 
   si->active = 1;
 
-  FlagRedraw();
+  FlagRedraw(MF_ALL);
 }
 
 /*
@@ -1441,7 +1441,7 @@ void SimInterface_navigateToModule(EditS
 
   //  DoTcl("BlockTree::setActive %s",path);
 
-  FlagRedraw();
+  FlagRedraw(MF_ALL);
 }
 
 const char* SimInterface_unitsToStr(int u)
Index: tkgate/src/tkgate/symblock.c
===================================================================
--- tkgate.orig/src/tkgate/symblock.c
+++ tkgate/src/tkgate/symblock.c
@@ -347,7 +347,7 @@ int SymBlock_EditProps(GCElement *g,int
     Generic_editPropsULBasics(g);
     Block_EditParmProps(g, isLoadDialog);
 
-    FlagRedraw();
+    FlagRedraw(MF_ALL);
   }
   return 0;
 }
Index: tkgate/src/tkgate/tclfuncs.c
===================================================================
--- tkgate.orig/src/tkgate/tclfuncs.c
+++ tkgate/src/tkgate/tclfuncs.c
@@ -226,7 +226,7 @@ static int gat_new(ClientData _d,Tcl_Int
    */
   TkGate.circuit->c_isNewFile = 1;
 
-  FlagRedraw();
+  FlagRedraw(MF_ALL);
 
   if (old_mode == OM_ENABLED) {
     ob_set_mode(old_mode);
@@ -290,7 +290,7 @@ static int gat_load(ClientData _d,Tcl_In
   Circuit_setCurrentFile(name);
 
   ClearModified();
-  FlagRedraw();
+  FlagRedraw(MF_ALL);
 
   if (old_mode == OM_ENABLED) {
     ob_set_mode(old_mode);
@@ -324,7 +324,7 @@ static int gat_loadMore(ClientData _d,Tc
 
   Circuit_setCurrentFile(name);
 
-  FlagRedraw();
+  FlagRedraw(MF_ALL);
 
   Tcl_SetResult(tcl, "1", TCL_STATIC);
   return TCL_OK;
@@ -375,7 +375,7 @@ static int gat_unloadLibrary(ClientData
 
   Circuit_unloadLibrary(TkGate.circuit,name);
 
-  FlagRedraw();
+  FlagRedraw(MF_ALL);
 
   return TCL_OK;
 }
@@ -521,7 +521,7 @@ static int gat_closeBox(ClientData _d,Tc
   SetModified(MF_MODULE);
   SynchronizeInterface();
 
-  FlagRedraw();
+  FlagRedraw(MF_ALL);
 
   return TCL_OK;
 }
@@ -627,7 +627,7 @@ static int gat_openBox(ClientData _d,Tcl
   SetModified(MF_MODULE|MF_SYNCONLY);
   SynchronizeInterface();
 
-  FlagRedraw();
+  FlagRedraw(MF_ALL);
 
   return TCL_OK;
 }
@@ -654,7 +654,7 @@ static int gat_reroot(ClientData _d,Tcl_
   Circuit_changeRoot(M);
 
   SynchronizeInterface();
-  FlagRedraw();
+  FlagRedraw(MF_ALL);
   return TCL_OK;
 }
 
@@ -984,7 +984,7 @@ static int gat_renameBlock(ClientData _d
   if (isCurrentRename) {
     editstate_setCurrent(*es);
     SynchronizeInterface();
-    FlagRedraw();
+    FlagRedraw(MF_ALL);
   }
 
   return TCL_OK;
@@ -1391,7 +1391,7 @@ static int gat_editCircProps(ClientData
       locale = (Locale*)SHash_find(TkGate.localeNameTable,r);
       if (locale && c->c_locale != locale) {
 	Circuit_setLocale(c,locale);
-	FlagRedraw();
+	FlagRedraw(MF_ALL);
       }
 
       r = Tcl_GetVar2(tcl,aname,"clockMode",TCL_GLOBAL_ONLY);
@@ -1530,7 +1530,7 @@ static int gat_changeNet(ClientData _d,T
 	gate_transmute(w->net->n_ionet,gi);
   }
 
-  FlagRedraw();
+  FlagRedraw(MF_ALL);
 
   return TCL_OK;
 }
@@ -1732,7 +1732,7 @@ static int gat_cutToBufAppend(ClientData
     sel_interfaceReset(es);
   } else {
     sel_killAppend(es);
-    FlagRedraw();
+    FlagRedraw(MF_ALL);
   }
 
   return TCL_OK;
@@ -1755,7 +1755,7 @@ static int gat_cutToBuf(ClientData _d,Tc
     sel_interfaceReset(es);
   } else {
     sel_kill(es);
-    FlagRedraw();
+    FlagRedraw(MF_ALL);
   }
 
   return TCL_OK;
@@ -1813,7 +1813,7 @@ static int gat_yankFromBuf(ClientData _d
       }
     }
     sel_yank(es);
-    FlagRedraw();
+    FlagRedraw(MF_ALL);
   }
 
 
@@ -2408,7 +2408,7 @@ static int gat_anchor(ClientData _d,Tcl_
 static int gat_setcolors(ClientData _d,Tcl_Interp *tcl,int argc,const char *argv[])
 {
   setGCcolors();
-  FlagRedraw();
+  FlagRedraw(MF_ALL);
   if (tkgate_currentMode() == MM_SIMULATE)
     ReqScopeRedisplay();
 
@@ -2544,7 +2544,7 @@ static int gat_zoom(ClientData _d,Tcl_In
     XSetFont(TkGate.D, TkGate.kanjiGC,		TkGate.ktextXF[zoom]->fid);
   }
 
-  FlagRedraw();
+  FlagRedraw(MF_ALL);
 
   return TCL_OK;
 }
@@ -2816,7 +2816,7 @@ static int gat_gotoCPathNet(ClientData _
 
   Error_navigateToModule(&TkGate.circuit->es,argv[1]);
   editstate_setCurrent(TkGate.circuit->es);
-  FlagRedraw();
+  FlagRedraw(MF_ALL);
 
   p = strrchr (argv[1],'.');
   if (p)
@@ -3291,7 +3291,7 @@ static int gat_makeMakeShortcuts(ClientD
 static int gat_showPath(ClientData _d,Tcl_Interp *tcl,int argc,const char *argv[])
 {
   cpath_show(argc-1,argv+1);
-  FlagRedraw();
+  FlagRedraw(MF_ALL);
   return TCL_OK;
 }
 
@@ -3299,7 +3299,7 @@ static int gat_clearPath(ClientData _d,T
 {
   cpath_clear();
   cpath_flush();
-  FlagRedraw();
+  FlagRedraw(MF_ALL);
   return TCL_OK;
 }
 
@@ -3311,7 +3311,7 @@ static int gat_cpathFlash(ClientData _d,
 
 static int gat_refreshScreen(ClientData _d,Tcl_Interp *tcl,int argc,const char *argv[])
 {
-  FlagRedraw();
+  FlagRedraw(MF_ALL);
   return TCL_OK;
 }
 
@@ -3391,7 +3391,7 @@ static int gat_undo(ClientData _d,Tcl_In
     sscanf(argv[1],"%d",&n);
 
   ob_undo(n);
-  FlagRedraw();
+  FlagRedraw(MF_ALL);
   return TCL_OK;
 }
 
@@ -3406,7 +3406,7 @@ static int gat_redo(ClientData _d,Tcl_In
     sscanf(argv[1],"%d",&n);
 
   ob_redo(n);
-  FlagRedraw();
+  FlagRedraw(MF_ALL);
   return TCL_OK;
 }
 
