Split usounds.c and usystem.c from xboard.c
[xboard.git] / menus.c
diff --git a/menus.c b/menus.c
index 55bbdf2..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