Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: PATCH: caps strings
- X-seq: zsh-workers 26679
- From: Mikael Magnusson <mikachu@xxxxxxxxx>
- To: Zsh hackers list <zsh-workers@xxxxxxxxxx>
- Subject: Re: PATCH: caps strings
- Date: Tue, 3 Mar 2009 19:00:50 +0100
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :date:message-id:subject:from:to:content-type :content-transfer-encoding; bh=AWJMsvAsI0XqTbTD06MMezd2Ep4CLm16R03vIgQGghI=; b=rMzTAyBzOQQNXwrxQzawuSmTfzxi3JYhARPEDlVM7somM3LiodGqOTPYpmn7cRxL7n Gxoo2fn6yUFi19wweVZEy7qfD32xEb5WiWZtHL7YG7ot/e5DZdTnXuhU2479erclEBZR MguaWIviCESRG2eJyYZ5CIUY0PyQIoczvcsdk=
- Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type:content-transfer-encoding; b=JD0zkq8Kra4spHxtJ5QSNDl/Ivw2VT1B7N7nbPFl/xL8Iizvizh4dRr1FWFykRafc3 rN+8vlgA/9SCWHyelQRBMcj7cZ3lNVLzdj0+Jb3kHJCs58W0YERZstQy8V6WhHsuF2Zu hK+7lbsVbIDQWIPkuOoLlDZ09EwmjtHXJj8IE=
- In-reply-to: <237967ef0903030955l1bbe4224p9d3f4a2bf1d04c77@xxxxxxxxxxxxxx>
- Mailing-list: contact zsh-workers-help@xxxxxxxxxx; run by ezmlm
- References: <27480.1236102218@xxxxxxx> <237967ef0903030955l1bbe4224p9d3f4a2bf1d04c77@xxxxxxxxxxxxxx>
2009/3/3 Mikael Magnusson <mikachu@xxxxxxxxx>:
> 2009/3/3 Peter Stephenson <pws@xxxxxxx>:
>> This should fix string arguments to functions in the caps module as
>> noticed by Mikael. It looks like all the returned strings are output
>> directly by library calls so aren't affected.
>>
> I think the two zwarnnam calls with *argv needs them to be
> re-metafy()ed. When i didn't do that in attr.c, I got output like
> myutf8file\M-p.
Ie,
diff --git a/Src/Modules/cap.c b/Src/Modules/cap.c
index 4242d44..3fb653b 100644
--- a/Src/Modules/cap.c
+++ b/Src/Modules/cap.c
@@ -72,11 +72,12 @@
do {
char *result = NULL;
ssize_t length;
+ unmetafy(*argv, NULL);
cap_t caps = cap_get_file(*argv);
if(caps)
result = cap_to_text(caps, &length);
if (!caps || !result) {
- zwarnnam(nam, "%s: %e", *argv, errno);
+ zwarnnam(nam, "%s: %e", metafy(*argv, slen, META_NOALLOC), errno);
ret = 1;
} else
printf("%s %s\n", *argv, result);
@@ -101,7 +102,7 @@
do {
unmetafy(*argv, NULL);
if(cap_set_file(*argv, caps)) {
- zwarnnam(nam, "%s: %e", *argv, errno);
+ zwarnnam(nam, "%s: %e", metafy(*argv, slen, META_NOALLOC), errno);
ret = 1;
}
} while(*++argv);
--
Mikael Magnusson
Messages sorted by:
Reverse Date,
Date,
Thread,
Author