1 |
ssuominen 11/03/30 22:49:50 |
2 |
|
3 |
Added: jpilot-mail-0.1.7.patch |
4 |
Log: |
5 |
move from jpilot-Mail |
6 |
|
7 |
(Portage version: 2.2.0_alpha29/cvs/Linux x86_64) |
8 |
|
9 |
Revision Changes Path |
10 |
1.1 app-pda/jpilot-mail/files/jpilot-mail-0.1.7.patch |
11 |
|
12 |
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/app-pda/jpilot-mail/files/jpilot-mail-0.1.7.patch?rev=1.1&view=markup |
13 |
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/app-pda/jpilot-mail/files/jpilot-mail-0.1.7.patch?rev=1.1&content-type=text/plain |
14 |
|
15 |
Index: jpilot-mail-0.1.7.patch |
16 |
=================================================================== |
17 |
diff -Nru jpilot-Mail-0.1.7.orig/src/connect.c jpilot-Mail-0.1.7/src/connect.c |
18 |
--- jpilot-Mail-0.1.7.orig/src/connect.c 2003-01-11 17:52:28.000000000 +0200 |
19 |
+++ jpilot-Mail-0.1.7/src/connect.c 2007-01-02 11:43:09.000000000 +0200 |
20 |
@@ -24,7 +24,7 @@ |
21 |
if(inet_aton(ip, &ia)){ |
22 |
mxip_addr mxip; |
23 |
|
24 |
- mxip.name = g_strdup(ip); |
25 |
+ mxip.name = (guchar*)g_strdup(ip); |
26 |
mxip.pref = 0; |
27 |
mxip.ip = (guint32) *(guint32 *)(&ia); |
28 |
list = g_list_append(list, g_memdup(&mxip, sizeof(mxip))); |
29 |
diff -Nru jpilot-Mail-0.1.7.orig/src/lookup.c jpilot-Mail-0.1.7/src/lookup.c |
30 |
--- jpilot-Mail-0.1.7.orig/src/lookup.c 2002-06-27 21:36:26.000000000 +0300 |
31 |
+++ jpilot-Mail-0.1.7/src/lookup.c 2007-01-02 11:43:48.000000000 +0200 |
32 |
@@ -325,7 +325,7 @@ |
33 |
mxip_addr mxip; |
34 |
mxip.ip = *(guint32 *)(haddr); |
35 |
mxip.pref = 0; |
36 |
- mxip.name = g_strdup(hent->h_name); |
37 |
+ mxip.name = (guchar*)g_strdup(hent->h_name); |
38 |
list = g_list_append(list, g_memdup(&mxip, sizeof(mxip))); |
39 |
} |
40 |
} |
41 |
diff -Nru jpilot-Mail-0.1.7.orig/src/mail.c jpilot-Mail-0.1.7/src/mail.c |
42 |
--- jpilot-Mail-0.1.7.orig/src/mail.c 2004-07-18 21:06:42.000000000 +0300 |
43 |
+++ jpilot-Mail-0.1.7/src/mail.c 2007-01-02 12:15:30.000000000 +0200 |
44 |
@@ -56,7 +56,7 @@ |
45 |
static int show_category = 0; |
46 |
static int glob_row_selected; |
47 |
|
48 |
-static struct MyMail *glob_mymail_list = NULL; |
49 |
+struct MyMail *glob_mymail_list = NULL; |
50 |
|
51 |
struct Preferences prefs; |
52 |
struct MailSyncPref mailSyncPref; |
53 |
@@ -75,6 +75,8 @@ |
54 |
*minor_version = 99; |
55 |
} |
56 |
|
57 |
+void multibyte_safe_strncpy(char *dst, char *src, size_t len); |
58 |
+ |
59 |
static void free_mymail_list(struct MyMail **ppM) |
60 |
{ |
61 |
struct MyMail *pM, *next_pM; |
62 |
@@ -195,7 +197,7 @@ |
63 |
if (fptr) |
64 |
{ |
65 |
gchar *line = NULL; |
66 |
- gint line_size = 0; |
67 |
+ size_t line_size = 0; |
68 |
|
69 |
while (!feof(fptr)) |
70 |
{ |
71 |
@@ -1001,7 +1003,7 @@ |
72 |
|
73 |
if (size > 0) |
74 |
{ |
75 |
- char *buf = g_malloc(size); |
76 |
+ unsigned char *buf = g_malloc(size); |
77 |
|
78 |
if (buf) |
79 |
{ |
80 |
@@ -1030,7 +1032,7 @@ |
81 |
if (size > 0) |
82 |
{ |
83 |
buf_rec br; |
84 |
- char *buf = g_malloc(size); |
85 |
+ unsigned char *buf = g_malloc(size); |
86 |
|
87 |
if (buf) |
88 |
{ |
89 |
@@ -1212,7 +1214,7 @@ |
90 |
|
91 |
temp_str = malloc((len = strlen(mai.category.name[i])*2+1)); |
92 |
multibyte_safe_strncpy(temp_str, mai.category.name[i], len); |
93 |
- jp_charset_p2j(temp_str, len); |
94 |
+ jp_charset_p2j((unsigned char *)temp_str, len); |
95 |
categories[i] = temp_str; |
96 |
} |
97 |
categories[i] = NULL; |
98 |
diff -Nru jpilot-Mail-0.1.7.orig/src/mail_get.c jpilot-Mail-0.1.7/src/mail_get.c |
99 |
--- jpilot-Mail-0.1.7.orig/src/mail_get.c 2004-07-18 20:31:28.000000000 +0300 |
100 |
+++ jpilot-Mail-0.1.7/src/mail_get.c 2007-01-02 12:16:29.000000000 +0200 |
101 |
@@ -68,7 +68,7 @@ |
102 |
{ |
103 |
GList *id_list = NULL; |
104 |
gchar *line = NULL; |
105 |
- gint line_size = 0; |
106 |
+ size_t line_size = 0; |
107 |
|
108 |
while (!feof(fptr)) |
109 |
{ |
110 |
@@ -179,7 +179,7 @@ |
111 |
{ |
112 |
FILE *in; |
113 |
char *line = NULL; |
114 |
- gint line_size = 0; |
115 |
+ size_t line_size = 0; |
116 |
GList *id_list = read_msgids(); |
117 |
|
118 |
// conf.debug_level = 5; |
119 |
diff -Nru jpilot-Mail-0.1.7.orig/src/mail_send.c jpilot-Mail-0.1.7/src/mail_send.c |
120 |
--- jpilot-Mail-0.1.7.orig/src/mail_send.c 2004-04-29 20:27:48.000000000 +0300 |
121 |
+++ jpilot-Mail-0.1.7/src/mail_send.c 2007-01-02 12:16:58.000000000 +0200 |
122 |
@@ -233,7 +233,7 @@ |
123 |
|
124 |
if (pMail->mail.body != NULL) |
125 |
{ |
126 |
- guchar *p = pMail->mail.body; |
127 |
+ gchar *p = pMail->mail.body; |
128 |
|
129 |
while (*p) |
130 |
{ |
131 |
diff -Nru jpilot-Mail-0.1.7.orig/src/mbox.c jpilot-Mail-0.1.7/src/mbox.c |
132 |
--- jpilot-Mail-0.1.7.orig/src/mbox.c 2004-04-17 19:24:15.000000000 +0300 |
133 |
+++ jpilot-Mail-0.1.7/src/mbox.c 2007-01-02 11:49:55.000000000 +0200 |
134 |
@@ -25,7 +25,8 @@ |
135 |
gboolean mbox_read(message * msg, FILE * in, gchar ** from_line, int max_size) |
136 |
{ |
137 |
gchar *line = NULL; |
138 |
- gint line_size = 0, line_cnt = 0; |
139 |
+// gint line_size = 0, line_cnt = 0; |
140 |
+ size_t line_size = 0; |
141 |
gint data_size = 0; |
142 |
gboolean in_headers = TRUE; |
143 |
int l_no = 1; |
144 |
@@ -91,7 +92,7 @@ |
145 |
msg->data_list = g_list_append(msg->data_list, g_strdup(line)); |
146 |
data_size += strlen(line); |
147 |
} |
148 |
- line_cnt++; |
149 |
+// line_cnt++; |
150 |
} |
151 |
} |
152 |
|
153 |
diff -Nru jpilot-Mail-0.1.7.orig/src/smtp_out.c jpilot-Mail-0.1.7/src/smtp_out.c |
154 |
--- jpilot-Mail-0.1.7.orig/src/smtp_out.c 2003-01-11 17:52:28.000000000 +0200 |
155 |
+++ jpilot-Mail-0.1.7/src/smtp_out.c 2007-01-02 12:11:27.000000000 +0200 |
156 |
@@ -66,7 +66,7 @@ |
157 |
gchar *set_heloname(smtp_base *psb, gchar *default_name, gboolean do_correct) |
158 |
{ |
159 |
struct sockaddr_in sname; |
160 |
- int len = sizeof(struct sockaddr_in); |
161 |
+ socklen_t len = sizeof(struct sockaddr_in); |
162 |
struct hostent *host_entry; |
163 |
|
164 |
if(do_correct){ |
165 |
@@ -479,11 +479,11 @@ |
166 |
if((addr = connect_resolvelist(&sock, host, port, resolve_list))){ |
167 |
/* create structure to hold status data: */ |
168 |
psb = create_smtpbase(sock); |
169 |
- psb->remote_host = addr->name; |
170 |
+ psb->remote_host = (gchar*)addr->name; |
171 |
|
172 |
DEBUG(5){ |
173 |
struct sockaddr_in name; |
174 |
- int len = sizeof(struct sockaddr); |
175 |
+ socklen_t len = sizeof(struct sockaddr); |
176 |
getsockname(sock, (struct sockaddr *)(&name), &len); |
177 |
debugf("socket: name.sin_addr = %s\n", inet_ntoa(name.sin_addr)); |
178 |
} |
179 |
diff -Nru jpilot-Mail-0.1.7.orig/src/utils.h jpilot-Mail-0.1.7/src/utils.h |
180 |
--- jpilot-Mail-0.1.7.orig/src/utils.h 2002-06-27 21:36:26.000000000 +0300 |
181 |
+++ jpilot-Mail-0.1.7/src/utils.h 2007-01-02 11:28:45.000000000 +0200 |
182 |
@@ -21,4 +21,6 @@ |
183 |
|
184 |
int get_home_file_name(char *file, char *full_name, int max_size); |
185 |
|
186 |
+extern void multibyte_safe_strncpy(char *dst, char *src, size_t len); |
187 |
+ |
188 |
#endif |