Fossil SCM

Comment enhancements. No changes to code.

drh 2013-07-09 10:54 UTC sbsreloaded
Commit f04a3242ec15527e329284d0ed5619d56d49182e
1 file changed +14 -13
+14 -13
--- src/diff.c
+++ src/diff.c
@@ -737,17 +737,17 @@
737737
int iEnd2; /* Write </span> prior to character iEnd2 */
738738
ReCompiled *pRe; /* Only colorize matching lines, if not NULL */
739739
};
740740
741741
/*
742
-** Column indices
742
+** Column indices for SbsLine.apCols[]
743743
*/
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 */
749749
750750
/*
751751
** Append newlines to all columns.
752752
*/
753753
static void sbsWriteNewlines(SbsLine *p){
@@ -763,15 +763,16 @@
763763
static void sbsWriteSpace(SbsLine *p, int n, int col){
764764
blob_appendf(p->apCols[col], "%*s", n, "");
765765
}
766766
767767
/*
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.
773774
**
774775
** This comment contains multibyte unicode characters (ü, Æ, ð) in order
775776
** to test the ability of the diff code to handle such characters.
776777
*/
777778
static void sbsWriteText(SbsLine *p, DLine *pLine, int col){
@@ -852,11 +853,11 @@
852853
blob_str(pCol)
853854
);
854855
}
855856
856857
/*
857
-** Append separator to the column.
858
+** Append a separator line to column iCol
858859
*/
859860
static void sbsWriteSep(SbsLine *p, int len, int col){
860861
char ch = '.';
861862
if( len<1 ){
862863
len = 1;
@@ -864,11 +865,11 @@
864865
}
865866
blob_appendf(p->apCols[col], "<span class=\"diffhr\">%.*c</span>\n", len, ch);
866867
}
867868
868869
/*
869
-** Append the appropriate marker.
870
+** Append the appropriate marker into the center column of the diff.
870871
*/
871872
static void sbsWriteMarker(SbsLine *p, const char *zTxt, const char *zHtml){
872873
blob_append(p->apCols[SBS_MKR], p->escHtml ? zHtml : zTxt, -1);
873874
}
874875
875876
--- 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

Keyboard Shortcuts

Open search /
Next entry (timeline) j
Previous entry (timeline) k
Open focused entry Enter
Show this help ?
Toggle theme Top nav button