summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorTodd C. Miller <millert@cvs.openbsd.org>1997-11-29 19:54:53 +0000
committerTodd C. Miller <millert@cvs.openbsd.org>1997-11-29 19:54:53 +0000
commit024ba423ea0a307412d5003ef9850338156bf5a5 (patch)
tree1b9e345cdff1afda03d93ef840f966cc98ecfc09 /include
parent34231e94bf05e703994e7617faff53abdf1c9e72 (diff)
Implement asprintf(3) and vasprintf(3) functions similar to the
ones in the glibc. Some man pages changes from FreeBSD (asprintf.c/vasprintf.c are not based on GNU or FreeBSD code).
Diffstat (limited to 'include')
-rw-r--r--include/stdio.h6
1 files changed, 5 insertions, 1 deletions
diff --git a/include/stdio.h b/include/stdio.h
index d5152a67704..a31fa0610c8 100644
--- a/include/stdio.h
+++ b/include/stdio.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: stdio.h,v 1.7 1996/10/28 06:51:05 tholo Exp $ */
+/* $OpenBSD: stdio.h,v 1.8 1997/11/29 19:54:51 millert Exp $ */
/* $NetBSD: stdio.h,v 1.18 1996/04/25 18:29:21 jtc Exp $ */
/*-
@@ -162,6 +162,7 @@ __END_DECLS
#define __SNPT 0x0800 /* do not do fseek() optimisation */
#define __SOFF 0x1000 /* set iff _offset is in fact correct */
#define __SMOD 0x2000 /* true => fgetln modified _p text */
+#define __SALC 0x4000 /* allocate string space dynamically */
/*
* The following three definitions are for ANSI C, which took them
@@ -281,6 +282,7 @@ __END_DECLS
*/
#if !defined (_ANSI_SOURCE) && !defined(_POSIX_SOURCE)
__BEGIN_DECLS
+int asprintf __P((char **, const char *, ...));
char *fgetln __P((FILE *, size_t *));
int fpurge __P((FILE *));
int getw __P((FILE *));
@@ -292,6 +294,8 @@ int setlinebuf __P((FILE *));
char *tempnam __P((const char *, const char *));
int snprintf __P((char *, size_t, const char *, ...))
__attribute__((format (printf, 3, 4)));
+int vasprintf __P((char **, const char *, _BSD_VA_LIST_))
+ __attribute__((format (printf, 2, 0)));
int vsnprintf __P((char *, size_t, const char *, _BSD_VA_LIST_))
__attribute__((format (printf, 3, 0)));
int vscanf __P((const char *, _BSD_VA_LIST_))