Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: $var not expanded in ${x?$var}



2024-02-20 20:44:47 -0800, Bart Schaefer:
[...]
> +	    case 'S':
> +		str = va_arg(ap, const char *);
> +		fprintf(file, "%s", str);
> +		break;
[...]

I suspect there's something wrong with that as it could not
possibly work for ${var?$'\0'}.

(could also be simplified to fputs(str, file) though I suspect
it makes no difference with modern compilers).

-- 
Stephane




Messages sorted by: Reverse Date, Date, Thread, Author