From 8b99a4438f25882af1613c98911b984e2a49013e Mon Sep 17 00:00:00 2001 From: Yann Dirson Date: Sat, 9 Nov 2013 18:03:32 +0100 Subject: [PATCH] Move "offset to command args" to InputCommand. --- gnushogi/commondsp.c | 12 ++++-------- 1 files changed, 4 insertions(+), 8 deletions(-) diff --git a/gnushogi/commondsp.c b/gnushogi/commondsp.c index bb99864..1c6ae09 100644 --- a/gnushogi/commondsp.c +++ b/gnushogi/commondsp.c @@ -1454,13 +1454,11 @@ TestPSpeed(short(*f) (short side), unsigned j) static void -SetOppTime(char *s) +SetOppTime(char *time) { - char *time; int m, t, sec; sec = 0; - time = &s[strlen("otime")]; t = (int)strtol(time, &time, 10); if (*time == ':') @@ -1489,12 +1487,10 @@ SetOppTime(char *s) static void -SetMachineTime(char *s) +SetMachineTime(char *time) { - char *time; int m, t, sec; - time = &s[strlen("time")]; sec = 0; t = (int)strtol(time, &time, 10); @@ -1759,11 +1755,11 @@ InputCommand(char *command) } else if (strcmp(s, "time") == 0) { - SetMachineTime(sx); + SetMachineTime(sx + strlen("time")); } else if (strcmp(s, "otime") == 0) { - SetOppTime(sx); + SetOppTime(sx + strlen("otime")); } else if (strcmp(s, "Awindow") == 0) { -- 1.7.0.4