logging compataibility with emacs

This commit is contained in:
John Alanbrook 2023-01-31 23:41:09 +00:00
parent 35b9482928
commit fcf6f76949
3 changed files with 6 additions and 9 deletions

View file

@ -11,8 +11,8 @@
#define logLevel 0
//char *logstr[] = { "INFO", "WARN", "\x1b[1;31mERROR\x1b[0m", "CRITICAL" };
char *logstr[] = { "INFO", "WARN", "ERROR", "CRITICAL" };
char *catstr[] = {"ENGINE", "SCRIPT"};
char *logstr[] = { "info", "warn", "error", "critical" };
char *catstr[] = {"engine", "script"};
FILE *logfile = NULL;
@ -34,7 +34,7 @@ void mYughLog(int category, int priority, int line, const char *file, const char
va_end(args);
char buffer[ERROR_BUFFER] = { '\0' };
snprintf(buffer, ERROR_BUFFER, "%s | %s | %s [ %s:%d ] %s\n", logstr[priority], catstr[category], dt, file, line, msgbuffer);
snprintf(buffer, ERROR_BUFFER, "%s:%d: %s, %s | %s\n", file, line, logstr[priority], catstr[category], msgbuffer);
fprintf(stderr, "%s", buffer);
fflush(stderr);

View file

@ -175,10 +175,8 @@ duk_ret_t duk_spline_cmd(duk_context *duk)
duk_put_prop_index(duk, arridx, i);
}
free(samples);
ts_bspline_free(&spline);
return 1;
}

View file

@ -10,7 +10,7 @@
static struct bus bus[256];
static int first = 0; /* First bus available */
//static struct bus *first_on = NULL;
static int first_on = -1; /* First bus to fill buffer with */
short mastermix[BUF_FRAMES*CHANNELS];
@ -37,7 +37,7 @@ void mixer_init() {
}
struct bus *first_free_bus(struct dsp_filter in) {
if (!initted) return;
if (!initted) return NULL;
assert(initted);
if (first == -1) return NULL;
@ -80,5 +80,4 @@ void bus_fill_buffers(short *master, int n) {
curbus = nextbus;
}
}