Fossil

Check-in [ccc7724a]
Login

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:Fix some errors/inconsistancies in SYNTAX error messages
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1:ccc7724a511fad30331e4d77f609ce8858e72da8
User & Date: jan.nijtmans 2013-08-21 12:58:18
Original Comment: Fix some errors/inconsistancies in SYSTAX error messages
Context
2013-08-21
14:24
The undocumented feature of resolving RID-looking strings as RIDs has been changed to rid:### instead to avoid surprise, per ML discussion. check-in: 4c80aa2a user: stephan tags: trunk
12:58
Fix some errors/inconsistancies in SYNTAX error messages check-in: ccc7724a user: jan.nijtmans tags: trunk
07:45
Cluster artifacts with Q-card are invalid. Check for "cluster" artifacts first so all later code-paths can leave out the M-card check. Check for K-cards in the "ticket" section, so all later code-paths can leave out this check. Check for L-cards in the "wiki" section, so all later code-paths can leave out this check. This saves 9 code-lines while keeping equal functionality (except for the additional Q-card check in Clusters) check-in: 13e2c73a user: jan.nijtmans tags: trunk
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to src/manifest.c.

898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
    if( p->zAttachName ) SYNTAX("A-card in ticket");
    if( p->zMimetype) SYNTAX("N-card in ticket");
    if( !seenZ ) SYNTAX("missing Z-card in ticket");
    p->type = CFTYPE_TICKET;
  }else if( p->zEventId ){
    if( p->rDate<=0.0 ) SYNTAX("missing date for event");
    if( p->zWikiTitle!=0 ) SYNTAX("L-card in event");
    if( p->zWiki==0 ) SYNTAX("W-card in event");
    if( p->zAttachName ) SYNTAX("A-card in event");
    for(i=0; i<p->nTag; i++){
      if( p->aTag[i].zName[0]!='+' ) SYNTAX("propagating tag in event");
      if( p->aTag[i].zUuid!=0 ) SYNTAX("non-self-referential tag in event");
    }
    if( !seenZ ) SYNTAX("Z-card missing in event");
    p->type = CFTYPE_EVENT;
  }else if( p->zWiki!=0 || p->zWikiTitle!=0 ){
    if( p->rDate<=0.0 ) SYNTAX("date missing on wiki");
    if( p->nTag>0 ) SYNTAX("T-card in wiki");
    if( p->zWiki==0 ) SYNTAX("missing W-card in wiki");
    if( p->zWikiTitle==0 ) SYNTAX("L-card in wiki");
    if( p->zAttachName ) SYNTAX("A-card in wiki");
    if( !seenZ ) SYNTAX("missing Z-card on wiki");
    p->type = CFTYPE_WIKI;
  }else if( p->nTag>0 ){
    if( p->rDate<=0.0 ) SYNTAX("date missing on tag");
    if( p->nParent>0 ) SYNTAX("P-card on tag");
    if( p->zAttachName ) SYNTAX("A-card in tag");
    if( p->zMimetype ) SYNTAX("N-card in tag");
    if( !seenZ ) SYNTAX("missing Z-card on tag");
    for(i=0; i<p->nTag; i++){
      if( p->aTag[i].zUuid==0 ) SYNTAX("self-referential T-card in tag");
    }







|





|


|


|




|







898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
    if( p->zAttachName ) SYNTAX("A-card in ticket");
    if( p->zMimetype) SYNTAX("N-card in ticket");
    if( !seenZ ) SYNTAX("missing Z-card in ticket");
    p->type = CFTYPE_TICKET;
  }else if( p->zEventId ){
    if( p->rDate<=0.0 ) SYNTAX("missing date for event");
    if( p->zWikiTitle!=0 ) SYNTAX("L-card in event");
    if( p->zWiki==0 ) SYNTAX("missing W-card in event");
    if( p->zAttachName ) SYNTAX("A-card in event");
    for(i=0; i<p->nTag; i++){
      if( p->aTag[i].zName[0]!='+' ) SYNTAX("propagating tag in event");
      if( p->aTag[i].zUuid!=0 ) SYNTAX("non-self-referential tag in event");
    }
    if( !seenZ ) SYNTAX("missing Z-card in event");
    p->type = CFTYPE_EVENT;
  }else if( p->zWiki!=0 || p->zWikiTitle!=0 ){
    if( p->rDate<=0.0 ) SYNTAX("missing date on wiki");
    if( p->nTag>0 ) SYNTAX("T-card in wiki");
    if( p->zWiki==0 ) SYNTAX("missing W-card in wiki");
    if( p->zWikiTitle==0 ) SYNTAX("missing L-card in wiki");
    if( p->zAttachName ) SYNTAX("A-card in wiki");
    if( !seenZ ) SYNTAX("missing Z-card on wiki");
    p->type = CFTYPE_WIKI;
  }else if( p->nTag>0 ){
    if( p->rDate<=0.0 ) SYNTAX("missing date on tag");
    if( p->nParent>0 ) SYNTAX("P-card on tag");
    if( p->zAttachName ) SYNTAX("A-card in tag");
    if( p->zMimetype ) SYNTAX("N-card in tag");
    if( !seenZ ) SYNTAX("missing Z-card on tag");
    for(i=0; i<p->nTag; i++){
      if( p->aTag[i].zUuid==0 ) SYNTAX("self-referential T-card in tag");
    }