mirror of
https://github.com/dankamongmen/notcurses
synced 2025-03-10 01:29:05 -04:00
windows: elide still more signal jank
This commit is contained in:
parent
59cb0b8bfa
commit
3d3561fe0e
@ -17,6 +17,7 @@ extern "C" {
|
||||
// FIXME placeholders
|
||||
#define tcgetattr(x, y) -1
|
||||
#define tcsetattr(x, y, z) -1
|
||||
#define sigaction(x, y, z) -1
|
||||
#define ECHO 0
|
||||
#define ICANON 0
|
||||
#define ICRNL 0
|
||||
@ -25,6 +26,9 @@ extern "C" {
|
||||
#define TCSANOW 0
|
||||
#define O_CLOEXEC O_NOINHERIT
|
||||
#define O_NOCTTY 0
|
||||
#define SA_SIGNINFO 0
|
||||
#define SA_RESETHAND 0
|
||||
#define SIGQUIT 0
|
||||
#define sigdelset(x, y)
|
||||
#define sigaddset(x, y)
|
||||
typedef struct siginfo_t {
|
||||
@ -38,7 +42,6 @@ typedef struct sigaction {
|
||||
void (*sa_restorer)(void);
|
||||
} sigaction;
|
||||
#define nl_langinfo(x) "UTF-8"
|
||||
#define sigaction(x, y, z)
|
||||
#define ppoll(w, x, y, z) WSAPoll((w), (x), (y))
|
||||
#else
|
||||
#include <sys/ioctl.h>
|
||||
|
@ -580,10 +580,10 @@ write_sixel_header(FILE* fp, int leny, int lenx, const sixeltable* stab, sixel_p
|
||||
//fprintf(fp, "#%d;2;%u;%u;%u", i, rgb[0], rgb[1], rgb[2]);
|
||||
// we emit the average of the actual sums rather than the RGB clustering
|
||||
// point, as it can be (and usually is) much more accurate.
|
||||
int f = fprintf(fp, "#%d;2;%jd;%jd;%jd", i,
|
||||
(intmax_t)(stab->deets[idx].sums[0] * 100 / count / 255),
|
||||
(intmax_t)(stab->deets[idx].sums[1] * 100 / count / 255),
|
||||
(intmax_t)(stab->deets[idx].sums[2] * 100 / count / 255));
|
||||
int f = fprintf(fp, "#%d;2;%" PRId64 ";%" PRId64 ";%" PRId64, i,
|
||||
(stab->deets[idx].sums[0] * 100 / count / 255),
|
||||
(stab->deets[idx].sums[1] * 100 / count / 255),
|
||||
(stab->deets[idx].sums[2] * 100 / count / 255));
|
||||
if(f < 0){
|
||||
return -1;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user