Script 'mail_helper' called by obssrc
Hello community,

here is the log from the commit of package ed for openSUSE:Factory checked in 
at 2026-08-26 19:50:40
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/ed (Old)
 and      /work/SRC/openSUSE:Factory/.ed.new.1258 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "ed"

Wed Aug 26 19:50:40 2026 rev:45 rq:1373640 version:1.22.6

Changes:
--------
--- /work/SRC/openSUSE:Factory/ed/ed.changes    2026-02-12 17:24:40.616443263 
+0100
+++ /work/SRC/openSUSE:Factory/.ed.new.1258/ed.changes  2026-08-26 
19:50:42.450354970 +0200
@@ -1,0 +2,7 @@
+Fri Aug 21 18:08:21 UTC 2026 - Andreas Stieger <[email protected]>
+
+- GNU ed 1.22.6:
+  * Add gcc's static analyzer issues
+  * documentation updates
+
+-------------------------------------------------------------------

Old:
----
  ed-1.22.5.tar.xz

New:
----
  ed-1.22.6.tar.xz

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ ed.spec ++++++
--- /var/tmp/diff_new_pack.yAa8Am/_old  2026-08-26 19:50:43.747400651 +0200
+++ /var/tmp/diff_new_pack.yAa8Am/_new  2026-08-26 19:50:43.758401038 +0200
@@ -18,7 +18,7 @@
 
 
 Name:           ed
-Version:        1.22.5
+Version:        1.22.6
 Release:        0
 Summary:        A line-oriented text editor
 License:        GPL-3.0-or-later AND LGPL-2.1-or-later

++++++ ed-1.22.5.tar.xz -> ed-1.22.6.tar.xz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/ed-1.22.5/ChangeLog new/ed-1.22.6/ChangeLog
--- old/ed-1.22.5/ChangeLog     2026-02-06 22:08:05.000000000 +0100
+++ new/ed-1.22.6/ChangeLog     2026-08-20 12:35:48.000000000 +0200
@@ -1,3 +1,14 @@
+2026-08-20  Antonio Diaz Diaz  <[email protected]>
+
+       * Version 1.22.6 released.
+       * Pacify gcc's static analyzer. (Reported by Mikel Olasagasti Uranga).
+       * main.c: (show_help): Print "*See also* regex(7)" for man page.
+         (print_escaped): Don't escape backslashes.
+       * ed.texi: Document that 'e' and 'E' delete the cut buffer.
+         (Reported by Tim Chase).
+         Document the use of REs inside the command-list of a global command.
+         (Reported by Artyom Bologov).
+
 2026-02-06  Antonio Diaz Diaz  <[email protected]>
 
        * Version 1.22.5 released.
@@ -312,7 +323,7 @@
 
        * Version 1.3 released.
        * carg_parser.c (ap_resize_buffer): An aliasing related segfault
-         that only occurs when overoptimizing with GCC on some
+         that only occurs when overoptimizing with gcc on some
          architectures (alpha, sparc) has been (hopefully) fixed.
        * signal.c (resize_buffer): Likewise.
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/ed-1.22.5/INSTALL new/ed-1.22.6/INSTALL
--- old/ed-1.22.5/INSTALL       2026-01-03 12:24:07.000000000 +0100
+++ new/ed-1.22.6/INSTALL       2026-08-20 15:40:38.000000000 +0200
@@ -1,7 +1,7 @@
 Requirements
 ------------
-You will need a C99 compiler and a C library compatible with POSIX.
-(gcc 3.3.6 or newer is recommended).
+You will need a C99 compiler (or a C++98 compiler) and a C library
+compatible with POSIX. (gcc 3.3.6 or newer is recommended).
 I use gcc 6.1.0 and 3.3.6, but the code should compile with any standards
 compliant compiler.
 Gcc is available at http://gcc.gnu.org
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/ed-1.22.5/NEWS new/ed-1.22.6/NEWS
--- old/ed-1.22.5/NEWS  2026-01-13 22:57:01.000000000 +0100
+++ new/ed-1.22.6/NEWS  2026-08-20 11:29:16.000000000 +0200
@@ -1,3 +1,19 @@
+Changes in version 1.22.6:
+
+Some changes have been made to the code to pacify gcc's static analyzer.
+(Reported by Mikel Olasagasti Uranga).
+
+'regex(7)' has been added to the --help output and to section 'SEE ALSO' in
+the man page.
+
+It has been documented in the manual that the cut buffer is deleted when a
+new file is read with 'e' or 'E'. (Reported by Tim Chase).
+
+It has been documented in the manual that using a regular expression inside
+the command-list of a global command may cause the "last regular expression
+processed" to differ between the first and subsequent executions of the
+command-list. (Reported by Artyom Bologov).
+
 Changes in version 1.22.5:
 
 Use 'sizeof active_list[0]' instead of 'sizeof (line_node **)'.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/ed-1.22.5/buffer.c new/ed-1.22.6/buffer.c
