remove the -cT option

it was another vestige from the compat wrapper.

amends cbac8aa75.
This commit is contained in:
Oswald Buddenhagen 2020-10-05 11:56:30 +02:00
parent 23513564df
commit 6463a72f12
3 changed files with 5 additions and 13 deletions

View File

@ -317,7 +317,7 @@ merge_ops( int cops, int ops[] )
} }
int int
load_config( const char *where, int pseudo ) load_config( const char *where )
{ {
conffile_t cfile; conffile_t cfile;
store_conf_t *store, **storeapp = &stores; store_conf_t *store, **storeapp = &stores;
@ -331,14 +331,12 @@ load_config( const char *where, int pseudo )
char buf[1024]; char buf[1024];
if (!where) { if (!where) {
assert( !pseudo );
nfsnprintf( path, sizeof(path), "%s/." EXE "rc", Home ); nfsnprintf( path, sizeof(path), "%s/." EXE "rc", Home );
cfile.file = path; cfile.file = path;
} else } else
cfile.file = where; cfile.file = where;
if (!pseudo) info( "Reading configuration file %s\n", cfile.file );
info( "Reading configuration file %s\n", cfile.file );
if (!(cfile.fp = fopen( cfile.file, "r" ))) { if (!(cfile.fp = fopen( cfile.file, "r" ))) {
sys_error( "Cannot open config file '%s'", cfile.file ); sys_error( "Cannot open config file '%s'", cfile.file );
@ -525,7 +523,5 @@ load_config( const char *where, int pseudo )
cfile.err |= merge_ops( gcops, global_conf.ops ); cfile.err |= merge_ops( gcops, global_conf.ops );
if (!global_conf.sync_state) if (!global_conf.sync_state)
global_conf.sync_state = expand_strdup( "~/." EXE "/" ); global_conf.sync_state = expand_strdup( "~/." EXE "/" );
if (!cfile.err && pseudo)
unlink( where );
return cfile.err; return cfile.err;
} }

View File

@ -46,6 +46,6 @@ int parse_int( conffile_t *cfile );
uint parse_size( conffile_t *cfile ); uint parse_size( conffile_t *cfile );
int getcline( conffile_t *cfile ); int getcline( conffile_t *cfile );
int merge_ops( int cops, int ops[] ); int merge_ops( int cops, int ops[] );
int load_config( const char *filename, int pseudo ); int load_config( const char *filename );
#endif #endif

View File

@ -431,7 +431,7 @@ main( int argc, char **argv )
channel_conf_t *chan; channel_conf_t *chan;
string_list_t *channame; string_list_t *channame;
char *config = NULL, *opt, *ochar; char *config = NULL, *opt, *ochar;
int oind, cops = 0, op, ops[2] = { 0, 0 }, pseudo = 0, ms_warn = 0; int oind, cops = 0, op, ops[2] = { 0, 0 }, ms_warn = 0;
tzset(); tzset();
gethostname( Hostname, sizeof(Hostname) ); gethostname( Hostname, sizeof(Hostname) );
@ -595,10 +595,6 @@ main( int argc, char **argv )
mvars->list = 1; mvars->list = 1;
break; break;
case 'c': case 'c':
if (*ochar == 'T') {
ochar++;
pseudo = 1;
}
if (oind >= argc) { if (oind >= argc) {
error( "-c requires an argument.\n" ); error( "-c requires an argument.\n" );
return 1; return 1;
@ -747,7 +743,7 @@ main( int argc, char **argv )
if (merge_ops( cops, ops )) if (merge_ops( cops, ops ))
return 1; return 1;
if (load_config( config, pseudo )) if (load_config( config ))
return 1; return 1;
if (!channels) { if (!channels) {