Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
[PATCH] zerr*/zwarn* documentation
- X-seq: zsh-workers 34369
- From: Daniel Shahaf <d.s@xxxxxxxxxxxxxxxxxx>
- To: zsh-workers@xxxxxxx
- Subject: [PATCH] zerr*/zwarn* documentation
- Date: Sat, 24 Jan 2015 15:36:16 +0000
- Dkim-signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d= daniel.shahaf.name; h=x-sasl-enc:date:from:to:subject:message-id :mime-version:content-type; s=mesmtp; bh=yLx28e3g6zJfgQy0mxLV8BN 5siw=; b=ekyHJAhIa0IwLaE17MV84lAal1+WQfo4eNIbHUgKpLuneOJiJtTE4Zn HhMiogtReM8h+1/Mo1PbydUKvY2URQ+7iywVv43KgAHET4SNogfA2544jIdkBHbT J0diJHgzYretYWhPVwe6L9u76OQuNv+LMV5CVOhzSWOH199HXWio=
- Dkim-signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d= messagingengine.com; h=x-sasl-enc:date:from:to:subject :message-id:mime-version:content-type; s=smtpout; bh=yLx28e3g6zJ fgQy0mxLV8BN5siw=; b=sTnIOK9U39BSOR6b1iLs2gwM1R6aJHueVs1yJMyk/1s 8PQRglVH0f+5VVtvGH4ekcTVb4BBX29UMKX7nWA6bBfdl+P321e2C7W5D9/oNFPg 7m4AO0wIz2cpq16FsxWfMe7ZwnG4IqlGtFCZ+kwa5/utdXKX+pA1O/nmUJNaqcIo =
- List-help: <mailto:zsh-workers-help@zsh.org>
- List-id: Zsh Workers List <zsh-workers.zsh.org>
- List-post: <mailto:zsh-workers@zsh.org>
- Mailing-list: contact zsh-workers-help@xxxxxxx; run by ezmlm
Add API documentation for the internal zerr*/zwarn* functions.
(Maybe it exists somewhere and I missed it?)
From 5bb0c2931e4c68ef593e4b4f4c57e5cf63301756 Mon Sep 17 00:00:00 2001
From: Daniel Shahaf <d.s@xxxxxxxxxxxxxxxxxx>
Date: Mon, 19 Jan 2015 03:50:51 +0000
Subject: [PATCH] zerrmsg: Document format codes
---
Src/utils.c | 16 +++++++++++++++-
1 file changed, 15 insertions(+), 1 deletion(-)
diff --git a/Src/utils.c b/Src/utils.c
index cf18f12..e393a1e 100644
--- a/Src/utils.c
+++ b/Src/utils.c
@@ -112,7 +112,20 @@ set_widearray(char *mb_array, Widechar_array wca)
#endif
-/* Print an error */
+/* Print an error
+
+ The following functions use the following printf-like format codes
+ (implemented by zerrmsg()):
+
+ Code Argument types Prints
+ %s const char * C string (null terminated)
+ %l const char *, int C string of given length (null not required)
+ %L long decimal value
+ %d int decimal value
+ %% (none) literal '%'
+ %c int character at that codepoint
+ %e int strerror() message (argument is typically 'errno')
+ */
static void
zwarning(const char *cmd, const char *fmt, va_list ap)
@@ -343,6 +356,7 @@ zerrmsg(FILE *file, const char *fmt, va_list ap)
fputs(errmsg + 1, file);
}
break;
+ /* When adding format codes, update the comment above zwarning(). */
}
} else {
putc(*fmt == Meta ? *++fmt ^ 32 : *fmt, file);
--
1.9.1
Messages sorted by:
Reverse Date,
Date,
Thread,
Author