diff options
author | Johnny Willemsen <jwillemsen@remedy.nl> | 2008-10-21 07:15:23 +0000 |
---|---|---|
committer | Johnny Willemsen <jwillemsen@remedy.nl> | 2008-10-21 07:15:23 +0000 |
commit | 21908b12c6636ce9ff9442b5dbd5e526320b3c92 (patch) | |
tree | 7f36b0b30f369dd972811ac28cff371f33558c98 /ACE/ace/OS_NS_stdio.cpp | |
parent | f28a556b6ee77b34cc7445ff077cdd37b1ef90c2 (diff) | |
download | ATCD-21908b12c6636ce9ff9442b5dbd5e526320b3c92.tar.gz |
Tue Oct 21 07:15:00 UTC 2008 Johnny Willemsen <jwillemsen@remedy.nl>
Diffstat (limited to 'ACE/ace/OS_NS_stdio.cpp')
-rw-r--r-- | ACE/ace/OS_NS_stdio.cpp | 59 |
1 files changed, 59 insertions, 0 deletions
diff --git a/ACE/ace/OS_NS_stdio.cpp b/ACE/ace/OS_NS_stdio.cpp index fdb3d69e373..4205f0a7a98 100644 --- a/ACE/ace/OS_NS_stdio.cpp +++ b/ACE/ace/OS_NS_stdio.cpp @@ -459,4 +459,63 @@ ACE_OS::vaswprintf_emulation(wchar_t **bufp, const wchar_t *format, va_list argp #endif /* !ACE_HAS_VASWPRINTF */ #endif /* ACE_HAS_WCHAR */ +int +ACE_OS::scanf (const char *format, ...) +{ + int result; + va_list ap; + va_start (ap, format); + ACE_OSCALL (::scanf (format, ap), int, -1, result); + va_end (ap); + return result; +} + +#if defined (ACE_HAS_WCHAR) +int +ACE_OS::scanf (const wchar_t *format, ...) +{ +#if defined (ACE_LACKS_WSCANF) + ACE_UNUSED_ARG (format); + ACE_NOTSUP_RETURN (-1); +#else + int result; + va_list ap; + va_start (ap, format); + ACE_OSCALL (::wscanf (format, ap), int, -1, result); + va_end (ap); + return result; +#endif +} +#endif /* ACE_HAS_WCHAR */ + +int +ACE_OS::sscanf (char *buf, const char *format, ...) +{ + int result; + va_list ap; + va_start (ap, format); + ACE_OSCALL (::sscanf (buf, format, ap), int, -1, result); + va_end (ap); + return result; +} + +#if defined (ACE_HAS_WCHAR) +int +ACE_OS::sscanf (wchar_t *buf, const wchar_t *format, ...) +{ +#if defined (ACE_LACKS_SWSCANF) + ACE_UNUSED_ARG (buf); + ACE_UNUSED_ARG (format); + ACE_NOTSUP_RETURN (-1); +#else + int result; + va_list ap; + va_start (ap, format); + ACE_OSCALL (::swscanf (buf, format, ap), int, -1, result); + va_end (ap); + return result; +#endif +} +#endif /* ACE_HAS_WCHAR */ + ACE_END_VERSIONED_NAMESPACE_DECL |