sources/version.cpp

changeset 3
592845e6f9e8
parent 2
8be472cb0bca
child 4
ec5387e121fa
equal deleted inserted replaced
2:8be472cb0bca 3:592845e6f9e8
43 { 43 {
44 static char buffer[128] = {0}; 44 static char buffer[128] = {0};
45 45
46 if (buffer[0] == '\0') 46 if (buffer[0] == '\0')
47 { 47 {
48 char* ptr = &buffer[0];
49 snprintf (ptr, sizeof buffer - (ptr - buffer), "%s-%s", version_string(), HG_NODE);
50
51 if (strcmp (HG_BRANCH, "default") != 0) 48 if (strcmp (HG_BRANCH, "default") != 0)
52 snprintf (ptr, sizeof buffer - (ptr - buffer), " (%s)", HG_BRANCH); 49 snprintf (buffer, "%s-%s (%s)", version_string(), HG_NODE, HG_BRANCH);
50 else
51 snprintf (buffer, "%s-%s", version_string(), HG_NODE);
53 } 52 }
54 53
55 return buffer; 54 return buffer;
56 } 55 }
57 56

mercurial