tcsh/tcsh-6.18.03-colorls.dif

52 lines
1.6 KiB
Plaintext
Raw Normal View History

---
tw.color.c | 10 ++++------
1 file changed, 4 insertions(+), 6 deletions(-)
--- tw.color.c
+++ tw.color.c 2023-04-13 12:32:43.646160772 +0000
@@ -56,7 +56,7 @@ typedef struct {
typedef enum {
Vdi, Vln, Vor, Vpi, Vso, Vdo, Vbd, Vcd,
Vex, Vfi, Vno, Vmi, Vlc, Vrc, Vec, Vsu,
- Vsg, Vtw, Vow, Vst, Vrs, Vhl, Vmh, Vca,
+ Vsg, Vtw, Vow, Vst, Vrs, Vhl, Vmh, Vca, Vcl,
} VARINDEX;
typedef struct {
@@ -100,6 +100,7 @@ static Variable variables[] = {
VAR(Vhl, CV_NONE, "hl", ""), /* Obsolete, use mh */
VAR(Vmh, CV_HARD, "mh", ""), /* Regular file with multiple hard links */
VAR(Vca, CV_NONE, "ca", ""), /* File with capability. Not implemented. */
+ VAR(Vcl, CV_NONE, "cl", ""), /* CLRTOEOL */
};
#define nvariables (sizeof(variables)/sizeof(variables[0]))
@@ -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 */
- Extension *volatile e; /* pointer in extensions */
+ static Extension *volatile e; /* pointer in extensions */
jmp_buf_t osetexit;
size_t omark;
@@ -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;
+ v += 3;
if (i < nvariables) {
- v += 3;
getstring(&c, &v, &variables[i].color, ':');
if (i == Vln)
color_as_referent = Str_equal_literal(
&variables[Vln].color, "target");
continue;
}
- else
- stderror(ERR_BADCOLORVAR | (silent ? ERR_SILENT : 0),
- "LS_COLORS", v[0], v[1]);
}
break;
}