Personal tools
User menu

Difference between revisions of "Buildrev"

From Francois Louw

Jump to: navigation, search
 
Line 1: Line 1:
[http://aeif.info/files/buildrev/BuildRevision20121120.zip Downloan Windows executable with source] built with MinGW
+
[[Projects|Back To All Projects Page]]
  
This application is quite handy and small. It is coded in simple C. Every time it runs it reads the given header file and increments the number.
+
[[Main Page|Back To Main Page]]
 +
----
 +
[http://aeif.info/files/buildrev/BuildRevision20121120.zip Download Windows executable with source]
 +
 
 +
This application is quite handy and small. It is coded in simple C. Every time it runs it reads the given header file and increments the build number.
  
 
Please note that this program is very basic, and apart from file checking it does not do any other checking.
 
Please note that this program is very basic, and apart from file checking it does not do any other checking.
  
Usage of the program is '''buildrev build.h'''
+
Usage of the program is  
 +
<source lang="dos">
 +
buildrev.exe <filename.h>
 +
</source>
  
 
The format for the header file is as follows:
 
The format for the header file is as follows:
Line 13: Line 20:
  
 
The #define and the BUILD is not important and can be changed to  
 
The #define and the BUILD is not important and can be changed to  
<source lang="c">int build= 1</source>
+
<source lang="c">
 +
int build= 1
 +
</source>
  
 
'''The code looks for the third field (separated by space) and increases that value.'''
 
'''The code looks for the third field (separated by space) and increases that value.'''
  
Here is the [http://aeif.info/files/buildrev/buildrev.c code] released under the [http://aeif.info/gpl-3.0.txt GPL 3 license]
+
Here is the code released under the [http://aeif.info/gpl-3.0.txt GPL 3 license]
  
 
<source lang="c">
 
<source lang="c">
Line 46: Line 55:
 
if (f != NULL)
 
if (f != NULL)
 
{
 
{
fscanf(f, "%s %s %d",d, b, &i);
+
fscanf(f, "%s %s %d", d, b, &i);
 
fclose(f);
 
fclose(f);
 
f = NULL;
 
f = NULL;
 
} else
 
} else
 
{
 
{
printf("Build file not found, creating default");
+
printf("Build file not found, creating default\n");
 
strcpy(d, "#define");
 
strcpy(d, "#define");
 
strcpy(b, "BUILD");
 
strcpy(b, "BUILD");
Line 75: Line 84:
  
 
The code is pretty straightforward and does not need much explanation.
 
The code is pretty straightforward and does not need much explanation.
 +
 +
Please read [[Francois_Louw:Copyrights|here]] for more information on copyrights of my projects.

Latest revision as of 06:52, 18 April 2013