aboutsummaryrefslogtreecommitdiff
path: root/contrib/ncurses/ncurses/base/vsscanf.c
diff options
context:
space:
mode:
Diffstat (limited to 'contrib/ncurses/ncurses/base/vsscanf.c')
-rw-r--r--contrib/ncurses/ncurses/base/vsscanf.c53
1 files changed, 31 insertions, 22 deletions
diff --git a/contrib/ncurses/ncurses/base/vsscanf.c b/contrib/ncurses/ncurses/base/vsscanf.c
index ac2bf9f2e783..70d0517a6f0e 100644
--- a/contrib/ncurses/ncurses/base/vsscanf.c
+++ b/contrib/ncurses/ncurses/base/vsscanf.c
@@ -6,42 +6,51 @@
#if !HAVE_VSSCANF
-MODULE_ID("$Id: vsscanf.c,v 1.10 1996/12/21 14:24:06 tom Exp $")
+MODULE_ID("$Id: vsscanf.c,v 1.12 2000/12/10 02:43:28 tom Exp $")
#if defined(_IOREAD) && defined(_NFILE)
/*VARARGS2*/
-int vsscanf(const char *str, const char *format, va_list ap)
+NCURSES_EXPORT(int)
+vsscanf
+(const char *str, const char *format, va_list ap)
{
- /*
- * This code should work on anything descended from AT&T SVr1.
- */
- FILE strbuf;
+ /*
+ * This code should work on anything descended from AT&T SVr1.
+ */
+ FILE strbuf;
- strbuf._flag = _IOREAD;
- strbuf._ptr = strbuf._base = (unsigned char*)str;
- strbuf._cnt = strlen(str);
- strbuf._file = _NFILE;
+ strbuf._flag = _IOREAD;
+ strbuf._ptr = strbuf._base = (unsigned char *) str;
+ strbuf._cnt = strlen(str);
+ strbuf._file = _NFILE;
#if HAVE_VFSCANF
- return(vfscanf(&strbuf, format, ap));
+ return (vfscanf(&strbuf, format, ap));
#else
- return(_doscan(&strbuf, format, ap));
+ return (_doscan(&strbuf, format, ap));
#endif
}
#else
/*VARARGS2*/
-int vsscanf(const char *str, const char *format, va_list ap)
+NCURSES_EXPORT(int)
+vsscanf
+(const char *str, const char *format, va_list ap)
{
- /*
- * You don't have a native vsscanf(3), and you don't have System-V
- * compatible stdio internals. You're probably using a BSD
- * older than 4.4 or a really old Linux. You lose. Upgrade
- * to a current C library to win.
- */
- return -1; /* not implemented */
+ /*
+ * You don't have a native vsscanf(3), and you don't have System-V
+ * compatible stdio internals. You're probably using a BSD
+ * older than 4.4 or a really old Linux. You lose. Upgrade
+ * to a current C library to win.
+ */
+ return -1; /* not implemented */
}
#endif
#else
-extern void _nc_vsscanf(void); /* quiet's gcc warning */
-void _nc_vsscanf(void) { } /* nonempty for strict ANSI compilers */
+extern
+NCURSES_EXPORT(void)
+_nc_vsscanf(void); /* quiet's gcc warning */
+NCURSES_EXPORT(void)
+_nc_vsscanf(void)
+{
+} /* nonempty for strict ANSI compilers */
#endif /* !HAVE_VSSCANF */