mirror of
https://github.com/libretro/pcsx2.git
synced 2024-12-29 13:13:31 +00:00
4457fe40fc
git-svn-id: http://pcsx2.googlecode.com/svn/trunk@2897 96395faa-99c1-11dd-bbfe-3dabce05a288
38 lines
709 B
C
38 lines
709 B
C
#include <stdio.h>
|
|
#include <string.h>
|
|
#include <stdlib.h>
|
|
#include <ctype.h>
|
|
#include <sys/types.h>
|
|
#include <sys/stat.h>
|
|
#include <time.h>
|
|
|
|
int main(int argc, char *argv[]) {
|
|
char str[256];
|
|
FILE *f;
|
|
time_t t;
|
|
int version;
|
|
int build;
|
|
|
|
printf("fps2bios romver generator\n");
|
|
if (argc < 3){
|
|
printf("usage: %s version build\n", argv[0]);
|
|
return 1;
|
|
}
|
|
f = fopen("ROMVER", "wb");
|
|
if (f == NULL) {
|
|
printf("failed to create ROMVER\n");
|
|
return 1;
|
|
}
|
|
|
|
t = time(NULL);
|
|
strftime(str, 256, "%Y%m%d", localtime(&t));
|
|
version = strtol(argv[1], (char**)NULL, 0);
|
|
build = strtol(argv[2], (char**)NULL, 0);
|
|
fprintf(f, "%2.2d%2.2dPD%s\n", version, build, str);
|
|
fputc(0, f);
|
|
|
|
fclose(f);
|
|
|
|
return 0;
|
|
}
|