changeset 26510:7da6136d3ecd

maint: merge stable to default.
author Rik <rik@octave.org>
date Tue, 08 Jan 2019 21:35:53 -0800
parents 10919e3c9aaa (current diff) 0fba2d918b65 (diff)
children 32890ede698c
files
diffstat 17 files changed, 183 insertions(+), 154 deletions(-) [+]
line wrap: on
line diff
--- a/libgui/languages/pt_BR.ts	Tue Jan 08 13:54:57 2019 -0500
+++ b/libgui/languages/pt_BR.ts	Tue Jan 08 21:35:53 2019 -0800
@@ -102,7 +102,7 @@
     <message>
         <location line="+3"/>
         <source>Run Selection</source>
-        <translation type="unfinished">Executar Seleção</translation>
+        <translation>Executar Seleção</translation>
     </message>
     <message>
         <location line="+7"/>
@@ -388,12 +388,14 @@
         <source>Could not setup the data required for the
 documentation viewer. Only help texts in
 the Command Window will be available.</source>
-        <translation type="unfinished"></translation>
+        <translation>Não foi possível configurar os dados necessários
+para o visualizador de documentação. Apenas textos
+de ajuda na Janela de Comando estarão disponíveis.</translation>
     </message>
     <message>
         <location line="+21"/>
         <source>Find:</source>
-        <translation>Buscar:</translation>
+        <translation>Localizar:</translation>
     </message>
     <message>
         <location line="+7"/>
@@ -410,42 +412,42 @@
     <message>
         <location line="+74"/>
         <source>Function Index</source>
-        <translation type="unfinished"></translation>
+        <translation>Índice de Funções</translation>
     </message>
     <message>
         <location line="+98"/>
         <source>Go home</source>
-        <translation type="unfinished"></translation>
+        <translation>Ir para o início</translation>
     </message>
     <message>
         <location line="+3"/>
         <source>Go back</source>
-        <translation type="unfinished"></translation>
+        <translation>Ir para trás</translation>
     </message>
     <message>
         <location line="+14"/>
         <source>Go forward</source>
-        <translation type="unfinished"></translation>
+        <translation>Ir para frente</translation>
     </message>
     <message>
         <location line="+43"/>
         <source>Find</source>
-        <translation type="unfinished">Localizar</translation>
+        <translation>Localizar</translation>
     </message>
     <message>
         <location line="+6"/>
         <source>Zoom in</source>
-        <translation type="unfinished"></translation>
+        <translation>Mais zoom</translation>
     </message>
     <message>
         <location line="+3"/>
         <source>Zoom out</source>
-        <translation type="unfinished"></translation>
+        <translation>Menos zoom</translation>
     </message>
     <message>
         <location line="+3"/>
         <source>Zoom original</source>
-        <translation type="unfinished"></translation>
+        <translation>Zoom original</translation>
     </message>
     <message>
         <location line="-206"/>
@@ -466,12 +468,12 @@
     <message>
         <location line="+84"/>
         <source>Previous pages</source>
-        <translation type="unfinished"></translation>
+        <translation>Páginas anteriores</translation>
     </message>
     <message>
         <location line="+14"/>
         <source>Next pages</source>
-        <translation type="unfinished"></translation>
+        <translation>Páginas seguintes</translation>
     </message>
     <message>
         <location line="+383"/>
@@ -497,27 +499,27 @@
     <message>
         <location filename="../src/dw-main-window.cc" line="+49"/>
         <source>&amp;Close</source>
-        <translation type="unfinished">&amp;Fechar</translation>
+        <translation>&amp;Fechar</translation>
     </message>
     <message>
         <location line="+6"/>
         <source>Close &amp;All</source>
-        <translation type="unfinished"></translation>
+        <translation>Fechar &amp;Todos</translation>
     </message>
     <message>
         <location line="+6"/>
         <source>Close &amp;Other</source>
-        <translation type="unfinished"></translation>
+        <translation>Fechar as &amp;Demais Abas</translation>
     </message>
     <message>
         <location line="+4"/>
         <source>Switch to &amp;Left Widget</source>
-        <translation type="unfinished"></translation>
+        <translation>Alternar para Aba à &amp;Esquerda</translation>
     </message>
     <message>
         <location line="+4"/>
         <source>Switch to &amp;Right Widget</source>
-        <translation type="unfinished"></translation>
+        <translation>Alternar para Aba à &amp;Direita</translation>
     </message>
 </context>
 <context>
@@ -802,7 +804,7 @@
     <message>
         <location line="+4"/>
         <source>Go &amp;to Line...</source>
-        <translation>Vá para &amp;Linha...</translation>
+        <translation>Ir para &amp;Linha...</translation>
     </message>
     <message>
         <location line="+7"/>
@@ -1019,12 +1021,13 @@
         <location line="-1977"/>
         <source>Cannot add breakpoint to modified or unnamed file.
 Save and add breakpoint, or cancel?</source>
