diff --git a/ChangeLog b/ChangeLog index df45405..c379891 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1838,3 +1838,8 @@ Use MapViewOfFileEx for mmap on Windows (fstapi). Define FST_DO_MISALIGNED_OPS on AArch64 (fstapi). Fixed attrbegin short length problem. +3.3.116 25jun23 Fix manpage/odt for vcd2fst command switch documentation for + zlibpack. + Add GDK_WINDOWING_WAYLAND check for gdkwayland.h header usage. + Changed sprintf to snprintf in fstapi.c. + Fix init crash on show_base_symbols enabled. diff --git a/LICENSE.TXT b/LICENSE.TXT index c018f77..e45b515 100644 --- a/LICENSE.TXT +++ b/LICENSE.TXT @@ -1,6 +1,6 @@ ########################################################################## -GTKWave 3.3.115 Wave Viewer is Copyright (C) 1999-2023 Tony Bybell. +GTKWave 3.3.116 Wave Viewer is Copyright (C) 1999-2023 Tony Bybell. Portions of GTKWave are Copyright (C) 1999-2023 Udi Finkelstein. Context support is Copyright (C) 2007-2023 Kermin Elliott Fleming. Trace group support is Copyright (C) 2009-2023 Donald Baltus. diff --git a/configure b/configure index b547ed7..dd6e44c 100755 --- a/configure +++ b/configure @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.69 for gtkwave-gtk3 3.3.115. +# Generated by GNU Autoconf 2.69 for gtkwave-gtk3 3.3.116. # # Report bugs to . # @@ -580,8 +580,8 @@ # Identity of this package. PACKAGE_NAME='gtkwave-gtk3' PACKAGE_TARNAME='gtkwave-gtk3' -PACKAGE_VERSION='3.3.115' -PACKAGE_STRING='gtkwave-gtk3 3.3.115' +PACKAGE_VERSION='3.3.116' +PACKAGE_STRING='gtkwave-gtk3 3.3.116' PACKAGE_BUGREPORT='bybell@rocketmail.com' PACKAGE_URL='' @@ -1395,7 +1395,7 @@ # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures gtkwave-gtk3 3.3.115 to adapt to many kinds of systems. +\`configure' configures gtkwave-gtk3 3.3.116 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1461,7 +1461,7 @@ if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of gtkwave-gtk3 3.3.115:";; + short | recursive ) echo "Configuration of gtkwave-gtk3 3.3.116:";; esac cat <<\_ACEOF @@ -1609,7 +1609,7 @@ test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -gtkwave-gtk3 configure 3.3.115 +gtkwave-gtk3 configure 3.3.116 generated by GNU Autoconf 2.69 Copyright (C) 2012 Free Software Foundation, Inc. @@ -2253,7 +2253,7 @@ This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by gtkwave-gtk3 $as_me 3.3.115, which was +It was created by gtkwave-gtk3 $as_me 3.3.116, which was generated by GNU Autoconf 2.69. Invocation command line was $ $0 $@ @@ -3120,7 +3120,7 @@ # Define the identity of the package. PACKAGE='gtkwave-gtk3' - VERSION='3.3.115' + VERSION='3.3.116' cat >>confdefs.h <<_ACEOF @@ -11568,7 +11568,7 @@ # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by gtkwave-gtk3 $as_me 3.3.115, which was +This file was extended by gtkwave-gtk3 $as_me 3.3.116, which was generated by GNU Autoconf 2.69. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -11634,7 +11634,7 @@ cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ -gtkwave-gtk3 config.status 3.3.115 +gtkwave-gtk3 config.status 3.3.116 configured by $0, generated by GNU Autoconf 2.69, with options \\"\$ac_cs_config\\" diff --git a/configure.ac b/configure.ac index 7c063b0..06cd513 100644 --- a/configure.ac +++ b/configure.ac @@ -2,7 +2,7 @@ # Process this file with autoconf to produce a configure script. AC_PREREQ(2.59) -AC_INIT(gtkwave-gtk3, 3.3.115, bybell@rocketmail.com) +AC_INIT(gtkwave-gtk3, 3.3.116, bybell@rocketmail.com) AC_CONFIG_SRCDIR([src/vcd.c]) AM_INIT_AUTOMAKE AC_CONFIG_HEADER([config.h]) diff --git a/contrib/bundle_for_osx/Info-gtkwave.plist b/contrib/bundle_for_osx/Info-gtkwave.plist index d6ece82..64e3f7b 100644 --- a/contrib/bundle_for_osx/Info-gtkwave.plist +++ b/contrib/bundle_for_osx/Info-gtkwave.plist @@ -8,7 +8,7 @@ CFBundleExecutable gtkwave CFBundleGetInfoString - 3.3.115, (C) 1999-2023 Tony Bybell http://gtkwave.sourceforge.net + 3.3.116, (C) 1999-2023 Tony Bybell http://gtkwave.sourceforge.net CFBundleIconFile gtkwave.icns CFBundleIdentifier @@ -18,11 +18,11 @@ CFBundlePackageType APPL CFBundleShortVersionString - 3.3.115 + 3.3.116 CFBundleSignature ???? CFBundleVersion - 3.3.115 + 3.3.116 NSHumanReadableCopyright Copyright 1999 - 2023 Tony Bybell, GNU General Public License. LSMinimumSystemVersion diff --git a/man/vcd2fst.1 b/man/vcd2fst.1 index 0c4684a..e3ebd73 100644 --- a/man/vcd2fst.1 +++ b/man/vcd2fst.1 @@ -24,7 +24,7 @@ \fB\-F,\-\-fastpack\fR Indicates that fastlz should be used instead of LZ4 for value change data. .TP -\fB\-4,\-\-zlibpack\fR +\fB\-Z,\-\-zlibpack\fR Indicates that zlib should be used instead of LZ4 for value change data. .TP \fB\-c,\-\-compress\fR diff --git a/src/gtk23compat.h b/src/gtk23compat.h index 42ba1fd..e56d733 100644 --- a/src/gtk23compat.h +++ b/src/gtk23compat.h @@ -8,7 +8,7 @@ #endif #if GTK_CHECK_VERSION(3,22,26) -#if !defined(__MINGW32__) && !defined(MAC_INTEGRATION) +#if !defined(__MINGW32__) && !defined(MAC_INTEGRATION) && defined(GDK_WINDOWING_WAYLAND) #include #endif #endif diff --git a/src/helpers/fst/fstapi.c b/src/helpers/fst/fstapi.c index df8b238..205e439 100644 --- a/src/helpers/fst/fstapi.c +++ b/src/helpers/fst/fstapi.c @@ -2052,7 +2052,8 @@ int zfd; int fourpack_duo = 0; #ifndef __MINGW32__ - char *fnam = (char *)malloc(strlen(xc->filename) + 5 + 1); + int fnam_len = strlen(xc->filename) + 5 + 1; + char *fnam = (char *)malloc(fnam_len); #endif fixup_offs = ftello(xc->handle); @@ -2142,7 +2143,7 @@ fflush(xc->handle); #ifndef __MINGW32__ - sprintf(fnam, "%s.hier", xc->filename); + snprintf(fnam, fnam_len, "%s.hier", xc->filename); unlink(fnam); free(fnam); #endif @@ -2821,7 +2822,7 @@ uint32_t i; name_len = strlen(name); - elem_count_len = sprintf(elem_count_buf, "%" PRIu32, elem_count); + elem_count_len = snprintf(elem_count_buf, 16, "%" PRIu32, elem_count); literal_lens = (unsigned int *)calloc(elem_count, sizeof(unsigned int)); val_lens = (unsigned int *)calloc(elem_count, sizeof(unsigned int)); @@ -3909,7 +3910,8 @@ if(!xc->fh) { fst_off_t offs_cache = ftello(xc->f); - char *fnam = (char *)malloc(strlen(xc->filename) + 6 + 16 + 32 + 1); + int fnam_len = strlen(xc->filename) + 6 + 16 + 32 + 1; + char *fnam = (char *)malloc(fnam_len); unsigned char *mem = (unsigned char *)malloc(FST_GZIO_LEN); fst_off_t hl, uclen; fst_off_t clen = 0; @@ -3928,7 +3930,7 @@ htyp = xc->contains_hier_section_lz4duo ? FST_BL_HIER_LZ4DUO : FST_BL_HIER_LZ4; } - sprintf(fnam, "%s.hier_%d_%p", xc->filename, getpid(), (void *)xc); + snprintf(fnam, fnam_len, "%s.hier_%d_%p", xc->filename, getpid(), (void *)xc); fstReaderFseeko(xc, xc->f, xc->hier_pos, SEEK_SET); uclen = fstReaderUint64(xc->f); #ifndef __MINGW32__ @@ -4585,15 +4587,17 @@ int zfd; int flen = strlen(xc->filename); char *hf; + int hf_len; seclen = fstReaderUint64(xc->f); uclen = fstReaderUint64(xc->f); if(!seclen) return(0); /* not finished compressing, this is a failed read */ - hf = (char *)calloc(1, flen + 16 + 32 + 1); - - sprintf(hf, "%s.upk_%d_%p", xc->filename, getpid(), (void *)xc); + hf_len = flen + 16 + 32 + 1; + hf = (char *)calloc(1, hf_len); + + snprintf(hf, hf_len, "%s.upk_%d_%p", xc->filename, getpid(), (void *)xc); fcomp = fopen(hf, "w+b"); if(!fcomp) { @@ -5189,16 +5193,16 @@ if(beg_tim) { - if(dumpvars_state == 1) { wx_len = sprintf(wx_buf, "$end\n"); fstWritex(xc, wx_buf, wx_len); dumpvars_state = 2; } - wx_len = sprintf(wx_buf, "#%" PRIu64 "\n", beg_tim); + if(dumpvars_state == 1) { wx_len = snprintf(wx_buf, 32, "$end\n"); fstWritex(xc, wx_buf, wx_len); dumpvars_state = 2; } + wx_len = snprintf(wx_buf, 32, "#%" PRIu64 "\n", beg_tim); fstWritex(xc, wx_buf, wx_len); - if(!dumpvars_state) { wx_len = sprintf(wx_buf, "$dumpvars\n"); fstWritex(xc, wx_buf, wx_len); dumpvars_state = 1; } + if(!dumpvars_state) { wx_len = snprintf(wx_buf, 32, "$dumpvars\n"); fstWritex(xc, wx_buf, wx_len); dumpvars_state = 1; } } if((xc->num_blackouts)&&(cur_blackout != xc->num_blackouts)) { if(beg_tim == xc->blackout_times[cur_blackout]) { - wx_len = sprintf(wx_buf, "$dump%s $end\n", (xc->blackout_activity[cur_blackout++]) ? "on" : "off"); + wx_len = snprintf(wx_buf, 32, "$dump%s $end\n", (xc->blackout_activity[cur_blackout++]) ? "on" : "off"); fstWritex(xc, wx_buf, wx_len); } } @@ -5332,7 +5336,7 @@ clone_d[j] = srcdata[7-j]; } } - sprintf((char *)xc->temp_signal_value_buf, "%.16g", d); + snprintf((char *)xc->temp_signal_value_buf, xc->longest_signal_value_len + 1, "%.16g", d); value_change_callback(user_callback_data_pointer, beg_tim, idx+1, xc->temp_signal_value_buf); } } @@ -5360,7 +5364,7 @@ } fstVcdID(vcdid_buf, idx+1); - wx_len = sprintf(wx_buf, "r%.16g %s\n", d, vcdid_buf); + wx_len = snprintf(wx_buf, 64, "r%.16g %s\n", d, vcdid_buf); fstWritex(xc, wx_buf, wx_len); } } @@ -5625,16 +5629,16 @@ } } - if(dumpvars_state == 1) { wx_len = sprintf(wx_buf, "$end\n"); fstWritex(xc, wx_buf, wx_len); dumpvars_state = 2; } - wx_len = sprintf(wx_buf, "#%" PRIu64 "\n", time_table[i]); + if(dumpvars_state == 1) { wx_len = snprintf(wx_buf, 32, "$end\n"); fstWritex(xc, wx_buf, wx_len); dumpvars_state = 2; } + wx_len = snprintf(wx_buf, 32, "#%" PRIu64 "\n", time_table[i]); fstWritex(xc, wx_buf, wx_len); - if(!dumpvars_state) { wx_len = sprintf(wx_buf, "$dumpvars\n"); fstWritex(xc, wx_buf, wx_len); dumpvars_state = 1; } + if(!dumpvars_state) { wx_len = snprintf(wx_buf, 32, "$dumpvars\n"); fstWritex(xc, wx_buf, wx_len); dumpvars_state = 1; } if((xc->num_blackouts)&&(cur_blackout != xc->num_blackouts)) { if(time_table[i] == xc->blackout_times[cur_blackout]) { - wx_len = sprintf(wx_buf, "$dump%s $end\n", (xc->blackout_activity[cur_blackout++]) ? "on" : "off"); + wx_len = snprintf(wx_buf, 32, "$dump%s $end\n", (xc->blackout_activity[cur_blackout++]) ? "on" : "off"); fstWritex(xc, wx_buf, wx_len); } } @@ -5884,7 +5888,7 @@ clone_d[j] = srcdata[7-j]; } } - sprintf((char *)xc->temp_signal_value_buf, "%.16g", d); + snprintf((char *)xc->temp_signal_value_buf, xc->longest_signal_value_len + 1, "%.16g", d); value_change_callback(user_callback_data_pointer, time_table[i], idx+1, xc->temp_signal_value_buf); } } @@ -5910,7 +5914,7 @@ } } - wx_len = sprintf(wx_buf, "r%.16g", d); + wx_len = snprintf(wx_buf, 32, "r%.16g", d); fstWritex(xc, wx_buf, wx_len); } } @@ -6016,7 +6020,7 @@ } } - sprintf((char *)buf, "%.16g", d); + snprintf((char *)buf, 32, "%.16g", d); /* this will write 18 bytes */ } } @@ -6608,7 +6612,7 @@ } } - sprintf(buf, "r%.16g", d); + snprintf(buf, 32, "r%.16g", d); /* this will write 19 bytes */ return(buf); } } diff --git a/src/menu.c b/src/menu.c index 4893a45..e2cdb12 100644 --- a/src/menu.c +++ b/src/menu.c @@ -7415,6 +7415,9 @@ else { GLOBALS->show_base = gtk_check_menu_item_get_active(GTK_CHECK_MENU_ITEM(menu_wlist[WV_MENU_VSBS])); + if (!GLOBALS->signalarea || !GLOBALS->wavewindow) { + return; + } GLOBALS->signalwindow_width_dirty=1; MaxSignalLength(); signalarea_configure_event(GLOBALS->signalarea, NULL); diff --git a/src/twinwave.c b/src/twinwave.c index 590c7f6..71ba15a 100644 --- a/src/twinwave.c +++ b/src/twinwave.c @@ -19,7 +19,7 @@ #include #endif #if GTK_CHECK_VERSION(3,22,26) -#if !defined(MAC_INTEGRATION) +#if !defined(MAC_INTEGRATION) && defined(GDK_WINDOWING_WAYLAND) #include #endif #endif