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
112
113
114
115
116
117
118
119
120
121
122
123
124
125
|
*** os_bsd.c.orig Mon Apr 15 17:46:29 1996
--- pine3.93/imap/non-ANSI/c-client/os_bsd.c Mon Apr 15 14:02:14 1996
***************
*** 67,72 ****
--- 67,74 ----
#include "memmove.c"
#include "strerror.c"
#include "strstr.c"
+ #ifndef ibm032
#include "strtol.c"
+ #endif /* !ibm032 */
#include "strtoul.c"
#include "tz_bsd.c"
*** os_bsd.h.orig Mon Apr 15 17:46:31 1996
--- pine3.93/imap/non-ANSI/c-client/os_bsd.h Mon Apr 15 13:45:22 1996
***************
*** 40,46 ****
--- 40,48 ----
#include <fcntl.h>
#include <syslog.h>
#include <sys/file.h>
+ #ifndef ibm032
#include <machine/endian.h> /* needed for htons() prototypes */
+ #endif /* !ibm032 */
char *getenv ();
*** tz_bsd.c.orig Mon Apr 15 17:46:32 1996
--- pine3.93/imap/non-ANSI/c-client/tz_bsd.c Mon Apr 15 16:22:38 1996
***************
*** 42,47 ****
--- 42,61 ----
char *s;
void *t;
{
+ #ifndef ibm032
/* append timezone from tm struct */
sprintf (s + strlen (s)," (%s)",((struct tm *) t)->tm_zone);
+ #else
+ struct timeval tv;
+ struct timezone tz;
+
+ (void)memset((char *)&tv, 0, sizeof(tv));
+ (void)memset((char *)&tz, 0, sizeof(tz));
+
+ if (gettimeofday(&tv, &tz) < 0)
+ return; /* Silent error. */
+
+ (void)sprintf(s + strlen(s), " (%s)",
+ timezone(tz.tz_minuteswest, tz.tz_dsttime));
+ #endif /* !ibm032 */
}
*** other.c.orig Mon Apr 15 17:47:02 1996
--- pine3.93/pine/other.c Mon Apr 15 15:18:02 1996
***************
*** 353,359 ****
pbuf.exittest = sigedit_exit_for_pico;
pbuf.upload = (ps_global->VAR_UPLOAD_CMD
&& ps_global->VAR_UPLOAD_CMD[0])
! ? upload_msg_to_pico : NULL;
pbuf.keybinit = init_keyboard;
pbuf.helper = helper;
pbuf.resize = resize_for_pico;
--- 353,359 ----
pbuf.exittest = sigedit_exit_for_pico;
pbuf.upload = (ps_global->VAR_UPLOAD_CMD
&& ps_global->VAR_UPLOAD_CMD[0])
! ? (int(*)())upload_msg_to_pico : NULL;
pbuf.keybinit = init_keyboard;
pbuf.helper = helper;
pbuf.resize = resize_for_pico;
*** send.c.orig Mon Apr 15 17:47:12 1996
--- pine3.93/pine/send.c Mon Apr 15 15:36:46 1996
***************
*** 1656,1662 ****
#else
pbuf.upload = (ps_global->VAR_UPLOAD_CMD
&& ps_global->VAR_UPLOAD_CMD[0])
! ? upload_msg_to_pico : NULL;
#endif
pbuf.raw_io = Raw;
--- 1656,1662 ----
#else
pbuf.upload = (ps_global->VAR_UPLOAD_CMD
&& ps_global->VAR_UPLOAD_CMD[0])
! ? (int (*)())upload_msg_to_pico : NULL;
#endif
pbuf.raw_io = Raw;
*** tempfile.orig Mon Apr 15 17:48:22 1996
--- pine3.93/pine/osdep/tempfile Mon Apr 15 15:39:52 1996
***************
*** 2,11 ****
--- 2,31 ----
Create a temporary file, the name of which we don't care about
and that goes away when it is closed. Just like ANSI C tmpfile.
----*/
+ #ifdef ibm032
+ #define FILENAMESIZE 20
+ #define FILETMPLATE "/tmp/ptmpXXXXXX"
+ #endif /* ibm032 */
+
FILE *
create_tmpfile()
{
+ #ifndef ibm032
return(tmpfile());
+ #else
+ char buf[FILENAMESIZE];
+ int fd;
+
+ (void)memset(buf, 0, FILENAMESIZE);
+ (void)strcpy(buf, FILETMPLATE);
+
+ if ((fd = mkstemp(buf)) < 0)
+ return(NULL);
+
+ (void)unlink(buf);
+
+ return(fdopen(fd, "w+"));
+ #endif /* !ibm032 */
}
|