--- old/ed-1.22.5/buffer.c      2026-01-03 12:24:07.000000000 +0100
+++ new/ed-1.22.6/buffer.c      2026-08-19 11:44:26.000000000 +0200
@@ -84,7 +84,7 @@
   set_error_msg( "Too many lines in buffer" ); return true;
   }
 
-/* add a line node in the editor buffer after the given line */
+/* add a line node in the editor buffer after the current line */
 static void add_line_node( line_node * const lp )
   {
   line_node * const prev = search_line_node( current_addr_ );
@@ -535,7 +535,7 @@
 static bool u_modified = false;
 
 
-void clear_undo_stack( void )
+void clear_undo_stack( void )  /* free also line nodes of deleted lines */
   {
   while( u_len-- )
     if( ustack[u_len].type == UDEL )
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/ed-1.22.5/carg_parser.c new/ed-1.22.6/carg_parser.c
--- old/ed-1.22.5/carg_parser.c 2026-01-04 00:13:00.000000000 +0100
+++ new/ed-1.22.6/carg_parser.c 2026-08-15 01:46:36.000000000 +0200
@@ -191,8 +191,7 @@
     {
     int index = -1, i;
     const unsigned char c = opt[cind];
-    char code_str[2];
-    code_str[0] = c; code_str[1] = 0;
+    const char code_str[2] = { opt[cind], 0 };
 
     if( c != 0 )
       for( i = 0; options[i].code; ++i )
@@ -200,7 +199,7 @@
           { index = i; break; }
 
     if( index < 0 )
-      return set_error( ap, "invalid option -- '", code_str, "'" );
+      return set_error( ap, "invalid option -- '", &code_str[0], "'" );
 
     if( !push_back_option( ap, c, 0 ) ) return 0;
     if( opt[++cind] == 0 ) { ++*argindp; cind = 0; }   /* opt finished */
@@ -213,7 +212,7 @@
     else if( options[index].has_arg == ap_yes || options[index].has_arg == 
ap_yesme )
       {
       if( !arg || ( options[index].has_arg == ap_yes && !arg[0] ) )
-        return set_error( ap, "option requires an argument -- '", code_str, 
"'" );
+        return set_error( ap, "option requires an argument -- '", 
&code_str[0], "'" );
       ++*argindp; cind = 0;
       if( !set_argument( ap, arg ) ) return 0; /* argument may be empty */
       }
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/ed-1.22.5/configure new/ed-1.22.6/configure
--- old/ed-1.22.5/configure     2026-02-06 22:08:05.000000000 +0100
+++ new/ed-1.22.6/configure     2026-08-17 00:17:58.000000000 +0200
@@ -6,7 +6,7 @@
 # to copy, distribute, and modify it.
 
 pkgname=ed
-pkgversion=1.22.5
+pkgversion=1.22.6
 progname=ed
 srctrigger=doc/${pkgname}.texi
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/ed-1.22.5/doc/ed.1 new/ed-1.22.6/doc/ed.1
--- old/ed-1.22.5/doc/ed.1      2026-02-06 22:24:12.000000000 +0100
+++ new/ed-1.22.6/doc/ed.1      2026-08-20 15:41:13.000000000 +0200
@@ -1,5 +1,5 @@
 .\" DO NOT MODIFY THIS FILE!  It was generated by help2man 1.49.2.
-.TH ED "1" "February 2026" "GNU ed 1.22.5" "User Commands"
+.TH ED "1" "August 2026" "GNU ed 1.22.6" "User Commands"
 .SH NAME
 ed \- line-oriented text editor
 .SH SYNOPSIS
@@ -79,6 +79,8 @@
 This is free software: you are free to change and redistribute it.
 There is NO WARRANTY, to the extent permitted by law.
 .SH "SEE ALSO"
+regex(7)
+.PP
 The full documentation for
 .B ed
 is maintained as a Texinfo manual.  If the
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/ed-1.22.5/doc/ed.info new/ed-1.22.6/doc/ed.info
--- old/ed-1.22.5/doc/ed.info   2026-02-06 22:11:42.000000000 +0100
+++ new/ed-1.22.6/doc/ed.info   2026-08-20 12:35:53.000000000 +0200
@@ -18,7 +18,7 @@
 The GNU ed line editor
 **********************
 
-This manual is for GNU ed (version 1.22.5, 6 February 2026).
+This manual is for GNU ed (version 1.22.6, 20 August 2026).
 
 * Menu:
 
@@ -580,6 +580,10 @@
 
 An empty regular expression is equivalent to the last regular expression
 processed. Therefore '/RE/s//REPLACEMENT/' replaces RE with REPLACEMENT.
+Note that if a regular expression is used inside the COMMAND-LIST of a
+global command, the "last regular expression processed" may differ between
+the first and subsequent executions of the COMMAND-LIST. *Note global
+command::.
 
 As a GNU extension, a regular expression /RE/ may be followed by the suffix
 'I' which makes 'ed' match RE in a case-insensitive manner. Note that the
@@ -852,10 +856,10 @@
      line. Else, the current address is unchanged.
 
 '(.)kx'
-     Marks a line with a lower case letter 'x'. The line can then be
-     addressed as ''x' (i.e., a single quote followed by 'x') in subsequent
-     commands. The mark is not cleared until the line is deleted or
-     otherwise modified. The current address is unchanged.
+     Marks the addressed line with a lower case letter 'x'. The line can
+     then be addressed as ''x' (i.e., a single quote followed by 'x') in
+     subsequent commands. The mark is not cleared until the line is deleted
+     or otherwise modified. The current address is unchanged.
 
 '(.,.)l'
      List command. Prints the addressed lines unambiguously. The end of each
@@ -960,9 +964,10 @@
      copied.
 
 '(.,.)y'
-     Copies (yanks) the addressed lines to the cut buffer. The cut buffer is
-     overwritten by subsequent 'c', 'd', 'j', 's', or 'y' commands. The
-     current address is unchanged.
+     Copies (yanks) the addressed lines to the cut buffer. The current
+     address is unchanged. The cut buffer is overwritten by subsequent 'c',
+     'd', 'j', 's', or 'y' commands. The cut buffer is deleted when a new
+     file is read with 'e' or 'E'.
 
 '(.+1)zN'
      Scroll. Prints N lines at a time starting at addressed line, and sets
@@ -1605,20 +1610,21 @@
 
 Tag Table:
 Node: Top529
-Node: Overview1900
-Node: Introduction to line editing4748
-Node: Invoking ed11961
-Node: Argument syntax16017
-Node: Line addressing17779
-Node: Regular expressions21795
-Node: Commands27965
-Ref: print suffixes28300
-Ref: shell escape command40813
-Node: The 's' Command42391
-Node: Limitations45285
-Node: Diagnostics46302
-Node: Problems47131
-Node: GNU Free Documentation License47663
+Node: Overview1899
+Node: Introduction to line editing4747
+Node: Invoking ed11960
+Node: Argument syntax16016
+Node: Line addressing17778
+Node: Regular expressions21794
+Node: Commands28191
+Ref: print suffixes28526
+Ref: global command32108
+Ref: shell escape command41123
+Node: The 's' Command42701
+Node: Limitations45595
+Node: Diagnostics46612
+Node: Problems47441
+Node: GNU Free Documentation License47973
 
 End Tag Table
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/ed-1.22.5/doc/ed.texi new/ed-1.22.6/doc/ed.texi
--- old/ed-1.22.5/doc/ed.texi   2026-02-06 22:08:05.000000000 +0100
+++ new/ed-1.22.6/doc/ed.texi   2026-08-20 12:35:48.000000000 +0200
@@ -6,8 +6,8 @@
 @finalout
 @c %**end of header
 
-@set UPDATED 6 February 2026
-@set VERSION 1.22.5
+@set UPDATED 20 August 2026
+@set VERSION 1.22.6
 
 @dircategory Basics
 @direntry
@@ -651,7 +651,10 @@
 
 An empty regular expression is equivalent to the last regular expression
 processed. Therefore @samp{/@var{re}/s//@var{replacement}/} replaces
-@var{re} with @var{replacement}.
+@var{re} with @var{replacement}. Note that if a regular expression is used
+inside the @var{command-list} of a global command, the "last regular
+expression processed" may differ between the first and subsequent executions
+of the @var{command-list}. @xref{global command}.
 
 As a GNU extension, a regular expression /@var{re}/ may be followed by the
 suffix @samp{I} which makes @command{ed} match @var{re} in a
@@ -880,6 +883,7 @@
 with @file{~/}, the @file{~} is expanded to specify your home directory
 @file{$HOME}.
 
+@anchor{global command}
 @item (1,$)g/@var{re}/[I]@var{command-list}
 Global command. The global command makes two passes over the file. On the
 first pass, all the addressed lines matching a regular expression @var{re}
@@ -942,10 +946,10 @@
 address is unchanged.
 
 @item (.)kx
-Marks a line with a lower case letter @samp{x}. The line can then be
-addressed as @samp{'x} (i.e., a single quote followed by @samp{x}) in
-subsequent commands. The mark is not cleared until the line is deleted
-or otherwise modified. The current address is unchanged.
+Marks the addressed line with a lower case letter @samp{x}. The line can
+then be addressed as @samp{'x} (i.e., a single quote followed by @samp{x})
+in subsequent commands. The mark is not cleared until the line is deleted or
+otherwise modified. The current address is unchanged.
 
 @item (.,.)l
 List command. Prints the addressed lines unambiguously. The end of each
@@ -1051,9 +1055,10 @@
 line. The current address is set to the address of the last line copied.
 
 @item (.,.)y
-Copies (yanks) the addressed lines to the cut buffer. The cut buffer is
-overwritten by subsequent @samp{c}, @samp{d}, @samp{j}, @samp{s}, or
-@samp{y} commands. The current address is unchanged.
+Copies (yanks) the addressed lines to the cut buffer. The current address is
+unchanged. The cut buffer is overwritten by subsequent @samp{c}, @samp{d},
+@samp{j}, @samp{s}, or @samp{y} commands. The cut buffer is deleted when a
+new file is read with @samp{e} or @samp{E}.
 
 @item (.+1)z@var{n}
 Scroll. Prints @var{n} lines at a time starting at addressed line, and sets
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/ed-1.22.5/global.c new/ed-1.22.6/global.c
--- old/ed-1.22.5/global.c      2026-01-09 17:35:00.000000000 +0100
+++ new/ed-1.22.6/global.c      2026-08-17 11:56:03.000000000 +0200
@@ -26,7 +26,7 @@
 
 /* list of lines active in a global command */
 static const line_node **active_list = 0;
-static int active_size = 0;    /* size (in bytes) of active_list */
+static int active_size = 0;    /* capacity (in lines) of active_list */
 static int active_len = 0;     /* number of lines in active_list */
 static int active_idx = 0;     /* active_list index ( non-decreasing ) */
 static int active_idxm = 0;    /* active_list index ( modulo active_len ) */
@@ -55,17 +55,17 @@
 /* add a line node to the global-active list */
 bool set_active_node( const line_node * const lp )
   {
-  const unsigned min_size = ( active_len + 1 ) * sizeof active_list[0];
-  if( (unsigned)active_size < min_size )
+  if( active_len >= active_size )
     {
-    if( min_size >= INT_MAX )
+    enum { max_lines = INT_MAX / sizeof active_list[0] };
+    if( active_len >= max_lines )
       { set_error_msg( "Too many matching lines" ); return false; }
-    const int new_size = ( ( min_size < 512 ) ? 512 :
-      ( min_size >= INT_MAX / 2 ) ? INT_MAX - 1 : ( min_size / 512 ) * 1024 );
+    const int new_size = ( ( active_len < 64 ) ? 64 :
+      ( active_len >= max_lines / 2 ) ? max_lines : active_len * 2 );
     void * new_buf = 0;
     disable_interrupts();
-    if( active_list ) new_buf = realloc( active_list, new_size );
-    else new_buf = malloc( new_size );
+    if( !active_list ) new_buf = malloc( new_size * sizeof active_list[0] );
+    else new_buf = realloc( active_list, new_size * sizeof active_list[0] );
     if( !new_buf )
       { show_strerror( 0, errno );
         set_error_msg( mem_msg ); enable_interrupts(); return false; }
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/ed-1.22.5/io.c new/ed-1.22.6/io.c
--- old/ed-1.22.5/io.c  2026-01-03 12:24:07.000000000 +0100
+++ new/ed-1.22.6/io.c  2026-08-17 13:21:16.000000000 +0200
@@ -289,9 +289,9 @@
                bool * const read_onlyp )
   {
   FILE * fp;
-  int ret;
+  const bool is_pipe = *filename == '!';
 
-  if( *filename == '!' ) fp = popen( filename + 1, "r" );
+  if( is_pipe ) fp = popen( filename + 1, "r" );
   else if( !( fp = fopen( filename, "r+" ) ) && errno != ENOENT &&
            ( fp = fopen( filename, "r" ) ) && read_onlyp && !modified() )
     *read_onlyp = true;
@@ -299,7 +299,7 @@
     { show_strerror( filename, errno );
       set_error_msg( "Cannot open input file" ); return -1; }
   const long size = read_stream( filename, fp, addr ); /* file size in bytes */
-  if( *filename == '!' ) ret = pclose( fp ); else ret = fclose( fp );
+  const int ret = is_pipe ? pclose( fp ) : fclose( fp );
   if( size < 0 ) return -2;
   if( ret < 0 )
     { show_strerror( filename, errno );
@@ -346,16 +346,13 @@
 int write_file( const char * const filename, const char * const mode,
                 const int from, const int to )
   {
-  FILE * fp;
-  int ret;
-
-  if( *filename == '!' ) fp = popen( filename + 1, "w" );
-  else fp = fopen( filename, mode );
+  const bool is_pipe = *filename == '!';
+  FILE * fp = is_pipe ? popen( filename + 1, "w" ) : fopen( filename, mode );
   if( !fp )
     { show_strerror( filename, errno );
       set_error_msg( "Cannot open output file" ); return -1; }
   const long size = write_stream( filename, fp, from, to );    /* bytes 
written */
-  if( *filename == '!' ) ret = pclose( fp ); else ret = fclose( fp );
+  const int ret = is_pipe ? pclose( fp ) : fclose( fp );
   if( size < 0 ) return -1;
   if( ret < 0 )
     { show_strerror( filename, errno );
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/ed-1.22.5/main.c new/ed-1.22.6/main.c
--- old/ed-1.22.5/main.c        2026-01-13 22:57:01.000000000 +0100
+++ new/ed-1.22.6/main.c        2026-08-20 13:48:42.000000000 +0200
@@ -102,6 +102,8 @@
     "options, memory exhausted, command failed, etc), 2 for problems with 
the\n"
     "input file (file not found, buffer modified, I/O errors), 3 for an 
internal\n"
     "consistency error (e.g., bug) which caused ed to panic.\n"
+    "\n*See also*\n"
+    "regex(7)\n"
     "\nReport bugs to [email protected]\n"
     "Ed home page: http://www.gnu.org/software/ed/ed.html\n";
     "General help using GNU software: http://www.gnu.org/gethelp\n";, stdout );
@@ -125,7 +127,6 @@
   for( ; *p; ++p )
     {
     const unsigned char ch = *p;
-    if( ch == '\\' ) { putc( ch, fp ); putc( ch, fp ); continue; }
     if( ch >= 32 && ch <= 126 ) { putc( ch, fp ); continue; }
     putc( '\\', fp );
     const char e = escchar( ch ); if( e ) { putc( e, fp ); continue; }
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/ed-1.22.5/regex.c new/ed-1.22.6/regex.c
--- old/ed-1.22.5/regex.c       2026-01-03 12:24:07.000000000 +0100
+++ new/ed-1.22.6/regex.c       2026-08-19 12:33:13.000000000 +0200
@@ -323,18 +323,18 @@
     int n;
     if( rbuf[i] == '&' )
       {
-      int j = rm[0].rm_so; int k = rm[0].rm_eo;
+      int j = rm[0].rm_so; const int k = rm[0].rm_eo;
       if( !resize_buffer( txtbufp, txtbufszp, offset - j + k ) ) return -1;
       while( j < k ) (*txtbufp)[offset++] = txt[j++];
       }
     else if( rbuf[i] == '\\' && rbuf[++i] >= '1' && rbuf[i] <= '9' &&
              ( n = rbuf[i] - '0' ) <= re_nsub )
       {
-      int j = rm[n].rm_so; int k = rm[n].rm_eo;
+      int j = rm[n].rm_so; const int k = rm[n].rm_eo;
       if( !resize_buffer( txtbufp, txtbufszp, offset - j + k ) ) return -1;
       while( j < k ) (*txtbufp)[offset++] = txt[j++];
       }
-    else               /* preceding 'if' skipped escaping backslashes */
+    else               /* preceding 'if' skipped escaping backslash */
       {
       if( !resize_buffer( txtbufp, txtbufszp, offset + 1 ) ) return -1;
       (*txtbufp)[offset++] = rbuf[i];

Reply via email to