mirror of
https://github.com/dankamongmen/notcurses
synced 2025-03-10 01:29:05 -04:00
windows: no sys/wait.h, weird printf specifiers
This commit is contained in:
parent
dae8e340d2
commit
ff2ef8571d
@ -5,8 +5,6 @@
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#include "lib/logging.h"
|
||||
|
||||
#include <time.h>
|
||||
|
||||
#define NANOSECS_IN_SEC 1000000000ul
|
||||
|
@ -886,7 +886,7 @@ ncdirect* ncdirect_core_init(const char* termtype, FILE* outfp, uint64_t flags){
|
||||
|
||||
err:
|
||||
if(ret->ctermfd >= 0){
|
||||
tcsetattr(ret->ctermfd, TCSANOW, &ret->tcache.tpreserved);
|
||||
(void)tcsetattr(ret->ctermfd, TCSANOW, &ret->tcache.tpreserved);
|
||||
}
|
||||
drop_signals(ret);
|
||||
free(ret);
|
||||
|
@ -12,6 +12,7 @@
|
||||
#include <unigbrk.h>
|
||||
#include <stdbool.h>
|
||||
#include "notcurses/notcurses.h"
|
||||
#include "compat/compat.h"
|
||||
#include "logging.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
@ -233,8 +234,7 @@ egcpool_check_validity(const egcpool* pool, int offset){
|
||||
wchar_t wcs;
|
||||
int r = mbrtowc(&wcs, egc, strlen(egc), &mbstate);
|
||||
if(r < 0){
|
||||
fprintf(stderr, "Invalid UTF8 at offset 0x%06x, len %zu [%s]\n",
|
||||
offset, strlen(egc), strerror(errno));
|
||||
fprintf(stderr, "Invalid UTF8 at offset 0x%06x [%s]\n", offset, strerror(errno));
|
||||
return false;
|
||||
}
|
||||
egc += r;
|
||||
|
@ -1,7 +1,9 @@
|
||||
#include <fcntl.h>
|
||||
#include <unistd.h>
|
||||
#include <pthread.h>
|
||||
#ifndef __MINGW64__
|
||||
#include <sys/wait.h>
|
||||
#endif
|
||||
#include <sys/time.h>
|
||||
#ifdef USING_PIDFD
|
||||
#error "USING_PIDFD was already defined; it should not be."
|
||||
|
@ -20,6 +20,7 @@ extern "C" {
|
||||
#include <wctype.h>
|
||||
#include <pthread.h>
|
||||
#include <stdbool.h>
|
||||
#include <inttypes.h>
|
||||
#include <unictype.h>
|
||||
#ifndef __MINGW64__
|
||||
#include <langinfo.h>
|
||||
@ -622,9 +623,9 @@ ncplane_cell_ref_yx(const ncplane* n, int y, int x){
|
||||
|
||||
static inline void
|
||||
cell_debug(const egcpool* p, const nccell* c){
|
||||
fprintf(stderr, "gcluster: %08x %s style: 0x%04x chan: 0x%016jx\n",
|
||||
fprintf(stderr, "gcluster: %08x %s style: 0x%04x chan: 0x%016" PRIx64 "\n",
|
||||
c->gcluster, egcpool_extended_gcluster(p, c), c->stylemask,
|
||||
(uintmax_t)c->channels);
|
||||
c->channels);
|
||||
}
|
||||
|
||||
static inline void
|
||||
|
Loading…
x
Reference in New Issue
Block a user