132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
|
/*
** Test the comment printing
**
** COMMAND: test-comment-format
*/
void test_comment_format(void){
int indent;
if( g.argc!=4 ){
usage("PREFIX TEXT");
}
indent = strlen(g.argv[2]) + 1;
fossil_print("%s ", g.argv[2]);
fossil_print("(%d lines output)\n", comment_print(g.argv[3], indent, 79));
}
|
>
>
|
|
|
>
>
|
>
>
>
>
>
>
|
>
|
|
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
|
/*
** Test the comment printing
**
** COMMAND: test-comment-format
*/
void test_comment_format(void){
const char *zPrefix;
const char *zText;
int indent, width;
if( g.argc!=4 && g.argc!=5 ){
usage("PREFIX TEXT ?WIDTH?");
}
zPrefix = g.argv[2];
zText = g.argv[3];
indent = strlen(zPrefix);
if( g.argc==5 ){
width = atoi(g.argv[4]);
}else{
width = -1; /* automatic */
}
if( indent>0 ){
fossil_print("%s", zPrefix);
}
fossil_print("(%d lines output)\n", comment_print(zText, indent, width));
}
|