Script 'mail_helper' called by obssrc
Hello community,

here is the log from the commit of package tree for openSUSE:Factory checked in 
at 2024-09-25 21:51:34
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/tree (Old)
 and      /work/SRC/openSUSE:Factory/.tree.new.29891 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "tree"

Wed Sep 25 21:51:34 2024 rev:31 rq:1203372 version:2.1.3

Changes:
--------
--- /work/SRC/openSUSE:Factory/tree/tree.changes        2023-12-01 
21:27:04.605642928 +0100
+++ /work/SRC/openSUSE:Factory/.tree.new.29891/tree.changes     2024-09-25 
21:51:42.296320936 +0200
@@ -1,0 +2,35 @@
+Wed Sep 25 08:44:35 UTC 2024 - Dirk Müller <dmuel...@suse.com>
+
+- update to 2.1.3:
+  * Mostly a brown-paper bag release to fix the below
+    regression and add a feature I forgot to add.
+  * Fix regression in search() function that broke --fromfile
+  * Allow the -L option to accept its parameter immediately
+    (with no space) instead of requiring it be the next option
+    word.
+  * Fix issue where --gitignore does not think a pattern with
+    a singular terminal '/' (indicating it matches only
+    directories,) is a relative path.
+  * Don't emit the error 'recursive, not followed' if when
+    using -L, the depth would prevent descending anyway. This also
+    fixes up a JSON output error (missing comma) when this happens.
+  * Don't prematurely sort files/directories with
+    --from*file. (gitlab @jack6th)
+  * Various seg-faults fixed
+    - Make doubly sure that there is actually a previous path
+      entry when reading from a tabbed file.
+    - Make sure there is actually a file entity when applying
+      the link info to it when reading fromfile using --fflinks.
+    - Increase space for the path a little in listdir(), just
+      to be sure.
+  * Make sure that there is no topsort (--dirsfirst /
+    --filesfirst) if there is no basesort (-U).
+  * Make sure gittrim() function can handle a null string.
+
+-------------------------------------------------------------------
+Tue Sep 24 13:48:56 UTC 2024 - Giacomo Leidi <giacomo.le...@suse.com>
+
+- Source tarball URL was unresolvable, update it to the correct version based 
on
+  https://gitlab.com/OldManProgrammer/unix-tree
+
+-------------------------------------------------------------------

Old:
----
  tree-2.1.1.tgz

New:
----
  tree-2.1.3.tgz

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

Other differences:
------------------
++++++ tree.spec ++++++
--- /var/tmp/diff_new_pack.Wjjeg9/_old  2024-09-25 21:51:42.752339930 +0200
+++ /var/tmp/diff_new_pack.Wjjeg9/_new  2024-09-25 21:51:42.752339930 +0200
@@ -1,7 +1,7 @@
 #
 # spec file for package tree
 #
-# Copyright (c) 2023 SUSE LLC
+# Copyright (c) 2024 SUSE LLC
 #
 # All modifications and additions to the file contributed by third parties
 # remain the property of their copyright owners, unless otherwise agreed
@@ -17,13 +17,13 @@
 
 
 Name:           tree
-Version:        2.1.1
+Version:        2.1.3
 Release:        0
 Summary:        File listing as a tree
 License:        GPL-2.0-or-later
 Group:          Productivity/File utilities
-URL:            https://mama.indstate.edu/users/ice/tree/
-Source0:        
https://mama.indstate.edu/users/ice/tree/src/%{name}-%{version}.tgz
+URL:            https://oldmanprogrammer.net/tar/tree/
+Source0:        https://oldmanprogrammer.net/tar/tree/%{name}-%{version}.tgz
 
 %description
 Tree is a recursive directory listing command that produces a depth

