summaryrefslogtreecommitdiffabout
Unidiff
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--examples/lsf.c2
-rw-r--r--include/mailutils/cpp/folder.h4
-rw-r--r--include/mailutils/folder.h9
-rw-r--r--libmailutils/mailbox/folder.c8
-rw-r--r--libmailutils/mailbox/fsfolder.c12
-rw-r--r--libmailutils/tests/fsfolder.c8
-rw-r--r--libmu_cpp/folder.cc8
-rw-r--r--libproto/imap/folder.c4
-rw-r--r--libproto/imap/genlist.c12
-rw-r--r--libproto/imap/tests/imapfolder.c2
-rw-r--r--libproto/nntp/folder.c2
-rw-r--r--mu/libexec/imap.c2
-rw-r--r--python/2/libmu_py/folder.c8
-rw-r--r--python/2/mailutils/folder.py4
-rw-r--r--python/3/libmu_py/folder.c10
-rw-r--r--python/3/mailutils/folder.py4
16 files changed, 50 insertions, 49 deletions
diff --git a/examples/lsf.c b/examples/lsf.c
index cba79d3..c386893 100644
--- a/examples/lsf.c
+++ b/examples/lsf.c
@@ -31,3 +31,3 @@ enumfun (mu_folder_t folder, struct mu_list_response *resp, void *data)
31 resp->separator, 31 resp->separator,
32 resp->level, 32 resp->depth,
33 resp->name); 33 resp->name);
diff --git a/include/mailutils/cpp/folder.h b/include/mailutils/cpp/folder.h
index fe4ed77..97c6d0f 100644
--- a/include/mailutils/cpp/folder.h
+++ b/include/mailutils/cpp/folder.h
@@ -45,5 +45,5 @@ class Folder
45 45
46 List& list (const std::string& dirname, void* pattern, size_t max_level); 46 List& list (const std::string& dirname, void* pattern, size_t max_depth);
47 List& enumerate (const std::string& name, void* pattern, 47 List& enumerate (const std::string& name, void* pattern,
48 int flags, size_t max_level, 48 int flags, size_t max_depth,
49 mu_folder_enumerate_fp enumfun, void* enumdata); 49 mu_folder_enumerate_fp enumfun, void* enumdata);
diff --git a/include/mailutils/folder.h b/include/mailutils/folder.h
index 4ca4b92..ceb54dd 100644
--- a/include/mailutils/folder.h
+++ b/include/mailutils/folder.h
@@ -29,5 +29,5 @@ struct mu_list_response
29 int type; /* MU_FOLDER_ATTRIBUTE_.* flags */ 29 int type; /* MU_FOLDER_ATTRIBUTE_.* flags */
30 int level; 30 int depth; /* Item depth within the hierarchy */
31 int separator; 31 int separator; /* Directory separator character */
32 char *name; 32 char *name; /* Item name */
33 mu_record_t format; /* Associated mailbox format record */ 33 mu_record_t format; /* Associated mailbox format record */
@@ -68,3 +68,4 @@ struct mu_folder_scanner
68 int match_flags; /* Matching flags */ 68 int match_flags; /* Matching flags */
69 size_t max_level; /* Max. nesting level to descend */ 69 size_t max_depth; /* Max. depth to descend
70 (1-based, 0 means 'unlimited') */
70 mu_folder_enumerate_fp enumfun; /* Enumeration function */ 71 mu_folder_enumerate_fp enumfun; /* Enumeration function */
diff --git a/libmailutils/mailbox/folder.c b/libmailutils/mailbox/folder.c
index 8a474c8..d22bb33 100644
--- a/libmailutils/mailbox/folder.c
+++ b/libmailutils/mailbox/folder.c
@@ -358,3 +358,3 @@ int
358mu_folder_list (mu_folder_t folder, const char *dirname, void *pattern, 358mu_folder_list (mu_folder_t folder, const char *dirname, void *pattern,
359 size_t max_level, 359 size_t max_depth,
360 mu_list_t *pflist) 360 mu_list_t *pflist)
@@ -362,3 +362,3 @@ mu_folder_list (mu_folder_t folder, const char *dirname, void *pattern,
362 return mu_folder_enumerate (folder, dirname, pattern, 362 return mu_folder_enumerate (folder, dirname, pattern,
363 MU_FOLDER_ATTRIBUTE_ALL, max_level, 363 MU_FOLDER_ATTRIBUTE_ALL, max_depth,
364 pflist, NULL, NULL); 364 pflist, NULL, NULL);
@@ -369,3 +369,3 @@ mu_folder_enumerate (mu_folder_t folder, const char *name,
369 void *pattern, int flags, 369 void *pattern, int flags,
370 size_t max_level, 370 size_t max_depth,
371 mu_list_t *pflist, 371 mu_list_t *pflist,
@@ -385,3 +385,3 @@ mu_folder_enumerate (mu_folder_t folder, const char *name,
385 scn.match_flags = flags; 385 scn.match_flags = flags;
386 scn.max_level = max_level; 386 scn.max_depth = max_depth;
387 scn.enumfun = enumfun; 387 scn.enumfun = enumfun;
diff --git a/libmailutils/mailbox/fsfolder.c b/libmailutils/mailbox/fsfolder.c
index 553c9fd..4afdbd6 100644
--- a/libmailutils/mailbox/fsfolder.c
+++ b/libmailutils/mailbox/fsfolder.c
@@ -296,3 +296,3 @@ list_helper (struct mu_folder_scanner *scn,
296 struct inode_list *ilist, 296 struct inode_list *ilist,
297 const char *dirname, size_t level) 297 const char *dirname, size_t depth)
298{ 298{
@@ -302,3 +302,3 @@ list_helper (struct mu_folder_scanner *scn,
302 302
303 if (scn->max_level && level >= scn->max_level) 303 if (scn->max_depth && depth >= scn->max_depth)
304 return 0; 304 return 0;
@@ -379,3 +379,3 @@ list_helper (struct mu_folder_scanner *scn,
379 resp->name = fname; 379 resp->name = fname;
380 resp->level = level; 380 resp->depth = depth;
381 resp->separator = '/'; 381 resp->separator = '/';
@@ -423,3 +423,3 @@ list_helper (struct mu_folder_scanner *scn,
423 stop = list_helper (scn, data, &idata, refname, 423 stop = list_helper (scn, data, &idata, refname,
424 level + 1); 424 depth + 1);
425 } 425 }
@@ -433,3 +433,3 @@ list_helper (struct mu_folder_scanner *scn,
433 idata.next = ilist; 433 idata.next = ilist;
434 stop = list_helper (scn, data, &idata, fname, level + 1); 434 stop = list_helper (scn, data, &idata, fname, depth + 1);
435 } 435 }
@@ -510,3 +510,3 @@ _fsfolder_lsub (mu_folder_t folder, const char *ref, const char *name,
510 resp->type = MU_FOLDER_ATTRIBUTE_FILE; 510 resp->type = MU_FOLDER_ATTRIBUTE_FILE;
511 resp->level = 0; 511 resp->depth = 0;
512 resp->separator = '/'; 512 resp->separator = '/';
diff --git a/libmailutils/tests/fsfolder.c b/libmailutils/tests/fsfolder.c
index 5a4d9df..e6c45b7 100644
--- a/libmailutils/tests/fsfolder.c
+++ b/libmailutils/tests/fsfolder.c
@@ -46,5 +46,5 @@ compare_response (void const *a, void const *b)
46 46
47 if (ra->level < rb->level) 47 if (ra->depth < rb->depth)
48 return -1; 48 return -1;
49 if (ra->level > rb->level) 49 if (ra->depth > rb->depth)
50 return 1; 50 return 1;
@@ -62,3 +62,3 @@ _print_list_entry (void *item, void *data)
62 resp->separator ? resp->separator : ' ', 62 resp->separator ? resp->separator : ' ',
63 resp->level, 63 resp->depth,
64 resp->name + len); 64 resp->name + len);
@@ -175,3 +175,3 @@ com_scan (int argc, char **argv, mu_assoc_t options, void *env)
175 errno = 0; 175 errno = 0;
176 scn.max_level = strtoul (s, &p, 10); 176 scn.max_depth = strtoul (s, &p, 10);
177 if (errno || *p) 177 if (errno || *p)
diff --git a/libmu_cpp/folder.cc b/libmu_cpp/folder.cc
index ebc7401..cf6857f 100644
--- a/libmu_cpp/folder.cc
+++ b/libmu_cpp/folder.cc
@@ -84,3 +84,3 @@ List&
84Folder :: list (const std::string& dirname, void* pattern, 84Folder :: list (const std::string& dirname, void* pattern,
85 size_t max_level = 0) 85 size_t max_depth = 0)
86{ 86{
@@ -89,3 +89,3 @@ Folder :: list (const std::string& dirname, void* pattern,
89 int status = mu_folder_list (folder, dirname.c_str (), pattern, 89 int status = mu_folder_list (folder, dirname.c_str (), pattern,
90 max_level, &c_list); 90 max_depth, &c_list);
91 if (status) 91 if (status)
@@ -98,3 +98,3 @@ List&
98Folder :: enumerate (const std::string& name, void* pattern, 98Folder :: enumerate (const std::string& name, void* pattern,
99 int flags, size_t max_level, 99 int flags, size_t max_depth,
100 mu_folder_enumerate_fp enumfun, void* enumdata) 100 mu_folder_enumerate_fp enumfun, void* enumdata)
@@ -104,3 +104,3 @@ Folder :: enumerate (const std::string& name, void* pattern,
104 int status = mu_folder_enumerate (folder, name.c_str (), pattern, 104 int status = mu_folder_enumerate (folder, name.c_str (), pattern,
105 flags, max_level, &c_list, 105 flags, max_depth, &c_list,
106 enumfun, enumdata); 106 enumfun, enumdata);
diff --git a/libproto/imap/folder.c b/libproto/imap/folder.c
index 5e43312..9e23847 100644
--- a/libproto/imap/folder.c
+++ b/libproto/imap/folder.c
@@ -274,3 +274,3 @@ _mu_imap_folder_list (mu_folder_t folder, struct mu_folder_scanner *scn)
274 274
275 if (scn->max_level 275 if (scn->max_depth
276 || (scn->match_flags & MU_FOLDER_ATTRIBUTE_ALL) != MU_FOLDER_ATTRIBUTE_ALL) 276 || (scn->match_flags & MU_FOLDER_ATTRIBUTE_ALL) != MU_FOLDER_ATTRIBUTE_ALL)
@@ -294,3 +294,3 @@ _mu_imap_folder_list (mu_folder_t folder, struct mu_folder_scanner *scn)
294 if (!(rp->type & scn->match_flags) 294 if (!(rp->type & scn->match_flags)
295 || (scn->max_level && rp->level > scn->max_level)) 295 || (scn->max_depth && rp->depth > scn->max_depth))
296 mu_iterator_ctl (itr, mu_itrctl_delete, NULL); 296 mu_iterator_ctl (itr, mu_itrctl_delete, NULL);
diff --git a/libproto/imap/genlist.c b/libproto/imap/genlist.c
index 1e2de88..13352b6 100644
--- a/libproto/imap/genlist.c
+++ b/libproto/imap/genlist.c
@@ -39,5 +39,5 @@ struct list_closure
39static int 39static int
40count_level (const char *name, int delim) 40count_depth (const char *name, int delim)
41{ 41{
42 int level = 0; 42 int depth = 0;
43 43
@@ -45,4 +45,4 @@ count_level (const char *name, int delim)
45 if (*name++ == delim) 45 if (*name++ == delim)
46 level++; 46 depth++;
47 return level; 47 return depth;
48} 48}
@@ -111,3 +111,3 @@ list_untagged_handler (mu_imap_t imap, mu_list_t resp, void *data)
111 rp->separator = 0; 111 rp->separator = 0;
112 rp->level = 0; 112 rp->depth = 0;
113 } 113 }
@@ -118,3 +118,3 @@ list_untagged_handler (mu_imap_t imap, mu_list_t resp, void *data)
118 rp->separator = elt->v.string[0]; 118 rp->separator = elt->v.string[0];
119 rp->level = count_level (rp->name, rp->separator); 119 rp->depth = count_depth (rp->name, rp->separator);
120 } 120 }
diff --git a/libproto/imap/tests/imapfolder.c b/libproto/imap/tests/imapfolder.c
index 8d3f6ce..2de8506 100644
--- a/libproto/imap/tests/imapfolder.c
+++ b/libproto/imap/tests/imapfolder.c
@@ -39,3 +39,3 @@ _print_list_entry (void *item, void *data)
39 resp->separator ? resp->separator : ' ', 39 resp->separator ? resp->separator : ' ',
40 resp->level, 40 resp->depth,
41 resp->name); 41 resp->name);
diff --git a/libproto/nntp/folder.c b/libproto/nntp/folder.c
index bdc16f5..8919a03 100644
--- a/libproto/nntp/folder.c
+++ b/libproto/nntp/folder.c
@@ -191,3 +191,3 @@ static int
191nntp_folder_list (mu_folder_t folder, const char *ref, void *pat, int flags, 191nntp_folder_list (mu_folder_t folder, const char *ref, void *pat, int flags,
192 size_t max_level, mu_list_t flist, 192 size_t max_depth, mu_list_t flist,
193 mu_folder_enumerate_fp efp, void *edp) 193 mu_folder_enumerate_fp efp, void *edp)
diff --git a/mu/libexec/imap.c b/mu/libexec/imap.c
index 3496e5b..8136f4b 100644
--- a/mu/libexec/imap.c
+++ b/mu/libexec/imap.c
@@ -1126,3 +1126,3 @@ print_list_item (void *item, void *data)
1126 resp->separator : MU_HIERARCHY_DELIMITER, 1126 resp->separator : MU_HIERARCHY_DELIMITER,
1127 resp->level, 1127 resp->depth,
1128 resp->name); 1128 resp->name);
diff --git a/python/2/libmu_py/folder.c b/python/2/libmu_py/folder.c
index cf1ae69..20b731f 100644
--- a/python/2/libmu_py/folder.c
+++ b/python/2/libmu_py/folder.c
@@ -205,3 +205,3 @@ api_folder_list (PyObject *self, PyObject *args)
205 int status = 0; 205 int status = 0;
206 Py_ssize_t max_level = 0; 206 Py_ssize_t max_depth = 0;
207 char *dirname, *pattern; 207 char *dirname, *pattern;
@@ -212,5 +212,5 @@ api_folder_list (PyObject *self, PyObject *args)
212 if (!PyArg_ParseTuple (args, "O!zs|n", &PyFolderType, &py_folder, 212 if (!PyArg_ParseTuple (args, "O!zs|n", &PyFolderType, &py_folder,
213 &dirname, &pattern, &max_level)) 213 &dirname, &pattern, &max_depth))
214 return NULL; 214 return NULL;
215 if (max_level < 0) 215 if (max_depth < 0)
216 { 216 {
@@ -219,3 +219,3 @@ api_folder_list (PyObject *self, PyObject *args)
219 } 219 }
220 status = mu_folder_list (py_folder->folder, dirname, pattern, max_level, 220 status = mu_folder_list (py_folder->folder, dirname, pattern, max_depth,
221 &c_list); 221 &c_list);
diff --git a/python/2/mailutils/folder.py b/python/2/mailutils/folder.py
index ecd3fc9..8e33d65 100644
--- a/python/2/mailutils/folder.py
+++ b/python/2/mailutils/folder.py
@@ -68,4 +68,4 @@ class Folder:
68 68
69 def list (self, dirname, pattern, max_level=0): 69 def list (self, dirname, pattern, max_depth=0):
70 status, lst = folder.list (self.folder, dirname, pattern, max_level) 70 status, lst = folder.list (self.folder, dirname, pattern, max_depth)
71 if status: 71 if status:
diff --git a/python/3/libmu_py/folder.c b/python/3/libmu_py/folder.c
index 8b3dc93..b24bd0b 100644
--- a/python/3/libmu_py/folder.c
+++ b/python/3/libmu_py/folder.c
@@ -164,3 +164,3 @@ folderdata_extractor (void *data, PyObject **dst)
164 PyTuple_SetItem (*dst, 0, PyUnicode_FromString (attr)); 164 PyTuple_SetItem (*dst, 0, PyUnicode_FromString (attr));
165 PyTuple_SetItem (*dst, 1, PyLong_FromLong (resp->level)); 165 PyTuple_SetItem (*dst, 1, PyLong_FromLong (resp->depth));
166 PyTuple_SetItem (*dst, 2, PyUnicode_FromString (separator)); 166 PyTuple_SetItem (*dst, 2, PyUnicode_FromString (separator));
@@ -174,3 +174,3 @@ api_folder_list (PyObject *self, PyObject *args)
174 int status = 0; 174 int status = 0;
175 Py_ssize_t max_level = 0; 175 Py_ssize_t max_depth = 0;
176 char *dirname, *pattern; 176 char *dirname, *pattern;
@@ -181,5 +181,5 @@ api_folder_list (PyObject *self, PyObject *args)
181 if (!PyArg_ParseTuple (args, "O!zs|n", &PyFolderType, &py_folder, 181 if (!PyArg_ParseTuple (args, "O!zs|n", &PyFolderType, &py_folder,
182 &dirname, &pattern, &max_level)) 182 &dirname, &pattern, &max_depth))
183 return NULL; 183 return NULL;
184 if (max_level < 0) 184 if (max_depth < 0)
185 { 185 {
@@ -188,3 +188,3 @@ api_folder_list (PyObject *self, PyObject *args)
188 } 188 }
189 status = mu_folder_list (py_folder->folder, dirname, pattern, max_level, 189 status = mu_folder_list (py_folder->folder, dirname, pattern, max_depth,
190 &c_list); 190 &c_list);
diff --git a/python/3/mailutils/folder.py b/python/3/mailutils/folder.py
index ecd3fc9..8e33d65 100644
--- a/python/3/mailutils/folder.py
+++ b/python/3/mailutils/folder.py
@@ -68,4 +68,4 @@ class Folder:
68 68
69 def list (self, dirname, pattern, max_level=0): 69 def list (self, dirname, pattern, max_depth=0):
70 status, lst = folder.list (self.folder, dirname, pattern, max_level) 70 status, lst = folder.list (self.folder, dirname, pattern, max_depth)
71 if status: 71 if status:

Return to:

Send suggestions and report system problems to the System administrator.