X-Git-Url: http://winboard.nl/cgi-bin?a=blobdiff_plain;f=xaw%2Fxboard.c;h=40e901ca22349d567ecd3f322d645cb20ddb1ca6;hb=1c03d229073e56dda9e5856db5adaae51576a3bb;hp=a834adf73735fa8e259474afd040d506f2b4f0d8;hpb=447740095b0491c84370083c0ee2bf281aa502bd;p=xboard.git diff --git a/xaw/xboard.c b/xaw/xboard.c index a834adf..40e901c 100644 --- a/xaw/xboard.c +++ b/xaw/xboard.c @@ -5,7 +5,7 @@ * Massachusetts. * * Enhancements Copyright 1992-2001, 2002, 2003, 2004, 2005, 2006, - * 2007, 2008, 2009, 2010, 2011, 2012 Free Software Foundation, Inc. + * 2007, 2008, 2009, 2010, 2011, 2012, 2013 Free Software Foundation, Inc. * * The following terms apply to Digital Equipment Corporation's copyright * interest in XBoard: @@ -202,7 +202,6 @@ extern char *getenv(); #include "childio.h" #include "xgamelist.h" #include "xhistory.h" -#include "xevalgraph.h" #include "menus.h" #include "board.h" #include "dialogs.h" @@ -261,7 +260,6 @@ void TempForwardProc P((Widget w, XEvent *event, String *prms, Cardinal *nprms)) Boolean TempBackwardActive = False; void ManInner P((Widget w, XEvent *event, String *prms, Cardinal *nprms)); void DisplayMove P((int moveNumber)); -void ICSInitScript P((void)); void update_ics_width P(()); int CopyMemoProc P(()); @@ -1266,7 +1264,6 @@ main (int argc, char **argv) XtSetArg(args[1], XtNforeground, &buttonForegroundPixel); XtGetValues(optList[W_PAUSE].handle, args, 2); } - AppendEnginesToMenu(appData.recentEngineList); xBoardWindow = XtWindow(boardWidget); @@ -1624,18 +1621,6 @@ KeyBindingProc (Widget w, XEvent *event, String *prms, Cardinal *nprms) if(item) ((MenuProc *) item->proc) (); } -static void -MenuEngineSelect (Widget w, caddr_t addr, caddr_t index) -{ - RecentEngineEvent((int) (intptr_t) addr); -} - -void -AppendMenuItem (char *msg, int n) -{ - CreateMenuItem((Widget) optList[W_ENGIN].textValue, msg, (XtCallbackProc) MenuEngineSelect, n); -} - void SetupDropMenu () { @@ -1795,7 +1780,7 @@ HandlePV (Widget w, XEvent * event, String * params, Cardinal * nParams) MovePV(event->xmotion.x, event->xmotion.y, lineGap + BOARD_HEIGHT * (squareSize + lineGap)); } -static int savedIndex; /* gross that this is global */ +extern int savedIndex; /* gross that this is global */ void CommentClick (Widget w, XEvent * event, String * params, Cardinal * nParams) @@ -1812,27 +1797,6 @@ CommentClick (Widget w, XEvent * event, String * params, Cardinal * nParams) LoadVariation( index, val ); // [HGM] also does the actual moving to it, now } -void -EditCommentPopUp (int index, char *title, char *text) -{ - savedIndex = index; - if (text == NULL) text = ""; - NewCommentPopup(title, text, index); -} - -void -CommentPopUp (char *title, char *text) -{ - savedIndex = currentMove; // [HGM] vari - NewCommentPopup(title, text, currentMove); -} - -void -CommentPopDown () -{ - PopDown(CommentDlg); -} - /* Disable all user input other than deleting the window */ static int frozen = 0; @@ -2402,6 +2366,19 @@ SetClockIcon (int color) } } +#define INPUT_SOURCE_BUF_SIZE 8192 + +typedef struct { + CPKind kind; + int fd; + int lineByLine; + char *unused; + InputCallback func; + XtInputId xid; + char buf[INPUT_SOURCE_BUF_SIZE]; + VOIDSTAR closure; +} InputSource; + void DoInputCallback (caddr_t closure, int *source, XtInputId *xid) { @@ -2551,4 +2528,3 @@ UpdateLogos (int displ) if(displ) DisplayLogos(&optList[W_WHITE-1], &optList[W_BLACK+1]); return; } -