summaryrefslogtreecommitdiff
path: root/Src/utils.c
diff options
context:
space:
mode:
authorBarton E. Schaefer <schaefer@zsh.org>2015-07-22 12:52:24 -0700
committerBarton E. Schaefer <schaefer@zsh.org>2015-07-22 12:52:24 -0700
commita1f8d4ffc73293e0461c01ff005194a474854376 (patch)
tree6d625d2e0e5321c4fd8d160cbadac2354c243f86 /Src/utils.c
parent045bd4e3a6eb1d2a8a7b0a16a1b00f477c0112ed (diff)
downloadzsh-a1f8d4ffc73293e0461c01ff005194a474854376.tar.gz
zsh-a1f8d4ffc73293e0461c01ff005194a474854376.zip
35826: add getsparam_u() to return unmetafied string, use it for a number of references to non-special params
Diffstat (limited to 'Src/utils.c')
-rw-r--r--Src/utils.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/Src/utils.c b/Src/utils.c
index 8ff575fd9..ba9056459 100644
--- a/Src/utils.c
+++ b/Src/utils.c
@@ -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);