Fossil SCM
Comment enhancements. No changes to code.
Commit
f04a3242ec15527e329284d0ed5619d56d49182e
Parent
4081a91c84c181b…
1 file changed
+14
-13
+14
-13
| --- src/diff.c | ||
| +++ src/diff.c | ||
| @@ -737,17 +737,17 @@ | ||
| 737 | 737 | int iEnd2; /* Write </span> prior to character iEnd2 */ |
| 738 | 738 | ReCompiled *pRe; /* Only colorize matching lines, if not NULL */ |
| 739 | 739 | }; |
| 740 | 740 | |
| 741 | 741 | /* |
| 742 | -** Column indices | |
| 742 | +** Column indices for SbsLine.apCols[] | |
| 743 | 743 | */ |
| 744 | -#define SBS_LNA 0 | |
| 745 | -#define SBS_TXTA 1 | |
| 746 | -#define SBS_MKR 2 | |
| 747 | -#define SBS_LNB 3 | |
| 748 | -#define SBS_TXTB 4 | |
| 744 | +#define SBS_LNA 0 /* Left line number */ | |
| 745 | +#define SBS_TXTA 1 /* Left text */ | |
| 746 | +#define SBS_MKR 2 /* Middle separator column */ | |
| 747 | +#define SBS_LNB 3 /* Right line number */ | |
| 748 | +#define SBS_TXTB 4 /* Right text */ | |
| 749 | 749 | |
| 750 | 750 | /* |
| 751 | 751 | ** Append newlines to all columns. |
| 752 | 752 | */ |
| 753 | 753 | static void sbsWriteNewlines(SbsLine *p){ |
| @@ -763,15 +763,16 @@ | ||
| 763 | 763 | static void sbsWriteSpace(SbsLine *p, int n, int col){ |
| 764 | 764 | blob_appendf(p->apCols[col], "%*s", n, ""); |
| 765 | 765 | } |
| 766 | 766 | |
| 767 | 767 | /* |
| 768 | -** Write pLine to the column. If outputting HTML, write the full line. | |
| 769 | -** Otherwise, only write up to width characters. Translate tabs into | |
| 770 | -** spaces. Add newlines if col is SBS_TXTB. Translate HTML characters | |
| 771 | -** if escHtml is true. Pad the rendering out width bytes if col is | |
| 772 | -** SBS_TXTA and escHtml is false. | |
| 768 | +** Write the text of pLine into column iCol of p. | |
| 769 | +** | |
| 770 | +** If outputting HTML, write the full line. Otherwise, only write the | |
| 771 | +** width characters. Translate tabs into spaces. Add newlines if col | |
| 772 | +** is SBS_TXTB. Translate HTML characters if escHtml is true. Pad the | |
| 773 | +** rendering to width bytes if col is SBS_TXTA and escHtml is false. | |
| 773 | 774 | ** |
| 774 | 775 | ** This comment contains multibyte unicode characters (ü, Æ, ð) in order |
| 775 | 776 | ** to test the ability of the diff code to handle such characters. |
| 776 | 777 | */ |
| 777 | 778 | static void sbsWriteText(SbsLine *p, DLine *pLine, int col){ |
| @@ -852,11 +853,11 @@ | ||
| 852 | 853 | blob_str(pCol) |
| 853 | 854 | ); |
| 854 | 855 | } |
| 855 | 856 | |
| 856 | 857 | /* |
| 857 | -** Append separator to the column. | |
| 858 | +** Append a separator line to column iCol | |
| 858 | 859 | */ |
| 859 | 860 | static void sbsWriteSep(SbsLine *p, int len, int col){ |
| 860 | 861 | char ch = '.'; |
| 861 | 862 | if( len<1 ){ |
| 862 | 863 | len = 1; |
| @@ -864,11 +865,11 @@ | ||
| 864 | 865 | } |
| 865 | 866 | blob_appendf(p->apCols[col], "<span class=\"diffhr\">%.*c</span>\n", len, ch); |
| 866 | 867 | } |
| 867 | 868 | |
| 868 | 869 | /* |
| 869 | -** Append the appropriate marker. | |
| 870 | +** Append the appropriate marker into the center column of the diff. | |
| 870 | 871 | */ |
| 871 | 872 | static void sbsWriteMarker(SbsLine *p, const char *zTxt, const char *zHtml){ |
| 872 | 873 | blob_append(p->apCols[SBS_MKR], p->escHtml ? zHtml : zTxt, -1); |
| 873 | 874 | } |
| 874 | 875 | |
| 875 | 876 |
| --- src/diff.c | |
| +++ src/diff.c | |
| @@ -737,17 +737,17 @@ | |
| 737 | int iEnd2; /* Write </span> prior to character iEnd2 */ |
| 738 | ReCompiled *pRe; /* Only colorize matching lines, if not NULL */ |
| 739 | }; |
| 740 | |
| 741 | /* |
| 742 | ** Column indices |
| 743 | */ |
| 744 | #define SBS_LNA 0 |
| 745 | #define SBS_TXTA 1 |
| 746 | #define SBS_MKR 2 |
| 747 | #define SBS_LNB 3 |
| 748 | #define SBS_TXTB 4 |
| 749 | |
| 750 | /* |
| 751 | ** Append newlines to all columns. |
| 752 | */ |
| 753 | static void sbsWriteNewlines(SbsLine *p){ |
| @@ -763,15 +763,16 @@ | |
| 763 | static void sbsWriteSpace(SbsLine *p, int n, int col){ |
| 764 | blob_appendf(p->apCols[col], "%*s", n, ""); |
| 765 | } |
| 766 | |
| 767 | /* |
| 768 | ** Write pLine to the column. If outputting HTML, write the full line. |
| 769 | ** Otherwise, only write up to width characters. Translate tabs into |
| 770 | ** spaces. Add newlines if col is SBS_TXTB. Translate HTML characters |
| 771 | ** if escHtml is true. Pad the rendering out width bytes if col is |
| 772 | ** SBS_TXTA and escHtml is false. |
| 773 | ** |
| 774 | ** This comment contains multibyte unicode characters (ü, Æ, ð) in order |
| 775 | ** to test the ability of the diff code to handle such characters. |
| 776 | */ |
| 777 | static void sbsWriteText(SbsLine *p, DLine *pLine, int col){ |
| @@ -852,11 +853,11 @@ | |
| 852 | blob_str(pCol) |
| 853 | ); |
| 854 | } |
| 855 | |
| 856 | /* |
| 857 | ** Append separator to the column. |
| 858 | */ |
| 859 | static void sbsWriteSep(SbsLine *p, int len, int col){ |
| 860 | char ch = '.'; |
| 861 | if( len<1 ){ |
| 862 | len = 1; |
| @@ -864,11 +865,11 @@ | |
| 864 | } |
| 865 | blob_appendf(p->apCols[col], "<span class=\"diffhr\">%.*c</span>\n", len, ch); |
| 866 | } |
| 867 | |
| 868 | /* |
| 869 | ** Append the appropriate marker. |
| 870 | */ |
| 871 | static void sbsWriteMarker(SbsLine *p, const char *zTxt, const char *zHtml){ |
| 872 | blob_append(p->apCols[SBS_MKR], p->escHtml ? zHtml : zTxt, -1); |
| 873 | } |
| 874 | |
| 875 |
| --- src/diff.c | |
| +++ src/diff.c | |
| @@ -737,17 +737,17 @@ | |
| 737 | int iEnd2; /* Write </span> prior to character iEnd2 */ |
| 738 | ReCompiled *pRe; /* Only colorize matching lines, if not NULL */ |
| 739 | }; |
| 740 | |
| 741 | /* |
| 742 | ** Column indices for SbsLine.apCols[] |
| 743 | */ |
| 744 | #define SBS_LNA 0 /* Left line number */ |
| 745 | #define SBS_TXTA 1 /* Left text */ |
| 746 | #define SBS_MKR 2 /* Middle separator column */ |
| 747 | #define SBS_LNB 3 /* Right line number */ |
| 748 | #define SBS_TXTB 4 /* Right text */ |
| 749 | |
| 750 | /* |
| 751 | ** Append newlines to all columns. |
| 752 | */ |
| 753 | static void sbsWriteNewlines(SbsLine *p){ |
| @@ -763,15 +763,16 @@ | |
| 763 | static void sbsWriteSpace(SbsLine *p, int n, int col){ |
| 764 | blob_appendf(p->apCols[col], "%*s", n, ""); |
| 765 | } |
| 766 | |
| 767 | /* |
| 768 | ** Write the text of pLine into column iCol of p. |
| 769 | ** |
| 770 | ** If outputting HTML, write the full line. Otherwise, only write the |
| 771 | ** width characters. Translate tabs into spaces. Add newlines if col |
| 772 | ** is SBS_TXTB. Translate HTML characters if escHtml is true. Pad the |
| 773 | ** rendering to width bytes if col is SBS_TXTA and escHtml is false. |
| 774 | ** |
| 775 | ** This comment contains multibyte unicode characters (ü, Æ, ð) in order |
| 776 | ** to test the ability of the diff code to handle such characters. |
| 777 | */ |
| 778 | static void sbsWriteText(SbsLine *p, DLine *pLine, int col){ |
| @@ -852,11 +853,11 @@ | |
| 853 | blob_str(pCol) |
| 854 | ); |
| 855 | } |
| 856 | |
| 857 | /* |
| 858 | ** Append a separator line to column iCol |
| 859 | */ |
| 860 | static void sbsWriteSep(SbsLine *p, int len, int col){ |
| 861 | char ch = '.'; |
| 862 | if( len<1 ){ |
| 863 | len = 1; |
| @@ -864,11 +865,11 @@ | |
| 865 | } |
| 866 | blob_appendf(p->apCols[col], "<span class=\"diffhr\">%.*c</span>\n", len, ch); |
| 867 | } |
| 868 | |
| 869 | /* |
| 870 | ** Append the appropriate marker into the center column of the diff. |
| 871 | */ |
| 872 | static void sbsWriteMarker(SbsLine *p, const char *zTxt, const char *zHtml){ |
| 873 | blob_append(p->apCols[SBS_MKR], p->escHtml ? zHtml : zTxt, -1); |
| 874 | } |
| 875 | |
| 876 |