Fossil SCM

Rename the zBuf variable to zLine, to improve clarity.

mistachkin 2014-06-19 03:03 UTC respectformatting
Commit b68446e291d82d52b3618258370abb2358fd1c04
1 file changed +6 -6
+6 -6
--- src/comformat.c
+++ src/comformat.c
@@ -45,11 +45,11 @@
4545
** Return the number of newlines that are output.
4646
*/
4747
int comment_print(const char *zText, int indent, int lineLength){
4848
int tlen = lineLength - indent;
4949
int len = 0, doIndent = 0, lineCnt = 0;
50
- const char *zBuf;
50
+ const char *zLine;
5151
5252
#if defined(_WIN32)
5353
if( lineLength<0 ){
5454
CONSOLE_SCREEN_BUFFER_INFO csbi;
5555
memset(&csbi, 0, sizeof(CONSOLE_SCREEN_BUFFER_INFO));
@@ -85,17 +85,17 @@
8585
fossil_print("\n");
8686
lineCnt++;
8787
}
8888
return lineCnt;
8989
}
90
- zBuf = zText;
90
+ zLine = zText;
9191
for(;;){
9292
if( zText[0]==0 ){
9393
if( doIndent ){
9494
fossil_print("%*s", indent, "");
9595
}
96
- fossil_print("%.*s\n", (int)(zText - zBuf), zBuf);
96
+ fossil_print("%.*s\n", (int)(zText - zLine), zLine);
9797
lineCnt++;
9898
break;
9999
}
100100
len += ((zText[0]=='\t') ? 8 : 1);
101101
if( zText[0]=='\n' || len>=tlen ){
@@ -102,14 +102,14 @@
102102
if( doIndent ){
103103
fossil_print("%*s", indent, "");
104104
}
105105
doIndent = 1;
106106
while( !fossil_isspace(zText[0]) ){ zText--; }
107
- fossil_print("%.*s\n", (int)(zText - zBuf), zBuf);
107
+ fossil_print("%.*s\n", (int)(zText - zLine), zLine);
108108
lineCnt++;
109
- zBuf = zText;
110
- if( !zBuf++ ) break;
109
+ zLine = zText;
110
+ if( !zLine++ ) break;
111111
len = 0;
112112
}
113113
zText++;
114114
}
115115
return lineCnt;
116116
--- src/comformat.c
+++ src/comformat.c
@@ -45,11 +45,11 @@
45 ** Return the number of newlines that are output.
46 */
47 int comment_print(const char *zText, int indent, int lineLength){
48 int tlen = lineLength - indent;
49 int len = 0, doIndent = 0, lineCnt = 0;
50 const char *zBuf;
51
52 #if defined(_WIN32)
53 if( lineLength<0 ){
54 CONSOLE_SCREEN_BUFFER_INFO csbi;
55 memset(&csbi, 0, sizeof(CONSOLE_SCREEN_BUFFER_INFO));
@@ -85,17 +85,17 @@
85 fossil_print("\n");
86 lineCnt++;
87 }
88 return lineCnt;
89 }
90 zBuf = zText;
91 for(;;){
92 if( zText[0]==0 ){
93 if( doIndent ){
94 fossil_print("%*s", indent, "");
95 }
96 fossil_print("%.*s\n", (int)(zText - zBuf), zBuf);
97 lineCnt++;
98 break;
99 }
100 len += ((zText[0]=='\t') ? 8 : 1);
101 if( zText[0]=='\n' || len>=tlen ){
@@ -102,14 +102,14 @@
102 if( doIndent ){
103 fossil_print("%*s", indent, "");
104 }
105 doIndent = 1;
106 while( !fossil_isspace(zText[0]) ){ zText--; }
107 fossil_print("%.*s\n", (int)(zText - zBuf), zBuf);
108 lineCnt++;
109 zBuf = zText;
110 if( !zBuf++ ) break;
111 len = 0;
112 }
113 zText++;
114 }
115 return lineCnt;
116
--- src/comformat.c
+++ src/comformat.c
@@ -45,11 +45,11 @@
45 ** Return the number of newlines that are output.
46 */
47 int comment_print(const char *zText, int indent, int lineLength){
48 int tlen = lineLength - indent;
49 int len = 0, doIndent = 0, lineCnt = 0;
50 const char *zLine;
51
52 #if defined(_WIN32)
53 if( lineLength<0 ){
54 CONSOLE_SCREEN_BUFFER_INFO csbi;
55 memset(&csbi, 0, sizeof(CONSOLE_SCREEN_BUFFER_INFO));
@@ -85,17 +85,17 @@
85 fossil_print("\n");
86 lineCnt++;
87 }
88 return lineCnt;
89 }
90 zLine = zText;
91 for(;;){
92 if( zText[0]==0 ){
93 if( doIndent ){
94 fossil_print("%*s", indent, "");
95 }
96 fossil_print("%.*s\n", (int)(zText - zLine), zLine);
97 lineCnt++;
98 break;
99 }
100 len += ((zText[0]=='\t') ? 8 : 1);
101 if( zText[0]=='\n' || len>=tlen ){
@@ -102,14 +102,14 @@
102 if( doIndent ){
103 fossil_print("%*s", indent, "");
104 }
105 doIndent = 1;
106 while( !fossil_isspace(zText[0]) ){ zText--; }
107 fossil_print("%.*s\n", (int)(zText - zLine), zLine);
108 lineCnt++;
109 zLine = zText;
110 if( !zLine++ ) break;
111 len = 0;
112 }
113 zText++;
114 }
115 return lineCnt;
116

Keyboard Shortcuts

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