Script 'mail_helper' called by obssrc
Hello community,

here is the log from the commit of package tcsh for openSUSE:Factory checked in 
at 2023-04-14 13:12:30
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/tcsh (Old)
 and      /work/SRC/openSUSE:Factory/.tcsh.new.19717 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "tcsh"

Fri Apr 14 13:12:30 2023 rev:91 rq:1079203 version:6.24.09

Changes:
--------
--- /work/SRC/openSUSE:Factory/tcsh/tcsh.changes        2023-04-12 
12:50:58.532712889 +0200
+++ /work/SRC/openSUSE:Factory/.tcsh.new.19717/tcsh.changes     2023-04-14 
13:12:37.975411096 +0200
@@ -1,0 +2,11 @@
+Thu Apr 13 12:34:15 UTC 2023 - Dr. Werner Fink <wer...@suse.de>
+
+- Update to tcsh 6.24.09
+  * ls-F: unsetenv LS*COLOR reapplies other LS*COLOR (Luke Mewburn)
+  * Don't crash if LSCOLORS contains > 11 pairs (Luke Mewburn)
+- Port patch
+  * tcsh-6.18.03-colorls.dif
+    that is we ignore unknown colors to be compatible with LS_COLOR
+    used by /usr/bin/ls from coreutils
+
+-------------------------------------------------------------------
@@ -4 +15 @@
-- Update too tcsh 6.24.08
+- Update to tcsh 6.24.08

Old:
----
  tcsh-6.24.08.tar.gz
  tcsh-6.24.08.tar.gz.asc

New:
----
  tcsh-6.24.09.tar.gz
  tcsh-6.24.09.tar.gz.asc

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

Other differences:
------------------
++++++ tcsh.spec ++++++
--- /var/tmp/diff_new_pack.V4m0zo/_old  2023-04-14 13:12:38.695415213 +0200
+++ /var/tmp/diff_new_pack.V4m0zo/_new  2023-04-14 13:12:38.699415236 +0200
@@ -17,7 +17,7 @@
 
 
 Name:           tcsh
-Version:        6.24.08
+Version:        6.24.09
 Release:        0
 Summary:        The C SHell
 License:        BSD-3-Clause

++++++ tcsh-6.18.03-colorls.dif ++++++
--- /var/tmp/diff_new_pack.V4m0zo/_old  2023-04-14 13:12:38.779415694 +0200
+++ /var/tmp/diff_new_pack.V4m0zo/_new  2023-04-14 13:12:38.783415717 +0200
@@ -1,9 +1,76 @@
 ---
- tw.color.c |    9 ++++-----
- 1 file changed, 4 insertions(+), 5 deletions(-)
+ tests/ls-F.at |   36 ++++++++++++++++++------------------
+ tw.color.c    |   10 ++++------
+ 2 files changed, 22 insertions(+), 24 deletions(-)
 
