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