From: Zefram <zefram@dcs.warwick.ac.uk>
To: zsh-workers@math.gatech.edu
Subject: parameter bugfix
Date: Sat, 26 Apr 1997 20:49:59 +0100 (BST) [thread overview]
Message-ID: <15229.199704261949@stone.dcs.warwick.ac.uk> (raw)
-----BEGIN PGP SIGNED MESSAGE-----
One of my earlier patches, 3014 I think, merging a couple of elements
of the param structure, breaks the LC_* parameters, which rely on those
two elements being distinct. This patch fixes it; as only lcsetfn() is
affected, and the necessary table already exists, it modifies lcsetfn()
to not require the data member.
-zefram
*** Src/hashtable.h 1997/03/31 18:09:29 1.32
--- Src/hashtable.h 1997/04/26 15:32:33
***************
*** 114,133 ****
IPDEF2("_", underscoregetfn, nullsetfn, PM_READONLY),
#ifdef LC_ALL
! #define LCIPDEF(A,B) {NULL,A,PM_SCALAR|PM_SPECIAL|PM_UNSET,BR((void *)B),SFN(lcsetfn),GFN(strgetfn),stdunsetfn,0,NULL,NULL,NULL,0}
IPDEF2("LANG", strgetfn, langsetfn, PM_UNSET),
IPDEF2("LC_ALL", strgetfn, lc_allsetfn, PM_UNSET),
#ifdef LC_COLLATE
! LCIPDEF("LC_COLLATE", LC_COLLATE),
#endif
#ifdef LC_CTYPE
! LCIPDEF("LC_CTYPE", LC_CTYPE),
#endif
#ifdef LC_MESSAGES
! LCIPDEF("LC_MESSAGES", LC_MESSAGES),
#endif
#ifdef LC_TIME
! LCIPDEF("LC_TIME", LC_TIME),
#endif
#endif
--- 114,133 ----
IPDEF2("_", underscoregetfn, nullsetfn, PM_READONLY),
#ifdef LC_ALL
! #define LCIPDEF(name) IPDEF2(name, strgetfn, lcsetfn, PM_UNSET)
IPDEF2("LANG", strgetfn, langsetfn, PM_UNSET),
IPDEF2("LC_ALL", strgetfn, lc_allsetfn, PM_UNSET),
#ifdef LC_COLLATE
! LCIPDEF("LC_COLLATE"),
#endif
#ifdef LC_CTYPE
! LCIPDEF("LC_CTYPE"),
#endif
#ifdef LC_MESSAGES
! LCIPDEF("LC_MESSAGES"),
#endif
#ifdef LC_TIME
! LCIPDEF("LC_TIME"),
#endif
#endif
*** Src/params.c 1997/04/01 08:59:53 1.45
--- Src/params.c 1997/04/26 15:30:09
***************
*** 1615,1626 ****
void
lcsetfn(Param pm, char *x)
{
strsetfn(pm, x);
if (getsparam("LC_ALL"))
return;
if (!x)
x = getsparam("LANG");
! setlocale((int) pm->u.data, x ? x : "");
}
#endif
--- 1615,1631 ----
void
lcsetfn(Param pm, char *x)
{
+ struct localename *ln;
+
strsetfn(pm, x);
if (getsparam("LC_ALL"))
return;
if (!x)
x = getsparam("LANG");
!
! for (ln = lc_names; ln->name; ln++)
! if (!strcmp(ln->name, pm->nam))
! setlocale(ln->category, x ? x : "");
}
#endif
-----BEGIN PGP SIGNATURE-----
Version: 2.6.3ia
Charset: ascii
iQCVAwUBM2IiTHD/+HJTpU/hAQGexAP+NZpG+21ARK142RgsiJnTSQqbpaxryB54
xxcaPXAgk9+2HtyMNAs30P5gUqOHkQVxjuPZY6KL01TbsW0u7gjpOZ49uhyw1dpY
+BkAH974h0ncKofEDNuTXMM0Qcp9wOvPht3oiQbkd5PMgvQVnjhKzqvxILr+l+LC
Pc9EWqwcnLc=
=4qOL
-----END PGP SIGNATURE-----
reply other threads:[~1997-04-26 19:52 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=15229.199704261949@stone.dcs.warwick.ac.uk \
--to=zefram@dcs.warwick.ac.uk \
--cc=zsh-workers@math.gatech.edu \
/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.
Code repositories for project(s) associated with this public inbox
https://git.vuxu.org/mirror/zsh/
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).