Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
PATCH: fix for $job{texts,states}
- X-seq: zsh-workers 8482
- From: Sven Wischnowsky <wischnow@xxxxxxxxxxxxxxxxxxxxxxx>
- To: zsh-workers@xxxxxxxxxxxxxx
- Subject: PATCH: fix for $job{texts,states}
- Date: Tue, 2 Nov 1999 13:06:43 +0100 (MET)
- Mailing-list: contact zsh-workers-help@xxxxxxxxxxxxxx; run by ezmlm
Oops. The keys for these weren't always set when needed. I.e.
${(k)jobtexts} gave you nothing or rubbish.
Bye
Sven
diff -u oldsrc/Modules/parameter.c Src/Modules/parameter.c
--- oldsrc/Modules/parameter.c Tue Nov 2 13:00:48 1999
+++ Src/Modules/parameter.c Tue Nov 2 13:04:21 1999
@@ -1223,13 +1223,12 @@
for (job = 1; job < MAXJOB; job++) {
if (jobtab[job].stat && jobtab[job].procs &&
!(jobtab[job].stat & STAT_NOPRINT)) {
+ sprintf(buf, "%d", job);
+ pm.nam = dupstring(buf);
if (func != scancountparams &&
((flags & (SCANPM_WANTVALS|SCANPM_MATCHVAL)) ||
- !(flags & SCANPM_WANTKEYS))) {
- sprintf(buf, "%d", job);
- pm.nam = dupstring(buf);
+ !(flags & SCANPM_WANTKEYS)))
pm.u.str = pmjobtext(job);
- }
func((HashNode) &pm, flags);
}
}
@@ -1329,13 +1328,12 @@
for (job = 1; job < MAXJOB; job++) {
if (jobtab[job].stat && jobtab[job].procs &&
!(jobtab[job].stat & STAT_NOPRINT)) {
+ sprintf(buf, "%d", job);
+ pm.nam = dupstring(buf);
if (func != scancountparams &&
((flags & (SCANPM_WANTVALS|SCANPM_MATCHVAL)) ||
- !(flags & SCANPM_WANTKEYS))) {
- sprintf(buf, "%d", job);
- pm.nam = dupstring(buf);
+ !(flags & SCANPM_WANTKEYS)))
pm.u.str = pmjobstate(job);
- }
func((HashNode) &pm, flags);
}
}
--
Sven Wischnowsky wischnow@xxxxxxxxxxxxxxxxxxxxxxx
Messages sorted by:
Reverse Date,
Date,
Thread,
Author