changeset 3309:f00054d40753

* movemail.c [MAIL_USE_POP] (main): Don't use non-portable string-handling functions.
author Jim Blandy <jimb@redhat.com>
date Sun, 30 May 1993 19:26:11 +0000
parents a784dfbd4d67
children 2807618b3f72
files lib-src/movemail.c
diffstat 1 files changed, 5 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/lib-src/movemail.c	Sun May 30 19:18:28 1993 +0000
+++ b/lib-src/movemail.c	Sun May 30 19:26:11 1993 +0000
@@ -140,11 +140,14 @@
   }
 
 #ifdef MAIL_USE_POP
-  if (!bcmp (inname, "po:", 3))
+  if (!strncmp (inname, "po:", 3))
     {
       int status; char *user;
 
-      user = (char *) rindex (inname, ':') + 1;
+      for (user = &inname[strlen (inname) - 1]; user >= inname; user--)
+	if (*user == ':')
+	  break;
+
       status = popmail (user, outname);
       exit (status);
     }