Move FileNamePopUp to dialogs.c
[xboard.git] / xboard.c
index cf6beec..4935dea 100644 (file)
--- a/xboard.c
+++ b/xboard.c
@@ -256,8 +256,6 @@ void DrawPositionProc P((Widget w, XEvent *event,
 void CommentClick P((Widget w, XEvent * event,
                   String * params, Cardinal * nParams));
 void ICSInputBoxPopUp P((void));
-void FileNamePopUp P((char *label, char *def, char *filter,
-                     FileProc proc, char *openMode));
 void SelectCommand P((Widget w, XtPointer client_data, XtPointer call_data));
 void KeyBindingProc P((Widget w, XEvent *event, String *prms, Cardinal *nprms));
 void QuitWrapper P((Widget w, XEvent *event, String *prms, Cardinal *nprms));
@@ -272,9 +270,7 @@ void DisplayMove P((int moveNumber));
 void ICSInitScript P((void));
 void SelectMove P((Widget w, XEvent * event, String * params, Cardinal * nParams));
 void update_ics_width P(());
-int get_term_width P(());
 int CopyMemoProc P(());
-void SetupDropMenu P((void));
 
 /*
 * XBoard depends on Xt R4 or higher
@@ -305,8 +301,6 @@ XFontStruct *coordFontStruct, *countFontStruct;
 XtAppContext appContext;
 char *layoutName;
 
-FileProc fileProc;
-char *fileOpenMode;
 char installDir[] = "."; // [HGM] UCI: needed for UCI; probably needs run-time initializtion
 
 Position commentX = -1, commentY = -1;
@@ -885,7 +879,8 @@ MainWindowUp ()
   return xBoardWindow != 0;
 }
 
-void SwitchWindow()
+void
+SwitchWindow ()
 {
     extern Option dualOptions[];
     static Window dual;
@@ -941,7 +936,7 @@ InitDrawingSizes (BoardSize boardSize, int flags)
     if(appData.overrideLineGap >= 0) lineGap = appData.overrideLineGap;
     boardWidth = lineGap + BOARD_WIDTH * (squareSize + lineGap);
     boardHeight = lineGap + BOARD_HEIGHT * (squareSize + lineGap);
-fprintf(debugFP, "BOARD %d x %d\n",boardWidth, boardHeight);
+
   if(boardWidth != oldWidth || boardHeight != oldHeight) { // do resizing stuff only if size actually changed
 
     oldWidth = boardWidth; oldHeight = boardHeight;
@@ -2315,14 +2310,6 @@ KeyBindingProc (Widget w, XEvent *event, String *prms, Cardinal *nprms)
 }
 
 static void
-MenuBarSelect (Widget w, caddr_t addr, caddr_t index)
-{
-    MenuProc *proc = (MenuProc *) addr;
-
-    (proc)();
-}
-
-static void
 MenuEngineSelect (Widget w, caddr_t addr, caddr_t index)
 {
     RecentEngineEvent((int) (intptr_t) addr);
@@ -2809,26 +2796,6 @@ CommentPopDown ()
     PopDown(CommentDlg);
 }
 
-static char *openName;
-FILE *openFP;
-
-void
-DelayedLoad ()
-{
-  (void) (*fileProc)(openFP, 0, openName);
-}
-
-void
-FileNamePopUp (char *label, char *def, char *filter, FileProc proc, char *openMode)
-{
-    fileProc = proc;           /* I can't see a way not */
-    fileOpenMode = openMode;   /*   to use globals here */
-    {   // [HGM] use file-selector dialog stolen from Ghostview
-       // int index; // this is not supported yet
-       Browse(BoardWindow, label, (def[0] ? def : NULL), filter, False, openMode, &openName, &openFP);
-    }
-}
-
 
 /* Disable all user input other than deleting the window */
 static int frozen = 0;