Fossil SCM
Merge fixed from trunk into the diff-color-enhancements branch.
Commit
06a4494e01270a14e33da798418018446e7f9cd7ea05a71056a1fb5ce0d905a3
Parent
9a30e83d88d7ab4…
2 files changed
+1
-1
+9
-1
+1
-1
| --- src/sbsdiff.js | ||
| +++ src/sbsdiff.js | ||
| @@ -51,11 +51,11 @@ | ||
| 51 | 51 | allCols[i].style.maxWidth = w + "px"; |
| 52 | 52 | } |
| 53 | 53 | var allDiffs = document.getElementsByClassName('sbsdiffcols'); |
| 54 | 54 | w = lastWidth; |
| 55 | 55 | for(let i=0; i<allDiffs.length; i++){ |
| 56 | - allDiffs[i].style.width = w + "px"; | |
| 56 | + allDiffs[i].style.width = '98%'; // setting to w causes unsightly horiz. scrollbar | |
| 57 | 57 | allDiffs[i].style.maxWidth = w + "px"; |
| 58 | 58 | } |
| 59 | 59 | } |
| 60 | 60 | setTimeout(checkWidth, 100) |
| 61 | 61 | } |
| 62 | 62 |
| --- src/sbsdiff.js | |
| +++ src/sbsdiff.js | |
| @@ -51,11 +51,11 @@ | |
| 51 | allCols[i].style.maxWidth = w + "px"; |
| 52 | } |
| 53 | var allDiffs = document.getElementsByClassName('sbsdiffcols'); |
| 54 | w = lastWidth; |
| 55 | for(let i=0; i<allDiffs.length; i++){ |
| 56 | allDiffs[i].style.width = w + "px"; |
| 57 | allDiffs[i].style.maxWidth = w + "px"; |
| 58 | } |
| 59 | } |
| 60 | setTimeout(checkWidth, 100) |
| 61 | } |
| 62 |
| --- src/sbsdiff.js | |
| +++ src/sbsdiff.js | |
| @@ -51,11 +51,11 @@ | |
| 51 | allCols[i].style.maxWidth = w + "px"; |
| 52 | } |
| 53 | var allDiffs = document.getElementsByClassName('sbsdiffcols'); |
| 54 | w = lastWidth; |
| 55 | for(let i=0; i<allDiffs.length; i++){ |
| 56 | allDiffs[i].style.width = '98%'; // setting to w causes unsightly horiz. scrollbar |
| 57 | allDiffs[i].style.maxWidth = w + "px"; |
| 58 | } |
| 59 | } |
| 60 | setTimeout(checkWidth, 100) |
| 61 | } |
| 62 |
+9
-1
| --- src/util.c | ||
| +++ src/util.c | ||
| @@ -649,10 +649,13 @@ | ||
| 649 | 649 | ** freed by the caller. |
| 650 | 650 | */ |
| 651 | 651 | char *fossil_temp_filename(void){ |
| 652 | 652 | char *zTFile = 0; |
| 653 | 653 | const char *zDir; |
| 654 | + char cDirSep; | |
| 655 | + char zSep[2]; | |
| 656 | + size_t nDir; | |
| 654 | 657 | u64 r[2]; |
| 655 | 658 | int i; |
| 656 | 659 | #ifdef _WIN32 |
| 657 | 660 | char zTempDir[1000]; |
| 658 | 661 | #else |
| @@ -663,10 +666,11 @@ | ||
| 663 | 666 | if( zTFile ) return zTFile; |
| 664 | 667 | } |
| 665 | 668 | sqlite3_randomness(sizeof(r), &r); |
| 666 | 669 | #if _WIN32 |
| 667 | 670 | zTempDir[0] = 0; |
| 671 | + cDirSep = '\\'; | |
| 668 | 672 | GetTempPathA(sizeof(zTempDir), zTempDir); |
| 669 | 673 | if( zTempDir[0] ){ |
| 670 | 674 | zDir = zTempDir; |
| 671 | 675 | }else{ |
| 672 | 676 | zDir = fossil_getenv("LOCALAPPDATA"); |
| @@ -679,12 +683,16 @@ | ||
| 679 | 683 | if( stat(zDir,&buf)==0 && S_ISDIR(buf.st_mode) && access(zDir,03)==0 ){ |
| 680 | 684 | break; |
| 681 | 685 | } |
| 682 | 686 | } |
| 683 | 687 | if( i>=sizeof(azTmp)/sizeof(azTmp[0]) ) zDir = "."; |
| 688 | + cDirSep = '/'; | |
| 684 | 689 | #endif |
| 685 | - return sqlite3_mprintf("%s/fossil%016llx%016llx", zDir, r[0], r[1]); | |
| 690 | + nDir = strlen(zDir); | |
| 691 | + zSep[1] = 0; | |
| 692 | + zSep[0] = (nDir && zDir[nDir-1]==cDirSep) ? 0 : cDirSep; | |
| 693 | + return sqlite3_mprintf("%s%sfossil%016llx%016llx", zDir,zSep,r[0],r[1]); | |
| 686 | 694 | } |
| 687 | 695 | |
| 688 | 696 | /* |
| 689 | 697 | ** Turn memory limits for stack and heap on and off. The argument |
| 690 | 698 | ** is true to turn memory limits on and false to turn them off. |
| 691 | 699 |
| --- src/util.c | |
| +++ src/util.c | |
| @@ -649,10 +649,13 @@ | |
| 649 | ** freed by the caller. |
| 650 | */ |
| 651 | char *fossil_temp_filename(void){ |
| 652 | char *zTFile = 0; |
| 653 | const char *zDir; |
| 654 | u64 r[2]; |
| 655 | int i; |
| 656 | #ifdef _WIN32 |
| 657 | char zTempDir[1000]; |
| 658 | #else |
| @@ -663,10 +666,11 @@ | |
| 663 | if( zTFile ) return zTFile; |
| 664 | } |
| 665 | sqlite3_randomness(sizeof(r), &r); |
| 666 | #if _WIN32 |
| 667 | zTempDir[0] = 0; |
| 668 | GetTempPathA(sizeof(zTempDir), zTempDir); |
| 669 | if( zTempDir[0] ){ |
| 670 | zDir = zTempDir; |
| 671 | }else{ |
| 672 | zDir = fossil_getenv("LOCALAPPDATA"); |
| @@ -679,12 +683,16 @@ | |
| 679 | if( stat(zDir,&buf)==0 && S_ISDIR(buf.st_mode) && access(zDir,03)==0 ){ |
| 680 | break; |
| 681 | } |
| 682 | } |
| 683 | if( i>=sizeof(azTmp)/sizeof(azTmp[0]) ) zDir = "."; |
| 684 | #endif |
| 685 | return sqlite3_mprintf("%s/fossil%016llx%016llx", zDir, r[0], r[1]); |
| 686 | } |
| 687 | |
| 688 | /* |
| 689 | ** Turn memory limits for stack and heap on and off. The argument |
| 690 | ** is true to turn memory limits on and false to turn them off. |
| 691 |
| --- src/util.c | |
| +++ src/util.c | |
| @@ -649,10 +649,13 @@ | |
| 649 | ** freed by the caller. |
| 650 | */ |
| 651 | char *fossil_temp_filename(void){ |
| 652 | char *zTFile = 0; |
| 653 | const char *zDir; |
| 654 | char cDirSep; |
| 655 | char zSep[2]; |
| 656 | size_t nDir; |
| 657 | u64 r[2]; |
| 658 | int i; |
| 659 | #ifdef _WIN32 |
| 660 | char zTempDir[1000]; |
| 661 | #else |
| @@ -663,10 +666,11 @@ | |
| 666 | if( zTFile ) return zTFile; |
| 667 | } |
| 668 | sqlite3_randomness(sizeof(r), &r); |
| 669 | #if _WIN32 |
| 670 | zTempDir[0] = 0; |
| 671 | cDirSep = '\\'; |
| 672 | GetTempPathA(sizeof(zTempDir), zTempDir); |
| 673 | if( zTempDir[0] ){ |
| 674 | zDir = zTempDir; |
| 675 | }else{ |
| 676 | zDir = fossil_getenv("LOCALAPPDATA"); |
| @@ -679,12 +683,16 @@ | |
| 683 | if( stat(zDir,&buf)==0 && S_ISDIR(buf.st_mode) && access(zDir,03)==0 ){ |
| 684 | break; |
| 685 | } |
| 686 | } |
| 687 | if( i>=sizeof(azTmp)/sizeof(azTmp[0]) ) zDir = "."; |
| 688 | cDirSep = '/'; |
| 689 | #endif |
| 690 | nDir = strlen(zDir); |
| 691 | zSep[1] = 0; |
| 692 | zSep[0] = (nDir && zDir[nDir-1]==cDirSep) ? 0 : cDirSep; |
| 693 | return sqlite3_mprintf("%s%sfossil%016llx%016llx", zDir,zSep,r[0],r[1]); |
| 694 | } |
| 695 | |
| 696 | /* |
| 697 | ** Turn memory limits for stack and heap on and off. The argument |
| 698 | ** is true to turn memory limits on and false to turn them off. |
| 699 |