1
0
Fork 0
mirror of git://git.code.sf.net/p/zsh/code synced 2025-11-18 12:01:00 +01:00

35826: add getsparam_u() to return unmetafied string, use it for a number of references to non-special params

This commit is contained in:
Barton E. Schaefer 2015-07-22 12:52:24 -07:00
parent 045bd4e3a6
commit a1f8d4ffc7
9 changed files with 38 additions and 20 deletions

View file

@ -248,7 +248,7 @@ VA_DCL
VA_START(ap, message);
VA_GET_ARG(ap, message, const char *);
if ((filename = getsparam("ZSH_DEBUG_LOG")) != NULL &&
if ((filename = getsparam_u("ZSH_DEBUG_LOG")) != NULL &&
(file = fopen(filename, "a")) != NULL) {
zerrmsg(file, message, ap);
fclose(file);
@ -1949,7 +1949,8 @@ extern char *_mktemp(char *);
/* Get a unique filename for use as a temporary file. If "prefix" is
* NULL, the name is relative to $TMPPREFIX; If it is non-NULL, the
* unique suffix includes a prefixed '.' for improved readability. If
* "use_heap" is true, we allocate the returned name on the heap. */
* "use_heap" is true, we allocate the returned name on the heap.
* The string passed as "prefix" is expected to be metafied. */
/**/
mod_export char *
@ -1976,6 +1977,9 @@ gettempname(const char *prefix, int use_heap)
return ret;
}
/* The gettempfile() "prefix" is expected to be metafied, see hist.c
* and gettempname(). */
/**/
mod_export int
gettempfile(const char *prefix, int use_heap, char **tempname)
@ -3585,7 +3589,7 @@ zbeep(void)
{
char *vb;
queue_signals();
if ((vb = getsparam("ZBEEP"))) {
if ((vb = getsparam_u("ZBEEP"))) {
int len;
vb = getkeystring(vb, &len, GETKEYS_BINDKEY, NULL);
write_loop(SHTTY, vb, len);