Fossil

Diff
Login

Differences From Artifact [204d064ab3]:

To Artifact [70f80fdc8f]:


346
347
348
349
350
351
352
353

354
355
356

357
358
359
360
361
362
363
346
347
348
349
350
351
352

353
354
355

356
357
358
359
360
361
362
363







-
+


-
+







  blob_zero(&x);
  while( zInput[0] ){
    for(i=0; zInput[i] && zInput[i]!='%'; i++){}
    if( i>0 ){
      blob_append(&x, zInput, i);
      zInput += i;
    }
    if( zInput[i]==0 ) break;
    if( zInput[0]==0 ) break;
    for(j=0; j<nSubst; j+=2){
      int n = strlen(azSubst[j]);
      if( memcmp(zInput, azSubst[j], n)==0 ){
      if( strncmp(zInput, azSubst[j], n)==0 ){
        blob_append(&x, azSubst[j+1], -1);
        zInput += n;
        break;
      }
    }
    if( j>=nSubst ){
      blob_append(&x, "%", 1);
418
419
420
421
422
423
424
425
426







427
428
429
430
431
432
433
434
435
436
418
419
420
421
422
423
424


425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441







-
-
+
+
+
+
+
+
+










      azSubst[0] = "%baseline";  azSubst[1] = zPivot;
      azSubst[2] = "%original";  azSubst[3] = zOrig;
      azSubst[4] = "%merge";     azSubst[5] = zOther;
      azSubst[6] = "%output";    azSubst[7] = zOut;
      zCmd = string_subst(zGMerge, 8, azSubst);
      printf("%s\n", zCmd); fflush(stdout);
      fossil_system(zCmd);
      if( file_size(zOut)>=0 ) blob_read_from_file(pOut, zOut);
      unlink(zOut);
      if( file_size(zOut)>=0 ){
        blob_read_from_file(pOut, zOut);
        unlink(zPivot);
        unlink(zOrig);
        unlink(zOther);
        unlink(zOut);
      }
      fossil_free(zCmd);
      fossil_free(zOut);
    }
    fossil_free(zPivot);
    fossil_free(zOrig);
    fossil_free(zOther);
  }
  blob_reset(&v1);
  return rc;
}