diff options
author | Dan Winship <danw@src.gnome.org> | 2002-03-09 06:03:21 +0800 |
---|---|---|
committer | Dan Winship <danw@src.gnome.org> | 2002-03-09 06:03:21 +0800 |
commit | e6cd7bec0e6f009c771999e6840ce55ca3b22c42 (patch) | |
tree | 0d5532f4ab3f5efbe4f4ad41fbf511433d9e328c /mail | |
parent | 9c939e7a9964b860fcfa5bdc0ca13aeaa2d74f36 (diff) | |
download | gsoc2013-evolution-e6cd7bec0e6f009c771999e6840ce55ca3b22c42.tar gsoc2013-evolution-e6cd7bec0e6f009c771999e6840ce55ca3b22c42.tar.gz gsoc2013-evolution-e6cd7bec0e6f009c771999e6840ce55ca3b22c42.tar.bz2 gsoc2013-evolution-e6cd7bec0e6f009c771999e6840ce55ca3b22c42.tar.lz gsoc2013-evolution-e6cd7bec0e6f009c771999e6840ce55ca3b22c42.tar.xz gsoc2013-evolution-e6cd7bec0e6f009c771999e6840ce55ca3b22c42.tar.zst gsoc2013-evolution-e6cd7bec0e6f009c771999e6840ce55ca3b22c42.zip |
Rewrite this to not use stpcpy, which isn't portable.
* mail-config-druid.c (management_prepare): Rewrite this to not
use stpcpy, which isn't portable.
svn path=/trunk/; revision=15991
Diffstat (limited to 'mail')
-rw-r--r-- | mail/ChangeLog | 5 | ||||
-rw-r--r-- | mail/mail-config-druid.c | 11 |
2 files changed, 11 insertions, 5 deletions
diff --git a/mail/ChangeLog b/mail/ChangeLog index 937fcc00e7..85c30a0d43 100644 --- a/mail/ChangeLog +++ b/mail/ChangeLog @@ -1,3 +1,8 @@ +2002-03-08 Dan Winship <danw@ximian.com> + + * mail-config-druid.c (management_prepare): Rewrite this to not + use stpcpy, which isn't portable. + 2002-03-08 Radek Doulik <rodo@ximian.com> * mail-accounts.c (sig_event_client): handle name changed event diff --git a/mail/mail-config-druid.c b/mail/mail-config-druid.c index e43f0dfbf5..d1c0fabcc1 100644 --- a/mail/mail-config-druid.c +++ b/mail/mail-config-druid.c @@ -414,17 +414,18 @@ management_prepare (EvolutionWizard *wizard, gpointer data) name = gtk_entry_get_text (gui->gui->email_address); if (name && *name) { if (mail_config_get_account_by_name (name)) { - char *template, *p; - unsigned int i = 1; + char *template; + unsigned int i = 1, len; /* length of name + 1 char for ' ' + 1 char for '(' + 10 chars for %d + 1 char for ')' + 1 char for nul */ - template = alloca (strlen (name) + 14); - p = stpcpy (template, name); + len = strlen (name); + template = alloca (len + 14); + strcpy (template, name); name = template; do { - sprintf (p, " (%d)", i++); + sprintf (template + len, " (%d)", i++); } while (mail_config_get_account_by_name (name) && i != 0); } |