]> git.pld-linux.org Git - packages/WindowMaker.git/blob - WindowMaker-a_macro.patch
a8773703702b642efd23864da46baaa8548a22b5
[packages/WindowMaker.git] / WindowMaker-a_macro.patch
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.
6
7 Full_Name: Salvador Ortiz
8 Version: 0.51.0
9 OS: RedHat Linux
10 Submission from: lulu.msg.com.mx (200.33.54.10)
11
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
14 explanation:
15
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.
19
20 --- src/misc.c.orig     Sun Feb 14 01:01:22 1999
21 +++ src/misc.c  Sun Feb 14 01:06:38 1999
22 @@ -840,7 +840,7 @@
23          case _PROMPT:
24             if (line[*ptr]==')' && j==0) {
25  
26 -               if (*ptr-begin > 1) {
27 +               if (*ptr > begin) {
28                     strncpy(pbuffer, &line[begin], WMIN(*ptr-begin, 255));
29                     pbuffer[WMIN(*ptr-begin, 255)] = 0;
30                     prompt = (char*)pbuffer;
31 @@ -858,6 +858,7 @@
32  #undef _PROMPT
33  #undef _DONE
34  
35 +    (*ptr)--; /* To be incremented in ExpandOptions */
36      if (!wInputDialog(scr, title, prompt, &ret))
37         return NULL;
38      else
This page took 0.050108 seconds and 2 git commands to generate.