]> git.pld-linux.org Git - packages/cvs.git/blob - cvs-debian-cvsrc.patch
rel 20; rediff patches
[packages/cvs.git] / cvs-debian-cvsrc.patch
1 # Ignore leading whitespace in .cvsrc files. Closes: #212415. Thanks
2 # to James R. Van Zandt for the patch.
3 diff -ruN cvs-1.12.13-old/src/cvsrc.c cvs-1.12.13/src/cvsrc.c
4 --- cvs-1.12.13-old/src/cvsrc.c 2005-03-16 23:52:14.000000000 +0800
5 +++ cvs-1.12.13/src/cvsrc.c     2006-02-26 18:25:18.000000000 +0800
6 @@ -41,6 +41,7 @@
7      size_t line_chars_allocated;
8  
9      char *optstart;
10 +    int white_len;
11  
12      int command_len;
13      int found = 0;
14 @@ -96,9 +97,12 @@
15         if (line[0] == '#')
16             continue;
17  
18 +    for (white_len=0; isspace(line[white_len]); white_len++)
19 +        ;
20 +
21         /* stop if we match the current command */
22 -       if (!strncmp (line, cmdname, command_len)
23 -           && isspace ((unsigned char) *(line + command_len)))
24 +       if (!strncmp (line + white_len, cmdname, command_len)
25 +           && isspace ((unsigned char) *(line + white_len + command_len)))
26         {
27             found = 1;
28             break;
29 @@ -120,7 +124,7 @@
30      if (found)
31      {
32         /* skip over command in the options line */
33 -       for (optstart = strtok (line + command_len, "\t \n");
34 +       for (optstart = strtok (line + white_len + command_len, "\t \n");
35              optstart;
36              optstart = strtok (NULL, "\t \n"))
37         {
This page took 0.065134 seconds and 3 git commands to generate.