@ -235,6 +235,8 @@ static unsigned long rejected_count = 0L;
static double * thr_hashrates ;
static double * thr_hashrates ;
uint64_t global_hashrate = 0 ;
uint64_t global_hashrate = 0 ;
uint32_t opt_work_size = 0 ; /* default */
# ifdef HAVE_GETOPT_LONG
# ifdef HAVE_GETOPT_LONG
# include <getopt.h>
# include <getopt.h>
# else
# else
@ -279,6 +281,7 @@ Options:\n\
Device IDs start counting from 0 ! Alternatively takes \ n \
Device IDs start counting from 0 ! Alternatively takes \ n \
string names of your cards like gtx780ti or gt640 # 2 \ n \
string names of your cards like gtx780ti or gt640 # 2 \ n \
( matching 2 nd gt640 in the PC ) \ n \
( matching 2 nd gt640 in the PC ) \ n \
- i - - intensity = N GPU intensity 0 - 31 ( default : auto ) \ n \
- f , - - diff Divide difficulty by this factor ( std is 1 ) \ n \
- f , - - diff Divide difficulty by this factor ( std is 1 ) \ n \
- v , - - vote = VOTE block reward vote ( for HeavyCoin ) \ n \
- v , - - vote = VOTE block reward vote ( for HeavyCoin ) \ n \
- m , - - trust - pool trust the max block reward vote ( maxvote ) sent by the pool \ n \
- m , - - trust - pool trust the max block reward vote ( maxvote ) sent by the pool \ n \
@ -298,7 +301,7 @@ Options:\n\
- - no - longpoll disable X - Long - Polling support \ n \
- - no - longpoll disable X - Long - Polling support \ n \
- - no - stratum disable X - Stratum support \ n \
- - no - stratum disable X - Stratum support \ n \
- q , - - quiet disable per - thread hashmeter output \ n \
- q , - - quiet disable per - thread hashmeter output \ n \
- K , - - no - color disable colored output \ n \
- - no - color disable colored output \ n \
- D , - - debug enable debug output \ n \
- D , - - debug enable debug output \ n \
- P , - - protocol - dump verbose dump of protocol - level activities \ n "
- P , - - protocol - dump verbose dump of protocol - level activities \ n "
# ifdef HAVE_SYSLOG_H
# ifdef HAVE_SYSLOG_H
@ -324,7 +327,7 @@ static char const short_options[] =
# ifdef HAVE_SYSLOG_H
# ifdef HAVE_SYSLOG_H
" S "
" S "
# endif
# endif
" a:c:CK Dhp:Px:qr:R:s:t:T:o:u:O:Vd:f:mv: " ;
" a:c:i: Dhp:Px:qr:R:s:t:T:o:u:O:Vd:f:mv: " ;
static struct option const options [ ] = {
static struct option const options [ ] = {
{ " algo " , 1 , NULL , ' a ' } ,
{ " algo " , 1 , NULL , ' a ' } ,
@ -335,9 +338,10 @@ static struct option const options[] = {
{ " cputest " , 0 , NULL , 1006 } ,
{ " cputest " , 0 , NULL , 1006 } ,
{ " cert " , 1 , NULL , 1001 } ,
{ " cert " , 1 , NULL , 1001 } ,
{ " config " , 1 , NULL , ' c ' } ,
{ " config " , 1 , NULL , ' c ' } ,
{ " no-color " , 0 , NULL , ' K ' } ,
{ " no-color " , 0 , NULL , 1002 } ,
{ " debug " , 0 , NULL , ' D ' } ,
{ " debug " , 0 , NULL , ' D ' } ,
{ " help " , 0 , NULL , ' h ' } ,
{ " help " , 0 , NULL , ' h ' } ,
{ " intensity " , 1 , NULL , ' i ' } ,
{ " no-longpoll " , 0 , NULL , 1003 } ,
{ " no-longpoll " , 0 , NULL , 1003 } ,
{ " no-stratum " , 0 , NULL , 1007 } ,
{ " no-stratum " , 0 , NULL , 1007 } ,
{ " pass " , 1 , NULL , ' p ' } ,
{ " pass " , 1 , NULL , ' p ' } ,
@ -1603,12 +1607,12 @@ static void parse_arg (int key, char *arg)
}
}
break ;
break ;
}
}
case ' C ' :
case ' i ' :
/* color for compat */
v = atoi ( arg ) ;
use_colors = true ;
if ( v < 0 | | v > 31 )
break ;
show_usage_and_exit ( 1 ) ;
case ' K ' :
if ( v > 0 ) /* 0 = default */
use_colors = false ;
opt_work_size = ( 1 < < v ) ;
break ;
break ;
case ' D ' :
case ' D ' :
opt_debug = true ;
opt_debug = true ;
@ -1738,6 +1742,9 @@ static void parse_arg (int key, char *arg)
free ( opt_cert ) ;
free ( opt_cert ) ;
opt_cert = strdup ( arg ) ;
opt_cert = strdup ( arg ) ;
break ;
break ;
case 1002 :
use_colors = false ;
break ;
case 1005 :
case 1005 :
opt_benchmark = true ;
opt_benchmark = true ;
want_longpoll = false ;
want_longpoll = false ;