-        <translation type="unfinished"></translation>
+        <translation>Não é possível adicionar o ponto de parada a arquivo modificado ou sem nome.
+Salvar e adicionar ponto de parada ou cancelar?</translation>
     </message>
     <message>
         <location line="+833"/>
         <source>Goto line</source>
-        <translation>Vá para linha</translation>
+        <translation>Ir para linha</translation>
     </message>
     <message>
         <location line="+1"/>
@@ -1074,29 +1077,33 @@
 with the selected encoding %2.
 
 Modifying and saving the file might cause data loss!</source>
-        <translation type="unfinished"></translation>
+        <translation>Ocorreram problemas ao ler o arquivo
+%1
+com a codificação selecionada %2.
+
+Modificar e salvar o arquivo pode causar perda de dados!</translation>
     </message>
     <message>
         <location line="+10"/>
         <source>&amp;Edit anyway</source>
-        <translation type="unfinished"></translation>
+        <translation>&amp;Editar mesmo assim</translation>
     </message>
     <message>
         <location line="+1"/>
         <location line="+57"/>
         <source>Chan&amp;ge encoding</source>
-        <translation type="unfinished"></translation>
+        <translation>&amp;Mudar codificação</translation>
     </message>
     <message>
         <location line="-56"/>
         <location line="+49"/>
         <source>&amp;Close</source>
-        <translation type="unfinished">&amp;Fechar</translation>
+        <translation>&amp;Fechar</translation>
     </message>
     <message>
         <location line="+11"/>
         <source>Select new default encoding</source>
-        <translation type="unfinished"></translation>
+        <translation>Selecionar nova codificação padrão</translation>
     </message>
     <message>
         <location line="+3"/>
@@ -1105,7 +1112,11 @@
 
 This does not change the default encoding.
 </source>
-        <translation type="unfinished"></translation>
+        <translation>Favor selecionar uma nova codificação
+para recarregar o arquivo atual.
+
+Isso não altera a codificação padrão.
+</translation>
     </message>
     <message>
         <location line="+212"/>
@@ -1132,7 +1143,10 @@
 can not be applied.
 
 Please select another one!</source>
-        <translation type="unfinished"></translation>
+        <translation>A codificação atual %1
+não pode ser aplicada.
+
+Favor selecionar outra!</translation>
     </message>
     <message>
         <location line="+11"/>
@@ -1141,7 +1155,11 @@
 Using it would result in data loss!
 
 Please select another one!</source>
-        <translation type="unfinished"></translation>
+        <translation>O conteúdo atual do editor não pode ser codificado
+usando a codificação selecionada %1.
+Usá-la resultaria em perda de dados!
+
+Favor selecionar outra!</translation>
     </message>
     <message>
         <location line="-115"/>
@@ -1269,7 +1287,7 @@
     <message>
         <location line="+3"/>
         <source>Show Home Directory</source>
-        <translation>Exibir Diretório Pessoal</translation>
+        <translation>Exibir Diretório Inicial</translation>
     </message>
     <message>
         <location line="+12"/>
@@ -1297,7 +1315,7 @@
     <message>
         <location line="-329"/>
         <source>Double-click to open file/folder, right click for alternatives</source>
-        <translation type="unfinished"></translation>
+        <translation>Clique-duplo para abrir arquivo/pasta, botão direito para alternativas</translation>
     </message>
     <message>
         <location line="+282"/>
@@ -1790,7 +1808,7 @@
     <message>
         <location line="+121"/>
         <source>Double-click a command to transfer it to the Command Window.</source>
-        <translation type="unfinished"></translation>
+        <translation>Dê clique-duplo sobre um comando para transferí-lo à Janela de Comandos.</translation>
     </message>
     <message>
         <location line="+8"/>
@@ -1927,7 +1945,8 @@
         <location line="+44"/>
         <source>%1 is a built-in, compiled or inline
 function and can not be edited.</source>
-        <translation type="unfinished"></translation>
+        <translation>%1 é uma função embutida, compilada ou inline
+e não pode ser editada.</translation>
     </message>
     <message>
         <location line="+40"/>
@@ -2424,54 +2443,54 @@
     <message>
         <location filename="../src/settings-dialog.cc" line="-573"/>
         <source>Octave Preferences</source>
-        <translation type="unfinished"></translation>
+        <translation>Preferências do Octave</translation>
     </message>
     <message>
         <location line="+1"/>
         <source>Unable to save preferences.  Missing preferences file or unknown directory.</source>
-        <translation type="unfinished"></translation>
+        <translation>Não é possível salvar as preferências. Arquivo de preferências ausente ou diretório desconhecido.</translation>
     </message>
     <message>
         <location line="+15"/>
         <location line="+4"/>
         <location line="+700"/>
         <source>System setting</source>
-        <translation type="unfinished">Configuração do sistema</translation>
+        <translation>Configuração do sistema</translation>
     </message>
     <message>
         <location line="-448"/>
         <source>IBeam Cursor</source>
