Fossil SCM
Merge updates from trunk.
Commit
3221e519b6baee382dbfff142ffd93fd1a4d8965
Parent
41804ab1803ac3f…
2 files changed
+17
-6
+17
-6
+17
-6
| --- src/comformat.c | ||
| +++ src/comformat.c | ||
| @@ -121,13 +121,24 @@ | ||
| 121 | 121 | ** Test the comment printing |
| 122 | 122 | ** |
| 123 | 123 | ** COMMAND: test-comment-format |
| 124 | 124 | */ |
| 125 | 125 | void test_comment_format(void){ |
| 126 | - int indent; | |
| 127 | - if( g.argc!=4 ){ | |
| 128 | - usage("PREFIX TEXT"); | |
| 126 | + const char *zPrefix; | |
| 127 | + const char *zText; | |
| 128 | + int indent, width; | |
| 129 | + if( g.argc!=4 && g.argc!=5 ){ | |
| 130 | + usage("PREFIX TEXT ?WIDTH?"); | |
| 131 | + } | |
| 132 | + zPrefix = g.argv[2]; | |
| 133 | + zText = g.argv[3]; | |
| 134 | + indent = strlen(zPrefix); | |
| 135 | + if( g.argc==5 ){ | |
| 136 | + width = atoi(g.argv[4]); | |
| 137 | + }else{ | |
| 138 | + width = -1; /* automatic */ | |
| 139 | + } | |
| 140 | + if( indent>0 ){ | |
| 141 | + fossil_print("%s", zPrefix); | |
| 129 | 142 | } |
| 130 | - indent = strlen(g.argv[2]) + 1; | |
| 131 | - fossil_print("%s ", g.argv[2]); | |
| 132 | - fossil_print("(%d lines output)\n", comment_print(g.argv[3], indent, 79)); | |
| 143 | + fossil_print("(%d lines output)\n", comment_print(zText, indent, width)); | |
| 133 | 144 | } |
| 134 | 145 |
| --- src/comformat.c | |
| +++ src/comformat.c | |
| @@ -121,13 +121,24 @@ | |
| 121 | ** Test the comment printing |
| 122 | ** |
| 123 | ** COMMAND: test-comment-format |
| 124 | */ |
| 125 | void test_comment_format(void){ |
| 126 | int indent; |
| 127 | if( g.argc!=4 ){ |
| 128 | usage("PREFIX TEXT"); |
| 129 | } |
| 130 | indent = strlen(g.argv[2]) + 1; |
| 131 | fossil_print("%s ", g.argv[2]); |
| 132 | fossil_print("(%d lines output)\n", comment_print(g.argv[3], indent, 79)); |
| 133 | } |
| 134 |
| --- src/comformat.c | |
| +++ src/comformat.c | |
| @@ -121,13 +121,24 @@ | |
| 121 | ** Test the comment printing |
| 122 | ** |
| 123 | ** COMMAND: test-comment-format |
| 124 | */ |
| 125 | void test_comment_format(void){ |
| 126 | const char *zPrefix; |
| 127 | const char *zText; |
| 128 | int indent, width; |
| 129 | if( g.argc!=4 && g.argc!=5 ){ |
| 130 | usage("PREFIX TEXT ?WIDTH?"); |
| 131 | } |
| 132 | zPrefix = g.argv[2]; |
| 133 | zText = g.argv[3]; |
| 134 | indent = strlen(zPrefix); |
| 135 | if( g.argc==5 ){ |
| 136 | width = atoi(g.argv[4]); |
| 137 | }else{ |
| 138 | width = -1; /* automatic */ |
| 139 | } |
| 140 | if( indent>0 ){ |
| 141 | fossil_print("%s", zPrefix); |
| 142 | } |
| 143 | fossil_print("(%d lines output)\n", comment_print(zText, indent, width)); |
| 144 | } |
| 145 |
+17
-6
| --- src/comformat.c | ||
| +++ src/comformat.c | ||
| @@ -121,13 +121,24 @@ | ||
| 121 | 121 | ** Test the comment printing |
| 122 | 122 | ** |
| 123 | 123 | ** COMMAND: test-comment-format |
| 124 | 124 | */ |
| 125 | 125 | void test_comment_format(void){ |
| 126 | - int indent; | |
| 127 | - if( g.argc!=4 ){ | |
| 128 | - usage("PREFIX TEXT"); | |
| 126 | + const char *zPrefix; | |
| 127 | + const char *zText; | |
| 128 | + int indent, width; | |
| 129 | + if( g.argc!=4 && g.argc!=5 ){ | |
| 130 | + usage("PREFIX TEXT ?WIDTH?"); | |
| 131 | + } | |
| 132 | + zPrefix = g.argv[2]; | |
| 133 | + zText = g.argv[3]; | |
| 134 | + indent = strlen(zPrefix); | |
| 135 | + if( g.argc==5 ){ | |
| 136 | + width = atoi(g.argv[4]); | |
| 137 | + }else{ | |
| 138 | + width = -1; /* automatic */ | |
| 139 | + } | |
| 140 | + if( indent>0 ){ | |
| 141 | + fossil_print("%s", zPrefix); | |
| 129 | 142 | } |
| 130 | - indent = strlen(g.argv[2]) + 1; | |
| 131 | - fossil_print("%s ", g.argv[2]); | |
| 132 | - fossil_print("(%d lines output)\n", comment_print(g.argv[3], indent, 79)); | |
| 143 | + fossil_print("(%d lines output)\n", comment_print(zText, indent, width)); | |
| 133 | 144 | } |
| 134 | 145 |
| --- src/comformat.c | |
| +++ src/comformat.c | |
| @@ -121,13 +121,24 @@ | |
| 121 | ** Test the comment printing |
| 122 | ** |
| 123 | ** COMMAND: test-comment-format |
| 124 | */ |
| 125 | void test_comment_format(void){ |
| 126 | int indent; |
| 127 | if( g.argc!=4 ){ |
| 128 | usage("PREFIX TEXT"); |
| 129 | } |
| 130 | indent = strlen(g.argv[2]) + 1; |
| 131 | fossil_print("%s ", g.argv[2]); |
| 132 | fossil_print("(%d lines output)\n", comment_print(g.argv[3], indent, 79)); |
| 133 | } |
| 134 |
| --- src/comformat.c | |
| +++ src/comformat.c | |
| @@ -121,13 +121,24 @@ | |
| 121 | ** Test the comment printing |
| 122 | ** |
| 123 | ** COMMAND: test-comment-format |
| 124 | */ |
| 125 | void test_comment_format(void){ |
| 126 | const char *zPrefix; |
| 127 | const char *zText; |
| 128 | int indent, width; |
| 129 | if( g.argc!=4 && g.argc!=5 ){ |
| 130 | usage("PREFIX TEXT ?WIDTH?"); |
| 131 | } |
| 132 | zPrefix = g.argv[2]; |
| 133 | zText = g.argv[3]; |
| 134 | indent = strlen(zPrefix); |
| 135 | if( g.argc==5 ){ |
| 136 | width = atoi(g.argv[4]); |
| 137 | }else{ |
| 138 | width = -1; /* automatic */ |
| 139 | } |
| 140 | if( indent>0 ){ |
| 141 | fossil_print("%s", zPrefix); |
| 142 | } |
| 143 | fossil_print("(%d lines output)\n", comment_print(zText, indent, width)); |
| 144 | } |
| 145 |