++++++ tree-2.1.1.tgz -> tree-2.1.3.tgz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/tree-2.1.1/CHANGES new/tree-2.1.3/CHANGES
--- old/tree-2.1.1/CHANGES      2023-05-31 04:39:35.000000000 +0200
+++ new/tree-2.1.3/CHANGES      2024-07-10 00:41:41.000000000 +0200
@@ -1,3 +1,32 @@
+Version 2.1.3 (07/09/2024)
+  - Mostly a brown-paper bag release to fix the below regression and add a
+    feature I forgot to add.
+  - Fix regression in search() function that broke --fromfile (Florian Ernst)
+    (caused by removing too much code while fixing premature sort for
+    --fromfile)
+  - Allow the -L option to accept its parameter immediately (with no space)
+    instead of requiring it be the next option word. (Trevor Gross)
+
+Version 2.1.2 (07/01/2024)
+  - Fix issue where --gitignore does not think a pattern with a singular
+    terminal '/' (indicating it matches only directories,) is a relative path.
+    (Clinton)
+  - Don't emit the error 'recursive, not followed' if when using -L, the depth
+    would prevent descending anyway. This also fixes up a JSON output error 
+    (missing comma) when this happens. (simonpmind)
+  - Don't prematurely sort files/directories with --from*file. (gitlab 
@jack6th)
+  - Various seg-faults fixed (Hanqin Guan (The OSLab of Peking University)):
+    - Make doubly sure that there is actually a previous path entry when 
reading
+      from a tabbed file.
+    - Make sure there is actually a file entity when applying the link info to
+      it when reading fromfile using --fflinks.
+    - Increase space for the path a little in listdir(), just to be sure.
+    - Make sure that there is no topsort (--dirsfirst / --filesfirst) if there
+      is no basesort (-U).
+    - Make sure gittrim() function can handle a null string.
+  - Update email address to steve.baker....@gmail.com from 
i...@mama.indstate.edu
+    which has been permanently disabled.
+
 Version 2.1.1 (05/31/2023)
   - Various spelling corrections.
   - Fix issue where following links while doing JSON output would lead to
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/tree-2.1.1/INSTALL new/tree-2.1.3/INSTALL
--- old/tree-2.1.1/INSTALL      2023-05-31 20:41:22.000000000 +0200
+++ new/tree-2.1.3/INSTALL      2024-07-05 16:52:06.000000000 +0200
@@ -8,7 +8,7 @@
 
   I cannot test on non-Linux machines, so please feel free to contribute
 porting information, bug reports, compile options, patches, etc for porting to
-other OS's to i...@mama.indstate.edu.
+other OS's to steve.baker....@gmail.com.
 
   I would also welcome any localization efforts, particularly translating the
 man page to other languages.  And of course feel free to suggest options and
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/tree-2.1.1/Makefile new/tree-2.1.3/Makefile
--- old/tree-2.1.1/Makefile     2023-05-31 22:06:18.000000000 +0200
+++ new/tree-2.1.3/Makefile     2024-07-05 04:07:38.000000000 +0200
@@ -1,5 +1,5 @@
 # $Copyright: $
-# Copyright (c) 1996 - 2023 by Steve Baker
+# Copyright (c) 1996 - 2024 by Steve Baker (steve.baker....@gmail.com)
 # All Rights reserved
 #
 # This program is free software; you can redistribute it and/or modify
@@ -21,7 +21,7 @@
 CC=gcc
 INSTALL=install
 
-VERSION=2.1.1
+VERSION=2.1.3
 TREE_DEST=tree
 DESTDIR=${PREFIX}/bin
 MAN=tree.1
@@ -32,8 +32,8 @@
 # Uncomment options below for your particular OS:
 
 # Linux defaults:
-CFLAGS+=-ggdb -std=c11 -pedantic -Wall -D_LARGEFILE64_SOURCE 
-D_FILE_OFFSET_BITS=64
-#CFLAGS+=-O3 -std=c11 -pedantic -Wall -D_LARGEFILE64_SOURCE 
-D_FILE_OFFSET_BITS=64
+#CFLAGS+=-ggdb -std=c11 -pedantic -Wall -D_LARGEFILE64_SOURCE 
-D_FILE_OFFSET_BITS=64
+CFLAGS+=-O3 -std=c11 -pedantic -Wall -D_LARGEFILE64_SOURCE 
-D_FILE_OFFSET_BITS=64
 #LDFLAGS+=-s
 
 # Uncomment for FreeBSD:
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/tree-2.1.1/README new/tree-2.1.3/README
--- old/tree-2.1.1/README       2023-05-31 22:05:24.000000000 +0200
+++ new/tree-2.1.3/README       2024-07-07 03:14:55.000000000 +0200
@@ -19,6 +19,8 @@
   http://mama.indstate.edu/users/ice/tree/
   ftp://mama.indstate.edu/linux/tree/
 