-        <translation type="unfinished">Cursor IBeam</translation>
+        <translation>Cursor &quot;I&quot;</translation>
     </message>
     <message>
         <location line="+1"/>
         <source>Block Cursor</source>
-        <translation type="unfinished">Cursor de Bloco</translation>
+        <translation>Cursor de Bloco</translation>
     </message>
     <message>
         <location line="+1"/>
         <source>Underline Cursor</source>
-        <translation type="unfinished">Cursor Sublinhado</translation>
+        <translation>Cursor Sublinhado</translation>
     </message>
     <message>
         <location line="+164"/>
         <source>Set Octave Startup Directory</source>
-        <translation type="unfinished">Definir Diretório de Inicialização do Octave</translation>
+        <translation>Definir Diretório de Inicialização do Octave</translation>
     </message>
     <message>
         <location line="+5"/>
         <source>Set File Browser Startup Directory</source>
-        <translation type="unfinished">Alterar Diretório de Inicialização do Navegador de Arquivos</translation>
+        <translation>Definir Diretório de Inicialização do Navegador de Arquivos</translation>
     </message>
     <message>
         <location line="+503"/>
         <source>Enable attribute colors</source>
-        <translation type="unfinished"></translation>
+        <translation>Habilitar cores para atributos</translation>
     </message>
     <message>
         <location line="+3"/>
         <source>Hide tools tips</source>
-        <translation type="unfinished"></translation>
+        <translation>Ocultar dicas contextuais</translation>
     </message>
 </context>
 <context>
@@ -2971,7 +2990,7 @@
     <message>
         <location line="+3"/>
         <source>Goto Line</source>
-        <translation>Vá para Linha</translation>
+        <translation>Ir para Linha</translation>
     </message>
     <message>
         <location line="+2"/>
@@ -3051,27 +3070,27 @@
     <message>
         <location line="+154"/>
         <source>Documentation Viewer</source>
-        <translation type="unfinished"></translation>
+        <translation>Visualizador de Documentação</translation>
     </message>
     <message>
         <location line="+4"/>
         <source>Browser</source>
-        <translation type="unfinished"></translation>
+        <translation>Navegador</translation>
     </message>
     <message>
         <location line="+79"/>
         <source>Import shortcuts from file...</source>
-        <translation type="unfinished"></translation>
+        <translation>Importar teclas de atalho do arquivo...</translation>
     </message>
     <message>
         <location line="+5"/>
         <source>Export shortcuts to file...</source>
-        <translation type="unfinished"></translation>
+        <translation>Exportar teclas de atalho para arquivo...</translation>
     </message>
     <message>
         <location line="+11"/>
         <source>Failed to open %1 as Octave shortcut file</source>
-        <translation type="unfinished"></translation>
+        <translation>Falha ao abrir %1 como arquivo de teclas de atalho do Octave</translation>
     </message>
     <message>
         <location line="-367"/>
@@ -3132,17 +3151,17 @@
     <message>
         <location line="+5"/>
         <source>Go to Homepage</source>
-        <translation type="unfinished"></translation>
+        <translation>Ir para página inicial</translation>
     </message>
     <message>
         <location line="+2"/>
         <source>Go Back one Page</source>
-        <translation type="unfinished"></translation>
+        <translation>Voltar uma Página</translation>
     </message>
     <message>
         <location line="+1"/>
         <source>Go Forward one Page</source>
-        <translation type="unfinished"></translation>
+        <translation>Avançar uma Página</translation>
     </message>
     <message>
         <location line="+68"/>
@@ -3191,12 +3210,12 @@
     <message>
         <location line="+2"/>
         <source>Find &amp; Replace in Dock Widgets</source>
-        <translation type="unfinished"></translation>
+        <translation>Localizar e Substituir em Painéis</translation>
     </message>
     <message>
         <location line="+2"/>
         <source>Zooming in Editor and Documentation</source>
-        <translation type="unfinished"></translation>
+        <translation>Zoom no Editor e na Documentação</translation>
     </message>
     <message>
         <location line="+21"/>
@@ -3881,67 +3900,67 @@
     <message>
         <location line="-1037"/>
         <source>Preferences</source>
-        <translation type="unfinished">Preferências</translation>
+        <translation>Preferências</translation>
     </message>
     <message>
         <location line="+57"/>
         <source>(requires restart)</source>
-        <translation type="unfinished"></translation>
+        <translation>(requer reinicialização)</translation>
     </message>
     <message>
         <location line="+32"/>
         <source>Use native file dialogs</source>
-        <translation type="unfinished"></translation>
+        <translation>Usar caixas de diálogo de arquivos nativas</translation>
     </message>
     <message>
         <location line="+53"/>
         <source>Use system icon theme if available (requires restart)</source>
-        <translation type="unfinished"></translation>
+        <translation>Use o tema de ícones do sistema, se disponível (requer reinicialização)</translation>
     </message>
     <message>
         <location line="+70"/>
         <source>Toolbar Icons</source>
-        <translation type="unfinished"></translation>
+        <translation>Ícones da Barra de Ferramentas</translation>
     </message>
     <message>
         <location line="+186"/>
         <source>Language</source>
