1
0
mirror of https://github.com/unrealircd/unrealircd.git synced 2026-07-01 13:26:38 +02:00
Files
unrealircd/src/win32/compilerhelp.c
T
stskeeps 4d5d474bbd +- Removed SJOIN/SJOIN2 support in SJOIN
+- Fixed a +f bug, found by NiQuiL
+- Applied McSkaf's winlocal.patch, seems to work ok, fixed some problems
+  though in unix/win32 (cptr->fd can be -3. Should fix some READ ERRORS as
+  well. McSkaf, do me a favour and remove all of the C++ comments in the
+  source (//) or modify them to /* */
2001-05-01 15:03:07 +00:00

56 lines
1.1 KiB
C

/*
*
* A helper program for the compilation process
*
*/
/* x,y,z,w
* | | | `-- private build
* | | `---- release build
* | `------ minor version
* `-------- major version
*/
#include <stdio.h>
void main(int argc,char *argv[])
{
FILE *openme;
char inbuf[512];
int i,pb=0,rb=0,mi=0,ma=0;
if (argc == 1)
exit(-1);
if ((openme = fopen(argv[1],"r+"))==NULL)
{
printf("error\n");
exit(-1);
}
fscanf(openme,"%s %s %d\n",inbuf,inbuf,&pb); /*Read Buffer*/
fscanf(openme,"%s %s %d\n",inbuf,inbuf,&rb);
fscanf(openme,"%s %s %d\n",inbuf,inbuf,&mi);
fscanf(openme,"%s %s %d\n",inbuf,inbuf,&ma);
pb++;
if (argc > 2)
if (atoi(argv[2])==0) /*Public Build*/
rb++;
printf("new version = %d,%d,%d,%d",ma,mi,rb,pb);
rewind(openme);
fprintf(openme,"#define pb %d\n",pb); /*Write Buffer*/
fprintf(openme,"#define rb %d\n",rb);
fprintf(openme,"#define mi %d\n",mi);
fprintf(openme,"#define ma %d\n",ma);
fprintf(openme,"#define vFILEVERSION ma,mi,rb,pb\n#define vPRODUCTVERSION ma,mi,0,0\n#define vDISPFILEVERSION \"%d,%d,%d,%d\\0\"\n#define vSUBBUILD \"%d\\0\"\n",ma,mi,rb,pb,pb);
fclose(openme);
}