Differences From:
File
src/manifest.c
part of check-in
[dea1ae50d3]
- Relax the lexigraphical ordering requirement on manifests. Now the lines
of a manifest (or cluster or control file) must occur in lexigraphical order
after the arguments have been defossilized.
by
drh on
2007-09-23 11:43:40.
[view]
To:
File
src/manifest.c
part of check-in
[2ad378d065]
- Branching now working correctly, including adding of bgcolor tag and correct R line
by
jnc on
2007-09-23 15:02:58.
[view]
@@ -98,9 +98,9 @@
** and pContent is reset before the return.
*/
int manifest_parse(Manifest *p, Blob *pContent){
int seenHeader = 0;
- int i;
+ int i, lineNo=0;
Blob line, token, a1, a2, a3;
Blob selfuuid;
char cPrevType = 0;
@@ -116,8 +116,9 @@
blob_zero(&a2);
md5sum_init();
while( blob_line(pContent, &line) ){
char *z = blob_buffer(&line);
+ lineNo++;
if( z[0]=='-' ){
if( strncmp(z, "-----BEGIN PGP ", 15)!=0 ){
goto manifest_syntax_error;
}
@@ -250,10 +251,14 @@
*/
case 'T': {
char *zName, *zUuid, *zValue;
md5sum_step_text(blob_buffer(&line), blob_size(&line));
- if( blob_token(&line, &a1)==0 ) goto manifest_syntax_error;
- if( blob_token(&line, &a2)==0 ) goto manifest_syntax_error;
+ if( blob_token(&line, &a1)==0 ){
+ goto manifest_syntax_error;
+ }
+ if( blob_token(&line, &a2)==0 ){
+ goto manifest_syntax_error;
+ }
zName = blob_terminate(&a1);
zUuid = blob_terminate(&a2);
if( blob_token(&line, &a3)==0 ){
zValue = 0;
@@ -400,8 +405,9 @@
md5sum_init();
return 1;
manifest_syntax_error:
+ /*fprintf(stderr, "Manifest error on line %i\n", lineNo);fflush(stderr);*/
md5sum_init();
manifest_clear(p);
return 0;
}