/[pcsx2_0.9.7]/trunk/fps2bios/romver.c
ViewVC logotype

Contents of /trunk/fps2bios/romver.c

Parent Directory Parent Directory | Revision Log Revision Log


Revision 31 - (show annotations) (download)
Tue Sep 7 03:24:11 2010 UTC (9 years, 2 months ago) by william
File MIME type: text/plain
File size: 709 byte(s)
committing r3113 initial commit again...
1 #include <stdio.h>
2 #include <string.h>
3 #include <stdlib.h>
4 #include <ctype.h>
5 #include <sys/types.h>
6 #include <sys/stat.h>
7 #include <time.h>
8
9 int main(int argc, char *argv[]) {
10 char str[256];
11 FILE *f;
12 time_t t;
13 int version;
14 int build;
15
16 printf("fps2bios romver generator\n");
17 if (argc < 3){
18 printf("usage: %s version build\n", argv[0]);
19 return 1;
20 }
21 f = fopen("ROMVER", "wb");
22 if (f == NULL) {
23 printf("failed to create ROMVER\n");
24 return 1;
25 }
26
27 t = time(NULL);
28 strftime(str, 256, "%Y%m%d", localtime(&t));
29 version = strtol(argv[1], (char**)NULL, 0);
30 build = strtol(argv[2], (char**)NULL, 0);
31 fprintf(f, "%2.2d%2.2dPD%s\n", version, build, str);
32 fputc(0, f);
33
34 fclose(f);
35
36 return 0;
37 }

  ViewVC Help
Powered by ViewVC 1.1.22