aboutsummaryrefslogtreecommitdiff
path: root/project/dclib/dclib-file.c
diff options
context:
space:
mode:
Diffstat (limited to 'project/dclib/dclib-file.c')
-rw-r--r--project/dclib/dclib-file.c87
1 files changed, 0 insertions, 87 deletions
diff --git a/project/dclib/dclib-file.c b/project/dclib/dclib-file.c
index 1356d32..1b287f8 100644
--- a/project/dclib/dclib-file.c
+++ b/project/dclib/dclib-file.c
@@ -3618,93 +3618,6 @@ void DumpSearchFile ( FILE *f, int indent,
///////////////////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////////////////
-uint SearchConfig1
-(
- search_file_list_t *sfl,
- // valid search list, new file will be appended
- ccp config_fname, // default filename (without path) of config file
-
- ccp option, // NULL or filename by option => CONF_HINT_OPT
- ccp home_path, // NULL or home path for config file => CONF_HINT_HOME
- ccp etc_path, // NULL or etc path for config file => CONF_HINT_ETC
- ccp share_path, // NULL or share path for config file => CONF_HINT_MISC
-
- int stop_mode // >0: stop if found, >1: stop on option
-
- // hints (by source, values=prio): 8:option, 4:home, 2:etc, 1:prog-path
-)
-{
- DASSERT(sfl);
- char buf[PATH_MAX];
-
- uint count = 0;
- search_file_t *sf;
- if ( option && *option )
- {
- sf = AppendSearchFile(sfl,option,CPM_COPY,config_fname);
- if (sf)
- {
- sf->hint |= CONF_HINT_OPT;
- if ( sf->itype == INTY_REG && ++count && stop_mode > 0 )
- return 1;
- if ( stop_mode > 1 )
- return 0;
- }
- }
-
- if (home_path)
- {
- ccp home = getenv("HOME");
- if (home)
- home_path = PathCatPP(buf,sizeof(buf),home,home_path);
- sf = AppendSearchFile(sfl,home_path,CPM_COPY,config_fname);
- if (sf)
- {
- sf->hint |= CONF_HINT_HOME;
- if ( sf->itype == INTY_REG && ++count && stop_mode > 0 )
- return 1;
- }
- }
-
- if (etc_path)
- {
- sf = AppendSearchFile(sfl,etc_path,CPM_COPY,config_fname);
- if (sf)
- {
- sf->hint |= CONF_HINT_ETC;
- if ( sf->itype == INTY_REG && ++count && stop_mode > 0 )
- return 1;
- }
- }
-
- if (share_path)
- {
- sf = AppendSearchFile(sfl,share_path,CPM_COPY,config_fname);
- if (sf)
- {
- sf->hint |= CONF_HINT_MISC;
- if ( sf->itype == INTY_REG && ++count && stop_mode > 0 )
- return 1;
- }
- }
-
- ccp progpath = ProgramDirectory();
- if (progpath)
- {
- sf = AppendSearchFile(sfl,progpath,CPM_COPY,config_fname);
- if (sf)
- {
- sf->hint |= CONF_HINT_INST;
- if ( sf->itype == INTY_REG && ++count && stop_mode > 0 )
- return 1;
- }
- }
-
- return count;
-}
-
-///////////////////////////////////////////////////////////////////////////////
-
static int add_search
(
// returns 0 if !stop_if_found, 2 if added+found, 1 if added, 0 else