From a7054af8ad2d19f60b1c8c1863dc7cd8e82bf574 Mon Sep 17 00:00:00 2001 From: "jan.nijtmans" Date: Tue, 17 Mar 2020 10:10:03 +0000 Subject: Add various Xcode builds (8 up to 11.3) to Travis --- .travis.yml | 44 ++++++++++++++++++++++++++++++++++++-------- 1 file changed, 36 insertions(+), 8 deletions(-) diff --git a/.travis.yml b/.travis.yml index e192cb1..84c557c 100644 --- a/.travis.yml +++ b/.travis.yml @@ -112,14 +112,42 @@ matrix: env: - BUILD_DIR=unix - CFGOPT="--with-tcl=/usr/local/opt/tcl-tk/lib --disable-corefoundation --x-includes=/opt/X11/include --x-libraries=/opt/X11/lib CFLAGS=-I/usr/local/opt/tcl-tk/include" -# - name: "macOS/Xcode 11.3/Shared" -# os: osx -# osx_image: xcode11.3 -# env: -# - BUILD_DIR=macosx -# install: [] -# script: -# - make INSTALL_PATH=/usr/local/opt/tcl-tk/lib TCL_INSTALL_PATH=/usr/local/opt/tcl-tk/lib CFLAGS=-I/usr/local/opt/tcl-tk/include tk + - name: "macOS/Xcode 11.3/Shared" + os: osx + osx_image: xcode11.3 + env: + - BUILD_DIR=macosx + install: [] + script: &mactest + - make INSTALL_PATH=/usr/local/opt/tcl-tk/lib TCL_INSTALL_PATH=/usr/local/opt/tcl-tk/lib CFLAGS=-I/usr/local/opt/tcl-tk/include tk + - name: "macOS/Xcode 11/Shared" + os: osx + osx_image: xcode11 + env: + - BUILD_DIR=macosx + install: [] + script: *mactest + - name: "macOS/Xcode 10/Shared" + os: osx + osx_image: xcode10.3 + env: + - BUILD_DIR=macosx + install: [] + script: *mactest + - name: "macOS/Xcode 9/Shared" + os: osx + osx_image: xcode9 + env: + - BUILD_DIR=macosx + install: [] + script: *mactest + - name: "macOS/Xcode 8/Shared" + os: osx + osx_image: xcode8 + env: + - BUILD_DIR=macosx + install: [] + script: *mactest # Test on Windows with MSVC native # - name: "Windows/MSVC/Shared" # os: windows -- cgit v0.12 From 54591f0f146041539b5a5d39654e19e71d6a4b1c Mon Sep 17 00:00:00 2001 From: "jan.nijtmans" Date: Wed, 18 Mar 2020 17:45:24 +0000 Subject: Build Mac using unix/Makefile in stead of macosx/GNUmakefile, because that's easier to get working directly. --- .travis.yml | 45 ++++++++++++++++++++++++++------------------- 1 file changed, 26 insertions(+), 19 deletions(-) diff --git a/.travis.yml b/.travis.yml index 84c557c..32cd25e 100644 --- a/.travis.yml +++ b/.travis.yml @@ -106,48 +106,55 @@ matrix: - BUILD_DIR=unix - CFGOPT="--enable-symbols" # Testing on Mac, various styles - - name: "macOS/Xcode 11.3/Shared/Unix-like" + - name: "macOS/Xcode 11.3/Shared" os: osx osx_image: xcode11.3 env: - BUILD_DIR=unix - - CFGOPT="--with-tcl=/usr/local/opt/tcl-tk/lib --disable-corefoundation --x-includes=/opt/X11/include --x-libraries=/opt/X11/lib CFLAGS=-I/usr/local/opt/tcl-tk/include" - - name: "macOS/Xcode 11.3/Shared" + - CFGOPT="--prefix=/usr/local/opt/tcl-tk --with-tcl=/usr/local/opt/tcl-tk/lib --enable-aqua CC=clang CFLAGS=-I/usr/local/opt/tcl-tk/include" + - name: "macOS/Xcode 11.3/Static" + os: osx + osx_image: xcode11.3 + env: + - BUILD_DIR=unix + - CFGOPT="--prefix=/usr/local/opt/tcl-tk --with-tcl=/usr/local/opt/tcl-tk/lib --enable-aqua --disable-shared CC=clang CFLAGS=-I/usr/local/opt/tcl-tk/include" + - name: "macOS/Xcode 11.3/Debug" os: osx osx_image: xcode11.3 env: - - BUILD_DIR=macosx - install: [] - script: &mactest - - make INSTALL_PATH=/usr/local/opt/tcl-tk/lib TCL_INSTALL_PATH=/usr/local/opt/tcl-tk/lib CFLAGS=-I/usr/local/opt/tcl-tk/include tk + - BUILD_DIR=unix + - CFGOPT="--prefix=/usr/local/opt/tcl-tk --with-tcl=/usr/local/opt/tcl-tk/lib --enable-aqua --enable-symbols CC=clang CFLAGS=-I/usr/local/opt/tcl-tk/include" + - name: "macOS/Xcode 11.3/Shared/XQuartz" + os: osx + osx_image: xcode11.3 + env: + - BUILD_DIR=unix + - CFGOPT="--prefix=/usr/local/opt/tcl-tk --with-tcl=/usr/local/opt/tcl-tk/lib --disable-corefoundation --x-includes=/opt/X11/include --x-libraries=/opt/X11/lib CC=clang CFLAGS=-I/usr/local/opt/tcl-tk/include" +# Older MacOS versions - name: "macOS/Xcode 11/Shared" os: osx osx_image: xcode11 env: - - BUILD_DIR=macosx - install: [] - script: *mactest + - BUILD_DIR=unix + - CFGOPT="--prefix=/usr/local/opt/tcl-tk --with-tcl=/usr/local/opt/tcl-tk/lib --enable-aqua CC=clang CFLAGS=-I/usr/local/opt/tcl-tk/include" - name: "macOS/Xcode 10/Shared" os: osx osx_image: xcode10.3 env: - - BUILD_DIR=macosx - install: [] - script: *mactest + - BUILD_DIR=unix + - CFGOPT="--prefix=/usr/local/opt/tcl-tk --with-tcl=/usr/local/opt/tcl-tk/lib --enable-aqua CC=clang CFLAGS=-I/usr/local/opt/tcl-tk/include" - name: "macOS/Xcode 9/Shared" os: osx osx_image: xcode9 env: - - BUILD_DIR=macosx - install: [] - script: *mactest + - BUILD_DIR=unix + - CFGOPT="--prefix=/usr/local/opt/tcl-tk --with-tcl=/usr/local/opt/tcl-tk/lib --enable-aqua CC=clang CFLAGS=-I/usr/local/opt/tcl-tk/include" - name: "macOS/Xcode 8/Shared" os: osx osx_image: xcode8 env: - - BUILD_DIR=macosx - install: [] - script: *mactest + - BUILD_DIR=unix + - CFGOPT="--prefix=/usr/local/opt/tcl-tk --with-tcl=/usr/local/opt/tcl-tk/lib --enable-aqua CC=clang CFLAGS=-I/usr/local/opt/tcl-tk/include" # Test on Windows with MSVC native # - name: "Windows/MSVC/Shared" # os: windows -- cgit v0.12 From 2697ce46a4ddd06efb4c543aeeee43b6f3dcf94b Mon Sep 17 00:00:00 2001 From: "jan.nijtmans" Date: Thu, 19 Mar 2020 09:37:41 +0000 Subject: Increase FONTMAP_PAGES from 192 to 256, making room for Unicode 13 plane 3. --- unix/tkUnixFont.c | 14 +++++++------- win/tkWinFont.c | 9 +++++---- 2 files changed, 12 insertions(+), 11 deletions(-) diff --git a/unix/tkUnixFont.c b/unix/tkUnixFont.c index d95527b..6e7b4c3 100644 --- a/unix/tkUnixFont.c +++ b/unix/tkUnixFont.c @@ -36,11 +36,12 @@ static const char *const encodingList[] = { #define FONTMAP_SHIFT 10 #define FONTMAP_BITSPERPAGE (1 << FONTMAP_SHIFT) -#define FONTMAP_PAGES (0x30000 / FONTMAP_BITSPERPAGE) +#define FONTMAP_NUMCHARS 0x40000 +#define FONTMAP_PAGES (FONTMAP_NUMCHARS / FONTMAP_BITSPERPAGE) typedef struct FontFamily { struct FontFamily *nextPtr; /* Next in list of all known font families. */ - int refCount; /* How many SubFonts are referring to this + size_t refCount; /* How many SubFonts are referring to this * FontFamily. When the refCount drops to * zero, this FontFamily may be freed. */ /* @@ -1910,8 +1911,7 @@ FreeFontFamily( if (familyPtr == NULL) { return; } - familyPtr->refCount--; - if (familyPtr->refCount > 0) { + if (familyPtr->refCount-- > 1) { return; } if (familyPtr->encoding) { @@ -1979,7 +1979,7 @@ FindSubFontForChar( SubFont *subFontPtr; Tcl_DString ds; - if (ch < 0 || ch > 0x30000) { + if (ch < 0 || ch >= FONTMAP_NUMCHARS) { ch = 0xFFFD; } @@ -2133,7 +2133,7 @@ FontMapLookup( { int row, bitOffset; - if (ch < 0 || ch >= 0x30000) { + if (ch < 0 || ch >= FONTMAP_NUMCHARS) { return 0; } row = ch >> FONTMAP_SHIFT; @@ -2176,7 +2176,7 @@ FontMapInsert( { int row, bitOffset; - if (ch >= 0 && ch < 0x30000) { + if (ch >= 0 && ch < FONTMAP_NUMCHARS) { row = ch >> FONTMAP_SHIFT; if (subFontPtr->fontMap[row] == NULL) { FontMapLoadPage(subFontPtr, row); diff --git a/win/tkWinFont.c b/win/tkWinFont.c index 7b70a08..aae34a7 100644 --- a/win/tkWinFont.c +++ b/win/tkWinFont.c @@ -29,7 +29,8 @@ #define FONTMAP_SHIFT 10 #define FONTMAP_BITSPERPAGE (1 << FONTMAP_SHIFT) -#define FONTMAP_PAGES (0x30000 / FONTMAP_BITSPERPAGE) +#define FONTMAP_NUMCHARS 0x40000 +#define FONTMAP_PAGES (FONTMAP_NUMCHARS / FONTMAP_BITSPERPAGE) typedef struct FontFamily { struct FontFamily *nextPtr; /* Next in list of all known font families. */ @@ -1920,7 +1921,7 @@ FindSubFontForChar( SubFont *subFontPtr; Tcl_DString ds; - if ((ch < BASE_CHARS) || (ch >= 0x30000)) { + if ((ch < BASE_CHARS) || (ch >= FONTMAP_NUMCHARS)) { return &fontPtr->subFontArray[0]; } @@ -2090,7 +2091,7 @@ FontMapLookup( { int row, bitOffset; - if (ch < 0 || ch >= 0x30000) { + if (ch < 0 || ch >= FONTMAP_NUMCHARS) { return 0; } @@ -2134,7 +2135,7 @@ FontMapInsert( { int row, bitOffset; - if (ch >= 0 && ch < 0x30000) { + if (ch >= 0 && ch < FONTMAP_NUMCHARS) { row = ch >> FONTMAP_SHIFT; if (subFontPtr->fontMap[row] == NULL) { FontMapLoadPage(subFontPtr, row); -- cgit v0.12