+--- tests/ls-F.at
++++ tests/ls-F.at      2023-04-13 12:51:33.133052023 +0000
+@@ -358,9 +358,9 @@ dnl
+ dnl Fail: environment LS_COLORS=YY:XX=0 exits with unknown 'XX'.
+ dnl (Unknown 'YY' is ignored.)
+ dnl
+-AT_CHECK([LS_COLORS=YY:XX=0 tcsh -f -c 'set color;cd DIR && ls-F'], [1], [], 
[dnl
+-Unknown LS_COLORS color variable 'XX'.
+-])
++dnl AT_CHECK([LS_COLORS=YY:XX=0 tcsh -f -c 'set color;cd DIR && ls-F'], [1], 
[], [dnl
++dnl Unknown LS_COLORS color variable 'XX'.
++dnl ])
+ 
+ dnl
+ dnl setenv LS_COLORS "YY:XX=0" warns for unknown 'XX='. (Unknown 'YY' is 
ignored').
+@@ -368,11 +368,11 @@ dnl listflags=A, listlinks
+ dnl
+ dnl As per ls-F-color-default.out.
+ dnl
+-TCSH_LS_F([${tests_dir}/ls-F-color-default.out],
+-    [],
+-    [setenv LS_COLORS "YY:XX=0"; set color listflags=A listlinks], [dnl
+-Unknown LS_COLORS color variable 'XX'.
+-])
++dnl TCSH_LS_F([${tests_dir}/ls-F-color-default.out],
++dnl     [],
++dnl     [setenv LS_COLORS "YY:XX=0"; set color listflags=A listlinks], [dnl
++dnl Unknown LS_COLORS color variable 'XX'.
++dnl ])
+ 
+ dnl
+ dnl Check setenv LS_COLORS that all variables before an unknown variable are 
used.
+@@ -383,11 +383,11 @@ dnl listflags=A, listlinks
+ dnl
+ dnl As per ls-F-LS_COLORS-all.out.
+ dnl
+-TCSH_LS_F([${tests_dir}/ls-F-LS_COLORS-all.out],
+-    [],
+-    [setenv LS_COLORS "TCSH_TEXT_LS_COLORS:YY:XX=0"; set color listflags=A 
listlinks], [dnl
+-Unknown LS_COLORS color variable 'XX'.
+-])
++dnl TCSH_LS_F([${tests_dir}/ls-F-LS_COLORS-all.out],
++dnl     [],
++dnl     [setenv LS_COLORS "TCSH_TEXT_LS_COLORS:YY:XX=0"; set color 
listflags=A listlinks], [dnl
++dnl Unknown LS_COLORS color variable 'XX'.
++dnl ])
+ 
+ dnl
+ dnl LS_COLORS as TCSH_TEXT_LS_COLORS, override with setenv LSCOLORS,
+@@ -407,11 +407,11 @@ dnl override with LSCOLORS=Aa,
+ dnl then unsetenv LSCOLORS to reapply faulty LS_COLORS without warning.
+ dnl and results in default colors.
+ dnl
+-TCSH_LS_F([${tests_dir}/ls-F-color-default.out],
+-    [],
+-    [setenv LS_COLORS XX=0; setenv LSCOLORS Aa; unsetenv LSCOLORS || echo 
FAIL; set color listflags=A listlinks], [dnl
+-Unknown LS_COLORS color variable 'XX'.
+-])
++dnl TCSH_LS_F([${tests_dir}/ls-F-color-default.out],
++dnl     [],
++dnl     [setenv LS_COLORS XX=0; setenv LSCOLORS Aa; unsetenv LSCOLORS || echo 
FAIL; set color listflags=A listlinks], [dnl
++dnl Unknown LS_COLORS color variable 'XX'.
++dnl ])
+ 
+ m4_popdef([TCSH_TEXT_LS_COLORS])
+ 
 --- tw.color.c
-+++ tw.color.c 2023-04-11 10:36:56.030561276 +0000
++++ tw.color.c 2023-04-13 12:33:48.052952714 +0000
 @@ -56,7 +56,7 @@ typedef struct {
  typedef enum {
      Vdi, Vln, Vor, Vpi, Vso, Vdo, Vbd, Vcd,
@@ -21,7 +88,7 @@
  };
  
  #define nvariables (sizeof(variables)/sizeof(variables[0]))
-@@ -362,7 +363,7 @@ parseLS_COLORS(const Char *value)
+@@ -369,7 +370,7 @@ parseLS_COLORS(const Char *value, int si
      size_t  i, len;
      const Char         *v;            /* pointer in value */
      char   *c;                        /* pointer in colors */
@@ -30,7 +97,7 @@
      jmp_buf_t osetexit;
      size_t omark;
  
-@@ -419,16 +420,14 @@ parseLS_COLORS(const Char *value)
+@@ -426,17 +427,14 @@ parseLS_COLORS(const Char *value, int si
                        if ((Char)variables[i].variable[0] == (v[0] & CHAR) &&
                            (Char)variables[i].variable[1] == (v[1] & CHAR))
                            break;
@@ -44,7 +111,8 @@
                        continue;
                    }
 -                  else
--                      stderror(ERR_BADCOLORVAR, v[0], v[1]);
+-                      stderror(ERR_BADCOLORVAR | (silent ? ERR_SILENT : 0),
+-                          "LS_COLORS", v[0], v[1]);
                }
                break;
            }

++++++ tcsh-6.24.08.tar.gz -> tcsh-6.24.09.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/tcsh-6.24.08/Fixes new/tcsh-6.24.09/Fixes
--- old/tcsh-6.24.08/Fixes      2023-04-10 11:26:45.000000000 +0200
+++ new/tcsh-6.24.09/Fixes      2023-04-13 04:32:52.000000000 +0200
@@ -1,3 +1,6 @@
+ 27. V6.24.09 - 2023-04-13
+ 26. ls-F: unsetenv LS*COLOR reapplies other LS*COLOR (Luke Mewburn)
+ 25. Don't crash if LSCOLORS contains > 11 pairs (Luke Mewburn)
  24. V6.24.08 - 2023-04-10
  23. Support LS_COLORS su,sg,tw,ow,st,mh variables. (Luke Mewburn)
  22. Fixes for LS_COLORS ln=target: ls-F directory; reset on unsetenv;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/tcsh-6.24.08/configure new/tcsh-6.24.09/configure
--- old/tcsh-6.24.08/configure  2023-04-10 11:26:45.000000000 +0200
+++ new/tcsh-6.24.09/configure  2023-04-13 04:32:52.000000000 +0200
@@ -1,6 +1,6 @@
 #! /bin/sh
 # Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.71 for Tcsh 6.24.08.
+# Generated by GNU Autoconf 2.71 for Tcsh 6.24.09.
 #
 # Report bugs to <https://bugs.astron.com/>.
 #
@@ -611,8 +611,8 @@
 # Identity of this package.
 PACKAGE_NAME='Tcsh'
 PACKAGE_TARNAME='tcsh'
-PACKAGE_VERSION='6.24.08'
-PACKAGE_STRING='Tcsh 6.24.08'
+PACKAGE_VERSION='6.24.09'
+PACKAGE_STRING='Tcsh 6.24.09'
 PACKAGE_BUGREPORT='https://bugs.astron.com/'
 PACKAGE_URL='https://www.tcsh.org/'
 
@@ -1294,7 +1294,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 Tcsh 6.24.08 to adapt to many kinds of systems.
+\`configure' configures Tcsh 6.24.09 to adapt to many kinds of systems.
 
 Usage: $0 [OPTION]... [VAR=VALUE]...
 
@@ -1360,7 +1360,7 @@
 
 if test -n "$ac_init_help"; then
   case $ac_init_help in
-     short | recursive ) echo "Configuration of Tcsh 6.24.08:";;
+     short | recursive ) echo "Configuration of Tcsh 6.24.09:";;
    esac
   cat <<\_ACEOF
 
@@ -1458,7 +1458,7 @@
 test -n "$ac_init_help" && exit $ac_status
 if $ac_init_version; then
   cat <<\_ACEOF
-Tcsh configure 6.24.08
+Tcsh configure 6.24.09
 generated by GNU Autoconf 2.71
 
 Copyright (C) 2021 Free Software Foundation, Inc.
@@ -2172,7 +2172,7 @@
 This file contains any messages produced by compilers while
 running configure, to aid debugging if configure makes a mistake.
 
-It was created by Tcsh $as_me 6.24.08, which was
+It was created by Tcsh $as_me 6.24.09, which was
 generated by GNU Autoconf 2.71.  Invocation command line was
 
   $ $0$ac_configure_args_raw
@@ -2928,7 +2928,7 @@
 
 
 
-PACKAGE_DATE=2023-04-10
+PACKAGE_DATE=2023-04-13
 
 PACKAGE_ORIGIN=Astron
 
@@ -9477,7 +9477,7 @@
 # report actual input values of CONFIG_FILES etc. instead of their
 # values after options handling.
 ac_log="
-This file was extended by Tcsh $as_me 6.24.08, which was
+This file was extended by Tcsh $as_me 6.24.09, which was
 generated by GNU Autoconf 2.71.  Invocation command line was
 
   CONFIG_FILES    = $CONFIG_FILES
@@ -9546,7 +9546,7 @@
 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
 ac_cs_config='$ac_cs_config_escaped'
 ac_cs_version="\\
-Tcsh config.status 6.24.08
+Tcsh config.status 6.24.09
 configured by $0, generated by GNU Autoconf 2.71,
   with options \\"\$ac_cs_config\\"
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/tcsh-6.24.08/configure.ac 
new/tcsh-6.24.09/configure.ac
--- old/tcsh-6.24.08/configure.ac       2023-04-10 11:26:45.000000000 +0200
+++ new/tcsh-6.24.09/configure.ac       2023-04-13 04:32:52.000000000 +0200
@@ -10,8 +10,8 @@
 dnl
 dnl UPDATE THIS SECTION FOR RELEASE
 dnl
-AC_DEFUN([TCSH_VERSION], [6.24.08])
-AC_DEFUN([TCSH_DATE],    [2023-04-10])
+AC_DEFUN([TCSH_VERSION], [6.24.09])
+AC_DEFUN([TCSH_DATE],    [2023-04-13])
 
 AC_PREREQ([2.69])dnl Minimum Autoconf version required.
 
AC_INIT([Tcsh],TCSH_VERSION,[https://bugs.astron.com/],,[https://www.tcsh.org/])
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/tcsh-6.24.08/debian/changelog 
new/tcsh-6.24.09/debian/changelog
--- old/tcsh-6.24.08/debian/changelog   2023-04-10 11:26:45.000000000 +0200
+++ new/tcsh-6.24.09/debian/changelog   2023-04-13 04:32:52.000000000 +0200
@@ -1,6 +1,6 @@
-tcsh (6.24.08) unstable; urgency=medium
+tcsh (6.24.09) unstable; urgency=medium
 
-  * Release 6.24.08
+  * Release 6.24.09
   * Please look in the Fixes file for an actual changelog
   * In packaging tcsh:
     - Avoid non-default settings in system-wide init files.
@@ -8,4 +8,4 @@
       to maintain compatibility with older versions packaged by
       Debian.
 
- -- The Tcsh Team <t...@astron.com>  Mon, 10 Apr 2023 00:00:00 +0000
+ -- The Tcsh Team <t...@astron.com>  Thu, 13 Apr 2023 00:00:00 +0000
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/tcsh-6.24.08/nls/C/set1 new/tcsh-6.24.09/nls/C/set1
--- old/tcsh-6.24.08/nls/C/set1 2023-04-10 11:26:45.000000000 +0200
+++ new/tcsh-6.24.09/nls/C/set1 2023-04-13 04:32:52.000000000 +0200
@@ -136,4 +136,4 @@
 134 Usage: unlimit [-fh] [limits]
 135 $%S is read-only
 136 No such job
-137 Unknown colorls variable '%c%c'
+137 Unknown %s color variable '%c%c'
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/tcsh-6.24.08/nls/french/set1 
new/tcsh-6.24.09/nls/french/set1
--- old/tcsh-6.24.08/nls/french/set1    2023-04-10 11:26:45.000000000 +0200
+++ new/tcsh-6.24.09/nls/french/set1    2023-04-13 04:32:52.000000000 +0200
@@ -136,4 +136,4 @@
 134 Syntaxe: unlimit [-fh] [limites]
 135 $%S est en lecture seule
 136 Pas de travail de ce type
-137 Unknown colorls variable '%c%c'
+137 Unknown %s color variable '%c%c'
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/tcsh-6.24.08/nls/german/set1 
new/tcsh-6.24.09/nls/german/set1
--- old/tcsh-6.24.08/nls/german/set1    2023-04-10 11:26:45.000000000 +0200
+++ new/tcsh-6.24.09/nls/german/set1    2023-04-13 04:32:52.000000000 +0200
@@ -136,4 +136,4 @@
 134 Benutzung: unlimit [-fh] [Grenzen]
 135 $%S ist nur lesbar
 136 Kein solcher Job
-137 Unknown colorls variable '%c%c'
+137 Unknown %s color variable '%c%c'
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/tcsh-6.24.08/nls/greek/set1 
new/tcsh-6.24.09/nls/greek/set1
--- old/tcsh-6.24.08/nls/greek/set1     2023-04-10 11:26:45.000000000 +0200
+++ new/tcsh-6.24.09/nls/greek/set1     2023-04-13 04:32:52.000000000 +0200
@@ -136,4 +136,4 @@
 134 Χρήση: unlimit [-fh] [όρια]
 135 Tο $%S είναι μόνο γιά διάβασμα
 136 Δεν υπάρχει τέτοια εργασία
-137 Unknown colorls variable '%c%c'
+137 Unknown %s color variable '%c%c'
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/tcsh-6.24.08/nls/spanish/set1 
new/tcsh-6.24.09/nls/spanish/set1
--- old/tcsh-6.24.08/nls/spanish/set1   2023-04-10 11:26:45.000000000 +0200
+++ new/tcsh-6.24.09/nls/spanish/set1   2023-04-13 04:32:52.000000000 +0200
@@ -136,4 +136,4 @@
 134 Uso: unlimit [-fh] [límites]
 135 $%S es de sólo-lectura
 136 No existe ese trabajo
-137 Unknown colorls variable '%c%c'
+137 Unknown %s color variable '%c%c'
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/tcsh-6.24.08/sh.c new/tcsh-6.24.09/sh.c
--- old/tcsh-6.24.08/sh.c       2023-04-10 11:26:45.000000000 +0200
+++ new/tcsh-6.24.09/sh.c       2023-04-13 04:32:52.000000000 +0200
@@ -809,9 +809,9 @@
     if ((tcp = getenv("CLICOLOR_FORCE")) != NULL)
        parseCLICOLOR_FORCE(TRUE, str2short(tcp));
     if ((tcp = getenv("LSCOLORS")) != NULL)
-       parseLSCOLORS(str2short(tcp));
+       parseLSCOLORS(str2short(tcp), FALSE);
     if ((tcp = getenv("LS_COLORS")) != NULL)
-       parseLS_COLORS(str2short(tcp));
+       parseLS_COLORS(str2short(tcp), FALSE);
 #endif /* COLOR_LS_F */
 
     mainpid = getpid();
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/tcsh-6.24.08/sh.err.c new/tcsh-6.24.09/sh.err.c
--- old/tcsh-6.24.08/sh.err.c   2023-04-10 11:26:45.000000000 +0200
+++ new/tcsh-6.24.09/sh.err.c   2023-04-13 04:32:52.000000000 +0200
@@ -363,7 +363,7 @@
     elst[ERR_ULIMUS] = CSAVS(1, 134, "Usage: unlimit [-fh] [limits]");
     elst[ERR_READONLY] = CSAVS(1, 135, "$%S is read-only");
     elst[ERR_BADJOB] = CSAVS(1, 136, "No such job (badjob)");
-    elst[ERR_BADCOLORVAR] = CSAVS(1, 137, "Unknown colorls variable '%c%c'");
+    elst[ERR_BADCOLORVAR] = CSAVS(1, 137, "Unknown %s color variable '%c%c'");
     elst[ERR_EOF] = CSAVS(1, 138, "Unexpected end of file");
 }
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/tcsh-6.24.08/sh.func.c new/tcsh-6.24.09/sh.func.c
--- old/tcsh-6.24.08/sh.func.c  2023-04-10 11:26:45.000000000 +0200
+++ new/tcsh-6.24.09/sh.func.c  2023-04-13 04:32:52.000000000 +0200
@@ -1511,12 +1511,12 @@
        return;
     }
     if (eq(vp, STRLS_COLORS)) {
-       parseLS_COLORS(lp);
+       parseLS_COLORS(lp, FALSE);
        cleanup_until(lp);
        return;
     }
     if (eq(vp, STRLSCOLORS)) {
-       parseLSCOLORS(lp);
+       parseLSCOLORS(lp, FALSE);
        cleanup_until(lp);
        return;
     }
@@ -1647,10 +1647,24 @@
 #ifdef COLOR_LS_F
                else if (eq(name, STRCLICOLOR_FORCE))
                    parseCLICOLOR_FORCE(FALSE, n);
-               else if (eq(name, STRLS_COLORS))
-                   parseLS_COLORS(n);
-               else if (eq(name, STRLSCOLORS))
-                   parseLSCOLORS(n);
+               else if (eq(name, STRLS_COLORS)) {
+                   parseLS_COLORS(n, FALSE);
+                   Char *other = tgetenv(STRLSCOLORS);
+                   if (other) {
+                           /* reapply LSCOLORS, ignoring errors */
+                       parseLSCOLORS(other, TRUE);
+                       setstatus(0);
+                   }
+               }
+               else if (eq(name, STRLSCOLORS)) {
+                   parseLSCOLORS(n, FALSE);
+                   Char *other = tgetenv(STRLS_COLORS);
+                   if (other) {
+                           /* reapply LS_COLORS, ignoring errors */
+                       parseLS_COLORS(other, TRUE);
+                       setstatus(0);
+                   }
+               }
 #endif /* COLOR_LS_F */
 #ifdef NLS_CATALOGS
                else if (eq(name, STRNLSPATH)) {
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/tcsh-6.24.08/tcsh.man.in new/tcsh-6.24.09/tcsh.man.in
--- old/tcsh-6.24.08/tcsh.man.in        2023-04-10 11:26:45.000000000 +0200
+++ new/tcsh-6.24.09/tcsh.man.in        2023-04-13 04:32:52.000000000 +0200
@@ -6733,7 +6733,7 @@
 It is an error for
 .Ic argv
 not to be set or to have
-less than one word as value.
+fewer than one word as value.
 .Pp
 With
 .Ar variable ,
@@ -9463,6 +9463,7 @@
 .Ev LS_COLORS ) .
 This variable is used by some BSD versions of
 .Xr ls 1 .
+.Pp
 On
 .Nm
 startup,
@@ -9478,41 +9479,61 @@
 the most recent
 .Ic setenv
 is used.
+If
+.Ev LSCOLORS
+is
+.Ic unsetenv
+while
+.Ev LS_COLORS
+is still
+.Ic setenv ,
+then
+.Ev LS_COLORS
+is parsed again (with any warnings suppressed)
+to reapply its settings.
 .Pp
 This variable is a 22 character string containing
-a concatenation of pairs of the format
+a concatenation of 11 pairs of the format
 .Ar f Ns Ar b ,
 where
 .Ar f
 is the foreground color and
 .Ar b
 is the background color.
+If fewer than 11 pairs are provided, default colors are used
+for the remaining entries.
+If more than 11 pairs are provided, the extra values are ignored.
 .Pp
-The order of the color attribute pairs to file type is as follows:
+The order of the color attribute pairs to
+the equivalent
+.Ev LS_COLORS
+variable, the file type, and default color, is as follows:
 .Pp
-.Bl -enum -offset indent -compact
-.It
-Directory.
-.It
-Symbolic link.
-.It
-Socket.
-.It
-Named pipe (FIFO).
-.It
-Executable file.
-.It
-Block device
-.It
-Character device.
-.It
-Executable with setuid bit set.
-.It
-Executable with setgid bit set.
-.It
-Directory writable to others, with sticky bit.
-.It
-Directory writable to others, without sticky bit.
+.Bl -column -offset indent ".Sy Index" ".Sy Var" ""
+.
+.It Sy Index Ta Sy Var Ta Sy File type. [Default color]
+.
+.It 1 Ta Li di Ta Directory. [Bold blue]
+.
+.It 2 Ta Li ln Ta Symbolic link. [Bold cyan]
+.
+.It 3 Ta Li so Ta Socket. [Bold magenta]
+.
+.It 4 Ta Li pi Ta Named pipe (FIFO). [Yellow (or brown)]
+.
+.It 5 Ta Li ex Ta Executable file. [Bold green]
+.
+.It 6 Ta Li bd Ta Block device. [Bold yellow]
+.
+.It 7 Ta Li cd Ta Character device. [Bold yellow]
+.
+.It 8 Ta Li su Ta Setuid file. [White on red]
+.
+.It 9 Ta Li sg Ta Setgid file. [Black on yellow]
+.
+.It 10 Ta Li tw Ta Sticky and other writable directory. [Black on green]
+.
+.It 11 Ta Li ow Ta Other writable but not sticky directory. [Blue on green]
 .El
 .Pp
 The color code designators are as follows:
@@ -9560,9 +9581,9 @@
 The actual display may differ
 depending on the color capabilities of the terminal in use.
 .Pp
-The default colors are described in
+The default colors are as per the color variables in
 .Ev LS_COLORS ,
-and are not the same default as that used by some BSD versions of
+and are not the same default colors as those used by some BSD versions of
 .Xr ls 1 .
 .
 .It Ev LS_COLORS
@@ -9575,6 +9596,7 @@
 .Xr ls 1
 and may be setup by
 .Xr dircolors 1 .
+.Pp
 On
 .Nm
 startup,
@@ -9590,6 +9612,18 @@
 the most recent
 .Ic setenv
 is used.
+If
+.Ev LS_COLORS
+is
+.Ic unsetenv
+while
+.Ev LSCOLORS
+is still
+.Ic setenv ,
+then
+.Ev LSCOLORS
+is parsed again (with any warnings suppressed)
+to reapply its settings.
 .Pp
 The format of this variable is reminiscent of the
 .Xr termcap 5
@@ -9610,7 +9644,7 @@
 .
 .Bl -column -offset indent ".Sy Var" ".Sy Default" ""
 .
-.It Sy Var Ta Sy Default Ta Sy File type. [Default foreground color]
+.It Sy Var Ta Sy Default Ta Sy File type. [Default color]
 .
 .It Li no Ta Li 0 Ta Normal (non-filename) text.
 .
@@ -9644,7 +9678,7 @@
 .
 .It Li su Ta Li 37;41 Ta Setuid file. [White on red]
 .
-.It Li sg Ta Li 30;43 Ta Setuid file. [Black on yellow]
+.It Li sg Ta Li 30;43 Ta Setgid file. [Black on yellow]
 .
 .It Li tw Ta Li 30;42 Ta Sticky and other writable directory. [Black on green]
 .
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/tcsh-6.24.08/tests/ls-F-LSCOLORS-short.out 
new/tcsh-6.24.09/tests/ls-F-LSCOLORS-short.out
--- old/tcsh-6.24.08/tests/ls-F-LSCOLORS-short.out      1970-01-01 
01:00:00.000000000 +0100
+++ new/tcsh-6.24.09/tests/ls-F-LSCOLORS-short.out      2023-04-13 
04:32:52.000000000 +0200
@@ -0,0 +1,32 @@
+.hidden 
+dir-ow/
+dir-st/
+dir-tw/
+dir/
+exec*
+file 
+file.1 
+file.12 
+file.123 
+file.1234 
+ldir-ow>
+ldir-st>
+ldir-tw>
+ldir>
+lexec@
+lfile.1234@
+lfile@
+link1 
+link2 
+lldir-ow>
+lldir-st>
+lldir-tw>
+lldir>
+llexec@
+llfile.1234@
+llfile@
+llorphan&
+llpipe@
+lorphan&
+lpipe@
+pipe|
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/tcsh-6.24.08/tests/ls-F.at 
new/tcsh-6.24.09/tests/ls-F.at
--- old/tcsh-6.24.08/tests/ls-F.at      2023-04-10 11:26:45.000000000 +0200
+++ new/tcsh-6.24.09/tests/ls-F.at      2023-04-13 04:32:52.000000000 +0200
@@ -1,20 +1,21 @@
 AT_BANNER([ls-F built-in command])
 
 dnl
-dnl TCSH_LS_F(EXPECTFILE, [ENVS], [VARS])
+dnl TCSH_LS_F(EXPECTFILE, [ENVS], [PRECMD], [STDERR])
 dnl    Check 'cd DIR && ls-F' and 'ls-F DIR'.
 dnl    For 'cd DIR && ls-F', stdout should match EXPECTFILE.
 dnl    For 'ls-F DIR', first line should be 'DIR:' and
 dnl    the rest should match EXPECTFILE.
 dnl    If ENVS isn't empty, use that as the environment to tcsh.
-dnl    If VARS isn't empty, run in tcsh before ls-F.
+dnl    If PRECMD isn't empty, run in tcsh before ls-F.
+dnl    If STDERR isn't empty, stderr from PRECMD;ls-F should match STDERR.
 dnl
 m4_define([TCSH_LS_F], [dnl
-m4_if(m4_eval($# < 1 || $# > 3), [1],
-    [m4_fatal([usage: $0(OUTFILE, ENVS, VARS)])])dnl
-AT_CHECK([$2 tcsh -f -c '$3;cd DIR && ls-F'], [0], [stdout-nolog])
+m4_if(m4_eval($# < 1 || $# > 4), [1],
+    [m4_fatal([usage: $0(OUTFILE, ENVS, PRECMD, STDERR)])])dnl
+AT_CHECK([$2 tcsh -f -c '$3;cd DIR && ls-F'], [0], [stdout-nolog], [$4])
 TCSH_DIFF([$1], [stdout])
-AT_CHECK([$2 tcsh -f -c '$3;ls-F DIR'], [0], [stdout-nolog])
+AT_CHECK([$2 tcsh -f -c '$3;ls-F DIR'], [0], [stdout-nolog], [$4])
 AT_CHECK([sed -e '1!b' -e '/^DIR:/d' stdout], [0], [stdout-nolog])
 AT_CHECK([diff "$1" stdout])
 ])
@@ -135,7 +136,7 @@
     [set color listflags=A listlinks])
 
 dnl
-dnl As ls-F-LSCOLORS-dim.out above, but setenv LSCOLORS in tcsh.
+dnl As per ls-F-LSCOLORS-dim.out above, but setenv LSCOLORS in tcsh.
 dnl
 TCSH_LS_F([${tests_dir}/ls-F-LSCOLORS-dim.out], [],
     [set color listflags=A listlinks; setenv LSCOLORS 
"bxcxdxexfxgxhxAxBxCxDx"])
@@ -153,7 +154,7 @@
     [set color listflags=A listlinks])
 
 dnl
-dnl As ls-F-LSCOLORS-bright.out above, but setenv LSCOLORS in tcsh.
+dnl As per ls-F-LSCOLORS-bright.out above, but setenv LSCOLORS in tcsh.
 dnl
 TCSH_LS_F([${tests_dir}/ls-F-LSCOLORS-bright.out], [],
     [setenv LSCOLORS BxCxDxExFxGxHxaxbxcxdx; set color listflags=A listlinks])
@@ -172,7 +173,7 @@
     [set color listflags=A])
 
 dnl
-dnl As ls-F-LSCOLORS-bright.out above, with LS_COLORS=ln=target,
+dnl As per ls-F-LSCOLORS-bright.out above, with LS_COLORS=ln=target,
 dnl then setenv LSCOLORS override in tcsh.
 dnl This should disable ln=target with the LSCOLORS override,
 dnl and be same as ls-F-LSCOLORS-bright.out.
@@ -181,6 +182,97 @@
     [LS_COLORS=ln=target],
     [setenv LSCOLORS BxCxDxExFxGxHxaxbxcxdx; set color listflags=A listlinks])
 
+dnl
+dnl LSCOLORS 4 chars: 2 pairs.
+dnl Directory red on yellow,
+dnl Symlink bright yellow on bright red,
+dnl Using LS_COLORS defaults for remaining indicies.
+dnl
+TCSH_LS_F([${tests_dir}/ls-F-LSCOLORS-short.out],
+    [LSCOLORS=bdDB],
+    [set color listflags=A listlinks])
+
+dnl
+dnl LSCOLORS 5 chars: 2 pairs with extra 'z'
+dnl As previous, ignoring odd 'z' char.
+dnl
+TCSH_LS_F([${tests_dir}/ls-F-LSCOLORS-short.out],
+    [LSCOLORS=bdDBz],
+    [set color listflags=A listlinks])
+
+dnl
+dnl LSCOLORS 23 chars: 11 pairs with dim foreground colors (as earlier),
+dnl ignore trailing (and unknown) 'z'.
+dnl listflags=A, listlinks
+dnl
+dnl As per ls-F-LSCOLORS-dim.out above.
+dnl
+TCSH_LS_F([${tests_dir}/ls-F-LSCOLORS-dim.out],
+    [LSCOLORS=bxcxdxexfxgxhxAxBxCxDxz],
+    [set color listflags=A listlinks])
+
+dnl
+dnl LSCOLORS 24 chars:  11 pairs ignoring extra (and unknown) 'zz'.
+dnl listflags=A, listlinks
+dnl
+dnl As per ls-F-LSCOLORS-dim.out above.
+dnl
+TCSH_LS_F([${tests_dir}/ls-F-LSCOLORS-dim.out],
+    [LSCOLORS=bxcxdxexfxgxhxAxBxCxDxzz],
+    [set color listflags=A listlinks])
+
+dnl
+dnl Fail: environment LSCOLORS=ix exits with unknown 'i?'.
+dnl
+AT_CHECK([LSCOLORS=ix tcsh -f -c 'set color;cd DIR && ls-F'], [1], [], [dnl
+Unknown LSCOLORS color variable 'i?'.
+])
+
+dnl
+dnl Fail: environment LSCOLORS=aj exits with unknown '?j'.
+dnl
+AT_CHECK([LSCOLORS=aj tcsh -f -c 'set color;cd DIR && ls-F'], [1], [], [dnl
+Unknown LSCOLORS color variable '?j'.
+])
+
+dnl
+dnl setenv LSCOLORS 6 chars: "bdDB" per short above, "ix" warns for unknown 
'i?'.
+dnl listflags=A, listlinks
+dnl
+dnl As per ls-F-LSCOLORS-short.out.
+dnl
+TCSH_LS_F([${tests_dir}/ls-F-LSCOLORS-short.out],
+    [],
+    [setenv LSCOLORS "bdDBix"; set color listflags=A listlinks], [dnl
+Unknown LSCOLORS color variable 'i?'.
+])
+
+dnl
+dnl LSCOLORS bright, override with LS_COLORS=ln=target,
+dnl then unsetenv LS_COLORS to reapply LSCOLORS.
+dnl
+dnl This should reapply LSCOLORS, and be same as ls-F-LSCOLORS-bright.out.
+dnl
+TCSH_LS_F([${tests_dir}/ls-F-LSCOLORS-bright.out],
+    [LSCOLORS=BxCxDxExFxGxHxaxbxcxdx LS_COLORS=ln=target],
+    [unsetenv LS_COLORS; set color listflags=A listlinks])
+
+dnl
+dnl Check unsetenv LS_COLORS to reapply existing LSCOLORS that contains 
unknown colors.
+dnl
+dnl setenv LSCOLORS 6 chars: "bdDB" per short above, "xj" warns for unknown 
'?j',
+dnl override with LS_COLORS=ln=target,
+dnl then unsetenv LS_COLORS to reapply faulty LSCOLORS without warning.
+dnl listflags=A, listlinks
+dnl
+dnl As per ls-F-LSCOLORS-short.out.
+dnl
+TCSH_LS_F([${tests_dir}/ls-F-LSCOLORS-short.out],
+    [],
+    [setenv LSCOLORS "bdDBxj"; setenv LS_COLORS ln=target; unsetenv LS_COLORS 
|| echo FAIL; set color listflags=A listlinks], [dnl
+Unknown LSCOLORS color variable '?j'.
+])
+
 AT_CLEANUP()
 
 
@@ -251,16 +343,76 @@
 dnl
 TCSH_LS_F([${tests_dir}/ls-F-LS_COLORS-all.out],
     [LS_COLORS="TCSH_TEXT_LS_COLORS:ln=target"],
-    [set color listflags=A listlinks;setenv LS_COLORS 
"ln=target:TCSH_TEXT_LS_COLORS"])
+    [set color listflags=A listlinks; setenv LS_COLORS 
"ln=target:TCSH_TEXT_LS_COLORS"])
 
 dnl
 dnl LS_COLORS with just ln=target, then unsetenv LS_COLORS.
+dnl
 dnl This should disable ln=target, and be same as ls-F-color-default.out.
 dnl
 TCSH_LS_F([${tests_dir}/ls-F-color-default.out],
     [LS_COLORS="ln=target"],
     [unsetenv LS_COLORS; set color listflags=A listlinks])
 
+dnl
+dnl Fail: environment LS_COLORS=YY:XX=0 exits with unknown 'XX'.
+dnl (Unknown 'YY' is ignored.)
+dnl
+AT_CHECK([LS_COLORS=YY:XX=0 tcsh -f -c 'set color;cd DIR && ls-F'], [1], [], 
[dnl
+Unknown LS_COLORS color variable 'XX'.
+])
+
+dnl
+dnl setenv LS_COLORS "YY:XX=0" warns for unknown 'XX='. (Unknown 'YY' is 
ignored').
+dnl listflags=A, listlinks
+dnl
+dnl As per ls-F-color-default.out.
+dnl
+TCSH_LS_F([${tests_dir}/ls-F-color-default.out],
+    [],
+    [setenv LS_COLORS "YY:XX=0"; set color listflags=A listlinks], [dnl
+Unknown LS_COLORS color variable 'XX'.
+])
+
+dnl
+dnl Check setenv LS_COLORS that all variables before an unknown variable are 
used.
+dnl
+dnl setenv LS_COLORS TCSH_TEXT_LS_COLORS:YY:XX=0 warns for unknown 'XX'.
+dnl (Unknown 'YY' is ignored').
+dnl listflags=A, listlinks
+dnl
+dnl As per ls-F-LS_COLORS-all.out.
+dnl
+TCSH_LS_F([${tests_dir}/ls-F-LS_COLORS-all.out],
+    [],
+    [setenv LS_COLORS "TCSH_TEXT_LS_COLORS:YY:XX=0"; set color listflags=A 
listlinks], [dnl
+Unknown LS_COLORS color variable 'XX'.
+])
+
+dnl
+dnl LS_COLORS as TCSH_TEXT_LS_COLORS, override with setenv LSCOLORS,
+dnl then unsetenv LSCOLORS to reapply LS_COLORS.
+dnl
+dnl This should reapply LS_COLORS, and be the same as ls-F-LS_COLORS-all.out.
+dnl
+TCSH_LS_F([${tests_dir}/ls-F-LS_COLORS-all.out],
+    [LS_COLORS="TCSH_TEXT_LS_COLORS"],
+    [setenv LSCOLORS BxCxDxExFxGxHxaxbxcxdx; unsetenv LSCOLORS; set color 
listflags=A listlinks])
+
+dnl
+dnl Check unsetenv LSCOLORS to reapply existing LS_COLORS that contains 
unknown colors.
+dnl
+dnl setenv LS_COLORS "XX=0" warns for unknown 'XX' (and uses default colors),
+dnl override with LSCOLORS=Aa,
+dnl then unsetenv LSCOLORS to reapply faulty LS_COLORS without warning.
+dnl and results in default colors.
+dnl
+TCSH_LS_F([${tests_dir}/ls-F-color-default.out],
+    [],
+    [setenv LS_COLORS XX=0; setenv LSCOLORS Aa; unsetenv LSCOLORS || echo 
FAIL; set color listflags=A listlinks], [dnl
+Unknown LS_COLORS color variable 'XX'.
+])
+
 m4_popdef([TCSH_TEXT_LS_COLORS])
 
 AT_CLEANUP()
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/tcsh-6.24.08/tw.color.c new/tcsh-6.24.09/tw.color.c
--- old/tcsh-6.24.08/tw.color.c 2023-04-10 11:26:45.000000000 +0200
+++ new/tcsh-6.24.09/tw.color.c 2023-04-13 04:32:52.000000000 +0200
@@ -304,11 +304,12 @@
 }
 
 /* parseLSCOLORS():
- *     Parse the LSCOLORS environment variable
+ *     Parse the LSCOLORS environment variable.
+ *     Suppress errors if silent is TRUE.
  */
 static const Char *xv; /* setjmp clobbering */
 void
-parseLSCOLORS(const Char *value)
+parseLSCOLORS(const Char *value, int silent)
 {
     size_t i, len, clen;
     jmp_buf_t osetexit;
@@ -337,13 +338,17 @@
 
        int fg, bg;
        for (i = 0; i < len; i++) {
+           if (i >= 
(sizeof(lscolors_to_varindex)/sizeof(lscolors_to_varindex[0])))
+               break;
            fg = color(*v++);
            if (fg == -1)
-               stderror(ERR_BADCOLORVAR, v[-1], '?');
+               stderror(ERR_BADCOLORVAR | (silent ? ERR_SILENT : 0),
+                   "LSCOLORS", v[-1], '?');
 
            bg = color(*v++);
            if (bg == -1)
-               stderror(ERR_BADCOLORVAR, '?', v[-1]);
+               stderror(ERR_BADCOLORVAR | (silent ? ERR_SILENT : 0),
+                   "LSCOLORS", '?', v[-1]);
            assert(lscolors_to_varindex[i] < nvariables);
            makecolor(&c, fg, bg, &variables[lscolors_to_varindex[i]].color);
        }
@@ -355,9 +360,11 @@
 
 /* parseLS_COLORS():
  *     Parse the LS_COLORS environment variable
+ *     Suppress printing errors if silent is TRUE
+ *     (although a non-zero exit status still occurs).
  */
 void
-parseLS_COLORS(const Char *value)
+parseLS_COLORS(const Char *value, int silent)
 {
     size_t  i, len;
     const Char  *v;            /* pointer in value */
@@ -428,7 +435,8 @@
                        continue;
                    }
                    else
-                       stderror(ERR_BADCOLORVAR, v[0], v[1]);
+                       stderror(ERR_BADCOLORVAR | (silent ? ERR_SILENT : 0),
+                           "LS_COLORS", v[0], v[1]);
                }
                break;
            }
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/tcsh-6.24.08/tw.decls.h new/tcsh-6.24.09/tw.decls.h
--- old/tcsh-6.24.08/tw.decls.h 2023-04-10 11:26:45.000000000 +0200
+++ new/tcsh-6.24.09/tw.decls.h 2023-04-13 04:32:52.000000000 +0200
@@ -127,8 +127,8 @@
 extern  void             print_with_color      (const Char *, const Char *, 
size_t,
                                                 struct filetype);
 extern  void             parseCLICOLOR_FORCE   (int, const Char *);
-extern  void             parseLS_COLORS        (const Char *);
-extern  void             parseLSCOLORS         (const Char *);
+extern  void             parseLS_COLORS        (const Char *, int);
+extern  void             parseLSCOLORS         (const Char *, int);
 
 #endif /* COLOR_LS_F */
 

Reply via email to