1 |
slords |
1.1 |
Index: field.c |
2 |
|
|
=================================================================== |
3 |
|
|
RCS file: /cvsroot/wv/field.c,v |
4 |
|
|
retrieving revision 1.19 |
5 |
|
|
retrieving revision 1.20 |
6 |
|
|
diff -u -r1.19 -r1.20 |
7 |
|
|
--- field.c 29 Dec 2002 16:37:00 -0000 1.19 |
8 |
|
|
+++ field.c 5 Jul 2004 18:10:03 -0000 1.20 |
9 |
|
|
@@ -98,18 +98,21 @@ |
10 |
|
|
case 1: |
11 |
|
|
sprintf (temp, "%d", current->tm_mon+1); |
12 |
|
|
strcat (timestr, temp); |
13 |
|
|
+ consumed += strlen (temp); |
14 |
|
|
break; |
15 |
|
|
case 2: |
16 |
|
|
strcat (timestr, "%m"); |
17 |
|
|
+ consumed += 2; |
18 |
|
|
break; |
19 |
|
|
case 3: |
20 |
|
|
strcat (timestr, "%b"); |
21 |
|
|
+ consumed += 2; |
22 |
|
|
break; |
23 |
|
|
default: |
24 |
|
|
strcat (timestr, "%B"); |
25 |
|
|
+ consumed += 2; |
26 |
|
|
break; |
27 |
|
|
} |
28 |
|
|
- consumed += 2; |
29 |
|
|
break; |
30 |
|
|
case 's': |
31 |
|
|
case 'S': |
32 |
|
|
@@ -139,6 +142,7 @@ |
33 |
|
|
case 1: |
34 |
|
|
consumed += sprintf (temp, "%d", current->tm_wday); |
35 |
|
|
strcat (timestr, temp); |
36 |
|
|
+ consumed += strlen (temp); |
37 |
|
|
break; |
38 |
|
|
case 2: |
39 |
|
|
strcat (timestr, "%d"); |
40 |
|
|
@@ -182,12 +186,13 @@ |
41 |
|
|
case 1: |
42 |
|
|
sprintf (temp, "%d", current->tm_hour % 12); |
43 |
|
|
strcat (timestr, temp); |
44 |
|
|
+ consumed += strlen (temp); |
45 |
|
|
break; |
46 |
|
|
default: |
47 |
|
|
strcat (timestr, "%I"); |
48 |
|
|
+ consumed += 2; |
49 |
|
|
break; |
50 |
|
|
} |
51 |
|
|
- consumed += 2; |
52 |
|
|
break; |
53 |
|
|
case 'H': |
54 |
|
|
no = lookahead (token, 'H', 'H'); |
55 |
|
|
@@ -197,6 +202,7 @@ |
56 |
|
|
case 1: |
57 |
|
|
consumed += sprintf (temp, "%d", current->tm_hour); |
58 |
|
|
strcat (timestr, temp); |
59 |
|
|
+ consumed += strlen (temp); |
60 |
|
|
break; |
61 |
|
|
default: |
62 |
|
|
strcat (timestr, "%H"); |
63 |
|
|
@@ -212,6 +218,7 @@ |
64 |
|
|
case 1: |
65 |
|
|
consumed += sprintf (temp, "%d", current->tm_min); |
66 |
|
|
strcat (timestr, temp); |
67 |
|
|
+ consumed += strlen (temp); |
68 |
|
|
break; |
69 |
|
|
default: |
70 |
|
|
strcat (timestr, "%M"); |