Skip to content

Commit

Permalink
simplewallet: fix output
Browse files Browse the repository at this point in the history
Output messages was written after the promt. This results in messages
without color (even error), unreadable and not copyable output.

- disable promt for all output
  • Loading branch information
psychocrypt committed Jan 24, 2020
1 parent cdb1963 commit cd2d039
Showing 1 changed file with 9 additions and 8 deletions.
17 changes: 9 additions & 8 deletions src/simplewallet/simplewallet.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -84,14 +84,6 @@

#include "common/gulps.hpp"

#define GULPS_PRINT_FAIL(...) GULPS_ERROR(tr("Error: "), __VA_ARGS__)
#define GULPS_PRINT_OK(...) GULPS_PRINT(__VA_ARGS__)
#define GULPSF_PRINT_OK(...) GULPSF_PRINT(__VA_ARGS__)
#define GULPS_PRINT_BOLD(...) GULPS_PRINT_CLR(gulps::COLOR_BOLD_WHITE, __VA_ARGS__)
#define GULPS_PRINT_GREEN(...) GULPS_PRINT_CLR(gulps::COLOR_GREEN, __VA_ARGS__)
#define GULPSF_PRINT_GREEN(...) GULPSF_PRINT_CLR(gulps::COLOR_GREEN, __VA_ARGS__)
#define GULPS_PRINT_SECRET(...) GULPS_OUTPUT(gulps::OUT_USER_1, gulps::LEVEL_PRINT, gulps_major_cat::c_str(), "secret", gulps::COLOR_WHITE, __VA_ARGS__)

#ifdef WIN32
#undef fmt
#include <windows.h>
Expand All @@ -101,6 +93,15 @@

#include "readline_buffer.h"

#define GULPS_PRINT_FAIL(...) do{PAUSE_READLINE();GULPS_ERROR(tr("Error: "), __VA_ARGS__);}while(false)
#define GULPS_PRINT_OK(...) do{PAUSE_READLINE();GULPS_PRINT(__VA_ARGS__);}while(false)
#define GULPSF_PRINT_OK(...) do{PAUSE_READLINE();GULPSF_PRINT(__VA_ARGS__);}while(false)
#define GULPS_PRINT_BOLD(...) do{PAUSE_READLINE();GULPS_PRINT_CLR(gulps::COLOR_BOLD_WHITE, __VA_ARGS__);}while(false)
#define GULPS_PRINT_GREEN(...) do{PAUSE_READLINE();GULPS_PRINT_CLR(gulps::COLOR_GREEN, __VA_ARGS__);}while(false)
#define GULPSF_PRINT_GREEN(...) do{PAUSE_READLINE();GULPSF_PRINT_CLR(gulps::COLOR_GREEN, __VA_ARGS__);}while(false)
#define GULPS_PRINT_SECRET(...) do{PAUSE_READLINE();GULPS_OUTPUT(gulps::OUT_USER_1, gulps::LEVEL_PRINT, gulps_major_cat::c_str(), "secret", gulps::COLOR_WHITE, __VA_ARGS__);}while(false)


using namespace std;
using namespace epee;
using namespace cryptonote;
Expand Down

0 comments on commit cd2d039

Please sign in to comment.