int nstrings;
ListGame *lg;
char **st, *line;
-struct {
- long sec; /* Assuming this is >= 32 bits */
- int ms; /* Assuming this is >= 16 bits */
-} t,t2; GetTimeMark(&t);
+ TimeMark t, t2;
+ GetTimeMark(&t);
if(st = glc->strings) while(*st) free(*st++);
nstrings = ((ListGame *) gameList.tailPred)->number;
glc->strings = (char **) malloc((nstrings + 1) * sizeof(char *));
st = glc->strings;
lg = (ListGame *) gameList.head;
listLength = wins = losses = draws = 0;
- if(byPos) MakePieceList(boards[currentMove], soughtCounts), CopyBoard(soughtBoard, boards[currentMove]);
+ if(byPos) InitSearch();
while (nstrings--) {
int pos = -1;
line = GameListLine(lg->number, &lg->gameInfo);
lg->position = pos;
lg = (ListGame *) lg->node.succ;
}
-GetTimeMark(&t2);printf("GameListPrepare %d msec\n", SubtractTimeMarks(&t2,&t));
+GetTimeMark(&t2);printf("GameListPrepare %ld msec\n", SubtractTimeMarks(&t2,&t));
DisplayTitle("XBoard");
*st = NULL;
return listLength;
XawListChange(listwidg, list, 0, 0, True);
XtSetValues(listwidg, &arg, 1);
XawListHighlight(listwidg, 0);
- snprintf(buf, MSG_SIZ, "%s- %d/%d games (%d-%d-%d)", glc->filename, listLength, ((ListGame *) gameList.tailPred)->number, wins, losses, draws);
+ snprintf(buf, MSG_SIZ, _("%s - %d/%d games (%d-%d-%d)"), glc->filename, listLength, ((ListGame *) gameList.tailPred)->number, wins, losses, draws);
XtSetArg(arg, XtNtitle, buf);
XtSetValues(glc->shell, &arg, 1);
}
if (glc == NULL) {
glc = (GameListClosure *) calloc(1, sizeof(GameListClosure));
glc->x = glc->y = -1;
+ glc->filename = NULL;
+ glc->shell = NULL;
}
GameListPrepare(False); // [HGM] filter: code put in separate routine
if (glc->filename != NULL) free(glc->filename);
glc->filename = StrSave(filename);
-
if (glc->shell == NULL) {
glc->shell = GameListCreate(filename, GameListCallback, glc);
} else {
int nItem;
if( !glc || ((ListGame *) gameList.tailPred)->number <= 0 ) {
- DisplayError("Game list not loaded or empty", 0);
+ DisplayError(_("Game list not loaded or empty"), 0);
return False;
}
XtSetArg(args[j], XtNresizable, True); j++;
XtSetArg(args[j], XtNallowShellResize, True); j++;
shell = gameListOptShell =
- XtCreatePopupShell("Game-list options", transientShellWidgetClass,
+ XtCreatePopupShell(_("Game-list options"), transientShellWidgetClass,
shellWidget, args, j);
layout =
XtCreateManagedWidget(layoutName, formWidgetClass, shell,