* mail/util.c (util_strupper): The first implementation was
buggy, corrected.
Showing
3 changed files
with
20 additions
and
12 deletions
1 | 2001-07-01 Alain Magloire | 1 | 2001-07-01 Alain Magloire |
2 | 2 | ||
3 | * mail/util.c (util_strupper): The first implementation was | ||
4 | buggy, corrected. | ||
5 | |||
6 | 2001-07-01 Alain Magloire | ||
7 | |||
3 | * mailbox2/pop3/*: Pop3 functions are thread-safe and cancel-safe. | 8 | * mailbox2/pop3/*: Pop3 functions are thread-safe and cancel-safe. |
4 | The problem is monitor.h, we will probably end up doing a monitor.h.in | 9 | The problem is monitor.h, we will probably end up doing a monitor.h.in |
5 | and set at compile time if threading is enable or not. | 10 | and set at compile time if threading is enable or not. | ... | ... |
... | @@ -80,11 +80,11 @@ typedef int function_t (); | ... | @@ -80,11 +80,11 @@ typedef int function_t (); |
80 | #define EF_REG 0x00 /* Regular command */ | 80 | #define EF_REG 0x00 /* Regular command */ |
81 | #define EF_FLOW 0x01 /* Flow control command */ | 81 | #define EF_FLOW 0x01 /* Flow control command */ |
82 | #define EF_SEND 0x02 /* Send command */ | 82 | #define EF_SEND 0x02 /* Send command */ |
83 | 83 | ||
84 | struct mail_command_entry { | 84 | struct mail_command_entry { |
85 | char *shortname; | 85 | char *shortname; |
86 | char *longname; | 86 | char *longname; |
87 | int flags; | 87 | int flags; |
88 | function_t *func; | 88 | function_t *func; |
89 | char *synopsis; | 89 | char *synopsis; |
90 | }; | 90 | }; |
... | @@ -113,7 +113,7 @@ extern unsigned int cursor; | ... | @@ -113,7 +113,7 @@ extern unsigned int cursor; |
113 | extern unsigned int realcursor; | 113 | extern unsigned int realcursor; |
114 | extern unsigned int total; | 114 | extern unsigned int total; |
115 | extern FILE *ofile; | 115 | extern FILE *ofile; |
116 | extern int interactive; | 116 | extern int interactive; |
117 | extern const struct mail_command_entry mail_command_table[]; | 117 | extern const struct mail_command_entry mail_command_table[]; |
118 | extern const struct mail_command_entry mail_escape_table[]; | 118 | extern const struct mail_command_entry mail_escape_table[]; |
119 | 119 | ||
... | @@ -165,7 +165,7 @@ int mail_z __P((int argc, char **argv)); | ... | @@ -165,7 +165,7 @@ int mail_z __P((int argc, char **argv)); |
165 | int mail_eq __P((int argc, char **argv)); /* command = */ | 165 | int mail_eq __P((int argc, char **argv)); /* command = */ |
166 | 166 | ||
167 | int if_cond __P((void)); | 167 | int if_cond __P((void)); |
168 | 168 | ||
169 | void mail_mainloop __P((char *(*input) __P((void *, int)), void *closure, int do_history)); | 169 | void mail_mainloop __P((char *(*input) __P((void *, int)), void *closure, int do_history)); |
170 | int mail_copy0 __P((int argc, char **argv, int mark)); | 170 | int mail_copy0 __P((int argc, char **argv, int mark)); |
171 | int mail_send0 __P((struct send_environ *env, int save_to)); | 171 | int mail_send0 __P((struct send_environ *env, int save_to)); |
... | @@ -201,7 +201,7 @@ int var_write __P((int argc, char **argv, struct send_environ *env)); | ... | @@ -201,7 +201,7 @@ int var_write __P((int argc, char **argv, struct send_environ *env)); |
201 | int var_exit __P((int argc, char **argv, struct send_environ *env)); | 201 | int var_exit __P((int argc, char **argv, struct send_environ *env)); |
202 | int var_pipe __P((int argc, char **argv, struct send_environ *env)); | 202 | int var_pipe __P((int argc, char **argv, struct send_environ *env)); |
203 | 203 | ||
204 | 204 | ||
205 | int util_expand_msglist __P((const int argc, char **argv, int **list)); | 205 | int util_expand_msglist __P((const int argc, char **argv, int **list)); |
206 | int util_do_command __P((const char *cmd, ...)); | 206 | int util_do_command __P((const char *cmd, ...)); |
207 | int util_msglist_command __P((function_t *func, int argc, char **argv, int set_cursor)); | 207 | int util_msglist_command __P((function_t *func, int argc, char **argv, int set_cursor)); |
... | @@ -217,13 +217,14 @@ int util_isdeleted __P((int message)); | ... | @@ -217,13 +217,14 @@ int util_isdeleted __P((int message)); |
217 | char *util_get_homedir __P((void)); | 217 | char *util_get_homedir __P((void)); |
218 | char *util_fullpath __P((char *inpath)); | 218 | char *util_fullpath __P((char *inpath)); |
219 | char *util_get_sender __P((int msgno, int strip)); | 219 | char *util_get_sender __P((int msgno, int strip)); |
220 | 220 | ||
221 | void util_slist_print __P((list_t list, int nl)); | 221 | void util_slist_print __P((list_t list, int nl)); |
222 | int util_slist_lookup __P((list_t list, char *str)); | 222 | int util_slist_lookup __P((list_t list, char *str)); |
223 | void util_slist_add __P((list_t *list, char *value)); | 223 | void util_slist_add __P((list_t *list, char *value)); |
224 | void util_slist_destroy __P((list_t *list)); | 224 | void util_slist_destroy __P((list_t *list)); |
225 | char *util_slist_to_string __P((list_t list, char *delim)); | 225 | char *util_slist_to_string __P((list_t list, char *delim)); |
226 | void util_strcat __P((char **dest, char *str)); | 226 | void util_strcat __P((char **dest, char *str)); |
227 | void util_strupper __P((char *str)); | ||
227 | void util_escape_percent __P((char **str)); | 228 | void util_escape_percent __P((char **str)); |
228 | char *util_outfolder_name __P((char *str)); | 229 | char *util_outfolder_name __P((char *str)); |
229 | void util_save_outgoing __P((message_t msg, char *savefile)); | 230 | void util_save_outgoing __P((message_t msg, char *savefile)); |
... | @@ -235,22 +236,22 @@ int ml_got_interrupt __P((void)); | ... | @@ -235,22 +236,22 @@ int ml_got_interrupt __P((void)); |
235 | void ml_clear_interrupt __P((void)); | 236 | void ml_clear_interrupt __P((void)); |
236 | void ml_readline_init __P((void)); | 237 | void ml_readline_init __P((void)); |
237 | int ml_reread __P((char *prompt, char **text)); | 238 | int ml_reread __P((char *prompt, char **text)); |
238 | 239 | ||
239 | char *alias_expand __P((char *name)); | 240 | char *alias_expand __P((char *name)); |
240 | void alias_destroy __P((char *name)); | 241 | void alias_destroy __P((char *name)); |
241 | 242 | ||
242 | #ifndef HAVE_READLINE_READLINE_H | 243 | #ifndef HAVE_READLINE_READLINE_H |
243 | char *readline __P((const char *prompt)); | 244 | char *readline __P((const char *prompt)); |
244 | #endif | 245 | #endif |
245 | 246 | ||
246 | #ifndef _PATH_SENDMAIL | 247 | #ifndef _PATH_SENDMAIL |
247 | #define _PATH_SENDMAIL "/usr/lib/sendmail" | 248 | #define _PATH_SENDMAIL "/usr/lib/sendmail" |
248 | #endif | 249 | #endif |
249 | 250 | ||
250 | /* Message attributes */ | 251 | /* Message attributes */ |
251 | #define MAIL_ATTRIBUTE_MBOXED 0x0001 | 252 | #define MAIL_ATTRIBUTE_MBOXED 0x0001 |
252 | #define MAIL_ATTRIBUTE_SAVED 0x0002 | 253 | #define MAIL_ATTRIBUTE_SAVED 0x0002 |
253 | 254 | ||
254 | #ifdef __cplusplus | 255 | #ifdef __cplusplus |
255 | } | 256 | } |
256 | #endif | 257 | #endif | ... | ... |
... | @@ -699,8 +699,10 @@ util_strupper (char *s) | ... | @@ -699,8 +699,10 @@ util_strupper (char *s) |
699 | { | 699 | { |
700 | if (s) | 700 | if (s) |
701 | { | 701 | { |
702 | while (s++) | 702 | int i; |
703 | *s = toupper ((int)*s); | 703 | int len = strlen (s); |
704 | for (i = 0; i < len; i++) | ||
705 | s[i] = toupper ((int)s[i]); | ||
704 | } | 706 | } |
705 | } | 707 | } |
706 | 708 | ... | ... |
-
Please register or sign in to post a comment