Fossil

Check-in [ae85ba15]
Login

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

Overview
Comment:Simplify the mkversion changes from the previous commit.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: ae85ba156cae59e2aa6037c74df555c66417002f
User & Date: mistachkin 2012-08-30 02:04:19
Context
2012-08-30
12:05
Fix overzealous identification of no-op merges that are not really no-ops. check-in: efba2bc1 user: drh tags: trunk
08:55
proposed fix for [c8c0b78c84]. And - bonus - allow a BOM in the --args file check-in: 95f21243 user: jan.nijtmans tags: ticket-c8c0b78c84
07:03
merge trunk check-in: 0387251b user: jan.nijtmans tags: eclipse-project
02:04
Simplify the mkversion changes from the previous commit. check-in: ae85ba15 user: mistachkin tags: trunk
01:56
Support setting the binary file/product versions in the Win32 resources. check-in: 6b8ef6a4 user: mistachkin tags: trunk
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to src/mkversion.c.

11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
..
53
54
55
56
57
58
59

60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
#include <string.h>

int main(int argc, char *argv[]){
    FILE *m,*u,*v;
    char *z;
    int i, x, d;
    char b[1000];
    char b2[1000];
    char vx[1000];
    memset(b,0,sizeof(b));
    memset(b2,0,sizeof(b2));
    memset(vx,0,sizeof(vx));
    u = fopen(argv[1],"r");
    fgets(b, sizeof(b)-1,u);
    fclose(u);
    for(z=b; z[0] && z[0]!='\r' && z[0]!='\n'; z++){}
    *z = 0;
    printf("#define MANIFEST_UUID \"%s\"\n",b);
................................................................................
        x = 0;
        if( z[0]==0 ) break;
      }
      z++;
    }
    for(z=vx; z[0]=='0'; z++){}
    printf("#define RELEASE_VERSION_NUMBER %s\n", z);

    strcpy(b2,b);
    d = 0;
    for(z=b2; z[0]; z++){
      if( z[0]!='.' ) continue;
      if ( d<3 ){
        z[0] = ',';
        d++;
      }else{
        z[0] = '\0';
        break;
      }
    }
    printf("#define RELEASE_RESOURCE_VERSION %s", b2);
    while( d<3 ){ printf(",0"); d++; }
    printf("\n");
    return 0;
}







<


<







 







>
|

|









|




11
12
13
14
15
16
17

18
19

20
21
22
23
24
25
26
..
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
#include <string.h>

int main(int argc, char *argv[]){
    FILE *m,*u,*v;
    char *z;
    int i, x, d;
    char b[1000];

    char vx[1000];
    memset(b,0,sizeof(b));

    memset(vx,0,sizeof(vx));
    u = fopen(argv[1],"r");
    fgets(b, sizeof(b)-1,u);
    fclose(u);
    for(z=b; z[0] && z[0]!='\r' && z[0]!='\n'; z++){}
    *z = 0;
    printf("#define MANIFEST_UUID \"%s\"\n",b);
................................................................................
        x = 0;
        if( z[0]==0 ) break;
      }
      z++;
    }
    for(z=vx; z[0]=='0'; z++){}
    printf("#define RELEASE_VERSION_NUMBER %s\n", z);
    memset(vx,0,sizeof(vx));
    strcpy(vx,b);
    d = 0;
    for(z=vx; z[0]; z++){
      if( z[0]!='.' ) continue;
      if ( d<3 ){
        z[0] = ',';
        d++;
      }else{
        z[0] = '\0';
        break;
      }
    }
    printf("#define RELEASE_RESOURCE_VERSION %s", vx);
    while( d<3 ){ printf(",0"); d++; }
    printf("\n");
    return 0;
}