changeset 32542:bbf9f4c2ccd5

maint: merge stable to default
author John W. Eaton <jwe@octave.org>
date Tue, 05 Dec 2023 14:15:58 -0500
parents 84bd22512a0f (current diff) 9357c0fdd2c1 (diff)
children e2b37dd640bd
files
diffstat 4 files changed, 15 insertions(+), 13 deletions(-) [+]
line wrap: on
line diff
--- a/libgui/languages/build_ts/update_ts_files	Tue Dec 05 10:19:14 2023 -0800
+++ b/libgui/languages/build_ts/update_ts_files	Tue Dec 05 14:15:58 2023 -0500
@@ -12,20 +12,20 @@
 SEARCH_PATH_QT="build_ts/octave-qt"
 SEARCH_PATH_QSCI="build_ts/octave-qsci"
 
-# Alwys add Qt search query widget since no translation is provided by Qt
-SEARCH_PATH_COMMON="$SEARCH_PATH_COMMON $SEARCH_PATH_QT/qhelpsearchquerywidget.cpp"
-
 # The directory with translations provided by Qt and QScintilla
-QT_LANG_DIR=/usr/share/qt5/translations
+QT_LANG_DIR=/usr/share/qt6/translations
 
 # Now update all ts files
-for file in *.ts; do
+for file in $(ls -b1 *.ts)
+do
 
   xx=${file:0:2}
   xx_yy=${file:0:5}
 
   # Set the search path to the minimal one used for each ts file
   SEARCH_PATH=$SEARCH_PATH_COMMON
+  T_QT="YES"
+  T_QSCI="YES"
 
   # Look for translations provided by Qt and QScintilla and extend the search
   # path if no existing translations are found. In this case we have to scan
@@ -35,22 +35,23 @@
     if [ "`ls $QT_LANG_DIR | grep -i qt_$xx.qm | wc -l`" -eq 0 ] &&
        [ "`ls $QT_LANG_DIR | grep -i qt_$xx_yy.qm | wc -l`" -eq 0 ]; then
        SEARCH_PATH="$SEARCH_PATH $SEARCH_PATH_QT"
-echo "QT"
+       T_QT="NO"
     fi
     # Look for QScintilla translations
     if [ "`ls $QT_LANG_DIR | grep -i qscintilla_$xx.qm | wc -l`" -eq 0 ] &&
        [ "`ls $QT_LANG_DIR | grep -i qscintilla_$xx_yy.qm | wc -l`" -eq 0 ]; then
        SEARCH_PATH="$SEARCH_PATH $SEARCH_PATH_QSCI"
-echo "QSCI"
+       T_QSCI="NO"
     fi
   fi
   echo
   echo
+  echo "$xx_yy: Existing translations for Qt: $T_QT, QSci: $T_QSCI"
 
   # Do the update after user's confirmation
-  echo       "$file => scan for strings in following paths"
-  echo    "         => $SEARCH_PATH"
-  read -p "         => Update (y/[n])? " ANS;
+  echo    "       => scan for strings in following paths"
+  echo    "       => $SEARCH_PATH"
+  read -p "       => Update (y/[n])? " ANS;
   ANS=${ANS:-n}
   if [ $ANS = "y" ]; then
     echo
--- a/libinterp/parse-tree/oct-parse.yy	Tue Dec 05 10:19:14 2023 -0800
+++ b/libinterp/parse-tree/oct-parse.yy	Tue Dec 05 14:15:58 2023 -0500
@@ -99,7 +99,7 @@
 // need to do is mention the symantic value somewhere in the rule.  It
 // doesn't actually need to be used to avoid the Bison warning, so just
 // define this macro to discard its parameter.
-#define OCTAVE_YYUSE(X, ...)
+#define OCTAVE_YYUSE(...)
 
 #if defined (HAVE_PRAGMA_GCC_DIAGNOSTIC)
    // Disable this warning for code that is generated by Bison,
--- a/liboctave/system/file-ops.cc	Tue Dec 05 10:19:14 2023 -0800
+++ b/liboctave/system/file-ops.cc	Tue Dec 05 14:15:58 2023 -0500
@@ -749,7 +749,7 @@
   templatename += "XXXXXX";
 
   // create and copy template to char array for call to gen_tempname
-  char tname [templatename.length () + 1];
+  OCTAVE_LOCAL_BUFFER (char, tname, templatename.length () + 1);
 
   strcpy (tname, templatename.c_str ());
 
--- a/liboctave/util/oct-string.cc	Tue Dec 05 10:19:14 2023 -0800
+++ b/liboctave/util/oct-string.cc	Tue Dec 05 14:15:58 2023 -0500
@@ -40,6 +40,7 @@
 #include "iconv-wrappers.h"
 #include "lo-ieee.h"
 #include "lo-mappers.h"
+#include "oct-locbuf.h"
 #include "uniconv-wrappers.h"
 #include "unistr-wrappers.h"
 #include "unwind-prot.h"
@@ -891,7 +892,7 @@
 {
   // return number of external characters that produce MAX internal ones
   std::size_t srclen = end-src;
-  std::size_t offsets[srclen];
+  OCTAVE_LOCAL_BUFFER (std::size_t, offsets, srclen);
   std::size_t lengthp = max;
   octave_u8_conv_from_encoding_offsets (m_enc.c_str (), src, srclen, offsets,
                                         &lengthp);