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
43cf6489
...
43cf6489867bbcb70212a497a12ca24782bff9c7
authored
2007-06-22 09:18:44 +0000
by
Sergey Poznyakoff
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
(mu_property_sget_value,mu_property_aget_value): New functions
1 parent
4c1fb17f
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
34 additions
and
0 deletions
include/mailutils/property.h
mailbox/property.c
include/mailutils/property.h
View file @
43cf648
...
...
@@ -34,6 +34,10 @@ extern void *mu_property_get_owner (mu_property_t);
extern
int
mu_property_set_value
(
mu_property_t
,
const
char
*
,
const
char
*
,
int
);
extern
int
mu_property_get_value
(
mu_property_t
,
const
char
*
,
char
*
,
size_t
,
size_t
*
);
extern
int
mu_property_sget_value
(
mu_property_t
prop
,
const
char
*
key
,
const
char
**
buffer
);
extern
int
mu_property_aget_value
(
mu_property_t
prop
,
const
char
*
key
,
char
**
buffer
);
/* Helper functions. */
extern
int
mu_property_set
(
mu_property_t
,
const
char
*
);
...
...
mailbox/property.c
View file @
43cf648
...
...
@@ -146,6 +146,36 @@ mu_property_get_value (mu_property_t prop, const char *key, char *buffer,
}
int
mu_property_sget_value
(
mu_property_t
prop
,
const
char
*
key
,
const
char
**
buffer
)
{
struct
property_item
*
item
=
NULL
;
int
status
;
status
=
property_find
(
prop
,
key
,
&
item
);
if
(
status
==
0
)
*
buffer
=
item
->
value
;
return
status
;
}
int
mu_property_aget_value
(
mu_property_t
prop
,
const
char
*
key
,
char
**
buffer
)
{
struct
property_item
*
item
=
NULL
;
int
status
;
status
=
property_find
(
prop
,
key
,
&
item
);
if
(
status
==
0
)
{
*
buffer
=
strdup
(
item
->
value
);
if
(
!*
buffer
)
status
=
ENOMEM
;
}
return
status
;
}
int
mu_property_set
(
mu_property_t
prop
,
const
char
*
k
)
{
struct
property_item
*
item
=
NULL
;
...
...
Please
register
or
sign in
to post a comment