Browse Source

Remove EOL spaces from stderr and curses

nfactor-troky
Kano 13 years ago
parent
commit
ba14a6705e
  1. 2
      main.c
  2. 1
      miner.h
  3. 9
      util.c

2
main.c

@ -216,7 +216,7 @@ static int opt_n_threads;
static int mining_threads; static int mining_threads;
static int num_processors; static int num_processors;
static int scan_intensity; static int scan_intensity;
static bool use_curses = true; bool use_curses = true;
static bool opt_submit_stale; static bool opt_submit_stale;
static bool opt_nogpu; static bool opt_nogpu;
static bool opt_usecpu; static bool opt_usecpu;

1
miner.h

@ -314,6 +314,7 @@ extern char *opt_kernel_path;
extern char *cgminer_path; extern char *cgminer_path;
extern bool opt_autofan; extern bool opt_autofan;
extern bool opt_autoengine; extern bool opt_autoengine;
extern bool use_curses;
extern const uint32_t sha256_init_state[]; extern const uint32_t sha256_init_state[];
extern json_t *json_rpc_call(CURL *curl, const char *url, const char *userpass, extern json_t *json_rpc_call(CURL *curl, const char *url, const char *userpass,

9
util.c

@ -100,7 +100,16 @@ void vapplog(int prio, const char *fmt, va_list ap)
vfprintf(stderr, f, apc); /* atomic write to stderr */ vfprintf(stderr, f, apc); /* atomic write to stderr */
fflush(stderr); fflush(stderr);
} }
if (use_curses)
log_curses(prio, f, ap); log_curses(prio, f, ap);
else {
int len = strlen(f);
strcpy(f + len - 1, " \n");
log_curses(prio, f, ap);
}
} }
} }

Loading…
Cancel
Save