Commit 5171c0f9 5171c0f91ea69eacd76068661db628f46f267c9e by Sergey Poznyakoff

Minor fixes.

* .gitignore: Add pathdefs.h
* examples/Makefile.am (muauth_CPPFLAGS)
(muemail_CPPFLAGS): New variables.
* examples/argcv.c (main): Remove unused local.
* include/mailutils/gsasl.h [USE_GSASL]: Change to WITH_GSASL.
* include/mailutils/libcfg.h (mu_acl_cfg_init): New prototype.
* include/mailutils/mu_auth.h (mu_authenticate): Password is const.
* include/mailutils/python.h: Fix indentation.
(mu_py_script_data): module_name is const char *.
* libmu_auth/radius.c: Include radius/debug.h
* libproto/mailer/smtp.c: Include io.h and secret.h
* mail/mail.c: Fix indentation.
* mail/util.c (util_rfc2047_decode): Fix local variable declaration.
* mailbox/mu_auth.c (mu_authenticate): Password is const.
* mh/mh.h (mh_alias_get, mh_alias_get_address)
(mh_alias_get_alias): Name is const.
* mh/mh_alias.y: Likewise.
* mh/mh_list.c (print_header_value): Fix improper use of mu_toupper.
* mh/mh_whatnow.c (invoke): Add typecasts.
* python/libmu_py/nls.c (api_nls_set_locale): Remove unused automatic.
* python/libmu_py/sieve.c (_sieve_error_printer): Provide missing
return value.
(_sieve_debug_printer): Likewise.
1 parent b9aaf724
...@@ -24,4 +24,5 @@ config.status ...@@ -24,4 +24,5 @@ config.status
24 configure 24 configure
25 libtool 25 libtool
26 m4 26 m4
27 pathdefs.h
27 stamp-h1 28 stamp-h1
......
...@@ -123,12 +123,14 @@ lsf_LDADD = \ ...@@ -123,12 +123,14 @@ lsf_LDADD = \
123 @MU_AUTHLIBS@ \ 123 @MU_AUTHLIBS@ \
124 ${MU_LIB_MAILUTILS} 124 ${MU_LIB_MAILUTILS}
125 125
126 muauth_CPPFLAGS = @MU_APP_COMMON_INCLUDES@
126 muauth_LDADD = \ 127 muauth_LDADD = \
127 ${MU_APP_LIBRARIES}\ 128 ${MU_APP_LIBRARIES}\
128 ${MU_LIB_AUTH}\ 129 ${MU_LIB_AUTH}\
129 @MU_AUTHLIBS@ \ 130 @MU_AUTHLIBS@ \
130 ${MU_LIB_MAILUTILS} 131 ${MU_LIB_MAILUTILS}
131 132
133 muemail_CPPFLAGS = @MU_APP_COMMON_INCLUDES@
132 muemail_LDADD = \ 134 muemail_LDADD = \
133 ${MU_APP_LIBRARIES} \ 135 ${MU_APP_LIBRARIES} \
134 ${MU_LIB_MAILUTILS} 136 ${MU_LIB_MAILUTILS}
......
...@@ -28,12 +28,11 @@ ...@@ -28,12 +28,11 @@
28 #include <mailutils/errno.h> 28 #include <mailutils/errno.h>
29 29
30 int 30 int
31 main(int argc, char **argv) 31 main (int argc, char **argv)
32 { 32 {
33 char *delim = ""; 33 char *delim = "";
34 char *comment = "#"; 34 char *comment = "#";
35 char buf[512]; 35 char buf[512];
36 size_t n = 0;
37 36
38 while (fgets (buf, sizeof buf, stdin)) 37 while (fgets (buf, sizeof buf, stdin))
39 { 38 {
......
...@@ -156,6 +156,7 @@ pop_session_str (enum pop_session_status stat) ...@@ -156,6 +156,7 @@ pop_session_str (enum pop_session_status stat)
156 case pop_session_logged_in: 156 case pop_session_logged_in:
157 return "logged in"; 157 return "logged in";
158 } 158 }
159 return "unknown";
159 } 160 }
160 161
161 char * 162 char *
......
1 /* GNU Mailutils -- a suite of utilities for electronic mail 1 /* GNU Mailutils -- a suite of utilities for electronic mail
2 Copyright (C) 2003, 2004, 2005, 2007, 2008 Free Software Foundation, Inc. 2 Copyright (C) 2003, 2004, 2005, 2007, 2008,
3 2009 Free Software Foundation, Inc.
3 4
4 This library is free software; you can redistribute it and/or 5 This library is free software; you can redistribute it and/or
5 modify it under the terms of the GNU Lesser General Public 6 modify it under the terms of the GNU Lesser General Public
...@@ -32,7 +33,7 @@ int mu_gsasl_module_init (enum mu_gocs_op, void *); ...@@ -32,7 +33,7 @@ int mu_gsasl_module_init (enum mu_gocs_op, void *);
32 33
33 struct mu_gsasl_module_data mu_gsasl_module_data; 34 struct mu_gsasl_module_data mu_gsasl_module_data;
34 35
35 #ifdef USE_GSASL 36 #ifdef WITH_GSASL
36 #include <gsasl.h> 37 #include <gsasl.h>
37 38
38 int mu_gsasl_stream_create (mu_stream_t *stream, mu_stream_t transport, 39 int mu_gsasl_stream_create (mu_stream_t *stream, mu_stream_t transport,
......
1 /* GNU Mailutils -- a suite of utilities for electronic mail 1 /* GNU Mailutils -- a suite of utilities for electronic mail
2 Copyright (C) 2007, 2008 Free Software Foundation, Inc. 2 Copyright (C) 2007, 2008, 2009 Free Software Foundation, Inc.
3 3
4 This library is free software; you can redistribute it and/or 4 This library is free software; you can redistribute it and/or
5 modify it under the terms of the GNU Lesser General Public 5 modify it under the terms of the GNU Lesser General Public
...@@ -51,6 +51,7 @@ extern int mu_register_cfg_capa (const char *name, ...@@ -51,6 +51,7 @@ extern int mu_register_cfg_capa (const char *name,
51 extern void mu_libcfg_init (char **cnames); 51 extern void mu_libcfg_init (char **cnames);
52 extern int mu_parse_config_files (struct mu_cfg_param *param, 52 extern int mu_parse_config_files (struct mu_cfg_param *param,
53 void *target_ptr); 53 void *target_ptr);
54 extern void mu_acl_cfg_init (void);
54 55
55 #define __mu_common_cat2__(a,b) a ## b 56 #define __mu_common_cat2__(a,b) a ## b
56 #define __mu_common_cat3__(a,b,c) a ## b ## c 57 #define __mu_common_cat3__(a,b,c) a ## b ## c
......
1 /* GNU Mailutils -- a suite of utilities for electronic mail 1 /* GNU Mailutils -- a suite of utilities for electronic mail
2 Copyright (C) 2002, 2005, 2007, 2008 Free Software Foundation, Inc. 2 Copyright (C) 2002, 2005, 2007, 2008, 2009 Free Software Foundation, Inc.
3 3
4 This library is free software; you can redistribute it and/or 4 This library is free software; you can redistribute it and/or
5 modify it under the terms of the GNU Lesser General Public 5 modify it under the terms of the GNU Lesser General Public
...@@ -99,7 +99,7 @@ extern struct mu_auth_data * ...@@ -99,7 +99,7 @@ extern struct mu_auth_data *
99 mu_get_auth_by_uid (uid_t uid); 99 mu_get_auth_by_uid (uid_t uid);
100 100
101 extern int 101 extern int
102 mu_authenticate (struct mu_auth_data *auth_data, char *pass); 102 mu_authenticate (struct mu_auth_data *auth_data, const char *pass);
103 103
104 extern int mu_auth_nosupport (struct mu_auth_data **return_data, 104 extern int mu_auth_nosupport (struct mu_auth_data **return_data,
105 const void *key, 105 const void *key,
......
...@@ -25,107 +25,128 @@ ...@@ -25,107 +25,128 @@
25 extern "C" { 25 extern "C" {
26 #endif 26 #endif
27 27
28 typedef struct { 28 typedef struct
29 {
29 PyObject_HEAD; 30 PyObject_HEAD;
30 mu_address_t addr; 31 mu_address_t addr;
31 } PyAddress; 32 } PyAddress;
32 33
33 typedef struct { 34 typedef struct
35 {
34 PyObject_HEAD; 36 PyObject_HEAD;
35 mu_attribute_t attr; 37 mu_attribute_t attr;
36 } PyAttribute; 38 } PyAttribute;
37 39
38 typedef struct { 40 typedef struct
41 {
39 PyObject_HEAD; 42 PyObject_HEAD;
40 mu_authority_t auth; 43 mu_authority_t auth;
41 } PyAuthority; 44 } PyAuthority;
42 45
43 typedef struct { 46 typedef struct
47 {
44 PyObject_HEAD; 48 PyObject_HEAD;
45 mu_ticket_t ticket; 49 mu_ticket_t ticket;
46 } PyTicket; 50 } PyTicket;
47 51
48 typedef struct { 52 typedef struct
53 {
49 PyObject_HEAD; 54 PyObject_HEAD;
50 mu_wicket_t wicket; 55 mu_wicket_t wicket;
51 } PyWicket; 56 } PyWicket;
52 57
53 typedef struct { 58 typedef struct
59 {
54 PyObject_HEAD; 60 PyObject_HEAD;
55 struct mu_auth_data *auth_data; 61 struct mu_auth_data *auth_data;
56 } PyAuthData; 62 } PyAuthData;
57 63
58 typedef struct { 64 typedef struct
65 {
59 PyObject_HEAD; 66 PyObject_HEAD;
60 mu_body_t body; 67 mu_body_t body;
61 } PyBody; 68 } PyBody;
62 69
63 typedef struct { 70 typedef struct
71 {
64 PyObject_HEAD; 72 PyObject_HEAD;
65 mu_debug_t dbg; 73 mu_debug_t dbg;
66 } PyDebug; 74 } PyDebug;
67 75
68 typedef struct { 76 typedef struct
77 {
69 PyObject_HEAD; 78 PyObject_HEAD;
70 mu_envelope_t env; 79 mu_envelope_t env;
71 } PyEnvelope; 80 } PyEnvelope;
72 81
73 typedef struct { 82 typedef struct
83 {
74 PyObject_HEAD; 84 PyObject_HEAD;
75 mu_folder_t folder; 85 mu_folder_t folder;
76 } PyFolder; 86 } PyFolder;
77 87
78 typedef struct { 88 typedef struct
89 {
79 PyObject_HEAD; 90 PyObject_HEAD;
80 mu_header_t hdr; 91 mu_header_t hdr;
81 } PyHeader; 92 } PyHeader;
82 93
83 typedef struct { 94 typedef struct
95 {
84 PyObject_HEAD; 96 PyObject_HEAD;
85 mu_mailbox_t mbox; 97 mu_mailbox_t mbox;
86 } PyMailbox; 98 } PyMailbox;
87 99
88 typedef struct { 100 typedef struct
101 {
89 PyObject_HEAD; 102 PyObject_HEAD;
90 mu_mailcap_t mc; 103 mu_mailcap_t mc;
91 } PyMailcap; 104 } PyMailcap;
92 105
93 typedef struct { 106 typedef struct
107 {
94 PyObject_HEAD; 108 PyObject_HEAD;
95 mu_mailcap_entry_t entry; 109 mu_mailcap_entry_t entry;
96 } PyMailcapEntry; 110 } PyMailcapEntry;
97 111
98 typedef struct { 112 typedef struct
113 {
99 PyObject_HEAD; 114 PyObject_HEAD;
100 mu_mailer_t mlr; 115 mu_mailer_t mlr;
101 } PyMailer; 116 } PyMailer;
102 117
103 typedef struct { 118 typedef struct
119 {
104 PyObject_HEAD; 120 PyObject_HEAD;
105 mu_message_t msg; 121 mu_message_t msg;
106 } PyMessage; 122 } PyMessage;
107 123
108 typedef struct { 124 typedef struct
125 {
109 PyObject_HEAD; 126 PyObject_HEAD;
110 mu_mime_t mime; 127 mu_mime_t mime;
111 } PyMime; 128 } PyMime;
112 129
113 typedef struct { 130 typedef struct
131 {
114 PyObject_HEAD; 132 PyObject_HEAD;
115 mu_secret_t secret; 133 mu_secret_t secret;
116 } PySecret; 134 } PySecret;
117 135
118 typedef struct { 136 typedef struct
137 {
119 PyObject_HEAD; 138 PyObject_HEAD;
120 mu_sieve_machine_t mach; 139 mu_sieve_machine_t mach;
121 } PySieveMachine; 140 } PySieveMachine;
122 141
123 typedef struct { 142 typedef struct
143 {
124 PyObject_HEAD; 144 PyObject_HEAD;
125 mu_stream_t stm; 145 mu_stream_t stm;
126 } PyStream; 146 } PyStream;
127 147
128 typedef struct { 148 typedef struct
149 {
129 PyObject_HEAD; 150 PyObject_HEAD;
130 mu_url_t url; 151 mu_url_t url;
131 } PyUrl; 152 } PyUrl;
...@@ -186,13 +207,15 @@ extern int PyMessage_Check (PyObject *x); ...@@ -186,13 +207,15 @@ extern int PyMessage_Check (PyObject *x);
186 extern int PySecret_Check (PyObject *x); 207 extern int PySecret_Check (PyObject *x);
187 extern int PyStream_Check (PyObject *x); 208 extern int PyStream_Check (PyObject *x);
188 209
189 typedef struct { 210 typedef struct
211 {
190 char *name; 212 char *name;
191 PyObject *obj; 213 PyObject *obj;
192 } mu_py_dict; 214 } mu_py_dict;
193 215
194 typedef struct { 216 typedef struct
195 char *module_name; 217 {
218 const char *module_name;
196 mu_py_dict *attrs; 219 mu_py_dict *attrs;
197 } mu_py_script_data; 220 } mu_py_script_data;
198 221
......
...@@ -46,6 +46,7 @@ ...@@ -46,6 +46,7 @@
46 #ifdef ENABLE_RADIUS 46 #ifdef ENABLE_RADIUS
47 47
48 #include <radius/radius.h> 48 #include <radius/radius.h>
49 #include <radius/debug.h>
49 50
50 static int radius_auth_enabled; 51 static int radius_auth_enabled;
51 52
......
...@@ -50,6 +50,8 @@ ...@@ -50,6 +50,8 @@
50 #include <mailutils/url.h> 50 #include <mailutils/url.h>
51 #include <mailutils/tls.h> 51 #include <mailutils/tls.h>
52 #include <mailutils/md5.h> 52 #include <mailutils/md5.h>
53 #include <mailutils/io.h>
54 #include <mailutils/secret.h>
53 #include <mailutils/cctype.h> 55 #include <mailutils/cctype.h>
54 #include <mailutils/cstr.h> 56 #include <mailutils/cstr.h>
55 57
......
...@@ -38,20 +38,24 @@ static char args_doc[] = N_("[address...]\n-f [OPTION...] [file]\n--file [OPTION ...@@ -38,20 +38,24 @@ static char args_doc[] = N_("[address...]\n-f [OPTION...] [file]\n--file [OPTION
38 #define F_OPTION 256 38 #define F_OPTION 256
39 39
40 static struct argp_option options[] = { 40 static struct argp_option options[] = {
41 { NULL, 'f', 0, OPTION_HIDDEN, NULL, 0 }, 41 { NULL, 'f', NULL, OPTION_HIDDEN, NULL, 0 },
42 {"file", F_OPTION, "FILE", OPTION_ARG_OPTIONAL|OPTION_HIDDEN, 0}, 42 {"file", F_OPTION, "FILE", OPTION_ARG_OPTIONAL|OPTION_HIDDEN, 0},
43 43
44 {"exist", 'e', 0, 0, N_("Return true if mail exists"), 0}, 44 {"exist", 'e', NULL, 0, N_("Return true if mail exists"), 0},
45 {"byname", 'F', 0, 0, N_("Save messages according to sender"), 0}, 45 {"byname", 'F', NULL, 0, N_("Save messages according to sender"), 0},
46 {"headers", 'H', 0, 0, N_("Write a header summary and exit"), 0}, 46 {"headers", 'H', NULL, 0, N_("Write a header summary and exit"), 0},
47 {"ignore", 'i', 0, 0, N_("Ignore interrupts"), 0}, 47 {"ignore", 'i', NULL, 0, N_("Ignore interrupts"), 0},
48 {"norc", 'n', 0, 0, N_("Do not read the system mailrc file"), 0}, 48 {"norc", 'n', NULL, 0, N_("Do not read the system mailrc file"), 0},
49 {"nosum", 'N', 0, 0, N_("Do not display initial header summary"), 0}, 49 {"nosum", 'N', NULL, 0,
50 {"print", 'p', 0, 0, N_("Print all mail to standard output"), 0}, 50 N_("Do not display initial header summary"), 0},
51 {"quit", 'q', 0, 0, N_("Cause interrupts to terminate program"), 0}, 51 {"print", 'p', NULL, 0, N_("Print all mail to standard output"), 0},
52 {"read", 'r', 0, 0, N_("Same as -p"), 0}, 52 {"read", 'r', NULL, OPTION_ALIAS },
53 {"subject", 's', N_("SUBJ"), 0, N_("Send a message with a Subject of SUBJ"), 0}, 53 {"quit", 'q', NULL, 0,
54 {"to", 't', 0, 0, N_("Precede message by a list of addresses"), 0}, 54 N_("Cause interrupts to terminate program"), 0},
55 {"subject", 's', N_("SUBJ"), 0,
56 N_("Send a message with the given SUBJECT"), 0},
57 {"to", 't', NULL, 0,
58 N_("Precede message by a list of addresses"), 0},
55 {"user", 'u', N_("USER"), 0, N_("Operate on USER's mailbox"), 0}, 59 {"user", 'u', N_("USER"), 0, N_("Operate on USER's mailbox"), 0},
56 {"append", 'a', N_("HEADER: VALUE"), 0, 60 {"append", 'a', N_("HEADER: VALUE"), 0,
57 N_("Append given header to the message being sent"), 0}, 61 N_("Append given header to the message being sent"), 0},
......
...@@ -1084,7 +1084,7 @@ void ...@@ -1084,7 +1084,7 @@ void
1084 util_rfc2047_decode (char **value) 1084 util_rfc2047_decode (char **value)
1085 { 1085 {
1086 char locale[32]; 1086 char locale[32];
1087 char *charset = NULL; 1087 const char *charset = NULL;
1088 char *tmp; 1088 char *tmp;
1089 int rc; 1089 int rc;
1090 1090
......
...@@ -296,7 +296,7 @@ mu_get_auth_by_uid (uid_t uid) ...@@ -296,7 +296,7 @@ mu_get_auth_by_uid (uid_t uid)
296 static mu_list_t mu_authenticate_list, _tmp_authenticate_list; 296 static mu_list_t mu_authenticate_list, _tmp_authenticate_list;
297 297
298 int 298 int
299 mu_authenticate (struct mu_auth_data *auth_data, char *pass) 299 mu_authenticate (struct mu_auth_data *auth_data, const char *pass)
300 { 300 {
301 if (!auth_data) 301 if (!auth_data)
302 return EINVAL; 302 return EINVAL;
...@@ -305,7 +305,7 @@ mu_authenticate (struct mu_auth_data *auth_data, char *pass) ...@@ -305,7 +305,7 @@ mu_authenticate (struct mu_auth_data *auth_data, char *pass)
305 auth_data->name, auth_data->source); 305 auth_data->name, auth_data->source);
306 if (!mu_authenticate_list) 306 if (!mu_authenticate_list)
307 mu_auth_begin_setup (); 307 mu_auth_begin_setup ();
308 return mu_auth_runlist (mu_authenticate_list, NULL, auth_data, pass); 308 return mu_auth_runlist (mu_authenticate_list, NULL, auth_data, (void*) pass);
309 } 309 }
310 310
311 311
......
...@@ -335,9 +335,9 @@ void mh_set_reply_regex (const char *str); ...@@ -335,9 +335,9 @@ void mh_set_reply_regex (const char *str);
335 int mh_decode_2047 (char *text, char **decoded_text); 335 int mh_decode_2047 (char *text, char **decoded_text);
336 336
337 int mh_alias_read (char *name, int fail); 337 int mh_alias_read (char *name, int fail);
338 int mh_alias_get (char *name, mu_list_t *return_list); 338 int mh_alias_get (const char *name, mu_list_t *return_list);
339 int mh_alias_get_address (char *name, mu_address_t *addr, int *incl); 339 int mh_alias_get_address (const char *name, mu_address_t *addr, int *incl);
340 int mh_alias_get_alias (char *uname, mu_list_t *return_list); 340 int mh_alias_get_alias (const char *uname, mu_list_t *return_list);
341 int mh_read_aliases (void); 341 int mh_read_aliases (void);
342 int mh_alias_expand (const char *str, mu_address_t *paddr, int *incl); 342 int mh_alias_expand (const char *str, mu_address_t *paddr, int *incl);
343 343
......
...@@ -225,7 +225,7 @@ ali_list_dup (mu_list_t src) ...@@ -225,7 +225,7 @@ ali_list_dup (mu_list_t src)
225 } 225 }
226 226
227 static int 227 static int
228 ali_member (mu_list_t list, char *name) 228 ali_member (mu_list_t list, const char *name)
229 { 229 {
230 mu_iterator_t itr; 230 mu_iterator_t itr;
231 int found = 0; 231 int found = 0;
...@@ -252,7 +252,7 @@ ali_member (mu_list_t list, char *name) ...@@ -252,7 +252,7 @@ ali_member (mu_list_t list, char *name)
252 } 252 }
253 253
254 int 254 int
255 aliascmp (char *pattern, char *name) 255 aliascmp (const char *pattern, const char *name)
256 { 256 {
257 int len = strlen (pattern); 257 int len = strlen (pattern);
258 258
...@@ -281,7 +281,7 @@ _insert_list (mu_list_t list, void *prev, mu_list_t new_list) ...@@ -281,7 +281,7 @@ _insert_list (mu_list_t list, void *prev, mu_list_t new_list)
281 return 0; 281 return 0;
282 } 282 }
283 283
284 static int mh_alias_get_internal (char *name, mu_iterator_t start, 284 static int mh_alias_get_internal (const char *name, mu_iterator_t start,
285 mu_list_t *return_list, int *inclusive); 285 mu_list_t *return_list, int *inclusive);
286 286
287 int 287 int
...@@ -311,7 +311,8 @@ alias_expand_list (mu_list_t name_list, mu_iterator_t orig_itr, int *inclusive) ...@@ -311,7 +311,8 @@ alias_expand_list (mu_list_t name_list, mu_iterator_t orig_itr, int *inclusive)
311 /* Look up the named alias. If found, return the list of recipient 311 /* Look up the named alias. If found, return the list of recipient
312 names associated with it */ 312 names associated with it */
313 static int 313 static int
314 mh_alias_get_internal (char *name, mu_iterator_t start, mu_list_t *return_list, 314 mh_alias_get_internal (const char *name,
315 mu_iterator_t start, mu_list_t *return_list,
315 int *inclusive) 316 int *inclusive)
316 { 317 {
317 mu_iterator_t itr; 318 mu_iterator_t itr;
...@@ -349,13 +350,13 @@ mh_alias_get_internal (char *name, mu_iterator_t start, mu_list_t *return_list, ...@@ -349,13 +350,13 @@ mh_alias_get_internal (char *name, mu_iterator_t start, mu_list_t *return_list,
349 } 350 }
350 351
351 int 352 int
352 mh_alias_get (char *name, mu_list_t *return_list) 353 mh_alias_get (const char *name, mu_list_t *return_list)
353 { 354 {
354 return mh_alias_get_internal (name, NULL, return_list, NULL); 355 return mh_alias_get_internal (name, NULL, return_list, NULL);
355 } 356 }
356 357
357 int 358 int
358 mh_alias_get_address (char *name, mu_address_t *paddr, int *incl) 359 mh_alias_get_address (const char *name, mu_address_t *paddr, int *incl)
359 { 360 {
360 mu_iterator_t itr; 361 mu_iterator_t itr;
361 mu_list_t list; 362 mu_list_t list;
...@@ -403,7 +404,7 @@ mh_alias_get_address (char *name, mu_address_t *paddr, int *incl) ...@@ -403,7 +404,7 @@ mh_alias_get_address (char *name, mu_address_t *paddr, int *incl)
403 /* Look up the given user name in the aliases. Return the list of 404 /* Look up the given user name in the aliases. Return the list of
404 alias names this user is member of */ 405 alias names this user is member of */
405 int 406 int
406 mh_alias_get_alias (char *uname, mu_list_t *return_list) 407 mh_alias_get_alias (const char *uname, mu_list_t *return_list)
407 { 408 {
408 mu_iterator_t itr; 409 mu_iterator_t itr;
409 int rc = 1; 410 int rc = 1;
......
...@@ -629,7 +629,10 @@ print_header_value (struct eval_env *env, char *val) ...@@ -629,7 +629,10 @@ print_header_value (struct eval_env *env, char *val)
629 } 629 }
630 630
631 if (env->bvar[B_UPPERCASE]) 631 if (env->bvar[B_UPPERCASE])
632 mu_toupper (val); 632 {
633 for (p = val; *p; p++)
634 *p = mu_toupper (*p);
635 }
633 636
634 if (env->bvar[B_COMPRESS]) 637 if (env->bvar[B_COMPRESS])
635 for (p = val; *p; p++) 638 for (p = val; *p; p++)
......
...@@ -257,13 +257,13 @@ invoke (const char *compname, const char *defval, int argc, char **argv, ...@@ -257,13 +257,13 @@ invoke (const char *compname, const char *defval, int argc, char **argv,
257 return -1; 257 return -1;
258 } 258 }
259 259
260 xargv[0] = progname; 260 xargv[0] = (char*) progname;
261 for (i = 1; i < argc; i++) 261 for (i = 1; i < argc; i++)
262 xargv[i] = argv[i]; 262 xargv[i] = argv[i];
263 if (extra0) 263 if (extra0)
264 xargv[i++] = extra0; 264 xargv[i++] = (char*) extra0;
265 if (extra1) 265 if (extra1)
266 xargv[i++] = extra1; 266 xargv[i++] = (char*) extra1;
267 xargv[i++] = NULL; 267 xargv[i++] = NULL;
268 rc = mu_spawnvp (xargv[0], xargv, &status); 268 rc = mu_spawnvp (xargv[0], xargv, &status);
269 free (xargv); 269 free (xargv);
......
...@@ -32,7 +32,6 @@ api_nls_init (PyObject *self) ...@@ -32,7 +32,6 @@ api_nls_init (PyObject *self)
32 static PyObject * 32 static PyObject *
33 api_nls_set_locale (PyObject *self, PyObject *args) 33 api_nls_set_locale (PyObject *self, PyObject *args)
34 { 34 {
35 int status;
36 char *lset; 35 char *lset;
37 const char *locale; 36 const char *locale;
38 37
......
...@@ -206,7 +206,7 @@ _sieve_error_printer (void *data, const char *fmt, va_list ap) ...@@ -206,7 +206,7 @@ _sieve_error_printer (void *data, const char *fmt, va_list ap)
206 PyObject *py_fnc = s->py_error_printer; 206 PyObject *py_fnc = s->py_error_printer;
207 207
208 if (mu_vasnprintf (&buf, &buflen, fmt, ap)) 208 if (mu_vasnprintf (&buf, &buflen, fmt, ap))
209 return; 209 return 0;
210 PyTuple_SetItem (py_args, 0, PyString_FromString (buf ? buf : "")); 210 PyTuple_SetItem (py_args, 0, PyString_FromString (buf ? buf : ""));
211 if (buf) 211 if (buf)
212 free (buf); 212 free (buf);
...@@ -237,7 +237,7 @@ _sieve_parse_error_printer (void *data, const char *filename, int lineno, ...@@ -237,7 +237,7 @@ _sieve_parse_error_printer (void *data, const char *filename, int lineno,
237 PyDict_SetItemString (py_dict, "lineno", PyInt_FromLong (lineno)); 237 PyDict_SetItemString (py_dict, "lineno", PyInt_FromLong (lineno));
238 238
239 if (mu_vasnprintf (&buf, &buflen, fmt, ap)) 239 if (mu_vasnprintf (&buf, &buflen, fmt, ap))
240 return; 240 return 0;
241 PyDict_SetItemString (py_dict, "text", 241 PyDict_SetItemString (py_dict, "text",
242 PyString_FromString (buf ? buf : "")); 242 PyString_FromString (buf ? buf : ""));
243 if (buf) 243 if (buf)
...@@ -259,6 +259,7 @@ _sieve_parse_error_printer (void *data, const char *filename, int lineno, ...@@ -259,6 +259,7 @@ _sieve_parse_error_printer (void *data, const char *filename, int lineno,
259 Py_DECREF (py_args); 259 Py_DECREF (py_args);
260 } 260 }
261 } 261 }
262 return 0;
262 } 263 }
263 264
264 static int 265 static int
...@@ -274,7 +275,7 @@ _sieve_debug_printer (void *data, const char *fmt, va_list ap) ...@@ -274,7 +275,7 @@ _sieve_debug_printer (void *data, const char *fmt, va_list ap)
274 PyObject *py_fnc = s->py_debug_printer; 275 PyObject *py_fnc = s->py_debug_printer;
275 276
276 if (mu_vasnprintf (&buf, &buflen, fmt, ap)) 277 if (mu_vasnprintf (&buf, &buflen, fmt, ap))
277 return; 278 return 0;
278 PyTuple_SetItem (py_args, 0, PyString_FromString (buf ? buf : "")); 279 PyTuple_SetItem (py_args, 0, PyString_FromString (buf ? buf : ""));
279 if (buf) 280 if (buf)
280 free (buf); 281 free (buf);
......