diff options
author | mp <mp@FreeBSD.org> | 2012-02-22 03:36:15 +0000 |
---|---|---|
committer | mp <mp@FreeBSD.org> | 2012-02-22 03:36:15 +0000 |
commit | 3ee51a00f36c11a6172d08d787943dfc63f66110 (patch) | |
tree | 522fd2d4d27770566e466a79d636194e5743d94a /contrib/tcsh/tc.prompt.c | |
parent | d177303078ee8f6069218009d6c3c2b6d9d9ca97 (diff) | |
parent | 54c5644df8eb87e7a5b1c4c411e349ac329ee04b (diff) | |
download | FreeBSD-src-3ee51a00f36c11a6172d08d787943dfc63f66110.zip FreeBSD-src-3ee51a00f36c11a6172d08d787943dfc63f66110.tar.gz |
Update to tcsh 6.18.01.
Diffstat (limited to 'contrib/tcsh/tc.prompt.c')
-rw-r--r-- | contrib/tcsh/tc.prompt.c | 16 |
1 files changed, 12 insertions, 4 deletions
diff --git a/contrib/tcsh/tc.prompt.c b/contrib/tcsh/tc.prompt.c index f63fdf0..2ac2355 100644 --- a/contrib/tcsh/tc.prompt.c +++ b/contrib/tcsh/tc.prompt.c @@ -1,4 +1,4 @@ -/* $Header: /p/tcsh/cvsroot/tcsh/tc.prompt.c,v 3.67 2006/11/17 16:26:58 christos Exp $ */ +/* $Header: /p/tcsh/cvsroot/tcsh/tc.prompt.c,v 3.70 2011/10/27 22:41:06 christos Exp $ */ /* * tc.prompt.c: Prompt printing stuff */ @@ -32,7 +32,7 @@ */ #include "sh.h" -RCSID("$tcsh: tc.prompt.c,v 3.67 2006/11/17 16:26:58 christos Exp $") +RCSID("$tcsh: tc.prompt.c,v 3.70 2011/10/27 22:41:06 christos Exp $") #include "ed.h" #include "tw.h" @@ -213,8 +213,9 @@ tprintf(int what, const Char *fmt, const char *str, time_t tim, ptr_t info) } break; case '#': - Strbuf_append1(&buf, - attributes | ((uid == 0) ? PRCHROOT : PRCH)); + Scp = (uid == 0 || euid == 0) ? PRCHROOT : PRCH; + if (Scp != '\0') + Strbuf_append1(&buf, attributes | Scp); break; case '!': case 'h': @@ -458,6 +459,11 @@ tprintf(int what, const Char *fmt, const char *str, time_t tim, ptr_t info) Strbuf_append1(&buf, attributes | *z++); } break; + case 'N': + if ((z = varval(STReuser)) != STRNULL) + while (*z) + Strbuf_append1(&buf, attributes | *z++); + break; case 'l': #ifndef HAVENOUTMP if (what == FMT_WHO) { @@ -528,6 +534,8 @@ tprintf(int what, const Char *fmt, const char *str, time_t tim, ptr_t info) for (pp = proclist.p_next; pp; pp = pp->p_next) njobs++; + if (njobs == -1) + njobs++; p = Itoa(njobs, 1, attributes); Strbuf_append(&buf, p); xfree(p); |