Page MenuHomeFreeBSD

D2935.id6526.diff
No OneTemporary

D2935.id6526.diff

Index: usr.bin/units/units.c
===================================================================
--- usr.bin/units/units.c
+++ usr.bin/units/units.c
@@ -802,17 +802,6 @@
if (!readfile)
readunits(NULL);
- inhistory = history_init();
- el = el_init(argv[0], stdin, stdout, stderr);
- el_set(el, EL_PROMPT, &prompt);
- el_set(el, EL_EDITOR, "emacs");
- el_set(el, EL_SIGNAL, 1);
- el_set(el, EL_HIST, history, inhistory);
- el_source(el, NULL);
- history(inhistory, &ev, H_SETSIZE, 800);
- if (inhistory == 0)
- err(1, "Could not initialize history");
-
if (cap_enter() < 0 && errno != ENOSYS)
err(1, "unable to enter capability mode");
@@ -828,6 +817,17 @@
showanswer(&have, &want);
}
else {
+ inhistory = history_init();
+ el = el_init(argv[0], stdin, stdout, stderr);
+ el_set(el, EL_PROMPT, &prompt);
+ el_set(el, EL_EDITOR, "emacs");
+ el_set(el, EL_SIGNAL, 1);
+ el_set(el, EL_HIST, history, inhistory);
+ el_source(el, NULL);
+ history(inhistory, &ev, H_SETSIZE, 800);
+ if (inhistory == 0)
+ err(1, "Could not initialize history");
+
if (!quiet)
printf("%d units, %d prefixes\n", unitcount,
prefixcount);
@@ -858,9 +858,10 @@
completereduce(&want));
showanswer(&have, &want);
}
+
+ history_end(inhistory);
+ el_end(el);
}
- history_end(inhistory);
- el_end(el);
return (0);
}

File Metadata

Mime Type
text/plain
Expires
Mon, Feb 9, 10:07 AM (11 h, 49 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
28566150
Default Alt Text
D2935.id6526.diff (1 KB)

Event Timeline