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
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
|
*** src/histadd.c.orig Tue Aug 17 01:17:01 1999
--- src/histadd.c Tue Aug 17 01:22:06 1999
***************
*** 13,22 ****
time_t timedate;
struct tm *my_tm;
char pdate[46];
- int cx, cy, cz;
char *halves[] = { "AM", "PM" };
int half = 0;
- char buf[ 1024 ];
char *filename;
int file;
--- 13,20 ----
***************
*** 53,84 ****
write( file, pdate, strlen( pdate ) );
! strcpy( buf, "" );
! cy = cz = 0;
! for( cx = 0; cx < strlen( strings[ 2 ] ); cx ++ )
! {
! cy ++;
! if( strings[ 2 ][cx] == '\n' || cy == 70 ||
! ( cy >= 60 && strings[ 2 ][cx] == ' ' ) )
! {
! write( file, ( strings[ 2 ] + cz ), cy );
! if( cy >= 60 && cy != 70 )
! {
! write( file, "\n", 1 );
! }
! if( cy == 70 )
! {
! write( file, "-\n", 2 );
! }
! cz += cy;
! cy = 0;
! }
! }
!
! if( cz != strlen( strings[ 2 ] ) )
! {
! write( file, ( strings[ 2 ] + cz ), strlen( strings[ 2 ] ) - cz );
! }
write( file, "\n", 1 );
--- 51,57 ----
write( file, pdate, strlen( pdate ) );
! write( file, strings[ 2 ], strlen( strings[ 2 ] ) );
write( file, "\n", 1 );
***************
*** 92,101 ****
time_t timedate;
struct tm *my_tm;
char pdate[42];
- int cx, cy, cz;
char *halves[] = { "AM", "PM" };
int half = 0;
- char buf[ 1024 ];
char *filename;
int file;
--- 65,72 ----
***************
*** 132,163 ****
write( file, pdate, strlen( pdate ) );
! strcpy( buf, "" );
! cy = cz = 0;
! for( cx = 0; cx < strlen( strings[ 2 ] ); cx ++ )
! {
! cy ++;
! if( strings[ 2 ][cx] == '\n' || cy == 70 ||
! ( cy >= 60 && strings[ 2 ][cx] == ' ' ) )
! {
! write( file, ( strings[ 2 ] + cz ), cy );
! if( cy >= 60 && cy != 70 )
! {
! write( file, "\n", 1 );
! }
! if( cy == 70 )
! {
! write( file, "-\n", 2 );
! }
! cz += cy;
! cy = 0;
! }
! }
!
! if( cz != strlen( strings[ 2 ] ) )
! {
! write( file, ( strings[ 2 ] + cz ), strlen( strings[ 2 ] ) - cz );
! }
write( file, "\n", 1 );
--- 103,109 ----
write( file, pdate, strlen( pdate ) );
! write( file, strings[ 2 ], strlen( strings[ 2 ] ) );
write( file, "\n", 1 );
|