diff options
| author | Fabien Costantini <fabien@onepost.net> | 2012-04-05 05:12:30 +0000 |
|---|---|---|
| committer | Fabien Costantini <fabien@onepost.net> | 2012-04-05 05:12:30 +0000 |
| commit | 8809c5d65dd20895dcae90e9d2af05fd271f2e9e (patch) | |
| tree | d53cbf6d921ae68bda31b6c5d522dc8c87ee9bd1 /src/fl_set_fonts_win32.cxx | |
| parent | 37ea8ba9e635e9655417714bd49ab7bb2b36beb5 (diff) | |
Fixed build error in msvs because Fl ref to FULLSCREEN enum was not accessible in Fl_Widget. new inline is_fullscreen() getter has been implemented to avoid a build error with (at least) msvc compilers. Fixed a ton of warnings / problems when bilding on windows 64 bits target with ms toolchain. cleaned up about 200 warnings raised when building win74 targets.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@9325 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
Diffstat (limited to 'src/fl_set_fonts_win32.cxx')
| -rw-r--r-- | src/fl_set_fonts_win32.cxx | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/fl_set_fonts_win32.cxx b/src/fl_set_fonts_win32.cxx index 8cf2866e8..604ac2817 100644 --- a/src/fl_set_fonts_win32.cxx +++ b/src/fl_set_fonts_win32.cxx @@ -62,11 +62,11 @@ enumcbw(CONST LOGFONTW *lpelf, LPARAM p) { if (!p && lpelf->lfCharSet != ANSI_CHARSET) return 1; char *n = NULL; - int l = wcslen(lpelf->lfFaceName); - unsigned dstlen = fl_utf8fromwc(n, 0, (xchar*)lpelf->lfFaceName, l) + 1; // measure the string + size_t l = wcslen(lpelf->lfFaceName); + unsigned dstlen = fl_utf8fromwc(n, 0, (xchar*)lpelf->lfFaceName, (unsigned) l) + 1; // measure the string n = (char*) malloc(dstlen); //n[fl_unicode2utf((xchar*)lpelf->lfFaceName, l, n)] = 0; - dstlen = fl_utf8fromwc(n, dstlen, (xchar*)lpelf->lfFaceName, l); // convert the string + dstlen = fl_utf8fromwc(n, dstlen, (xchar*)lpelf->lfFaceName, (unsigned) l); // convert the string n[dstlen] = 0; for (int i=0; i<FL_FREE_FONT; i++) // skip if one of our built-in fonts if (!strcmp(Fl::get_font_name((Fl_Font)i),n)) {free(n);return 1;} @@ -146,10 +146,10 @@ Fl::get_font_sizes(Fl_Font fnum, int*& sizep) { // unsigned short *b = (unsigned short*) malloc((l + 1) * sizeof(short)); // fl_utf2unicode((unsigned char*)s->name+1, l, (xchar*)b); const char *nm = (const char*)s->name+1; - int len = strlen(s->name+1); - int l = fl_utf8toUtf16(nm, len, NULL, 0); // Pass NULL to query length required + size_t len = strlen(s->name+1); + unsigned l = fl_utf8toUtf16(nm, (unsigned) len, NULL, 0); // Pass NULL to query length required unsigned short *b = (unsigned short*) malloc((l + 1) * sizeof(short)); - l = fl_utf8toUtf16(nm, len, b, (l+1)); // Now do the conversion + l = fl_utf8toUtf16(nm, (unsigned) len, b, (l+1)); // Now do the conversion b[l] = 0; EnumFontFamiliesW(fl_gc, (WCHAR*)b, (FONTENUMPROCW)EnumSizeCbW, 0); free(b); |