-        <translation type="unfinished"></translation>
+        <translation>Idioma</translation>
     </message>
     <message>
         <location line="+27"/>
         <source>Style</source>
-        <translation type="unfinished"></translation>
+        <translation>Estilo</translation>
     </message>
     <message>
         <location line="+27"/>
         <source>Initial working directory of Octave interpreter</source>
-        <translation type="unfinished"></translation>
+        <translation>Diretório de trabalho inicial do interpretador do Octave</translation>
     </message>
     <message>
         <location line="+18"/>
         <source>Restore last working directory of previous session</source>
-        <translation type="unfinished"></translation>
+        <translation>Restaurar último diretório de trabalho da sessão anterior</translation>
     </message>
     <message>
         <location line="+45"/>
         <source>Command</source>
-        <translation type="unfinished"></translation>
+        <translation>Comando</translation>
     </message>
     <message>
         <location line="+208"/>
         <source>Set focus to Command Window when running a command from within another widget</source>
-        <translation type="unfinished"></translation>
+        <translation>Definir o foco na Janela de Comandos ao executar um comando de outro painel</translation>
     </message>
     <message>
         <location line="+7"/>
         <source>Print debug location in Command Window in addition to the marker in the editor</source>
-        <translation type="unfinished"></translation>
+        <translation>Imprimir localização de depuração na Janela de Comandos, além do marcador no editor</translation>
     </message>
     <message>
         <location line="+16"/>
         <source>Command Window Colors</source>
-        <translation type="unfinished"></translation>
+        <translation>Cores da Janela de Comandos</translation>
     </message>
     <message>
         <location line="+172"/>
@@ -4066,12 +4085,12 @@
     <message>
         <location line="+34"/>
         <source>Debugging</source>
-        <translation type="unfinished"></translation>
+        <translation>Depuração</translation>
     </message>
     <message>
         <location line="+8"/>
         <source>Always show debug breakpoints and pointers (opens related file if closed)</source>
-        <translation type="unfinished"></translation>
+        <translation>Sempre exibir apontadores e pontos de parada na depuração (abrundo arquivos relacionados se estiverem fechados)</translation>
     </message>
     <message>
         <location line="+15"/>
@@ -4126,7 +4145,7 @@
     <message>
         <location line="+32"/>
         <source>Initial file browser directory (only if not synchronized with initial working directory of Octave)</source>
-        <translation type="unfinished"></translation>
+        <translation>Diretório inicial do navegador de arquivos (somente se não estiver sincronizado com o diretório de trabalho inicial do Octave)</translation>
     </message>
     <message>
         <location line="+36"/>
@@ -4146,7 +4165,7 @@
     <message>
         <location line="+107"/>
         <source>Use Command Window font</source>
-        <translation type="unfinished"></translation>
+        <translation>Usar a fonte da Janela de Comandos</translation>
     </message>
     <message>
         <location line="+196"/>
@@ -4242,7 +4261,7 @@
     <message>
         <location line="+59"/>
         <source>Disable global shortcuts when Command Window has focus</source>
-        <translation type="unfinished"></translation>
+        <translation>Desativar teclas de atalho globais quando a Janela de Comando tiver foco</translation>
     </message>
     <message>
         <location line="+211"/>
--- a/libgui/src/documentation.cc	Tue Jan 08 13:54:57 2019 -0500
+++ b/libgui/src/documentation.cc	Tue Jan 08 21:35:53 2019 -0800
@@ -407,9 +407,9 @@
     // Get quoted search strings first, then take first string as fall back
     QRegExp rx ("\"([^\"]*)\"");
     if (rx.indexIn (query_string, 0) != -1)
-      m_query_string = rx.cap (1);
+      m_internal_search = rx.cap (1);
     else
-      m_query_string = query_string.split (" ", QString::SkipEmptyParts).first ();
+      m_internal_search = query_string.split (" ", QString::SkipEmptyParts).first ();
 
     m_help_engine->searchEngine ()->search (queries);
   }