+  Current e-mail address to reach me at: steve.baker....@gmail.com
+
   If you don't like the way it looks let me know how you think it should be
 formatted. Feel free to suggest modifications and additions.
 
@@ -268,6 +270,9 @@
 
 Kenta Arai
  - Reported Segfault with --filelimit option
+ - Add NULL guard for json_printinfo() and xml_printinfo() (and fix ftype
+   printing for XML)
+ - Fix getcharset() to not return a getenv() pointer.
 
 Ben Brown
  - Updates to the Makefile
@@ -283,11 +288,6 @@
  - Suggested adding support for --info and --gitignore for the --fromfile
    option.
 
-Kenta Arai
- - Add NULL guard for json_printinfo() and xml_printinfo() (and fix ftype
-   printing for XML)
- - Fix getcharset() to not return a getenv() pointer.
-
 Sebastian Rose
  - Another attempt at fixing extraneous /'s in HTML URLs/output.
 
@@ -306,6 +306,8 @@
 simonpmind (gitlab)
  - Reported issue where following links while doing JSON output would lead to
    incorrect JSON output.
+ - Suggested suppressing 'recursive, not followed' when using -L, fixing JSON
+   error.
 
 German Lashevich
  - Reported an issue where .info patterns relative to the .info file that did
@@ -318,6 +320,22 @@
 6ramr (gitlab)
  - Reported issue with following symbolic links when a full tree was gathered.
 
+Clinton
+ - Reported issue where --gitignore does not think a pattern with a singular
+   terminal '/' (indicating it matches only directories,) is a relative path.
+
+gitlab @jack6th
+ - Don't prematurely sort files/directories with --from*file.
+
+Hanqin Guan (The OSLab of Peking University):
+ - Fuzzing testing that identified several problems in --fromfile and
+   --fromtabfile processing.
+ - -U should disable --dirsfirst / --filesfirst sorting.
+ - Make sure gittrim() function can handle a null string.
+
+Trevor Gross
+ - Suggested adding support for immediate values to -L with no spacing.
+
 And many others whom I've failed to keep track of.  I should have started
 this list years ago.
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/tree-2.1.1/color.c new/tree-2.1.3/color.c
--- old/tree-2.1.1/color.c      2023-04-08 01:53:54.000000000 +0200
+++ new/tree-2.1.3/color.c      2024-07-01 19:19:39.000000000 +0200
@@ -1,5 +1,5 @@
 /* $Copyright: $
- * Copyright (c) 1996 - 2023 by Steve Baker (i...@mama.indstate.edu)
+ * Copyright (c) 1996 - 2024 by Steve Baker (steve.baker....@gmail.com)
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/tree-2.1.1/doc/tree.1 new/tree-2.1.3/doc/tree.1
--- old/tree-2.1.1/doc/tree.1   2023-04-08 01:52:31.000000000 +0200
+++ new/tree-2.1.3/doc/tree.1   2024-07-05 16:51:29.000000000 +0200
@@ -1,5 +1,5 @@
 .\" $Copyright: $
-.\" Copyright (c) 1996 - 2022 by Steve Baker
+.\" Copyright (c) 1996 - 2024 by Steve Baker
 .\" All Rights reserved
 .\"
 .\" This program is free software; you can redistribute it and/or modify
@@ -17,7 +17,7 @@
 .\" Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
 .\"
 ...
-.TH TREE 1 "" "Tree 2.1.1"
+.TH TREE 1 "" "Tree 2.1.3"
 .SH NAME
 tree \- list contents of directories in a tree-like format.
 .SH SYNOPSIS
@@ -468,7 +468,7 @@
 \fBSTDDATA_FD\fP       Enable the stddata feature, optionally set descriptor 
to use.
 
 .SH AUTHOR
-Steve Baker (i...@mama.indstate.edu)
+Steve Baker (steve.baker....@gmail.com)
 .br
 HTML output hacked by Francesc Rocher (roc...@econ.udg.es)
 .br
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/tree-2.1.1/file.c new/tree-2.1.3/file.c
--- old/tree-2.1.1/file.c       2023-05-30 20:59:40.000000000 +0200
+++ new/tree-2.1.3/file.c       2024-07-05 23:44:17.000000000 +0200
@@ -1,5 +1,5 @@
 /* $Copyright: $
- * Copyright (c) 1996 - 2023 by Steve Baker (i...@mama.indstate.edu)
+ * Copyright (c) 1996 - 2024 by Steve Baker (steve.baker....@gmail.com)
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
@@ -81,10 +81,10 @@
 
   if (*dir == NULL) return (*dir = newent(name));
 
+  /* Don't insertion sort, let fprune() do the sort if necessary */
   for(prev = ptr = *dir; ptr != NULL; ptr=ptr->next) {
     cmp = strcmp(ptr->name,name);
     if (cmp == 0) return ptr;
-    if (cmp > 0) break;
     prev = ptr;
   }
   n = newent(name);
