/[mailutils]/mailutils/mailbox/mutil.c
ViewVC logotype

Diff of /mailutils/mailbox/mutil.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.20 by alainm, Sat Nov 17 19:20:11 2001 UTC revision 1.21 by gray, Tue Jan 15 21:53:28 2002 UTC
# Line 508  mu_normalize_path (char *path, const cha Line 508  mu_normalize_path (char *path, const cha
508    return path;    return path;
509  }  }
510    
511    char *
512    mu_normalize_maildir (const char *dir)
513    {
514      int len = strlen (dir);
515      if (dir[len-1] == '/')
516        return strdup (dir);
517      else if (strncasecmp (dir, "mbox:", 5) == 0 && dir[len-1] == '=')
518        {
519          if (len > 5 && strcmp (dir + len - 5, "user=") == 0)
520            return strdup (dir);
521          else
522            return NULL;
523        }
524      else
525        {
526          char *p = malloc (strlen (dir) + 2);
527          strcat (strcpy (p, dir), "/");
528          return p;
529        }
530    }
531    

Legend:
Removed from v.1.20  
changed lines
  Added in v.1.21

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26