@@ -423,6 +423,8 @@
   {
     if (! m_internal_search.isEmpty ())
       {
+        m_query_string = m_internal_search;
+
         QHelpSearchEngine *search_engine = m_help_engine->searchEngine ();
         if (search_engine)
           {
@@ -473,9 +475,9 @@
 
                 if (! url.isEmpty ())
                   {
-                    connect (this, SIGNAL (show_single_result (const QUrl)),
-                             m_doc_browser,
-                             SLOT (handle_index_clicked (const QUrl)));
+                    connect (this, SIGNAL (show_single_result (const QUrl&)),
+                             this,
+                             SLOT (handle_search_result_clicked (const QUrl&)));
 
                     emit show_single_result (url);
                   }
@@ -500,12 +502,18 @@
     m_find_line_edit->setText (m_query_string);
     m_find_line_edit->parentWidget ()->show ();
 
-    // Go to to first occurrence of search text. Going to the end and then
-    // search backwards until the last occurrence ensures the search text
-    // is visible in the first line of the visible part of the text.
-    m_doc_browser->moveCursor (QTextCursor::End);
-    while (m_doc_browser->find (m_find_line_edit->text (),
-                                QTextDocument::FindBackward));
+    // If no occurrence can be found go to the top of the page
+    if (! m_doc_browser->find (m_find_line_edit->text ()))
+      m_doc_browser->moveCursor (QTextCursor::Start);
+    else
+      {
+        // Go to to first occurrence of search text. Going to the end and then
+        // search backwards until the last occurrence ensures the search text
+        // is visible in the first line of the visible part of the text.
+        m_doc_browser->moveCursor (QTextCursor::End);
+        while (m_doc_browser->find (m_find_line_edit->text (),
+                                    QTextDocument::FindBackward));
+      }
   }
 
   void documentation::select_all_occurrences (const QString& text)
--- a/libgui/src/documentation.h	Tue Jan 08 13:54:57 2019 -0500
+++ b/libgui/src/documentation.h	Tue Jan 08 21:35:53 2019 -0800
@@ -127,7 +127,7 @@
 
   signals:
 
-    void show_single_result (const QUrl);
+    void show_single_result (const QUrl&);
 
   private:
 
--- a/libinterp/corefcn/ls-hdf5.cc	Tue Jan 08 13:54:57 2019 -0500
+++ b/libinterp/corefcn/ls-hdf5.cc	Tue Jan 08 21:35:53 2019 -0800
@@ -1008,7 +1008,7 @@
   H5Dclose (data_hid);
   H5Sclose (space_hid);
 
-  if (retval >= 0)
+  if (retval)
     retval = hdf5_add_attr (loc_id, "OCTAVE_EMPTY_MATRIX");
 
   return (retval == 0 ? 1 : retval);
--- a/libinterp/corefcn/oct-stream.cc	Tue Jan 08 13:54:57 2019 -0500
+++ b/libinterp/corefcn/oct-stream.cc	Tue Jan 08 21:35:53 2019 -0800
@@ -358,7 +358,7 @@
                              char& modifier);
 
     int finish_conversion (const std::string& s, size_t& i, size_t n,
-                           int& width, bool discard, char& type,
+                           int width, bool discard, char& type,
                            char modifier);
   };
 
@@ -569,7 +569,7 @@
 
   int
   scanf_format_list::finish_conversion (const std::string& s, size_t& i,
-                                        size_t n, int& width, bool discard,
+                                        size_t n, int width, bool discard,
                                         char& type, char modifier)
   {
     int retval = 0;
@@ -890,7 +890,7 @@
                   if (empty_buf)
                     {
                       process_conversion (s, i, n, args, flags, fw, prec,
-                                          type, modifier);
+                                          modifier, type);
 
                       // If there is nothing in the buffer, then
                       // add_elt_to_list must have just been called, so we
@@ -1756,7 +1756,7 @@
     std::string parse_char_class (const std::string& pattern) const;
 
     int finish_conversion (const std::string& s, size_t& i, size_t n,
-                           unsigned int& width, int& prec, int& bitwidth,
+                           unsigned int width, int prec, int bitwidth,
                            octave_value& val_type,
                            bool discard, char& type);
   };
