From: Jilles Tjoelker <jilles@stack.nl>
To: Wez Furlong <kingwez@gmail.com>
Cc: dash@vger.kernel.org
Subject: [PATCH] [VAR] Fix history (libedit only).
Date: Fri, 13 Aug 2010 15:52:09 +0200 [thread overview]
Message-ID: <20100813135209.GB73073@stack.nl> (raw)
In-Reply-To: <AANLkTimKQcUa=dpDVoO9TdiH3A5iW1_hJRsOdDE2LB9f@mail.gmail.com>
Git commit 0df96793ef6aa103df228d7dfe56099b7d721a15 "[SHELL] Add
preliminary LINENO support" added the LINENO variable in the middle of
other initialized variables, causing some macros for TERM and HISTSIZE
to break (both of these are only used if libedit support is compiled in,
which is not the case by default).
The breakage is the same as can be seen by setting HISTSIZE=0.
Also add a comment warning about this.
The breakage was reported by Wez Furlong.
---
src/var.c | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
diff --git a/src/var.c b/src/var.c
index 3efc943..25c2216 100644
--- a/src/var.c
+++ b/src/var.c
@@ -78,6 +78,7 @@ const char defifsvar[] = "IFS= \t\n";
const char defifs[] = " \t\n";
#endif
+/* Some macros in var.h depend on the order, add new variables to the end. */
struct var varinit[] = {
#if ATTY
{ 0, VSTRFIXED|VTEXTFIXED|VUNSET, "ATTY\0", 0 },
@@ -94,11 +95,11 @@ struct var varinit[] = {
{ 0, VSTRFIXED|VTEXTFIXED, "PS2=> ", 0 },
{ 0, VSTRFIXED|VTEXTFIXED, "PS4=+ ", 0 },
{ 0, VSTRFIXED|VTEXTFIXED, "OPTIND=1", getoptsreset },
- { 0, VSTRFIXED|VTEXTFIXED, "LINENO=1", 0 },
#ifndef SMALL
{ 0, VSTRFIXED|VTEXTFIXED|VUNSET, "TERM\0", 0 },
{ 0, VSTRFIXED|VTEXTFIXED|VUNSET, "HISTSIZE\0", sethistsize },
#endif
+ { 0, VSTRFIXED|VTEXTFIXED, "LINENO=1", 0 },
};
STATIC struct var *vartab[VTABSIZE];
--
1.7.1.1
next prev parent reply other threads:[~2010-08-13 13:52 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-07-26 17:17 "fc -l" broken between v0.5.5.1 and v0.5.6 Wez Furlong
2010-08-08 13:17 ` Jilles Tjoelker
2010-08-10 3:54 ` Wez Furlong
2010-08-13 13:52 ` Jilles Tjoelker [this message]
2010-09-08 8:17 ` [PATCH] [VAR] Fix history (libedit only) Herbert Xu
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20100813135209.GB73073@stack.nl \
--to=jilles@stack.nl \
--cc=dash@vger.kernel.org \
--cc=kingwez@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox