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
d735c7fa
...
d735c7fa10dc6b4f7b42ad89a1366411aff52999
authored
2008-02-26 13:37:53 +0000
by
Sergey Poznyakoff
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
Fix error reporting.
1 parent
8363108e
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
29 additions
and
6 deletions
libcfg/init.c
libcfg/init.c
View file @
d735c7f
...
...
@@ -87,15 +87,23 @@ int
mu_parse_config_files
(
struct
mu_cfg_param
*
param
,
void
*
target
)
{
int
flags
=
0
;
int
rc
;
if
(
mu_cfg_parser_verbose
)
flags
|=
MU_PARSE_CONFIG_VERBOSE
;
if
(
mu_cfg_parser_verbose
>
1
)
flags
|=
MU_PARSE_CONFIG_DUMP
;
if
(
mu_load_site_rcfile
)
mu_parse_config
(
MU_CONFIG_FILE
,
mu_program_name
,
param
,
flags
|
MU_PARSE_CONFIG_GLOBAL
,
target
);
{
rc
=
mu_parse_config
(
MU_CONFIG_FILE
,
mu_program_name
,
param
,
flags
|
MU_PARSE_CONFIG_GLOBAL
,
target
);
if
(
rc
==
ENOMEM
)
{
mu_error
(
"%s"
,
mu_strerror
(
rc
));
return
rc
;
}
}
if
(
mu_load_user_rcfile
&&
mu_program_name
)
{
...
...
@@ -106,14 +114,29 @@ mu_parse_config_files (struct mu_cfg_param *param, void *target)
strcpy
(
file_name
,
"~/."
);
strcat
(
file_name
,
mu_program_name
);
mu_parse_config
(
file_name
,
mu_program_name
,
param
,
flags
,
target
);
rc
=
mu_parse_config
(
file_name
,
mu_program_name
,
param
,
flags
,
target
);
if
(
rc
==
ENOMEM
)
{
mu_error
(
"%s"
,
mu_strerror
(
rc
));
return
rc
;
}
free
(
file_name
);
}
}
if
(
mu_load_rcfile
)
mu_parse_config
(
mu_load_rcfile
,
mu_program_name
,
param
,
flags
,
target
);
{
rc
=
mu_parse_config
(
mu_load_rcfile
,
mu_program_name
,
param
,
flags
,
target
);
if
(
rc
)
{
mu_error
(
_
(
"Cannot open file %s: %s"
),
mu_load_rcfile
,
mu_strerror
(
rc
));
return
rc
;
}
}
return
0
;
}
...
...
Please
register
or
sign in
to post a comment