@@ -2333,8 +2333,8 @@
 
   int
   textscan_format_list::finish_conversion (const std::string& s, size_t& i,
-                                           size_t n, unsigned int& width,
-                                           int& prec, int& bitwidth,
+                                           size_t n, unsigned int width,
+                                           int prec, int bitwidth,
                                            octave_value& val_type, bool discard,
                                            char& type)
   {
@@ -2457,7 +2457,6 @@
         bool already_skipped_delim = false;
         ts.skip_whitespace (ds);
         ds.progress_benchmark ();
-        bool progress = false;
         ts.scan_complex (ds, *fmt_elts[0], val);
         if (ds.fail ())
           {
@@ -2492,7 +2491,7 @@
         if (! already_skipped_delim)
           ts.skip_delim (ds);
 
-        if (! progress && ds.no_progress ())
+        if (ds.no_progress ())
           break;
 
         nconv++;
@@ -2643,7 +2642,7 @@
           {
             if (row == 0 || row >= size)
               {
-                size += size+1;
+                size += (size+1);
                 for (auto& col : out)
                   col = col.resize (dim_vector (size, 1), 0);
               }
@@ -2786,8 +2785,7 @@
         int precision = fmt.prec;
         int i;
 
-        if (width_left)
-          width_left--;                // Consider width of '.'
+        width_left--;                  // Consider width of '.'
 
         if (precision == -1)
           precision = 1<<30;           // FIXME: Should be MAXINT
@@ -2835,16 +2833,14 @@
             int exp_sign = 1;
             if (ch1 == '+')
               {
-                if (width_left)
-                  width_left--;
+                width_left--;
                 is.get ();
               }
             else if (ch1 == '-')
               {
+                width_left--;
                 exp_sign = -1;
                 is.get ();
-                if (width_left)
-                  width_left--;
               }
             valid = false;
             while (width_left-- && is && (ch = is.get ()) >= '0' && ch <= '9')
--- a/libinterp/corefcn/pr-output.cc	Tue Jan 08 13:54:57 2019 -0500
+++ b/libinterp/corefcn/pr-output.cc	Tue Jan 08 21:35:53 2019 -0800
@@ -412,8 +412,6 @@
         }
 
       fw = 1 + ld + 1 + rd;
-      if (inf_or_nan && fw < 4)
-        fw = 4;
     }
 
   if (! (rat_format || bank_format || hex_format || bit_format)
@@ -514,8 +512,6 @@
     {
       int digits = (x_max > x_min ? x_max : x_min);
       fw = (digits <= 0 ? 5 : digits + 4);
-      if (inf_or_nan && fw < 5)
-        fw = 5;
       rd = 2;
     }
   else if (hex_format)
@@ -687,8 +683,6 @@
       int digits = r_x;
       i_fw = 0;
       r_fw = (digits <= 0 ? 5 : digits + 4);
-      if (inf_or_nan && r_fw < 5)
-        r_fw = 5;
       rd = 2;
     }
   else if (hex_format)
@@ -755,11 +749,6 @@
 
       i_fw = ld + 1 + rd;
       r_fw = i_fw + 1;
-      if (inf_or_nan && i_fw < 3)
-        {
-          i_fw = 3;
-          r_fw = 4;
-        }
     }
 
   if (! (rat_format || bank_format || hex_format || bit_format)
@@ -906,8 +895,6 @@
       int digits = (r_x_max > r_x_min ? r_x_max : r_x_min);
       i_fw = 0;
       r_fw = (digits <= 0 ? 5 : digits + 4);
-      if (inf_or_nan && r_fw < 5)
-        r_fw = 5;
       rd = 2;
     }
   else if (hex_format)
@@ -1837,7 +1824,7 @@
                         os << "[ ";
                       else
                         {
-                          if (j > col && j < lim)
+                          if (j > col)
                             os << ", ";
                           else
                             os << "  ";
@@ -1953,7 +1940,7 @@
                     os << "[ ";
                   else
                     {
-                      if (j > col && j < lim)
+                      if (j > col)
                         os << ", ";
                       else
                         os << "  ";
@@ -2091,8 +2078,7 @@
               page.print_raw (os);
             }
 
-          if (i < m)
-            NDA_T::increment_index (ra_idx, dims, 2);
+          NDA_T::increment_index (ra_idx, dims, 2);
         }
     }
 }
@@ -2247,7 +2233,7 @@
                     os << "[ ";
                   else
                     {
-                      if (j > col && j < lim)
+                      if (j > col)
                         os << ", ";
                       else
                         os << "  ";
@@ -2691,8 +2677,7 @@
           if (i < m - 1)
             os << "\n";
 
-          if (i < m)
-            increment_index (ra_idx, dims, 2);
+          increment_index (ra_idx, dims, 2);
         }
     }
 }
--- a/libinterp/dldfcn/__eigs__.cc	Tue Jan 08 13:54:57 2019 -0500
+++ b/libinterp/dldfcn/__eigs__.cc	Tue Jan 08 21:35:53 2019 -0800
@@ -241,7 +241,7 @@
           else
             acm = (args(0).complex_matrix_value ());
           a_is_complex = true;
-          symmetric = false; // ARPACK doesn't special case complex symmetric
+          symmetric = false;  // ARPACK doesn't special case complex symmetric
           sym_tested = true;
         }
       else
@@ -327,17 +327,31 @@
       octave_value tmp;
 
       // issym is ignored for complex matrix inputs
-      tmp = map.getfield ("issym");
-      if (tmp.is_defined () && ! sym_tested)
+      if (! sym_tested)
         {
-          symmetric = tmp.double_value () != 0.0;
-          sym_tested = true;
+          tmp = map.getfield ("issym");
+          if (tmp.is_defined ())
+            {
+              if (tmp.numel () != 1)
+                error ("eigs: OPTS.issym must be a scalar value");
+
+              symmetric = tmp.xbool_value ("eigs: OPTS.issym must be a logical value");
+              sym_tested = true;
+            }
         }
 
       // isreal is ignored if A is not a function
-      tmp = map.getfield ("isreal");
-      if (tmp.is_defined () && have_a_fun)
-        a_is_complex = ! (tmp.double_value () != 0.0);
+      if (have_a_fun)
+        {
+          tmp = map.getfield ("isreal");
+          if (tmp.is_defined ())
+            {
+              if (tmp.numel () != 1)
+                error ("eigs: OPTS.isreal must be a scalar value");
+
+              a_is_complex = ! tmp.xbool_value ("eigs: OPTS.isreal must be a logical value");
+            }
+        }
 
       tmp = map.getfield ("tol");
       if (tmp.is_defined ())
@@ -366,7 +380,12 @@
 
       tmp = map.getfield ("cholB");
       if (tmp.is_defined ())
