Fossil SCM

Merge updates from trunk.

mistachkin 2014-06-19 00:48 UTC respectformatting merge
Commit 3221e519b6baee382dbfff142ffd93fd1a4d8965
2 files changed +17 -6 +17 -6
+17 -6
--- src/comformat.c
+++ src/comformat.c
@@ -121,13 +121,24 @@
121121
** Test the comment printing
122122
**
123123
** COMMAND: test-comment-format
124124
*/
125125
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);
129142
}
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));
133144
}
134145
--- 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 @@
121121
** Test the comment printing
122122
**
123123
** COMMAND: test-comment-format
124124
*/
125125
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);
129142
}
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));
133144
}
134145
--- 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

Keyboard Shortcuts

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