Commit ff6875c7 ff6875c7f1018b5ee7c5461c883788bc1703c064 by Sergey Poznyakoff

(is_proto): Replace by mu_is_proto. All callers updated

1 parent 11a83f4b
...@@ -90,15 +90,6 @@ mu_construct_user_mailbox_url (char **pout, const char *name) ...@@ -90,15 +90,6 @@ mu_construct_user_mailbox_url (char **pout, const char *name)
90 #define USE_ENVIRON 1 90 #define USE_ENVIRON 1
91 91
92 static int 92 static int
93 is_proto (const char *p)
94 {
95 for (; *p && *p != '/'; p++)
96 if (*p == ':')
97 return 1;
98 return 0;
99 }
100
101 static int
102 split_shortcut (const char *file, const char pfx[], char **user, char **rest) 93 split_shortcut (const char *file, const char pfx[], char **user, char **rest)
103 { 94 {
104 *user = NULL; 95 *user = NULL;
...@@ -249,7 +240,7 @@ plus_expand (const char *file, char **buf) ...@@ -249,7 +240,7 @@ plus_expand (const char *file, char **buf)
249 return ENOENT; 240 return ENOENT;
250 } 241 }
251 242
252 if (folder_dir[0] == '/' || is_proto (folder_dir)) 243 if (folder_dir[0] == '/' || mu_is_proto (folder_dir))
253 { 244 {
254 len = strlen (folder_dir) + strlen (path) + 2; 245 len = strlen (folder_dir) + strlen (path) + 2;
255 *buf = malloc (len); 246 *buf = malloc (len);
...@@ -391,7 +382,7 @@ mu_mailbox_create_default (mu_mailbox_t *pmbox, const char *mail) ...@@ -391,7 +382,7 @@ mu_mailbox_create_default (mu_mailbox_t *pmbox, const char *mail)
391 break; 382 break;
392 383
393 default: 384 default:
394 if (!is_proto (mail)) 385 if (!mu_is_proto (mail))
395 { 386 {
396 tmp_mbox = mu_getcwd(); 387 tmp_mbox = mu_getcwd();
397 mbox = malloc (strlen (tmp_mbox) + strlen (mail) + 2); 388 mbox = malloc (strlen (tmp_mbox) + strlen (mail) + 2);
......