* changed log file text to ASCII3.
pull/4/head
David Freese 2016-05-23 08:22:55 -05:00
rodzic 0a99bef130
commit e14bbb60af
1 zmienionych plików z 4 dodań i 1 usunięć

Wyświetl plik

@ -40,6 +40,8 @@
#include "fl_digi.h"
#include "timeops.h"
#include "ascii.h"
using namespace std;
static const char *lognames[] = { "RX", "TX", "", "" };
@ -84,7 +86,8 @@ void cLogfile::log_to_file(log_t type, const string& s)
fprintf(logfile, "%s %s : %s (%s): ", lognames[type], freq, logmode, timestr);
}
for (size_t i = 0; i < s.length(); i++)
if (s[i] == '\n' || (unsigned char)s[i] >= ' ') fprintf(logfile, "%c", s[i]);
fprintf(logfile, "%s", ascii3[s[i] & 0xFF]);
// if (s[i] == '\n' || (unsigned char)s[i] >= ' ') fprintf(logfile, "%c", s[i]);
retflag = *s.rbegin() == '\n';
if (!retflag)
fflush(logfile);