diff options
author | kim <kim@pkgsrc.org> | 2000-05-02 17:11:49 +0000 |
---|---|---|
committer | kim <kim@pkgsrc.org> | 2000-05-02 17:11:49 +0000 |
commit | c30f967a07eb41149b5917f9239a3031e7f0d00e (patch) | |
tree | ee1e65709ac2df8f1a9c1019bb63e6c7bdfd9e97 /mail/elm/patches | |
parent | 1aa6e3c8de67892c55d6dbefb55d32662c443bd4 (diff) | |
download | pkgsrc-c30f967a07eb41149b5917f9239a3031e7f0d00e.tar.gz |
Fix the & expansion in the gecos field.
Diffstat (limited to 'mail/elm/patches')
-rw-r--r-- | mail/elm/patches/patch-ae | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/mail/elm/patches/patch-ae b/mail/elm/patches/patch-ae new file mode 100644 index 00000000000..16d8ebfd410 --- /dev/null +++ b/mail/elm/patches/patch-ae @@ -0,0 +1,35 @@ +$NetBSD: patch-ae,v 1.1 2000/05/02 17:11:49 kim Exp $ + +--- lib/gcos_name.c.orig Mon Mar 15 01:32:34 1999 ++++ lib/gcos_name.c Tue May 2 13:03:14 2000 +@@ -26,20 +26,26 @@ + + static char fullname[SLEN]; + register char *fncp, *gcoscp, *lncp, *end; ++ int first; + + + /* full name is all chars up to first ',' (or whole gcos, if no ',') */ +- /* replace any & with logname in upper case */ ++ /* replace any & with logname capitalized */ + + for(fncp = fullname, gcoscp= gcos_field, end = fullname + sizeof fullname - 1; + (*gcoscp != ',' && *gcoscp != '\0' && fncp < end); + gcoscp++) { + + if(*gcoscp == '&') { +- for(lncp = logname; * +- lncp && fncp < end; ++ first = 1; ++ for(lncp = logname; ++ *lncp && fncp < end; + fncp++, lncp++) +- *fncp = toupper(*lncp); ++ if (first) { ++ first = 0; ++ *fncp = toupper(*lncp); ++ } else ++ *fncp = *lncp; + } else { + *fncp++ = *gcoscp; + } |