diff options
author | 2000-01-12 00:42:46 +0000 | |
---|---|---|
committer | 2000-01-12 00:42:46 +0000 | |
commit | f468c31409920246a84192f13cd8b89abc4b0f82 (patch) | |
tree | fd77e64fac7dae1c83a3ee81a1a7e9e3a7d65161 /lib/libc/stdio | |
parent | note about broken gas and align, some tabs vs spaces too (diff) | |
download | wireguard-openbsd-f468c31409920246a84192f13cd8b89abc4b0f82.tar.xz wireguard-openbsd-f468c31409920246a84192f13cd8b89abc4b0f82.zip |
indent the source right
Diffstat (limited to 'lib/libc/stdio')
-rw-r--r-- | lib/libc/stdio/printf.3 | 23 |
1 files changed, 12 insertions, 11 deletions
diff --git a/lib/libc/stdio/printf.3 b/lib/libc/stdio/printf.3 index aabe4fdb8bc..a214650bd09 100644 --- a/lib/libc/stdio/printf.3 +++ b/lib/libc/stdio/printf.3 @@ -1,4 +1,4 @@ -.\" $OpenBSD: printf.3,v 1.21 1999/09/22 10:05:25 espie Exp $ +.\" $OpenBSD: printf.3,v 1.22 2000/01/12 00:42:46 deraadt Exp $ .\" .\" Copyright (c) 1990, 1991, 1993 .\" The Regents of the University of California. All rights reserved. @@ -574,7 +574,7 @@ are pointers to strings: #include <stdio.h> fprintf(stdout, "%s, %s %d, %.2d:%.2d\en", - weekday, month, day, hour, min); + weekday, month, day, hour, min); .Ed .Pp To print \*(Pi @@ -592,17 +592,18 @@ To allocate a 128 byte string and print into it: #include <stdlib.h> #include <stdarg.h> -char *newfmt(const char *fmt, ...) +char * +newfmt(const char *fmt, ...) { - char *p; - va_list ap; + char *p; + va_list ap; - if ((p = malloc(128)) == NULL) - return (NULL); - va_start(ap, fmt); - (void) vsnprintf(p, 128, fmt, ap); - va_end(ap); - return (p); + if ((p = malloc(128)) == NULL) + return (NULL); + va_start(ap, fmt); + (void) vsnprintf(p, 128, fmt, ap); + va_end(ap); + return (p); } .Ed .Sh SEE ALSO |