Fossil SCM
Rename the zBuf variable to zLine, to improve clarity.
Commit
b68446e291d82d52b3618258370abb2358fd1c04
Parent
c7c3d99a6081d76…
1 file changed
+6
-6
+6
-6
| --- src/comformat.c | ||
| +++ src/comformat.c | ||
| @@ -45,11 +45,11 @@ | ||
| 45 | 45 | ** Return the number of newlines that are output. |
| 46 | 46 | */ |
| 47 | 47 | int comment_print(const char *zText, int indent, int lineLength){ |
| 48 | 48 | int tlen = lineLength - indent; |
| 49 | 49 | int len = 0, doIndent = 0, lineCnt = 0; |
| 50 | - const char *zBuf; | |
| 50 | + const char *zLine; | |
| 51 | 51 | |
| 52 | 52 | #if defined(_WIN32) |
| 53 | 53 | if( lineLength<0 ){ |
| 54 | 54 | CONSOLE_SCREEN_BUFFER_INFO csbi; |
| 55 | 55 | memset(&csbi, 0, sizeof(CONSOLE_SCREEN_BUFFER_INFO)); |
| @@ -85,17 +85,17 @@ | ||
| 85 | 85 | fossil_print("\n"); |
| 86 | 86 | lineCnt++; |
| 87 | 87 | } |
| 88 | 88 | return lineCnt; |
| 89 | 89 | } |
| 90 | - zBuf = zText; | |
| 90 | + zLine = zText; | |
| 91 | 91 | for(;;){ |
| 92 | 92 | if( zText[0]==0 ){ |
| 93 | 93 | if( doIndent ){ |
| 94 | 94 | fossil_print("%*s", indent, ""); |
| 95 | 95 | } |
| 96 | - fossil_print("%.*s\n", (int)(zText - zBuf), zBuf); | |
| 96 | + fossil_print("%.*s\n", (int)(zText - zLine), zLine); | |
| 97 | 97 | lineCnt++; |
| 98 | 98 | break; |
| 99 | 99 | } |
| 100 | 100 | len += ((zText[0]=='\t') ? 8 : 1); |
| 101 | 101 | if( zText[0]=='\n' || len>=tlen ){ |
| @@ -102,14 +102,14 @@ | ||
| 102 | 102 | if( doIndent ){ |
| 103 | 103 | fossil_print("%*s", indent, ""); |
| 104 | 104 | } |
| 105 | 105 | doIndent = 1; |
| 106 | 106 | while( !fossil_isspace(zText[0]) ){ zText--; } |
| 107 | - fossil_print("%.*s\n", (int)(zText - zBuf), zBuf); | |
| 107 | + fossil_print("%.*s\n", (int)(zText - zLine), zLine); | |
| 108 | 108 | lineCnt++; |
| 109 | - zBuf = zText; | |
| 110 | - if( !zBuf++ ) break; | |
| 109 | + zLine = zText; | |
| 110 | + if( !zLine++ ) break; | |
| 111 | 111 | len = 0; |
| 112 | 112 | } |
| 113 | 113 | zText++; |
| 114 | 114 | } |
| 115 | 115 | return lineCnt; |
| 116 | 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 *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 |