1 Date: Tue, 9 Feb 1999 21:52:06 -0600 (EST)
2 From: Salvador Ortiz Garcia <sog@msg.com.mx>
3 To: bugs@windowmaker.org
4 cc: developers@windowmaker.org
5 Subject: Yet another fix for %a macro.
7 Full_Name: Salvador Ortiz
10 Submission from: lulu.msg.com.mx (200.33.54.10)
12 The following patch cure two small remaining problems in the parser for
13 the %a macro, the first is a trivial one, the other may requiere some
16 At the exit of the for loop in getuserinput, ptr points to the char
17 _after_ the closing perentesis, but in ExpandOptions ptr is incremented
18 again, so one char is eaten.
20 --- src/misc.c.orig Sun Feb 14 01:01:22 1999
21 +++ src/misc.c Sun Feb 14 01:06:38 1999
24 if (line[*ptr]==')' && j==0) {
26 - if (*ptr-begin > 1) {
28 strncpy(pbuffer, &line[begin], WMIN(*ptr-begin, 255));
29 pbuffer[WMIN(*ptr-begin, 255)] = 0;
30 prompt = (char*)pbuffer;
35 + (*ptr)--; /* To be incremented in ExpandOptions */
36 if (!wInputDialog(scr, title, prompt, &ret))