Skip to content
Toggle navigation
Toggle navigation
This project
Loading...
Sign in
John McEleney
/
mailutils
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Network
Create a new issue
Builds
Commits
Issue Boards
Files
Commits
Network
Compare
Branches
Tags
Commit
04dc4c9f
...
04dc4c9f799494a091ceef476b668a1b53026e58
authored
2001-11-01 04:35:44 +0000
by
Alain Magloire
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
* imap4d/namespace.c: Put namespace_enumerate() and namespace_enumerate()
static scope.
1 parent
a6c22092
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
13 deletions
imap4d/namespace.c
imap4d/namespace.c
View file @
04dc4c9
...
...
@@ -34,12 +34,12 @@ set_namespace(int i, char *str)
{
char
*
p
,
*
save
;
struct
namespace_t
ns
;
/* first, estimate the number of items in subdir_v array: */
ns
.
subdir_c
=
1
;
ns
.
subdir_c
=
1
;
for
(
p
=
strchr
(
str
,
':'
);
p
&&
*
p
;
p
=
strchr
(
p
+
1
,
':'
))
ns
.
subdir_c
++
;
/* Now allocate the memory */
ns
.
subdir_v
=
calloc
(
ns
.
subdir_c
,
sizeof
(
ns
.
subdir_v
[
0
]));
...
...
@@ -56,9 +56,9 @@ set_namespace(int i, char *str)
ns
.
subdir_v
[
ns
.
subdir_c
++
]
=
util_normalize_path
(
strdup
(
p
),
"/"
);
}
}
namespace
[
i
]
=
ns
;
return
0
;
}
...
...
@@ -78,13 +78,13 @@ static void
print_namespace
(
int
n
)
{
int
i
;
if
(
namespace
[
n
].
subdir_c
==
0
)
{
util_send
(
"NIL"
);
return
;
}
util_send
(
"("
);
for
(
i
=
0
;
i
<
namespace
[
n
].
subdir_c
;
i
++
)
{
...
...
@@ -93,7 +93,7 @@ print_namespace(int n)
util_send
(
")"
);
}
int
static
int
namespace_enumerate
(
int
ns
,
nsfp_t
f
,
void
*
closure
)
{
int
i
,
rc
;
...
...
@@ -104,14 +104,14 @@ namespace_enumerate(int ns, nsfp_t f, void *closure)
return
0
;
}
int
static
int
namespace_enumerate_all
(
nsfp_t
f
,
void
*
closure
)
{
return
namespace_enumerate
(
NS_PRIVATE
,
f
,
closure
)
||
namespace_enumerate
(
NS_OTHER
,
f
,
closure
)
||
namespace_enumerate
(
NS_SHARED
,
f
,
closure
);
}
int
imap4d_namespace
(
struct
imap4d_command
*
command
,
char
*
arg
)
{
...
...
@@ -128,7 +128,7 @@ imap4d_namespace(struct imap4d_command *command, char *arg)
util_send
(
" "
);
print_namespace
(
NS_SHARED
);
util_send
(
"
\r\n
"
);
return
util_finish
(
command
,
RESP_OK
,
"Completed"
);
}
...
...
@@ -177,7 +177,7 @@ namespace_checkfullpath (char *name, const char *pattern, const char *delim)
return
path
;
util_normalize_path
(
path
,
"/"
);
info
.
name
=
path
;
info
.
namelen
=
strlen
(
path
);
if
(
!
namespace_enumerate_all
(
check_namespace
,
&
info
))
...
...
@@ -192,7 +192,7 @@ namespace_checkfullpath (char *name, const char *pattern, const char *delim)
free
(
path
);
return
NULL
;
}
return
path
;
}
...
...
Please
register
or
sign in
to post a comment