[tcsh/f16] Fix negative number of jobs with %%j formatting parameter in prompt
Vojtěch Vítek
vvitek at fedoraproject.org
Thu Oct 27 22:33:15 UTC 2011
commit 9b84783f2fd8ef34ab8afeb05ec232e778e1844b
Author: Vojtech Vitek (V-Teq) <vvitek at redhat.com>
Date: Wed Oct 26 15:07:34 2011 +0200
Fix negative number of jobs with %%j formatting parameter in prompt
tcsh-6.17.00-negative_jobs.patch | 13 +++++++++++++
tcsh.spec | 3 +++
2 files changed, 16 insertions(+), 0 deletions(-)
---
diff --git a/tcsh-6.17.00-negative_jobs.patch b/tcsh-6.17.00-negative_jobs.patch
new file mode 100644
index 0000000..7037115
--- /dev/null
+++ b/tcsh-6.17.00-negative_jobs.patch
@@ -0,0 +1,13 @@
+diff -up tcsh-6.17.00/tc.prompt.c.orig tcsh-6.17.00/tc.prompt.c
+--- tcsh-6.17.00/tc.prompt.c.orig 2010-06-17 12:40:40.422571577 +0200
++++ tcsh-6.17.00/tc.prompt.c 2010-06-17 12:41:28.628519727 +0200
+@@ -526,6 +526,9 @@ tprintf(int what, const Char *fmt, const
+ int njobs = -1;
+ struct process *pp;
+
++ if (!proclist.p_next)
++ njobs++;
++
+ for (pp = proclist.p_next; pp; pp = pp->p_next)
+ njobs++;
+ p = Itoa(njobs, 1, attributes);
diff --git a/tcsh.spec b/tcsh.spec
index 9bcdcc7..9ce2c29 100644
--- a/tcsh.spec
+++ b/tcsh.spec
@@ -23,6 +23,7 @@ Patch14: tcsh-6.17.00-history.patch
# Accepted by upstream:
Patch15: tcsh-6.17.00-printexitvalue.patch
Patch16: tcsh-6.17.00-testsuite.patch
+Patch17: tcsh-6.17.00-negative_jobs.patch
# Accepted by upstream (tcsh-6.17.03b http://bugs.gw.com/view.php?id=109):
Patch19: tcsh-6.17.00-wait-intr.patch
# Accepted by upstream (tcsh-6.17.03b http://bugs.gw.com/view.php?id=112):
@@ -68,6 +69,7 @@ like syntax.
%patch14 -p1 -b .history
%patch15 -p1 -b .printexitvalue
%patch16 -p1 -b .testsuite
+%patch17 -p1 -b .negative_jobs
%patch19 -p1 -b .wait-intr
%patch21 -p1 -b .dont-set-empty-remotehost
%patch22 -p1 -b .dont-print-history-on-verbose
@@ -147,6 +149,7 @@ fi
%{_mandir}/man1/*.1*
%changelog
+- Fix negative number of jobs with %%j formatting parameter in prompt
- Clean-up patches numbers & order (prepare space for missing RHEL-6 patches)
- Disable obsolete glob-automount.patch; The issue should have been
(and is now) fixed in glibc (posix/glob.c)
More information about the scm-commits
mailing list