aboutsummaryrefslogtreecommitdiffstats
path: root/games/uox3/files/patch-af
blob: 2b08b09c233693adb6eaca00dc551f5a5bfdea2c (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
--- work/dev/archive.cpp.orig   Tue Feb  9 00:14:28 1999
+++ work/dev/archive.cpp    Sun Feb 27 10:50:19 2000
@@ -44,6 +44,11 @@
 //
 #include "uox3.h"
 
+void _itoa(char *a, int b, int c)
+{
+   sprintf(a, "%d", b);
+}
+
 void fileArchive(char *pFile2Archive, char *pArchiveDir)
 {
    char ext[255] = "";
@@ -98,7 +103,7 @@
    ptime = localtime(&mytime);
 
 // Create the 4 digit year date
-   _itoa((ptime->tm_year + 1900), intdate, 10);
+   _itoa(intdate, (ptime->tm_year + 1900), 10);
    strcpy(archiveid, intdate);
 
 // Create the 3 digit day of the year date
@@ -107,7 +112,7 @@
        strcpy(temp, "0");
    if (ptime->tm_yday < 100)
        strcpy(temp, "00");
-   _itoa(ptime->tm_yday, intdate, 10);
+   _itoa(intdate, ptime->tm_yday, 10);
    strcat(temp, intdate);
    strcat(archiveid, temp); 
 
@@ -116,7 +121,7 @@
    strcpy(temp, "");
    if (ptime->tm_hour < 10)
        strcpy(temp, "0");
-   _itoa(ptime->tm_hour, intdate, 10);
+   _itoa(intdate, ptime->tm_hour, 10);
    strcat(temp, intdate);
    strcat(archiveid, temp); 
 
@@ -124,7 +129,7 @@
    strcpy(temp, "");
    if (ptime->tm_min < 10)
        strcpy(temp, "0");
-   _itoa(ptime->tm_min, intdate, 10);
+   _itoa(intdate, ptime->tm_min, 10);
    strcat(temp, intdate);
    strcat(archiveid, temp); 
 
@@ -132,7 +137,7 @@
    strcpy(temp, "");
    if (ptime->tm_sec < 10)
        strcpy(temp, "0");
-   _itoa(ptime->tm_sec, intdate, 10);
+   _itoa(intdate, ptime->tm_sec, 10);
    strcat(temp, intdate);
    strcat(archiveid, temp);