-        cholB = tmp.double_value () != 0.0;
+        {
+          if (tmp.numel () != 1)
+            error ("eigs: OPTS.cholB must be a scalar value");
+
+          cholB = tmp.xbool_value ("eigs: OPTS.cholB must be a logical value");
+        }
 
       tmp = map.getfield ("permB");
       if (tmp.is_defined ())
--- a/libinterp/parse-tree/pt-assign.cc	Tue Jan 08 13:54:57 2019 -0500
+++ b/libinterp/parse-tree/pt-assign.cc	Tue Jan 08 21:35:53 2019 -0800
@@ -40,7 +40,7 @@
                                                   bool plhs, int l, int c,
                                                   octave_value::assign_op t)
     : tree_expression (l, c), m_lhs (le), m_rhs (re), m_preserve (plhs),
-      m_etype (t)
+      m_ans_assign (), m_etype (t)
   { }
 
   tree_simple_assignment::~tree_simple_assignment (void)
--- a/libinterp/parse-tree/pt-eval.cc	Tue Jan 08 13:54:57 2019 -0500
+++ b/libinterp/parse-tree/pt-eval.cc	Tue Jan 08 21:35:53 2019 -0800
@@ -190,6 +190,9 @@
         retval = 0;
       }
 
+    // Clean up memory
+    delete lxr;
+
     return retval;
   }
 
--- a/liboctave/array/CDiagMatrix.cc	Tue Jan 08 13:54:57 2019 -0500
+++ b/liboctave/array/CDiagMatrix.cc	Tue Jan 08 21:35:53 2019 -0800
@@ -247,7 +247,7 @@
     (*current_liboctave_error_handler) ("invalid row selection");
 
   ComplexRowVector retval (c, 0.0);
-  if (r <= c || (r > c && i < c))
+  if (r <= c || i < c)
     retval.elem (i) = elem (i, i);
 
   return retval;
@@ -259,7 +259,7 @@
   if (! s)
     (*current_liboctave_error_handler) ("invalid row selection");
 
-  char c = *s;
+  char c = s[0];
   if (c == 'f' || c == 'F')
     return row (static_cast<octave_idx_type> (0));
   else if (c == 'l' || c == 'L')
@@ -277,7 +277,7 @@
     (*current_liboctave_error_handler) ("invalid column selection");
 
   ComplexColumnVector retval (r, 0.0);
-  if (r >= c || (r < c && i < r))
+  if (r >= c || i < r)
     retval.elem (i) = elem (i, i);
 
   return retval;
@@ -289,7 +289,7 @@
   if (! s)
     (*current_liboctave_error_handler) ("invalid column selection");
 
-  char c = *s;
+  char c = s[0];
   if (c == 'f' || c == 'F')
     return column (static_cast<octave_idx_type> (0));
   else if (c == 'l' || c == 'L')
--- a/liboctave/array/dDiagMatrix.cc	Tue Jan 08 13:54:57 2019 -0500
+++ b/liboctave/array/dDiagMatrix.cc	Tue Jan 08 21:35:53 2019 -0800
@@ -170,7 +170,7 @@
     (*current_liboctave_error_handler) ("invalid row selection");
 
   RowVector retval (c, 0.0);
-  if (r <= c || (r > c && i < c))
+  if (r <= c || i < c)
     retval.elem (i) = elem (i, i);
 
   return retval;
@@ -182,7 +182,7 @@
   if (! s)
     (*current_liboctave_error_handler) ("invalid row selection");
 
-  char c = *s;
+  char c = s[0];
   if (c == 'f' || c == 'F')
     return row (static_cast<octave_idx_type> (0));
   else if (c == 'l' || c == 'L')
@@ -200,7 +200,7 @@
     (*current_liboctave_error_handler) ("invalid column selection");
 
   ColumnVector retval (r, 0.0);
-  if (r >= c || (r < c && i < r))
+  if (r >= c || i < r)
     retval.elem (i) = elem (i, i);
 
   return retval;
@@ -212,7 +212,7 @@
   if (! s)
     (*current_liboctave_error_handler) ("invalid column selection");
 
-  char c = *s;
+  char c = s[0];
   if (c == 'f' || c == 'F')
     return column (static_cast<octave_idx_type> (0));
   else if (c == 'l' || c == 'L')
--- a/liboctave/array/fCDiagMatrix.cc	Tue Jan 08 13:54:57 2019 -0500
+++ b/liboctave/array/fCDiagMatrix.cc	Tue Jan 08 21:35:53 2019 -0800
@@ -251,7 +251,7 @@
     (*current_liboctave_error_handler) ("invalid row selection");
 
   FloatComplexRowVector retval (c, 0.0);
-  if (r <= c || (r > c && i < c))
+  if (r <= c || i < c)
     retval.elem (i) = elem (i, i);
 
   return retval;
@@ -263,7 +263,7 @@
   if (! s)
     (*current_liboctave_error_handler) ("invalid row selection");
 
