Fossil SCM

dequote_git_filename: missing return type

jan.nijtmans 2012-10-18 05:11 trunk
Commit ee424936daca3fcaeb4e2f6db979d6dbbe9a0ae2
1 file changed +11 -11
+11 -11
--- src/import.c
+++ src/import.c
@@ -12,11 +12,11 @@
1212
** Author contact information:
1313
** [email protected]
1414
**
1515
*******************************************************************************
1616
**
17
-** This file contains code used to import the content of a Git
17
+** This file contains code used to import the content of a Git
1818
** repository in the git-fast-import format as a new Fossil
1919
** repository.
2020
*/
2121
#include "config.h"
2222
#include "import.h"
@@ -24,11 +24,11 @@
2424
2525
#if INTERFACE
2626
/*
2727
** A single file change record.
2828
*/
29
-struct ImportFile {
29
+struct ImportFile {
3030
char *zName; /* Name of a file */
3131
char *zUuid; /* UUID of the file */
3232
char *zPrior; /* Prior name if the name was changed */
3333
char isFrom; /* True if obtained from the parent */
3434
char isExe; /* True if executable */
@@ -80,11 +80,11 @@
8080
8181
/*
8282
** A no-op "xFinish" method
8383
*/
8484
static void finish_noop(void){}
85
-
85
+
8686
/*
8787
** Deallocate the state information.
8888
**
8989
** The azMerge[] and aFile[] arrays are zeroed by allocated space is
9090
** retained unless the freeAll flag is set.
@@ -152,16 +152,16 @@
152152
rid = db_last_insert_rowid();
153153
}
154154
if( zMark ){
155155
db_multi_exec(
156156
"INSERT OR IGNORE INTO xmark(tname, trid, tuuid)"
157
- "VALUES(%Q,%d,%B)",
157
+ "VALUES(%Q,%d,%B)",
158158
zMark, rid, &hash
159159
);
160160
db_multi_exec(
161161
"INSERT OR IGNORE INTO xmark(tname, trid, tuuid)"
162
- "VALUES(%B,%d,%B)",
162
+ "VALUES(%B,%d,%B)",
163163
&hash, rid, &hash
164164
);
165165
}
166166
if( saveUuid ){
167167
fossil_free(gg.zPrevCheckin);
@@ -182,11 +182,11 @@
182182
blob_reset(&content);
183183
import_reset(0);
184184
}
185185
186186
/*
187
-** Use data accumulated in gg from a "tag" record to add a new
187
+** Use data accumulated in gg from a "tag" record to add a new
188188
** control artifact to the BLOB table.
189189
*/
190190
static void finish_tag(void){
191191
Blob record, cksum;
192192
if( gg.zDate && gg.zTag && gg.zFrom && gg.zUser ){
@@ -223,11 +223,11 @@
223223
224224
/* Forward reference */
225225
static void import_prior_files(void);
226226
227227
/*
228
-** Use data accumulated in gg from a "commit" record to add a new
228
+** Use data accumulated in gg from a "commit" record to add a new
229229
** manifest artifact to the BLOB table.
230230
*/
231231
static void finish_commit(void){
232232
int i;
233233
char *zFromBranch;
@@ -410,11 +410,11 @@
410410
int rid;
411411
ManifestFile *pOld;
412412
ImportFile *pNew;
413413
if( gg.fromLoaded ) return;
414414
gg.fromLoaded = 1;
415
- if( gg.zFrom==0 && gg.zPrevCheckin!=0
415
+ if( gg.zFrom==0 && gg.zPrevCheckin!=0
416416
&& fossil_strcmp(gg.zBranch, gg.zPrevBranch)==0
417417
){
418418
gg.zFrom = gg.zPrevCheckin;
419419
gg.zPrevCheckin = 0;
420420
}
@@ -456,11 +456,11 @@
456456
457457
/*
458458
** Dequote a fast-export filename. Filenames are normally unquoted. But
459459
** if the contain some obscure special characters, quotes might be added.
460460
*/
461
-static dequote_git_filename(char *zName){
461
+static void dequote_git_filename(char *zName){
462462
int n, i, j;
463463
if( zName==0 || zName[0]!='"' ) return;
464464
n = (int)strlen(zName);
465465
if( zName[n-1]!='"' ) return;
466466
for(i=0, j=1; j<n-1; j++){
@@ -621,11 +621,11 @@
621621
if( pFile==0 ){
622622
pFile = import_add_file();
623623
pFile->zName = fossil_strdup(zName);
624624
}
625625
pFile->isExe = (fossil_strcmp(zPerm, "100755")==0);
626
- pFile->isLink = (fossil_strcmp(zPerm, "120000")==0);
626
+ pFile->isLink = (fossil_strcmp(zPerm, "120000")==0);
627627
fossil_free(pFile->zUuid);
628628
pFile->zUuid = resolve_committish(zUuid);
629629
pFile->isFrom = 0;
630630
}else
631631
if( memcmp(zLine, "D ", 2)==0 ){
@@ -767,11 +767,11 @@
767767
768768
/* The following temp-tables are used to hold information needed for
769769
** the import.
770770
**
771771
** The XMARK table provides a mapping from fast-import "marks" and symbols
772
- ** into artifact ids (UUIDs - the 40-byte hex SHA1 hash of artifacts).
772
+ ** into artifact ids (UUIDs - the 40-byte hex SHA1 hash of artifacts).
773773
** Given any valid fast-import symbol, the corresponding fossil rid and
774774
** uuid can found by searching against the xmark.tname field.
775775
**
776776
** The XBRANCH table maps commit marks and symbols into the branch those
777777
** commits belong to. If xbranch.tname is a fast-import symbol for a
778778
--- src/import.c
+++ src/import.c
@@ -12,11 +12,11 @@
12 ** Author contact information:
13 ** [email protected]
14 **
15 *******************************************************************************
16 **
17 ** This file contains code used to import the content of a Git
18 ** repository in the git-fast-import format as a new Fossil
19 ** repository.
20 */
21 #include "config.h"
22 #include "import.h"
@@ -24,11 +24,11 @@
24
25 #if INTERFACE
26 /*
27 ** A single file change record.
28 */
29 struct ImportFile {
30 char *zName; /* Name of a file */
31 char *zUuid; /* UUID of the file */
32 char *zPrior; /* Prior name if the name was changed */
33 char isFrom; /* True if obtained from the parent */
34 char isExe; /* True if executable */
@@ -80,11 +80,11 @@
80
81 /*
82 ** A no-op "xFinish" method
83 */
84 static void finish_noop(void){}
85
86 /*
87 ** Deallocate the state information.
88 **
89 ** The azMerge[] and aFile[] arrays are zeroed by allocated space is
90 ** retained unless the freeAll flag is set.
@@ -152,16 +152,16 @@
152 rid = db_last_insert_rowid();
153 }
154 if( zMark ){
155 db_multi_exec(
156 "INSERT OR IGNORE INTO xmark(tname, trid, tuuid)"
157 "VALUES(%Q,%d,%B)",
158 zMark, rid, &hash
159 );
160 db_multi_exec(
161 "INSERT OR IGNORE INTO xmark(tname, trid, tuuid)"
162 "VALUES(%B,%d,%B)",
163 &hash, rid, &hash
164 );
165 }
166 if( saveUuid ){
167 fossil_free(gg.zPrevCheckin);
@@ -182,11 +182,11 @@
182 blob_reset(&content);
183 import_reset(0);
184 }
185
186 /*
187 ** Use data accumulated in gg from a "tag" record to add a new
188 ** control artifact to the BLOB table.
189 */
190 static void finish_tag(void){
191 Blob record, cksum;
192 if( gg.zDate && gg.zTag && gg.zFrom && gg.zUser ){
@@ -223,11 +223,11 @@
223
224 /* Forward reference */
225 static void import_prior_files(void);
226
227 /*
228 ** Use data accumulated in gg from a "commit" record to add a new
229 ** manifest artifact to the BLOB table.
230 */
231 static void finish_commit(void){
232 int i;
233 char *zFromBranch;
@@ -410,11 +410,11 @@
410 int rid;
411 ManifestFile *pOld;
412 ImportFile *pNew;
413 if( gg.fromLoaded ) return;
414 gg.fromLoaded = 1;
415 if( gg.zFrom==0 && gg.zPrevCheckin!=0
416 && fossil_strcmp(gg.zBranch, gg.zPrevBranch)==0
417 ){
418 gg.zFrom = gg.zPrevCheckin;
419 gg.zPrevCheckin = 0;
420 }
@@ -456,11 +456,11 @@
456
457 /*
458 ** Dequote a fast-export filename. Filenames are normally unquoted. But
459 ** if the contain some obscure special characters, quotes might be added.
460 */
461 static dequote_git_filename(char *zName){
462 int n, i, j;
463 if( zName==0 || zName[0]!='"' ) return;
464 n = (int)strlen(zName);
465 if( zName[n-1]!='"' ) return;
466 for(i=0, j=1; j<n-1; j++){
@@ -621,11 +621,11 @@
621 if( pFile==0 ){
622 pFile = import_add_file();
623 pFile->zName = fossil_strdup(zName);
624 }
625 pFile->isExe = (fossil_strcmp(zPerm, "100755")==0);
626 pFile->isLink = (fossil_strcmp(zPerm, "120000")==0);
627 fossil_free(pFile->zUuid);
628 pFile->zUuid = resolve_committish(zUuid);
629 pFile->isFrom = 0;
630 }else
631 if( memcmp(zLine, "D ", 2)==0 ){
@@ -767,11 +767,11 @@
767
768 /* The following temp-tables are used to hold information needed for
769 ** the import.
770 **
771 ** The XMARK table provides a mapping from fast-import "marks" and symbols
772 ** into artifact ids (UUIDs - the 40-byte hex SHA1 hash of artifacts).
773 ** Given any valid fast-import symbol, the corresponding fossil rid and
774 ** uuid can found by searching against the xmark.tname field.
775 **
776 ** The XBRANCH table maps commit marks and symbols into the branch those
777 ** commits belong to. If xbranch.tname is a fast-import symbol for a
778
--- src/import.c
+++ src/import.c
@@ -12,11 +12,11 @@
12 ** Author contact information:
13 ** [email protected]
14 **
15 *******************************************************************************
16 **
17 ** This file contains code used to import the content of a Git
18 ** repository in the git-fast-import format as a new Fossil
19 ** repository.
20 */
21 #include "config.h"
22 #include "import.h"
@@ -24,11 +24,11 @@
24
25 #if INTERFACE
26 /*
27 ** A single file change record.
28 */
29 struct ImportFile {
30 char *zName; /* Name of a file */
31 char *zUuid; /* UUID of the file */
32 char *zPrior; /* Prior name if the name was changed */
33 char isFrom; /* True if obtained from the parent */
34 char isExe; /* True if executable */
@@ -80,11 +80,11 @@
80
81 /*
82 ** A no-op "xFinish" method
83 */
84 static void finish_noop(void){}
85
86 /*
87 ** Deallocate the state information.
88 **
89 ** The azMerge[] and aFile[] arrays are zeroed by allocated space is
90 ** retained unless the freeAll flag is set.
@@ -152,16 +152,16 @@
152 rid = db_last_insert_rowid();
153 }
154 if( zMark ){
155 db_multi_exec(
156 "INSERT OR IGNORE INTO xmark(tname, trid, tuuid)"
157 "VALUES(%Q,%d,%B)",
158 zMark, rid, &hash
159 );
160 db_multi_exec(
161 "INSERT OR IGNORE INTO xmark(tname, trid, tuuid)"
162 "VALUES(%B,%d,%B)",
163 &hash, rid, &hash
164 );
165 }
166 if( saveUuid ){
167 fossil_free(gg.zPrevCheckin);
@@ -182,11 +182,11 @@
182 blob_reset(&content);
183 import_reset(0);
184 }
185
186 /*
187 ** Use data accumulated in gg from a "tag" record to add a new
188 ** control artifact to the BLOB table.
189 */
190 static void finish_tag(void){
191 Blob record, cksum;
192 if( gg.zDate && gg.zTag && gg.zFrom && gg.zUser ){
@@ -223,11 +223,11 @@
223
224 /* Forward reference */
225 static void import_prior_files(void);
226
227 /*
228 ** Use data accumulated in gg from a "commit" record to add a new
229 ** manifest artifact to the BLOB table.
230 */
231 static void finish_commit(void){
232 int i;
233 char *zFromBranch;
@@ -410,11 +410,11 @@
410 int rid;
411 ManifestFile *pOld;
412 ImportFile *pNew;
413 if( gg.fromLoaded ) return;
414 gg.fromLoaded = 1;
415 if( gg.zFrom==0 && gg.zPrevCheckin!=0
416 && fossil_strcmp(gg.zBranch, gg.zPrevBranch)==0
417 ){
418 gg.zFrom = gg.zPrevCheckin;
419 gg.zPrevCheckin = 0;
420 }
@@ -456,11 +456,11 @@
456
457 /*
458 ** Dequote a fast-export filename. Filenames are normally unquoted. But
459 ** if the contain some obscure special characters, quotes might be added.
460 */
461 static void dequote_git_filename(char *zName){
462 int n, i, j;
463 if( zName==0 || zName[0]!='"' ) return;
464 n = (int)strlen(zName);
465 if( zName[n-1]!='"' ) return;
466 for(i=0, j=1; j<n-1; j++){
@@ -621,11 +621,11 @@
621 if( pFile==0 ){
622 pFile = import_add_file();
623 pFile->zName = fossil_strdup(zName);
624 }
625 pFile->isExe = (fossil_strcmp(zPerm, "100755")==0);
626 pFile->isLink = (fossil_strcmp(zPerm, "120000")==0);
627 fossil_free(pFile->zUuid);
628 pFile->zUuid = resolve_committish(zUuid);
629 pFile->isFrom = 0;
630 }else
631 if( memcmp(zLine, "D ", 2)==0 ){
@@ -767,11 +767,11 @@
767
768 /* The following temp-tables are used to hold information needed for
769 ** the import.
770 **
771 ** The XMARK table provides a mapping from fast-import "marks" and symbols
772 ** into artifact ids (UUIDs - the 40-byte hex SHA1 hash of artifacts).
773 ** Given any valid fast-import symbol, the corresponding fossil rid and
774 ** uuid can found by searching against the xmark.tname field.
775 **
776 ** The XBRANCH table maps commit marks and symbols into the branch those
777 ** commits belong to. If xbranch.tname is a fast-import symbol for a
778

Keyboard Shortcuts

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