From: H.G.Muller Date: Mon, 21 Mar 2016 20:51:50 +0000 (+0100) Subject: Move dataDir definition to args.h so WB can also use it X-Git-Url: http://winboard.nl/cgi-bin?a=commitdiff_plain;h=454350e27828500d3ebf55574d13cb138336522a;p=xboard.git Move dataDir definition to args.h so WB can also use it --- diff --git a/args.h b/args.h index 9122282..55fdc07 100644 --- a/args.h +++ b/args.h @@ -100,6 +100,7 @@ typedef struct { } IcsTextMenuEntry; IcsTextMenuEntry icsTextMenuEntry[ICS_TEXT_MENU_SIZE]; +char dataDir[MSG_SIZ] = DATADIR, manDir[MSG_SIZ] = MANDIR; int junk; int saveDate; diff --git a/dialogs.c b/dialogs.c index 6db9c6e..772e310 100644 --- a/dialogs.c +++ b/dialogs.c @@ -66,7 +66,6 @@ extern char *getenv(); int values[MAX_OPTIONS]; ChessProgramState *currentCps; -char dataDir[MSG_SIZ] = DATADIR, manDir[MSG_SIZ] = MANDIR; //----------------------------Generic dialog -------------------------------------------- @@ -2473,7 +2472,7 @@ GetHelpText (FILE *f, char *name) int len, cnt = 0; snprintf(buf, MSG_SIZ, ".B %s", name); len = strlen(buf); - for(len=1; buf[len] == ' ' || buf[len] == '-' || isalpha(buf[len]) || isdigit(buf[len]); len++); + for(len=3; buf[len] && buf[len] != '(' && buf[len] != ':' && buf[len] != '.' && buf[len] != '?'; len++); buf[len] = NULLCHAR; while(buf[--len] == ' ') buf[len] = NULLCHAR; snprintf(title, MSG_SIZ, "Help on '%s'", buf+3);