Split usounds.c and usystem.c from xboard.c
[xboard.git] / menus.c
diff --git a/menus.c b/menus.c
index a8086b7..c222249 100644 (file)
--- a/menus.c
+++ b/menus.c
@@ -195,6 +195,17 @@ CopyFENToClipboard ()
   CopyPositionProc();
 }
 
+void
+CopyPositionProc ()
+{
+    static char *selected_fen_position=NULL;
+    if(gameMode == EditPosition) EditPositionDone(TRUE);
+    if (selected_fen_position) free(selected_fen_position);
+    selected_fen_position = (char *)PositionToFEN(currentMove, NULL);
+    if (!selected_fen_position) return;
+    CopySomething(selected_fen_position);
+}
+
 void
 CopyGameProc ()
 {
@@ -203,14 +214,14 @@ CopyGameProc ()
   ret = SaveGameToFile(gameCopyFilename, FALSE);
   if (!ret) return;
 
-  CopySomething();
+  CopySomething(NULL);
 }
 
 void
 CopyGameListProc ()
 {
   if(!SaveGameListAsText(fopen(gameCopyFilename, "w"))) return;
-  CopySomething();
+  CopySomething(NULL);
 }
 
 void
@@ -293,24 +304,6 @@ MatchProc ()
     MatchEvent(2);
 }
 
-void
-EditCommentProc ()
-{
-    Arg args[5];
-    int j;
-    if (PopDown(1)) { // popdown succesful
-       MarkMenuItem("Edit Comment", False);
-       MarkMenuItem("Show Comments", False);
-    } else // was not up
-       EditCommentEvent();
-}
-
-void
-IcsInputBoxProc ()
-{
-    if (!PopDown(4)) ICSInputBoxPopUp();
-}
-
 void
 AdjuWhiteProc ()
 {