Windows: kill some warnings

pull/2122/head
nick black 3 years ago
parent 321f9ecbe2
commit ba030a3293

@ -26,13 +26,13 @@ extern "C" {
#include <string.h>
#include <byteswap.h>
#define htole(x) (__bswap_32(htonl(x)))
#define wcwidth(w) 1 // FIXME lol, no
#define wcswidth(w, s) (wcslen(w)) // FIXME lol, no
#define wcwidth(w) 1 // FIXME lol, no
#define wcswidth(w, s) (int)(wcslen(w)) // FIXME lol, no
#elif defined(__MINGW64__) // Windows
#include <string.h>
#define wcwidth(w) 1 // FIXME lol, no
#define wcswidth(w, s) (wcslen(w)) // FIXME lol, no
#define htole(x) (x) // FIXME are all windows installs LE? ugh
#define wcwidth(w) 1 // FIXME lol, no
#define wcswidth(w, s) (int)(wcslen(w)) // FIXME lol, no
#define htole(x) (x) // FIXME are all windows installs LE? ugh
#else // BSDs
#include <sys/endian.h>
#define htole(x) (bswap32(htonl(x)))

@ -14,7 +14,6 @@
#include <sys/sysctl.h>
#include <sys/utsname.h>
#else
#include <windows.h>
#include <sysinfoapi.h>
#endif
#include <notcurses/notcurses.h>

@ -81,8 +81,8 @@ int main(int argc, char **argv){
fflush(stdout);
ncdirect_cursor_yx(n, &newy, &newx);
int realcols = (newx - x) + ncdirect_dim_x(n) * (newy - y);
printf("\n iterated wcwidth: %d total bytes: %zu wcswidth: %d true width: %d\n\n",
totalcols, totalb, wcswidth(wbuf, used), realcols);
printf("\n iterated wcwidth: %d total bytes: %llu wcswidth: %d true width: %d\n\n",
totalcols, (unsigned long long)totalb, wcswidth(wbuf, used), realcols);
ncdirect_cursor_yx(n, &y, &x);
// throw up a background color for invisible glyphs
uint64_t chan = NCCHANNELS_INITIALIZER(0xff, 0xff, 0xff, 0, 0x80, 0);

Loading…
Cancel
Save