@@ -231,7 +231,7 @@
       }
     } while (tok != T_FILE && tok != T_EOP);
 
-    if (link) {
+    if (ent && link) {
       ent->isdir = 0;
       ent->mode = S_IFLNK;
       ent->lnk = scopy(link);
@@ -281,7 +281,7 @@
       *link = '\0';
       link += 4;
     }
-    if (tabs-1 > top) {
+    if ((tabs-1 > top) || (istack[tabs-1] == NULL)) {
        fprintf(stderr, "tree: Orphaned file [%s] on line %d, check tab depth 
in file.\n", spath, line);
        continue;
     }
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/tree-2.1.1/filter.c new/tree-2.1.3/filter.c
--- old/tree-2.1.1/filter.c     2023-05-30 22:19:58.000000000 +0200
+++ new/tree-2.1.3/filter.c     2024-06-24 19:44:19.000000000 +0200
@@ -1,5 +1,5 @@
 /* $Copyright: $
- * Copyright (c) 1996 - 2023 by Steve Baker (i...@mama.indstate.edu)
+ * Copyright (c) 1996 - 2024 by Steve Baker (steve.baker....@gmail.com)
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
@@ -25,6 +25,7 @@
 {
   int i, e = strlen(s)-1;
 
+  if (e < 0) return;
   if (s[e] == '\n') e--;
 
   for(i = e; i >= 0; i--) {
@@ -42,8 +43,11 @@
 struct pattern *new_pattern(char *pattern)
 {
   struct pattern *p = xmalloc(sizeof(struct pattern));
+  char *sl;
+
   p->pattern = scopy(pattern + ((pattern[0] == '/')? 1 : 0));
-  p->relative = (strchr(pattern,'/') == NULL);
+  sl = strchr(pattern, '/');
+  p->relative = (sl == NULL || (sl && !*(sl+1)));
   p->next = NULL;
   return p;
 }
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/tree-2.1.1/hash.c new/tree-2.1.3/hash.c
--- old/tree-2.1.1/hash.c       2023-05-30 23:51:55.000000000 +0200
+++ new/tree-2.1.3/hash.c       2024-07-01 19:19:45.000000000 +0200
@@ -1,5 +1,5 @@
 /* $Copyright: $
- * Copyright (c) 1996 - 2023 by Steve Baker (i...@mama.indstate.edu)
+ * Copyright (c) 1996 - 2024 by Steve Baker (steve.baker....@gmail.com)
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/tree-2.1.1/html.c new/tree-2.1.3/html.c
--- old/tree-2.1.1/html.c       2023-04-08 01:54:19.000000000 +0200
+++ new/tree-2.1.3/html.c       2024-07-01 19:34:17.000000000 +0200
@@ -1,5 +1,5 @@
 /* $Copyright: $
- * Copyright (c) 1996 - 2023 by Steve Baker (i...@mama.indstate.edu)
+ * Copyright (c) 1996 - 2024 by Steve Baker (steve.baker....@gmail.com)
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
@@ -208,14 +208,17 @@
     if (!nolinks) {
       fprintf(outfile," href=\"%s",host);
       if (dirname != NULL) {
-       int len = strlen(dirname);
-       int off = (len >= htmldirlen? htmldirlen : 0);
-       url_encode(outfile, dirname + off);
-       putc('/',outfile);
-       url_encode(outfile, filename);
-       fprintf(outfile,"%s%s\"",(descend > 1? "/00Tree.html" : ""), 
(file->isdir?"/":""));
+       if (host[strlen(host)-1] != '/') putc('/', outfile);
+       url_encode(outfile, dirname);
+       if (strcmp(dirname, filename) != 0) {
+         if (dirname[strlen(dirname)-1] != '/') putc('/', outfile);
+         url_encode(outfile, filename);
+       }
+       fprintf(outfile,"%s%s\"",(descend > 1? "/00Tree.html" : ""), 
(file->isdir && descend < 2?"/":""));
       } else {
-       fprintf(outfile,"%s/\"",(descend > 1? "/00Tree.html" : ""));
+       if (host[strlen(host)-1] != '/') putc('/', outfile);
+       url_encode(outfile, filename);
+       fprintf(outfile,"%s\"",(descend > 1? "/00Tree.html" : ""));
       }
     }
   }
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/tree-2.1.1/info.c new/tree-2.1.3/info.c
--- old/tree-2.1.1/info.c       2023-05-30 23:20:15.000000000 +0200
+++ new/tree-2.1.3/info.c       2024-06-24 19:44:24.000000000 +0200
@@ -1,5 +1,5 @@
 /* $Copyright: $
- * Copyright (c) 1996 - 2023 by Steve Baker (i...@mama.indstate.edu)
+ * Copyright (c) 1996 - 2024 by Steve Baker (steve.baker....@gmail.com)
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/tree-2.1.1/json.c new/tree-2.1.3/json.c
--- old/tree-2.1.1/json.c       2023-04-08 01:54:32.000000000 +0200
+++ new/tree-2.1.3/json.c       2024-07-01 19:19:55.000000000 +0200
@@ -1,5 +1,5 @@
 /* $Copyright: $
- * Copyright (c) 1996 - 2023 by Steve Baker (i...@mama.indstate.edu)
+ * Copyright (c) 1996 - 2024 by Steve Baker (steve.baker....@gmail.com)
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/tree-2.1.1/list.c new/tree-2.1.3/list.c
--- old/tree-2.1.1/list.c       2023-05-31 00:02:43.000000000 +0200
+++ new/tree-2.1.3/list.c       2024-06-24 19:44:30.000000000 +0200
@@ -1,5 +1,5 @@
 /* $Copyright: $
- * Copyright (c) 1996 - 2023 by Steve Baker (i...@mama.indstate.edu)
+ * Copyright (c) 1996 - 2024 by Steve Baker (steve.baker....@gmail.com)
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
@@ -26,6 +26,7 @@
 extern FILE *outfile;
 extern int flimit, Level, *dirs, maxdirs, errors;
 extern int htmldirlen;
+extern char *host;
 
 extern bool colorize, linktargetcolor;
 extern char *endcode;
@@ -92,7 +93,7 @@
       lc.printinfo(dirname[i], info, 0);
     } else info = NULL;
 
-    needsclosed = lc.printfile(NULL, dirname[i], info, (dir != NULL) || (!dir 
&& n));
+    needsclosed = lc.printfile(dirname[i], dirname[i], info, (dir != NULL) || 
(!dir && n));
     subtotal = (struct totals){0, 0, 0};
     if (duflag) subtotal.size = info? info->size : 0;
 
@@ -141,7 +142,7 @@
   struct infofile *inf = NULL;
   struct _info **subdir = NULL;
   int namemax = 257, namelen;
-  int descend, htmldescend = 0, found, n, dirlen = strlen(dirname), pathlen = 
dirlen + 257;
+  int descend, htmldescend = 0, found, n, dirlen = strlen(dirname)+2, pathlen 
= dirlen + 257;
   int needsclosed;
   char *path, *newpath, *filename, *err = NULL;
 
@@ -193,6 +194,8 @@
          }
          if (found) {
            err = "recursive, not followed";
+           /* Not actually a problem if we weren't going to descend anyway: */
+           if (Level >= 0 && lev > Level) err = NULL;
            descend = -1;
          }
        }
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/tree-2.1.1/tree.c new/tree-2.1.3/tree.c
--- old/tree-2.1.1/tree.c       2023-05-30 23:19:55.000000000 +0200
+++ new/tree-2.1.3/tree.c       2024-07-07 01:09:36.000000000 +0200
@@ -1,5 +1,5 @@
 /* $Copyright: $
- * Copyright (c) 1996 - 2023 by Steve Baker (i...@mama.indstate.edu)
+ * Copyright (c) 1996 - 2024 by Steve Baker (steve.baker....@gmail.com)
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
@@ -18,8 +18,8 @@
 
 #include "tree.h"
 
-char *version = "$Version: $ tree v2.1.1 %s 1996 - 2023 by Steve Baker, Thomas 
Moore, Francesc Rocher, Florian Sesser, Kyosuke Tokoro $";
-char *hversion= "\t\t tree v2.1.1 %s 1996 - 2023 by Steve Baker and Thomas 
Moore <br>\n"
+char *version = "$Version: $ tree v2.1.3 %s 1996 - 2024 by Steve Baker, Thomas 
Moore, Francesc Rocher, Florian Sesser, Kyosuke Tokoro $";
+char *hversion= "\t\t tree v2.1.3 %s 1996 - 2024 by Steve Baker and Thomas 
Moore <br>\n"
                "\t\t HTML output hacked and copyleft %s 1998 by Francesc 
Rocher <br>\n"
                "\t\t JSON output hacked and copyleft %s 2014 by Florian Sesser 
<br>\n"
                "\t\t Charsets / OS/2 support %s 2001 by Kyosuke Tokoro\n";
@@ -333,9 +333,18 @@
          Rflag = TRUE;
          break;
        case 'L':
-         if ((sLevel = argv[n++]) == NULL) {
-           fprintf(stderr,"tree: Missing argument to -L option.\n");
-           exit(1);
+         if (isdigit(argv[i][j+1])) {
+           for(k=0; (argv[i][j+1+k] != '\0') && (isdigit(argv[i][j+1+k])) && 
(k < PATH_MAX-1); k++) {
+             xpattern[k] = argv[i][j+1+k];
+           }
+           xpattern[k] = '\0';
+           j += k;
+           sLevel = xpattern;
+         } else {
+           if ((sLevel = argv[n++]) == NULL) {
+             fprintf(stderr,"tree: Missing argument to -L option.\n");
+             exit(1);
+           }
          }
          Level = strtoul(sLevel,NULL,0)-1;
          if (Level < 0) {
@@ -551,6 +560,7 @@
     dirname[1] = NULL;
   }
   if (topsort == NULL) topsort = basesort;
+  if (basesort == NULL) topsort = NULL;
   if (timefmt) setlocale(LC_TIME,"");
   if (dflag) pruneflag = FALSE;  /* You'll just get nothing otherwise. */
   if (Rflag && (Level == -1)) Rflag = FALSE;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/tree-2.1.1/tree.h new/tree-2.1.3/tree.h
--- old/tree-2.1.1/tree.h       2023-05-30 23:16:15.000000000 +0200
+++ new/tree-2.1.3/tree.h       2024-07-01 19:20:03.000000000 +0200
@@ -1,5 +1,5 @@
 /* $Copyright: $
- * Copyright (c) 1996 - 2023 by Steve Baker (i...@mama.indstate.edu)
+ * Copyright (c) 1996 - 2024 by Steve Baker (steve.baker....@gmail.com)
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/tree-2.1.1/unix.c new/tree-2.1.3/unix.c
--- old/tree-2.1.1/unix.c       2023-04-08 01:55:02.000000000 +0200
+++ new/tree-2.1.3/unix.c       2024-07-01 19:20:07.000000000 +0200
@@ -1,5 +1,5 @@
 /* $Copyright: $
- * Copyright (c) 1996 - 2023 by Steve Baker (i...@mama.indstate.edu)
+ * Copyright (c) 1996 - 2024 by Steve Baker (steve.baker....@gmail.com)
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/tree-2.1.1/xml.c new/tree-2.1.3/xml.c
--- old/tree-2.1.1/xml.c        2023-04-08 01:55:07.000000000 +0200
+++ new/tree-2.1.3/xml.c        2024-07-01 19:20:11.000000000 +0200
@@ -1,5 +1,5 @@
 /* $Copyright: $
- * Copyright (c) 1996 - 2023 by Steve Baker (i...@mama.indstate.edu)
+ * Copyright (c) 1996 - 2024 by Steve Baker (steve.baker....@gmail.com)
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by

Reply via email to