X-Git-Url: http://winboard.nl/cgi-bin?a=blobdiff_plain;f=xgamelist.c;h=edc5e65549a27ae8416a72e8c731df008b30ac7b;hb=a3e7cc9b3eb04ffb69fd73b47c06758f73316373;hp=15165f164ff5f58b401d6d4dd02afd36239908f2;hpb=ca6061cbffe88ff5eb2332e733e0a534b89cc5e7;p=xboard.git diff --git a/xgamelist.c b/xgamelist.c index 15165f1..edc5e65 100644 --- a/xgamelist.c +++ b/xgamelist.c @@ -335,11 +335,9 @@ GameListPrepare(int byPos) 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 *)); @@ -365,7 +363,7 @@ struct { 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; @@ -394,7 +392,7 @@ GameListReplace(int page) 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); } @@ -481,6 +479,8 @@ GameListPopUp(fp, filename) 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 @@ -490,7 +490,6 @@ GameListPopUp(fp, filename) if (glc->filename != NULL) free(glc->filename); glc->filename = StrSave(filename); - if (glc->shell == NULL) { glc->shell = GameListCreate(filename, GameListCallback, glc); } else { @@ -676,7 +675,7 @@ int SaveGameListAsText(FILE *f) 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; } @@ -812,7 +811,7 @@ GameListOptionsCreate() 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,