]> pd.if.org Git - pdclib/blobdiff - functions/stdio/sscanf.c
PDCLib includes with quotes, not <>.
[pdclib] / functions / stdio / sscanf.c
index 368ae53a7f18f19c6436df0dcec44bcd395b72ef..5de77ae45c7a28745de7c8a5e56cc8cd5a1f8460 100644 (file)
@@ -1,5 +1,3 @@
-/* $Id$ */
-
 /* sscanf( const char *, const char *, ... )
 
    This file is part of the Public Domain C Library (PDCLib).
 
 int sscanf( const char * _PDCLIB_restrict s, const char * _PDCLIB_restrict format, ... )
 {
+    int rc;
     va_list ap;
     va_start( ap, format );
-    return vsscanf( s, format, ap );
+    rc = vsscanf( s, format, ap );
+    va_end( ap );
+    return rc;
 }
 
 #endif
 
 #ifdef TEST
-#include <_PDCLIB_test.h>
+#define _PDCLIB_FILEID "stdio/sscanf.c"
+#define _PDCLIB_STRINGIO
+
+#include "_PDCLIB_test.h"
+
+#define testscanf( s, format, ... ) sscanf( s, format, __VA_ARGS__ )
 
 int main( void )
 {
-    TESTCASE( NO_TESTDRIVER );
+    char source[100];
+#include "scanf_testcases.h"
     return TEST_RESULTS;
 }
 
 #endif
+