Fossil SCM

Documenting the Label structure I introduced.

viriketo 2011-09-06 20:30 UTC label_linkedlist
Commit 58a02a2e4adae108ef28c599fb1e7445a2b01c34
1 file changed +14 -7
+14 -7
--- src/diff.c
+++ src/diff.c
@@ -619,22 +619,29 @@
619619
/**************************************************************************
620620
** The basic difference engine is above. What follows is the annotation
621621
** engine. Both are in the same file since they share many components.
622622
*/
623623
624
+/*
625
+** Linked list of strings, labels used in the annotator code.
626
+** The elements of the list and the pointed string (str)
627
+** will be freed once they become totally unreferenced
628
+** (nref == 0).
629
+*/
630
+struct Label
631
+{
632
+ struct Label *prev; /* previous element */
633
+ struct Label *next; /* next element */
634
+ char *str; /* The label string */
635
+ int nref; /* Number of references to the string */
636
+};
637
+
624638
/*
625639
** The status of an annotation operation is recorded by an instance
626640
** of the following structure.
627641
*/
628642
typedef struct Annotator Annotator;
629
-struct Label
630
-{
631
- struct Label *prev;
632
- struct Label *next;
633
- char *str;
634
- int nref;
635
-};
636643
struct Annotator {
637644
DContext c; /* The diff-engine context */
638645
struct AnnLine { /* Lines of the original files... */
639646
const char *z; /* The text of the line */
640647
short int n; /* Number of bytes (omitting trailing space and \n) */
641648
--- src/diff.c
+++ src/diff.c
@@ -619,22 +619,29 @@
619 /**************************************************************************
620 ** The basic difference engine is above. What follows is the annotation
621 ** engine. Both are in the same file since they share many components.
622 */
623
 
 
 
 
 
 
 
 
 
 
 
 
 
 
624 /*
625 ** The status of an annotation operation is recorded by an instance
626 ** of the following structure.
627 */
628 typedef struct Annotator Annotator;
629 struct Label
630 {
631 struct Label *prev;
632 struct Label *next;
633 char *str;
634 int nref;
635 };
636 struct Annotator {
637 DContext c; /* The diff-engine context */
638 struct AnnLine { /* Lines of the original files... */
639 const char *z; /* The text of the line */
640 short int n; /* Number of bytes (omitting trailing space and \n) */
641
--- src/diff.c
+++ src/diff.c
@@ -619,22 +619,29 @@
619 /**************************************************************************
620 ** The basic difference engine is above. What follows is the annotation
621 ** engine. Both are in the same file since they share many components.
622 */
623
624 /*
625 ** Linked list of strings, labels used in the annotator code.
626 ** The elements of the list and the pointed string (str)
627 ** will be freed once they become totally unreferenced
628 ** (nref == 0).
629 */
630 struct Label
631 {
632 struct Label *prev; /* previous element */
633 struct Label *next; /* next element */
634 char *str; /* The label string */
635 int nref; /* Number of references to the string */
636 };
637
638 /*
639 ** The status of an annotation operation is recorded by an instance
640 ** of the following structure.
641 */
642 typedef struct Annotator Annotator;
 
 
 
 
 
 
 
643 struct Annotator {
644 DContext c; /* The diff-engine context */
645 struct AnnLine { /* Lines of the original files... */
646 const char *z; /* The text of the line */
647 short int n; /* Number of bytes (omitting trailing space and \n) */
648

Keyboard Shortcuts

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