Fossil SCM

Avoid using the %lld printf conversion since windows does not support it.

drh 2011-05-02 13:09 trunk
Commit be467e93287897e23a2d00f004bbd7d2b7a2f1ac
1 file changed +4 -4
+4 -4
--- src/export.c
+++ src/export.c
@@ -139,11 +139,11 @@
139139
" WHERE type='ci'"
140140
" ORDER BY mtime ASC",
141141
TAG_BRANCH
142142
);
143143
while( db_step(&q)==SQLITE_ROW ){
144
- sqlite3_int64 secondsSince1970 = db_column_int64(&q, 0);
144
+ const char *zSecondsSince1970 = db_column_text(&q, 0);
145145
int ckinId = db_column_int(&q, 1);
146146
const char *zComment = db_column_text(&q, 2);
147147
const char *zUser = db_column_text(&q, 3);
148148
const char *zBranch = db_column_text(&q, 4);
149149
char *zBr;
@@ -159,11 +159,11 @@
159159
}
160160
printf("commit refs/heads/%s\nmark :%d\n", zBr, ckinId+firstCkin);
161161
free(zBr);
162162
printf("committer");
163163
print_person(zUser);
164
- printf(" %lld +0000\n", secondsSince1970);
164
+ printf(" %s +0000\n", zSecondsSince1970);
165165
if( zComment==0 ) zComment = "null comment";
166166
printf("data %d\n%s\n", (int)strlen(zComment), zComment);
167167
p = manifest_get(ckinId, CFTYPE_ANY);
168168
zFromType = "from";
169169
for(i=0; i<p->nParent; i++){
@@ -197,16 +197,16 @@
197197
" WHERE tagtype=1 AND tagname GLOB 'sym-*'"
198198
);
199199
while( db_step(&q)==SQLITE_ROW ){
200200
const char *zTagname = db_column_text(&q, 0);
201201
int rid = db_column_int(&q, 1);
202
- sqlite3_int64 secSince1970 = db_column_int64(&q, 2);
202
+ const char *zSecSince1970 = db_column_text(&q, 2);
203203
if( rid==0 || !bag_find(&vers, rid) ) continue;
204204
zTagname += 4;
205205
printf("tag %s\n", zTagname);
206206
printf("from :%d\n", rid+firstCkin);
207
- printf("tagger <tagger> %lld +0000\n", secSince1970);
207
+ printf("tagger <tagger> %s +0000\n", zSecSince1970);
208208
printf("data 0\n");
209209
}
210210
db_finalize(&q);
211211
bag_clear(&vers);
212212
}
213213
--- src/export.c
+++ src/export.c
@@ -139,11 +139,11 @@
139 " WHERE type='ci'"
140 " ORDER BY mtime ASC",
141 TAG_BRANCH
142 );
143 while( db_step(&q)==SQLITE_ROW ){
144 sqlite3_int64 secondsSince1970 = db_column_int64(&q, 0);
145 int ckinId = db_column_int(&q, 1);
146 const char *zComment = db_column_text(&q, 2);
147 const char *zUser = db_column_text(&q, 3);
148 const char *zBranch = db_column_text(&q, 4);
149 char *zBr;
@@ -159,11 +159,11 @@
159 }
160 printf("commit refs/heads/%s\nmark :%d\n", zBr, ckinId+firstCkin);
161 free(zBr);
162 printf("committer");
163 print_person(zUser);
164 printf(" %lld +0000\n", secondsSince1970);
165 if( zComment==0 ) zComment = "null comment";
166 printf("data %d\n%s\n", (int)strlen(zComment), zComment);
167 p = manifest_get(ckinId, CFTYPE_ANY);
168 zFromType = "from";
169 for(i=0; i<p->nParent; i++){
@@ -197,16 +197,16 @@
197 " WHERE tagtype=1 AND tagname GLOB 'sym-*'"
198 );
199 while( db_step(&q)==SQLITE_ROW ){
200 const char *zTagname = db_column_text(&q, 0);
201 int rid = db_column_int(&q, 1);
202 sqlite3_int64 secSince1970 = db_column_int64(&q, 2);
203 if( rid==0 || !bag_find(&vers, rid) ) continue;
204 zTagname += 4;
205 printf("tag %s\n", zTagname);
206 printf("from :%d\n", rid+firstCkin);
207 printf("tagger <tagger> %lld +0000\n", secSince1970);
208 printf("data 0\n");
209 }
210 db_finalize(&q);
211 bag_clear(&vers);
212 }
213
--- src/export.c
+++ src/export.c
@@ -139,11 +139,11 @@
139 " WHERE type='ci'"
140 " ORDER BY mtime ASC",
141 TAG_BRANCH
142 );
143 while( db_step(&q)==SQLITE_ROW ){
144 const char *zSecondsSince1970 = db_column_text(&q, 0);
145 int ckinId = db_column_int(&q, 1);
146 const char *zComment = db_column_text(&q, 2);
147 const char *zUser = db_column_text(&q, 3);
148 const char *zBranch = db_column_text(&q, 4);
149 char *zBr;
@@ -159,11 +159,11 @@
159 }
160 printf("commit refs/heads/%s\nmark :%d\n", zBr, ckinId+firstCkin);
161 free(zBr);
162 printf("committer");
163 print_person(zUser);
164 printf(" %s +0000\n", zSecondsSince1970);
165 if( zComment==0 ) zComment = "null comment";
166 printf("data %d\n%s\n", (int)strlen(zComment), zComment);
167 p = manifest_get(ckinId, CFTYPE_ANY);
168 zFromType = "from";
169 for(i=0; i<p->nParent; i++){
@@ -197,16 +197,16 @@
197 " WHERE tagtype=1 AND tagname GLOB 'sym-*'"
198 );
199 while( db_step(&q)==SQLITE_ROW ){
200 const char *zTagname = db_column_text(&q, 0);
201 int rid = db_column_int(&q, 1);
202 const char *zSecSince1970 = db_column_text(&q, 2);
203 if( rid==0 || !bag_find(&vers, rid) ) continue;
204 zTagname += 4;
205 printf("tag %s\n", zTagname);
206 printf("from :%d\n", rid+firstCkin);
207 printf("tagger <tagger> %s +0000\n", zSecSince1970);
208 printf("data 0\n");
209 }
210 db_finalize(&q);
211 bag_clear(&vers);
212 }
213

Keyboard Shortcuts

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