-  char c = *s;
+  char c = s[0];
   if (c == 'f' || c == 'F')
     return row (static_cast<octave_idx_type> (0));
   else if (c == 'l' || c == 'L')
@@ -281,7 +281,7 @@
     (*current_liboctave_error_handler) ("invalid column selection");
 
   FloatComplexColumnVector retval (r, 0.0);
-  if (r >= c || (r < c && i < r))
+  if (r >= c || i < r)
     retval.elem (i) = elem (i, i);
 
   return retval;
@@ -293,7 +293,7 @@
   if (! s)
     (*current_liboctave_error_handler) ("invalid column selection");
 
-  char c = *s;
+  char c = s[0];
   if (c == 'f' || c == 'F')
     return column (static_cast<octave_idx_type> (0));
   else if (c == 'l' || c == 'L')
--- a/liboctave/array/fDiagMatrix.cc	Tue Jan 08 13:54:57 2019 -0500
+++ b/liboctave/array/fDiagMatrix.cc	Tue Jan 08 21:35:53 2019 -0800
@@ -170,7 +170,7 @@
     (*current_liboctave_error_handler) ("invalid row selection");
 
   FloatRowVector retval (c, 0.0);
-  if (r <= c || (r > c && i < c))
+  if (r <= c || i < c)
     retval.elem (i) = elem (i, i);
 
   return retval;
@@ -182,7 +182,7 @@
   if (! s)
     (*current_liboctave_error_handler) ("invalid row selection");
 
-  char c = *s;
+  char c = s[0];
   if (c == 'f' || c == 'F')
     return row (static_cast<octave_idx_type> (0));
   else if (c == 'l' || c == 'L')
@@ -200,7 +200,7 @@
     (*current_liboctave_error_handler) ("invalid column selection");
 
   FloatColumnVector retval (r, 0.0);
-  if (r >= c || (r < c && i < r))
+  if (r >= c || i < r)
     retval.elem (i) = elem (i, i);
 
   return retval;
@@ -212,7 +212,7 @@
   if (! s)
     (*current_liboctave_error_handler) ("invalid column selection");
 
-  char c = *s;
+  char c = s[0];
   if (c == 'f' || c == 'F')
     return column (static_cast<octave_idx_type> (0));
   else if (c == 'l' || c == 'L')
--- a/liboctave/system/lo-sysdep.cc	Tue Jan 08 13:54:57 2019 -0500
+++ b/liboctave/system/lo-sysdep.cc	Tue Jan 08 21:35:53 2019 -0800
@@ -170,7 +170,8 @@
 
       char *new_item = static_cast<char *> (std::malloc (new_len));
 
-      sprintf (new_item, "%s=%s", name.c_str (), value.c_str ());
+      if (new_item)
+        sprintf (new_item, "%s=%s", name.c_str (), value.c_str ());
 
       // As far as I can see there's no way to distinguish between the
       // various errors; putenv doesn't have errno values.
--- a/liboctave/system/lo-sysinfo.cc	Tue Jan 08 13:54:57 2019 -0500
+++ b/liboctave/system/lo-sysinfo.cc	Tue Jan 08 21:35:53 2019 -0800
@@ -66,10 +66,7 @@
           s << "FlexiBLAS Version "
             << v_major << "." << v_minor << "." << v_patch;
 
-          if (! retval.empty ())
-            retval += "\n";
-
-          retval += s.str ();
+          retval = s.str ();
         }
 
       // OpenBLAS
--- a/liboctave/util/oct-rl-edit.c	Tue Jan 08 13:54:57 2019 -0500
+++ b/liboctave/util/oct-rl-edit.c	Tue Jan 08 21:35:53 2019 -0800
@@ -44,7 +44,8 @@
  \
   ss = malloc (strlen (s) + 1); \
  \
-  strcpy (ss, s)
+  if (ss) \
+    strcpy (ss, s)
 
 void
 octave_rl_redisplay (void)
--- a/scripts/sparse/eigs.m	Tue Jan 08 13:54:57 2019 -0500
+++ b/scripts/sparse/eigs.m	Tue Jan 08 21:35:53 2019 -0800
@@ -871,7 +871,7 @@
 %! A = toeplitz (sparse (1:10));
 %! B = toeplitz (sparse ([1, 1], [1, 2], [2, 1], 1, 10));
 %! R = chol (B);
-%! opts.cholB = R;
+%! opts.cholB = true;
 %! [v, d] = eigs (A, R, 4, "lm", opts);
 %! for i = 1:4
 %!   assert (A * v(:,i), d(i, i) * B * v(:,i), 1e-12)
@@ -880,7 +880,7 @@
 %! A = toeplitz (sparse (1:10));
 %! B = toeplitz (sparse ([1, 1], [1, 2], [2, 1], 1, 10));
 %! [R, ~, permB] = chol (B, "vector");
-%! opts.cholB = R;
+%! opts.cholB = true;
 %! opts.permB = permB;
 %! [v, d] = eigs (A, R, 4, "lm", opts);
 %! for i = 1:4