Fossil

Check-in [597d1101]
Login

Check-in [597d1101]

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:Make stripping of end-of-line CR work correctly now (REALLY!)
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: 597d1101b48ca5d64f66bf401fcd3444a3d47d15
User & Date: jan.nijtmans 2014-03-17 12:47:34
Context
2014-03-17
13:12
Eliminate DIFF_INLINE flag (which is 0 anyway, no longer necessary). Strip end-of-line CR's in json_wiki_diff page as well. ... (check-in: e6309e05 user: jan.nijtmans tags: trunk)
12:47
Make stripping of end-of-line CR work correctly now (REALLY!) ... (check-in: 597d1101 user: jan.nijtmans tags: trunk)
2014-03-16
17:06
Removed some report format help text which refers to non-/no-longer existent SQL functions wiki() and tkt(). ... (check-in: 6bbcfec2 user: stephan tags: trunk)
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to src/diff.c.

88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
  ** a bucket in a hash table, as follows: */
  unsigned int iHash;   /* 1+(first entry in the hash chain) */
};

/*
** Length of a dline
*/
#define LENGTH(X)   ((X)->h & LENGTH_MASK)

/*
** A context for running a raw diff.
**
** The aEdit[] array describes the raw diff.  Each triple of integers in
** aEdit[] means:
**







|







88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
  ** a bucket in a hash table, as follows: */
  unsigned int iHash;   /* 1+(first entry in the hash chain) */
};

/*
** Length of a dline
*/
#define LENGTH(X)   ((X)->n)

/*
** A context for running a raw diff.
**
** The aEdit[] array describes the raw diff.  Each triple of integers in
** aEdit[] means:
**
164
165
166
167
168
169
170

171
172
173
174
175
176
177
178
179
180
181
    return a;
  }

  /* Fill in the array */
  for(i=0; i<nLine; i++){
    for(j=0; z[j] && z[j]!='\n'; j++){}
    a[i].z = z;

    if( diffFlags & DIFF_STRIP_EOLCR ){
      if( k>0 && z[k-1]=='\r' ){ k--; }
    }
    a[i].n = k = j;
    s = 0;
    if( diffFlags & DIFF_IGNORE_EOLWS ){
      while( k>0 && fossil_isspace(z[k-1]) ){ k--; }
    }
    if( (diffFlags & DIFF_IGNORE_ALLWS)==DIFF_IGNORE_ALLWS ){
      while( s<k && fossil_isspace(z[s]) ){ s++; }
    }







>



|







164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
    return a;
  }

  /* Fill in the array */
  for(i=0; i<nLine; i++){
    for(j=0; z[j] && z[j]!='\n'; j++){}
    a[i].z = z;
    k = j;
    if( diffFlags & DIFF_STRIP_EOLCR ){
      if( k>0 && z[k-1]=='\r' ){ k--; }
    }
    a[i].n = k;
    s = 0;
    if( diffFlags & DIFF_IGNORE_EOLWS ){
      while( k>0 && fossil_isspace(z[k-1]) ){ k--; }
    }
    if( (diffFlags & DIFF_IGNORE_ALLWS)==DIFF_IGNORE_ALLWS ){
      while( s<k && fossil_isspace(z[s]) ){ s++; }
    }

Changes to src/info.c.

467
468
469
470
471
472
473

474
475
476
477
478
479
480
481
482
    /* "dc" query parameter determines lines of context */
    x = atoi(PD("dc","7"));
    if( x<0 || x>DIFF_CONTEXT_MASK ) x = DIFF_CONTEXT_MASK;
    diffFlags += x;

    /* The "noopt" parameter disables diff optimization */
    if( PD("noopt",0)!=0 ) diffFlags |= DIFF_NOOPT;

  }
  return diffFlags|DIFF_STRIP_EOLCR;
}

/*
** WEBPAGE: vinfo
** WEBPAGE: ci
** URL:  /ci?name=RID|ARTIFACTID
**







>

|







467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
    /* "dc" query parameter determines lines of context */
    x = atoi(PD("dc","7"));
    if( x<0 || x>DIFF_CONTEXT_MASK ) x = DIFF_CONTEXT_MASK;
    diffFlags += x;

    /* The "noopt" parameter disables diff optimization */
    if( PD("noopt",0)!=0 ) diffFlags |= DIFF_NOOPT;
    diffFlags |= DIFF_STRIP_EOLCR;
  }
  return diffFlags;
}

/*
** WEBPAGE: vinfo
** WEBPAGE: ci
** URL:  /ci?name=RID|ARTIFACTID
**