mirror of
https://github.com/dankamongmen/notcurses.git
synced 2024-11-20 03:25:47 +00:00
Windows: kill some warnings
This commit is contained in:
parent
321f9ecbe2
commit
ba030a3293
@ -27,11 +27,11 @@ extern "C" {
|
||||
#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 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 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>
|
||||
|
@ -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…
Reference in New Issue
Block a user