Skip to content

Commit

Permalink
Merge 9.0
Browse files Browse the repository at this point in the history
  • Loading branch information
jan.nijtmans committed Jan 4, 2024
2 parents 7637b6f + bce6bda commit 28fd8d6
Show file tree
Hide file tree
Showing 39 changed files with 290 additions and 200 deletions.
20 changes: 10 additions & 10 deletions .github/workflows/linux-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,19 +24,19 @@ jobs:
compiler:
- "gcc"
- "clang"
cfgopt:
config:
- ""
- "CFLAGS=-DTK_NO_DEPRECATED=1"
- "--disable-shared"
- "--disable-xft"
- "--disable-xss"
- "--enable-symbols"
steps:
- name: Checkout
- name: Checkout Tk
uses: actions/checkout@v4
with:
path: tk
- name: Checkout Tcl
- name: Checkout Tcl 8.6
uses: actions/checkout@v4
with:
repository: tcltk/tcl
Expand All @@ -53,9 +53,9 @@ jobs:
echo "BUILD_CONFIG_ID=$OPTS" >> $GITHUB_ENV
working-directory: "."
env:
CFGOPT: ${{ matrix.cfgopt }}
CFGOPT: ${{ matrix.config }}
COMPILER: ${{ matrix.compiler }}
OPTS: ${{ matrix.compiler }}${{ matrix.cfgopt }}
OPTS: ${{ matrix.compiler }}${{ matrix.config }}
- name: Configure and Build Tcl
run: |
./configure $CFGOPT "--prefix=$HOME/install dir" || {
Expand All @@ -69,7 +69,7 @@ jobs:
}
echo "TCL_CONFIG_PATH=`pwd`" >> $GITHUB_ENV
working-directory: tcl/unix
- name: Configure (opts=${{ matrix.cfgopt }})
- name: Configure (opts=${{ matrix.config }})
run: |
./configure $CFGOPT --with-tcl=$TCL_CONFIG_PATH "--prefix=$HOME/install dir" || {
cat config.log
Expand Down Expand Up @@ -131,12 +131,12 @@ jobs:
matrix:
compiler:
- "gcc"
cfgopt:
config:
- ""
- "--disable-xft"
- "--enable-symbols"
steps:
- name: Checkout
- name: Checkout Tk
uses: actions/checkout@v4
with:
path: tk
Expand All @@ -155,7 +155,7 @@ jobs:
echo "CC=$COMPILER" >> $GITHUB_ENV
working-directory: "."
env:
CFGOPT: ${{ matrix.cfgopt }}
CFGOPT: ${{ matrix.config }}
COMPILER: ${{ matrix.compiler }}
- name: Configure and Build Tcl
run: |
Expand All @@ -170,7 +170,7 @@ jobs:
}
echo "TCL_CONFIG_PATH=`pwd`" >> $GITHUB_ENV
working-directory: tcl/unix
- name: Configure ${{ matrix.cfgopt }}
- name: Configure ${{ matrix.config }}
run: |
./configure $CFGOPT --with-tcl=$TCL_CONFIG_PATH "--prefix=$HOME/install dir" || {
cat config.log
Expand Down
File renamed without changes.
4 changes: 2 additions & 2 deletions .github/workflows/mac-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ jobs:
shell: bash
working-directory: tk/macosx
steps:
- name: Check out Tk
- name: Checkout Tk
uses: actions/checkout@v4
with:
path: tk
Expand Down Expand Up @@ -72,7 +72,7 @@ jobs:
shell: bash
working-directory: tk/unix
steps:
- name: Check out Tk
- name: Checkout Tk
uses: actions/checkout@v4
with:
path: tk
Expand Down
50 changes: 26 additions & 24 deletions .github/workflows/win-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,10 @@ jobs:
# Using powershell means we need to explicitly stop on failure
strategy:
matrix:
symbols:
- "none"
- "symbols"
config:
- ""
- "OPTS=symbols"
- "OPTS=static"
steps:
- name: Checkout Tk
uses: actions/checkout@v4
Expand All @@ -46,32 +47,32 @@ jobs:
mkdir install
cd install
echo "INSTALLDIR=`pwd`" >> $GITHUB_ENV
- name: Build Tcl (OPTS=${{ matrix.symbols }})
- name: Build Tcl (${{ matrix.config }})
run: |
&nmake -f makefile.vc release install OPTS=${{ matrix.symbols }}
&nmake -f makefile.vc release install ${{ matrix.config }}
if ($lastexitcode -ne 0) {
throw "nmake exit code: $lastexitcode"
}
working-directory: tcl/win
- name: Build Tk (OPTS=${{ matrix.symbols }})
- name: Build Tk (${{ matrix.config }})
run: |
&nmake -f makefile.vc all OPTS=${{ matrix.symbols }}
&nmake -f makefile.vc all ${{ matrix.config }}
if ($lastexitcode -ne 0) {
throw "nmake exit code: $lastexitcode"
}
- name: Build Test Harness (OPTS=${{ matrix.symbols }})
- name: Build Test Harness (${{ matrix.config }})
run: |
&nmake -f makefile.vc tktest OPTS=${{ matrix.symbols }}
&nmake -f makefile.vc tktest ${{ matrix.config }}
if ($lastexitcode -ne 0) {
throw "nmake exit code: $lastexitcode"
}
- name: Run Tk Tests (OPTS=${{ matrix.symbols }})
- name: Run Tk Tests (${{ matrix.config }})
run: |
nmake -f makefile.vc test-classic OPTS=${{ matrix.symbols }} | tee out-classic.txt || {
nmake -f makefile.vc test-classic ${{ matrix.config }} | tee out-classic.txt || {
echo "::error::Failure during Test"
exit 1
}
nmake -f makefile.vc test-ttk OPTS=${{ matrix.symbols }} | tee out-ttk.txt || {
nmake -f makefile.vc test-ttk ${{ matrix.config }} | tee out-ttk.txt || {
echo "::error::Failure during Test"
exit 1
}
Expand All @@ -87,15 +88,15 @@ jobs:
CI_BUILD_WITH_MSVC: 1
shell: bash
timeout-minutes: 15
- name: Build Help (OPTS=${{ matrix.symbols }})
- name: Build Help (${{ matrix.config }})
run: |
&nmake -f makefile.vc htmlhelp OPTS=${{ matrix.symbols }}
&nmake -f makefile.vc htmlhelp ${{ matrix.config }}
if ($lastexitcode -ne 0) {
throw "nmake exit code: $lastexitcode"
}
- name: Install (OPTS=${{ matrix.symbols }})
- name: Install (${{ matrix.config }})
run: |
&nmake -f makefile.vc install OPTS=${{ matrix.symbols }}
&nmake -f makefile.vc install ${{ matrix.config }}
if ($lastexitcode -ne 0) {
throw "nmake exit code: $lastexitcode"
}
Expand All @@ -107,10 +108,11 @@ jobs:
working-directory: win
strategy:
matrix:
symbols:
- "no"
- "mem"
- "all"
config:
- ""
- "--enable-config=mem"
- "--enable-config=all"
- "--disable-shared"
steps:
- name: Install MSYS2
uses: msys2/setup-msys2@v2
Expand All @@ -132,7 +134,7 @@ jobs:
mkdir "${HOME}/install_dir"
echo "INSTALL_DIR=${HOME}/install_dir" >> $GITHUB_ENV
working-directory: generic
- name: Configure and Build Tcl
- name: Configure and Build Tcl (${{ matrix.config }})
run: |
./configure $CFGOPT "--prefix=$INSTALL_DIR" || {
cat config.log
Expand All @@ -145,17 +147,17 @@ jobs:
}
echo "TCL_CONFIG_PATH=`pwd`" >> $GITHUB_ENV
env:
CFGOPT: --enable-64bit --enable-symbols=${{ matrix.symbols }}
CFGOPT: --enable-64bit ${{ matrix.config }}
working-directory: tcl/win
- name: Configure Tk (symbols=${{ matrix.symbols }})
- name: Configure Tk (${{ matrix.config }})
run: |
./configure $CFGOPT "--prefix=$HOME/INSTALL_DIR" "--with-tcl=$TCL_CONFIG_PATH" || {
cat config.log
echo "::error::Failure during Configure"
exit 1
}
env:
CFGOPT: --enable-64bit --enable-symbols=${{ matrix.symbols }}
CFGOPT: --enable-64bit ${{ matrix.config }}
- name: Build Tk
run: |
make all tktest || {
Expand Down
9 changes: 2 additions & 7 deletions doc/menu.n
Original file line number Diff line number Diff line change
Expand Up @@ -338,11 +338,6 @@ the \fBactivate\fR option to deactivate all the entries in the
menu. In most cases the specification of \fB{}\fR causes
nothing to happen in the widget command.
.TP 12
\fBnone\fR
.
Same as \fB{}\fR
This form may not be abbreviated.
.TP 12
\fB@\fIx\fB,\fIy\fR
.
Indicates the entry that covers the point in the menu's window specified
Expand Down Expand Up @@ -382,7 +377,7 @@ The following widget commands are possible for menu widgets:
Change the state of the entry indicated by \fIindex\fR to \fBactive\fR
and redisplay it using its active colors.
Any previously-active entry is deactivated. If \fIindex\fR
is specified as \fB{}\fR or \fBnone\fR, or if the specified entry is
is specified as \fB{}\fR, or if the specified entry is
disabled, then the menu ends up with no active entry.
Returns an empty string.
.TP
Expand Down Expand Up @@ -469,7 +464,7 @@ equivalent to \fB{}\fR.
\fIpathName \fBindex \fIindex\fR
.
Returns the numerical index corresponding to \fIindex\fR, or
\fB{}\fR if \fIindex\fR was specified as \fB{}\fR or \fBnone\fR.
\fB{}\fR if \fIindex\fR was specified as \fB{}\fR.
.TP
\fIpathName \fBinsert \fIindex type \fR?\fIid\fR? ?\fIoption value option value ...\fR?
.
Expand Down
2 changes: 1 addition & 1 deletion doc/ttk_combobox.n
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ the last element of the list, moreover the same simple interpretation as
for the command \fBstring index\fR is supported, with simple integer index
arithmetic and indexing relative to \fBend\fR).
Otherwise, returns the index of the current value in the list of
\fB\-values\fR or \fB\-1\fR if the current value does not appear in the list.
\fB\-values\fR or \fB\{}\fR if the current value does not appear in the list.
.TP
\fIpathName \fBget\fR
Returns the current value of the combobox.
Expand Down
2 changes: 1 addition & 1 deletion generic/tk.h
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ extern "C" {
#if TK_MAJOR_VERSION == 9
# define TK_MINOR_VERSION 0
# define TK_RELEASE_LEVEL TCL_BETA_RELEASE
# define TK_RELEASE_SERIAL 0
# define TK_RELEASE_SERIAL 1

# define TK_VERSION "9.0"
# define TK_PATCH_LEVEL "9.0b1"
Expand Down
41 changes: 24 additions & 17 deletions generic/tk3d.c
Original file line number Diff line number Diff line change
Expand Up @@ -639,8 +639,7 @@ Tk_GetReliefFromObj(
*
* Results:
* A standard Tcl return value. If all goes well then *reliefPtr is
* filled in with one of the values TK_RELIEF_RAISED, TK_RELIEF_FLAT, or
* TK_RELIEF_SUNKEN.
* filled in with one of the values TK_RELIEF_*
*
* Side effects:
* None.
Expand All @@ -656,30 +655,38 @@ Tk_GetRelief(
{
char c;
size_t length;
int relief;

c = name[0];
length = strlen(name);
if ((c == 'f') && (strncmp(name, "flat", length) == 0)) {
*reliefPtr = TK_RELIEF_FLAT;
} else if ((c == 'g') && (strncmp(name, "groove", length) == 0)
&& (length >= 2)) {
*reliefPtr = TK_RELIEF_GROOVE;
relief = TK_RELIEF_FLAT;
} else if ((c == 'g') && (strncmp(name, "groove", length) == 0)) {
relief = TK_RELIEF_GROOVE;
} else if ((c == 'r') && (strncmp(name, "raised", length) == 0)
&& (length >= 2)) {
*reliefPtr = TK_RELIEF_RAISED;
} else if ((c == 'r') && (strncmp(name, "ridge", length) == 0)) {
*reliefPtr = TK_RELIEF_RIDGE;
} else if ((c == 's') && (strncmp(name, "solid", length) == 0)) {
*reliefPtr = TK_RELIEF_SOLID;
} else if ((c == 's') && (strncmp(name, "sunken", length) == 0)) {
*reliefPtr = TK_RELIEF_SUNKEN;
relief = TK_RELIEF_RAISED;
} else if ((c == 'r') && (strncmp(name, "ridge", length) == 0)
&& (length >= 2)) {
relief = TK_RELIEF_RIDGE;
} else if ((c == 's') && (strncmp(name, "solid", length) == 0)
&& (length >= 2)) {
relief = TK_RELIEF_SOLID;
} else if ((c == 's') && (strncmp(name, "sunken", length) == 0)
&& (length >= 2)) {
relief = TK_RELIEF_SUNKEN;
} else {
Tcl_SetObjResult(interp,
Tcl_ObjPrintf("bad relief \"%.50s\": must be %s",
name, "flat, groove, raised, ridge, solid, or sunken"));
Tcl_SetErrorCode(interp, "TK", "VALUE", "RELIEF", NULL);
if (interp) {
Tcl_SetObjResult(interp,
Tcl_ObjPrintf("bad relief \"%.50s\": must be %s",
name, "flat, groove, raised, ridge, solid, or sunken"));
Tcl_SetErrorCode(interp, "TK", "VALUE", "RELIEF", NULL);
}
return TCL_ERROR;
}
if (reliefPtr) {
*reliefPtr = relief;
}
return TCL_OK;
}

Expand Down
4 changes: 2 additions & 2 deletions generic/tkCanvArc.c
Original file line number Diff line number Diff line change
Expand Up @@ -374,7 +374,7 @@ ArcCoords(
return TCL_ERROR;
} else if (objc != 4) {
Tcl_SetObjResult(interp, Tcl_ObjPrintf(
"wrong # coordinates: expected 4, got %" TCL_SIZE_MODIFIER "u", objc));
"wrong # coordinates: expected 4, got %" TCL_SIZE_MODIFIER "d", objc));
Tcl_SetErrorCode(interp, "TK", "CANVAS", "COORDS", "ARC",
NULL);
return TCL_ERROR;
Expand Down Expand Up @@ -404,7 +404,7 @@ ArcCoords(
ComputeArcBbox(canvas, arcPtr);
} else {
Tcl_SetObjResult(interp, Tcl_ObjPrintf(
"wrong # coordinates: expected 0 or 4, got %" TCL_SIZE_MODIFIER "u", objc));
"wrong # coordinates: expected 0 or 4, got %" TCL_SIZE_MODIFIER "d", objc));
Tcl_SetErrorCode(interp, "TK", "CANVAS", "COORDS", "ARC", NULL);
return TCL_ERROR;
}
Expand Down
4 changes: 2 additions & 2 deletions generic/tkCanvBmap.c
Original file line number Diff line number Diff line change
Expand Up @@ -263,7 +263,7 @@ BitmapCoords(
return TCL_ERROR;
} else if (objc != 2) {
Tcl_SetObjResult(interp, Tcl_ObjPrintf(
"wrong # coordinates: expected 2, got %" TCL_SIZE_MODIFIER "u", objc));
"wrong # coordinates: expected 2, got %" TCL_SIZE_MODIFIER "d", objc));
Tcl_SetErrorCode(interp, "TK", "CANVAS", "COORDS", "BITMAP",
NULL);
return TCL_ERROR;
Expand All @@ -278,7 +278,7 @@ BitmapCoords(
ComputeBitmapBbox(canvas, bmapPtr);
} else {
Tcl_SetObjResult(interp, Tcl_ObjPrintf(
"wrong # coordinates: expected 0 or 2, got %" TCL_SIZE_MODIFIER "u", objc));
"wrong # coordinates: expected 0 or 2, got %" TCL_SIZE_MODIFIER "d", objc));
Tcl_SetErrorCode(interp, "TK", "CANVAS", "COORDS", "BITMAP", NULL);
return TCL_ERROR;
}
Expand Down
4 changes: 2 additions & 2 deletions generic/tkCanvImg.c
Original file line number Diff line number Diff line change
Expand Up @@ -247,7 +247,7 @@ ImageCoords(
return TCL_ERROR;
} else if (objc != 2) {
Tcl_SetObjResult(interp, Tcl_ObjPrintf(
"wrong # coordinates: expected 2, got %" TCL_SIZE_MODIFIER "u", objc));
"wrong # coordinates: expected 2, got %" TCL_SIZE_MODIFIER "d", objc));
Tcl_SetErrorCode(interp, "TK", "CANVAS", "COORDS", "IMAGE",
NULL);
return TCL_ERROR;
Expand All @@ -262,7 +262,7 @@ ImageCoords(
ComputeImageBbox(canvas, imgPtr);
} else {
Tcl_SetObjResult(interp, Tcl_ObjPrintf(
"wrong # coordinates: expected 0 or 2, got %" TCL_SIZE_MODIFIER "u", objc));
"wrong # coordinates: expected 0 or 2, got %" TCL_SIZE_MODIFIER "d", objc));
Tcl_SetErrorCode(interp, "TK", "CANVAS", "COORDS", "IMAGE", NULL);
return TCL_ERROR;
}
Expand Down
4 changes: 2 additions & 2 deletions generic/tkCanvLine.c
Original file line number Diff line number Diff line change
Expand Up @@ -401,13 +401,13 @@ LineCoords(
}
if (objc & 1) {
Tcl_SetObjResult(interp, Tcl_ObjPrintf(
"wrong # coordinates: expected an even number, got %" TCL_SIZE_MODIFIER "u",
"wrong # coordinates: expected an even number, got %" TCL_SIZE_MODIFIER "d",
objc));
Tcl_SetErrorCode(interp, "TK", "CANVAS", "COORDS", "LINE", NULL);
return TCL_ERROR;
} else if (objc < 4) {
Tcl_SetObjResult(interp, Tcl_ObjPrintf(
"wrong # coordinates: expected at least 4, got %" TCL_SIZE_MODIFIER "u", objc));
"wrong # coordinates: expected at least 4, got %" TCL_SIZE_MODIFIER "d", objc));
Tcl_SetErrorCode(interp, "TK", "CANVAS", "COORDS", "LINE", NULL);
return TCL_ERROR;
}
Expand Down
Loading

0 comments on commit 28fd8d6

Please sign in to comment.