Fossil SCM
Rename "prefix" to "phase" and fix a C99-ism.
Commit
df99abda58765884b1d0a0d67491ff8cacf1605f9c05d34ed0de005f85a1c58b
Parent
5d3239bf588f7f9…
1 file changed
+11
-12
+11
-12
| --- src/timeline.c | ||
| +++ src/timeline.c | ||
| @@ -2741,12 +2741,12 @@ | ||
| 2741 | 2741 | ** %a author name |
| 2742 | 2742 | ** %d date |
| 2743 | 2743 | ** %c comment (\n, \t replaced by space, \r deleted) |
| 2744 | 2744 | ** %b branch |
| 2745 | 2745 | ** %t tags |
| 2746 | -** %p prefix (zero or more of: *CURRENT*, *MERGE*, *FORK*, | |
| 2747 | -** *UNPUBLISHED*, *LEAF*, *BRANCH*) | |
| 2746 | +** %p phase (zero or more of: *CURRENT*, *MERGE*, *FORK*, | |
| 2747 | +** *UNPUBLISHED*, *LEAF*, *BRANCH*) | |
| 2748 | 2748 | ** |
| 2749 | 2749 | ** The returned string is obtained from fossil_malloc() and should |
| 2750 | 2750 | ** be freed by the caller. |
| 2751 | 2751 | */ |
| 2752 | 2752 | static char *timeline_entry_subst( |
| @@ -2756,16 +2756,17 @@ | ||
| 2756 | 2756 | const char *zDate, |
| 2757 | 2757 | const char *zUser, |
| 2758 | 2758 | const char *zCom, |
| 2759 | 2759 | const char *zBranch, |
| 2760 | 2760 | const char *zTags, |
| 2761 | - const char *zPrefix | |
| 2761 | + const char *zPhase | |
| 2762 | 2762 | ){ |
| 2763 | - Blob co; | |
| 2764 | - int j; | |
| 2763 | + Blob r, co; | |
| 2764 | + int i, j; | |
| 2765 | + blob_init(&r, 0, 0); | |
| 2765 | 2766 | blob_init(&co, 0, 0); |
| 2766 | - *nLine = 1; | |
| 2767 | + | |
| 2767 | 2768 | /* Replace LF and tab with space, delete CR */ |
| 2768 | 2769 | while( zCom[0] ){ |
| 2769 | 2770 | for(j=0; zCom[j] && zCom[j]!='\r' && zCom[j]!='\n' && zCom[j]!='\t'; j++){} |
| 2770 | 2771 | blob_append(&co, zCom, j); |
| 2771 | 2772 | if( zCom[j]==0 ) break; |
| @@ -2773,13 +2774,11 @@ | ||
| 2773 | 2774 | blob_append(&co, " ", 1); |
| 2774 | 2775 | zCom += j+1; |
| 2775 | 2776 | } |
| 2776 | 2777 | blob_str(&co); |
| 2777 | 2778 | |
| 2778 | - Blob r; | |
| 2779 | - int i; | |
| 2780 | - blob_init(&r, 0, 0); | |
| 2779 | + *nLine = 1; | |
| 2781 | 2780 | while( zFormat[0] ){ |
| 2782 | 2781 | for(i=0; zFormat[i] && zFormat[i]!='%'; i++){} |
| 2783 | 2782 | blob_append(&r, zFormat, i); |
| 2784 | 2783 | if( zFormat[i]==0 ) break; |
| 2785 | 2784 | if( zFormat[i+1]=='%' ){ |
| @@ -2812,11 +2811,11 @@ | ||
| 2812 | 2811 | zFormat += i+2; |
| 2813 | 2812 | }else if( zFormat[i+1]=='t' ){ |
| 2814 | 2813 | blob_append(&r, zTags, -1); |
| 2815 | 2814 | zFormat += i+2; |
| 2816 | 2815 | }else if( zFormat[i+1]=='p' ){ |
| 2817 | - blob_append(&r, zPrefix, -1); | |
| 2816 | + blob_append(&r, zPhase, -1); | |
| 2818 | 2817 | zFormat += i+2; |
| 2819 | 2818 | }else{ |
| 2820 | 2819 | blob_append(&r, zFormat+i, 1); |
| 2821 | 2820 | zFormat += i+1; |
| 2822 | 2821 | } |
| @@ -3119,12 +3118,12 @@ | ||
| 3119 | 3118 | ** %a author name |
| 3120 | 3119 | ** %d date |
| 3121 | 3120 | ** %c comment (NL, TAB replaced by space, LF deleted) |
| 3122 | 3121 | ** %b branch |
| 3123 | 3122 | ** %t tags |
| 3124 | -** %p zero or more of: *CURRENT*, *MERGE*, *FORK*, | |
| 3125 | -** *UNPUBLISHED*, *LEAF*, *BRANCH* | |
| 3123 | +** %p phase: zero or more of *CURRENT*, *MERGE*, | |
| 3124 | +** *FORK*, *UNPUBLISHED*, *LEAF*, *BRANCH* | |
| 3126 | 3125 | ** --oneline Show only short hash and comment for each entry |
| 3127 | 3126 | ** --medium Medium-verbose entry formatting |
| 3128 | 3127 | ** --full Extra verbose entry formatting |
| 3129 | 3128 | ** -R REPO_FILE Specifies the repository db to use. Default is |
| 3130 | 3129 | ** the current checkout's repository. |
| 3131 | 3130 |
| --- src/timeline.c | |
| +++ src/timeline.c | |
| @@ -2741,12 +2741,12 @@ | |
| 2741 | ** %a author name |
| 2742 | ** %d date |
| 2743 | ** %c comment (\n, \t replaced by space, \r deleted) |
| 2744 | ** %b branch |
| 2745 | ** %t tags |
| 2746 | ** %p prefix (zero or more of: *CURRENT*, *MERGE*, *FORK*, |
| 2747 | ** *UNPUBLISHED*, *LEAF*, *BRANCH*) |
| 2748 | ** |
| 2749 | ** The returned string is obtained from fossil_malloc() and should |
| 2750 | ** be freed by the caller. |
| 2751 | */ |
| 2752 | static char *timeline_entry_subst( |
| @@ -2756,16 +2756,17 @@ | |
| 2756 | const char *zDate, |
| 2757 | const char *zUser, |
| 2758 | const char *zCom, |
| 2759 | const char *zBranch, |
| 2760 | const char *zTags, |
| 2761 | const char *zPrefix |
| 2762 | ){ |
| 2763 | Blob co; |
| 2764 | int j; |
| 2765 | blob_init(&co, 0, 0); |
| 2766 | *nLine = 1; |
| 2767 | /* Replace LF and tab with space, delete CR */ |
| 2768 | while( zCom[0] ){ |
| 2769 | for(j=0; zCom[j] && zCom[j]!='\r' && zCom[j]!='\n' && zCom[j]!='\t'; j++){} |
| 2770 | blob_append(&co, zCom, j); |
| 2771 | if( zCom[j]==0 ) break; |
| @@ -2773,13 +2774,11 @@ | |
| 2773 | blob_append(&co, " ", 1); |
| 2774 | zCom += j+1; |
| 2775 | } |
| 2776 | blob_str(&co); |
| 2777 | |
| 2778 | Blob r; |
| 2779 | int i; |
| 2780 | blob_init(&r, 0, 0); |
| 2781 | while( zFormat[0] ){ |
| 2782 | for(i=0; zFormat[i] && zFormat[i]!='%'; i++){} |
| 2783 | blob_append(&r, zFormat, i); |
| 2784 | if( zFormat[i]==0 ) break; |
| 2785 | if( zFormat[i+1]=='%' ){ |
| @@ -2812,11 +2811,11 @@ | |
| 2812 | zFormat += i+2; |
| 2813 | }else if( zFormat[i+1]=='t' ){ |
| 2814 | blob_append(&r, zTags, -1); |
| 2815 | zFormat += i+2; |
| 2816 | }else if( zFormat[i+1]=='p' ){ |
| 2817 | blob_append(&r, zPrefix, -1); |
| 2818 | zFormat += i+2; |
| 2819 | }else{ |
| 2820 | blob_append(&r, zFormat+i, 1); |
| 2821 | zFormat += i+1; |
| 2822 | } |
| @@ -3119,12 +3118,12 @@ | |
| 3119 | ** %a author name |
| 3120 | ** %d date |
| 3121 | ** %c comment (NL, TAB replaced by space, LF deleted) |
| 3122 | ** %b branch |
| 3123 | ** %t tags |
| 3124 | ** %p zero or more of: *CURRENT*, *MERGE*, *FORK*, |
| 3125 | ** *UNPUBLISHED*, *LEAF*, *BRANCH* |
| 3126 | ** --oneline Show only short hash and comment for each entry |
| 3127 | ** --medium Medium-verbose entry formatting |
| 3128 | ** --full Extra verbose entry formatting |
| 3129 | ** -R REPO_FILE Specifies the repository db to use. Default is |
| 3130 | ** the current checkout's repository. |
| 3131 |
| --- src/timeline.c | |
| +++ src/timeline.c | |
| @@ -2741,12 +2741,12 @@ | |
| 2741 | ** %a author name |
| 2742 | ** %d date |
| 2743 | ** %c comment (\n, \t replaced by space, \r deleted) |
| 2744 | ** %b branch |
| 2745 | ** %t tags |
| 2746 | ** %p phase (zero or more of: *CURRENT*, *MERGE*, *FORK*, |
| 2747 | ** *UNPUBLISHED*, *LEAF*, *BRANCH*) |
| 2748 | ** |
| 2749 | ** The returned string is obtained from fossil_malloc() and should |
| 2750 | ** be freed by the caller. |
| 2751 | */ |
| 2752 | static char *timeline_entry_subst( |
| @@ -2756,16 +2756,17 @@ | |
| 2756 | const char *zDate, |
| 2757 | const char *zUser, |
| 2758 | const char *zCom, |
| 2759 | const char *zBranch, |
| 2760 | const char *zTags, |
| 2761 | const char *zPhase |
| 2762 | ){ |
| 2763 | Blob r, co; |
| 2764 | int i, j; |
| 2765 | blob_init(&r, 0, 0); |
| 2766 | blob_init(&co, 0, 0); |
| 2767 | |
| 2768 | /* Replace LF and tab with space, delete CR */ |
| 2769 | while( zCom[0] ){ |
| 2770 | for(j=0; zCom[j] && zCom[j]!='\r' && zCom[j]!='\n' && zCom[j]!='\t'; j++){} |
| 2771 | blob_append(&co, zCom, j); |
| 2772 | if( zCom[j]==0 ) break; |
| @@ -2773,13 +2774,11 @@ | |
| 2774 | blob_append(&co, " ", 1); |
| 2775 | zCom += j+1; |
| 2776 | } |
| 2777 | blob_str(&co); |
| 2778 | |
| 2779 | *nLine = 1; |
| 2780 | while( zFormat[0] ){ |
| 2781 | for(i=0; zFormat[i] && zFormat[i]!='%'; i++){} |
| 2782 | blob_append(&r, zFormat, i); |
| 2783 | if( zFormat[i]==0 ) break; |
| 2784 | if( zFormat[i+1]=='%' ){ |
| @@ -2812,11 +2811,11 @@ | |
| 2811 | zFormat += i+2; |
| 2812 | }else if( zFormat[i+1]=='t' ){ |
| 2813 | blob_append(&r, zTags, -1); |
| 2814 | zFormat += i+2; |
| 2815 | }else if( zFormat[i+1]=='p' ){ |
| 2816 | blob_append(&r, zPhase, -1); |
| 2817 | zFormat += i+2; |
| 2818 | }else{ |
| 2819 | blob_append(&r, zFormat+i, 1); |
| 2820 | zFormat += i+1; |
| 2821 | } |
| @@ -3119,12 +3118,12 @@ | |
| 3118 | ** %a author name |
| 3119 | ** %d date |
| 3120 | ** %c comment (NL, TAB replaced by space, LF deleted) |
| 3121 | ** %b branch |
| 3122 | ** %t tags |
| 3123 | ** %p phase: zero or more of *CURRENT*, *MERGE*, |
| 3124 | ** *FORK*, *UNPUBLISHED*, *LEAF*, *BRANCH* |
| 3125 | ** --oneline Show only short hash and comment for each entry |
| 3126 | ** --medium Medium-verbose entry formatting |
| 3127 | ** --full Extra verbose entry formatting |
| 3128 | ** -R REPO_FILE Specifies the repository db to use. Default is |
| 3129 | ** the current checkout's repository. |
| 3130 |