diff options
author | dgaudet <dgaudet@unknown> | 1998-04-19 19:19:38 +0000 |
---|---|---|
committer | dgaudet <dgaudet@unknown> | 1998-04-19 19:19:38 +0000 |
commit | 2f3292b928c2d9cc5299a1b94ac2f66c82dd7db0 (patch) | |
tree | b8866361ac5397350e29c20776806fb6cba4c239 /src/include | |
parent | 93f026ce643a8e32f5e2333ddbdc7b0328fe98ad (diff) | |
download | httpd-2f3292b928c2d9cc5299a1b94ac2f66c82dd7db0.tar.gz |
add %pA, %pI, and %pp format codes
Reviewed by: Martin Kraemer
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/1.3.x@80964 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'src/include')
-rw-r--r-- | src/include/ap.h | 17 |
1 files changed, 15 insertions, 2 deletions
diff --git a/src/include/ap.h b/src/include/ap.h index 9484beca78..0ff9af5b38 100644 --- a/src/include/ap.h +++ b/src/include/ap.h @@ -81,8 +81,21 @@ int ap_execve(const char *, const char *argv[], const char *envp[]); #endif #endif /* WIN32 */ -/* ap_vformatter() is a generic printf-style formatting routine - * with some extensions. +/* apapi_vformatter() is a generic printf-style formatting routine + * with some extensions. The extensions are: + * + * %pA takes a struct in_addr *, and prints it as a.b.c.d + * %pI takes a struct sockaddr_in * and prints it as a.b.c.d:port + * %pp takes a void * and outputs it in hex + * + * The %p hacks are to force gcc's printf warning code to skip + * over a pointer argument without complaining. This does + * mean that the ANSI-style %p (output a void * in hex format) won't + * work as expected at all, but that seems to be a fair trade-off + * for the increased robustness of having printf-warnings work. + * + * Additionally, apapi_vformatter allows for arbitrary output methods + * using the apapi_vformatter_buff and flush_func. * * The ap_vformatter_buff has two elements curpos and endpos. * curpos is where ap_vformatter will write the next byte of output. |