forked from Imagelibrary/rtems
psxhdrs: added POSIX API Signature Compliance Tests for stdio.h File (GCI 2018)
This commit is contained in:
committed by
Joel Sherrill
parent
cf2e6dde5a
commit
a115818d9f
@@ -1113,6 +1113,74 @@ lib_a_SOURCES = psxhdrs/devctl/posix_devctl.c \
|
|||||||
psxhdrs/semaphore/sem_wait.c \
|
psxhdrs/semaphore/sem_wait.c \
|
||||||
psxhdrs/semaphore/sem_trywait.c \
|
psxhdrs/semaphore/sem_trywait.c \
|
||||||
psxhdrs/semaphore/sem_timedwait.c \
|
psxhdrs/semaphore/sem_timedwait.c \
|
||||||
|
psxhdrs/stdio/clearerr.c \
|
||||||
|
psxhdrs/stdio/ctermid.c \
|
||||||
|
psxhdrs/stdio/dprintf.c \
|
||||||
|
psxhdrs/stdio/fclose.c \
|
||||||
|
psxhdrs/stdio/fdopen.c \
|
||||||
|
psxhdrs/stdio/feof.c \
|
||||||
|
psxhdrs/stdio/ferror.c \
|
||||||
|
psxhdrs/stdio/fflush.c \
|
||||||
|
psxhdrs/stdio/fgetc.c \
|
||||||
|
psxhdrs/stdio/fgetpos.c \
|
||||||
|
psxhdrs/stdio/fgets.c \
|
||||||
|
psxhdrs/stdio/fileno.c \
|
||||||
|
psxhdrs/stdio/flockfile.c \
|
||||||
|
psxhdrs/stdio/fmemopen.c \
|
||||||
|
psxhdrs/stdio/fopen.c \
|
||||||
|
psxhdrs/stdio/fprintf.c \
|
||||||
|
psxhdrs/stdio/fputc.c \
|
||||||
|
psxhdrs/stdio/fputs.c \
|
||||||
|
psxhdrs/stdio/fread.c \
|
||||||
|
psxhdrs/stdio/freopen.c \
|
||||||
|
psxhdrs/stdio/fscanf.c \
|
||||||
|
psxhdrs/stdio/fseek.c \
|
||||||
|
psxhdrs/stdio/fseeko.c \
|
||||||
|
psxhdrs/stdio/fsetpos.c \
|
||||||
|
psxhdrs/stdio/ftell.c \
|
||||||
|
psxhdrs/stdio/ftello.c \
|
||||||
|
psxhdrs/stdio/ftrylockfile.c \
|
||||||
|
psxhdrs/stdio/funlockfile.c \
|
||||||
|
psxhdrs/stdio/fwrite.c \
|
||||||
|
psxhdrs/stdio/getc.c \
|
||||||
|
psxhdrs/stdio/getc_unlocked.c \
|
||||||
|
psxhdrs/stdio/getchar.c \
|
||||||
|
psxhdrs/stdio/getchar_unlocked.c \
|
||||||
|
psxhdrs/stdio/gets.c \
|
||||||
|
psxhdrs/stdio/open_memstream.c \
|
||||||
|
psxhdrs/stdio/perror.c \
|
||||||
|
psxhdrs/stdio/printf.c \
|
||||||
|
psxhdrs/stdio/putc.c \
|
||||||
|
psxhdrs/stdio/putc_unlocked.c \
|
||||||
|
psxhdrs/stdio/putchar.c \
|
||||||
|
psxhdrs/stdio/putchar_unlocked.c \
|
||||||
|
psxhdrs/stdio/puts.c \
|
||||||
|
psxhdrs/stdio/remove.c \
|
||||||
|
psxhdrs/stdio/rename.c \
|
||||||
|
psxhdrs/stdio/rewind.c \
|
||||||
|
psxhdrs/stdio/scanf.c \
|
||||||
|
psxhdrs/stdio/setbuf.c \
|
||||||
|
psxhdrs/stdio/setvbuf.c \
|
||||||
|
psxhdrs/stdio/snprintf.c \
|
||||||
|
psxhdrs/stdio/sprintf.c \
|
||||||
|
psxhdrs/stdio/sscanf.c \
|
||||||
|
psxhdrs/stdio/stderr.c \
|
||||||
|
psxhdrs/stdio/stdin.c \
|
||||||
|
psxhdrs/stdio/stdout.c \
|
||||||
|
psxhdrs/stdio/tempnam.c \
|
||||||
|
psxhdrs/stdio/tmpfile.c \
|
||||||
|
psxhdrs/stdio/tmpnam.c \
|
||||||
|
psxhdrs/stdio/ungetc.c \
|
||||||
|
psxhdrs/stdio/vdprintf.c \
|
||||||
|
psxhdrs/stdio/vfprintf.c \
|
||||||
|
psxhdrs/stdio/vfscanf.c \
|
||||||
|
psxhdrs/stdio/vprintf.c \
|
||||||
|
psxhdrs/stdio/vscanf.c \
|
||||||
|
psxhdrs/stdio/vsnprintf.c \
|
||||||
|
psxhdrs/stdio/vsprintf.c \
|
||||||
|
psxhdrs/stdio/vsscanf.c \
|
||||||
|
psxhdrs/stdio/pclose.c \
|
||||||
|
psxhdrs/stdio/popen.c \
|
||||||
psxhdrs/strings/bcmp.c \
|
psxhdrs/strings/bcmp.c \
|
||||||
psxhdrs/strings/bcopy.c \
|
psxhdrs/strings/bcopy.c \
|
||||||
psxhdrs/strings/ffs.c \
|
psxhdrs/strings/ffs.c \
|
||||||
@@ -1155,8 +1223,12 @@ lib_a_SOURCES = psxhdrs/devctl/posix_devctl.c \
|
|||||||
## lib_a_SOURCES += psxhdrs/ulimit/ulimit.c
|
## lib_a_SOURCES += psxhdrs/ulimit/ulimit.c
|
||||||
## lib_a_SOURCES += psxhdrs/monetary/strfmon.c
|
## lib_a_SOURCES += psxhdrs/monetary/strfmon.c
|
||||||
## lib_a_SOURCES += psxhdrs/monetary/strfmon_l.c
|
## lib_a_SOURCES += psxhdrs/monetary/strfmon_l.c
|
||||||
|
|
||||||
|
## Specific issues that tickets are tracking
|
||||||
## lib_a_SOURCES += psxhdrs/dirent/dirfd.c See ticket #3371
|
## lib_a_SOURCES += psxhdrs/dirent/dirfd.c See ticket #3371
|
||||||
## lib_a_SOURCES += psxhdrs/dirent/fdopendir.c See ticket #3371
|
## lib_a_SOURCES += psxhdrs/dirent/fdopendir.c See ticket #3371
|
||||||
|
## lib_a_SOURCES += psxhdrs/stdio/getdelim.c See ticket #3633
|
||||||
|
## lib_a_SOURCES += psxhdrs/stdio/getline.c See ticket #3633
|
||||||
endif
|
endif
|
||||||
|
|
||||||
rtems_tests_PROGRAMS = $(psx_tests)
|
rtems_tests_PROGRAMS = $(psx_tests)
|
||||||
|
|||||||
38
testsuites/psxtests/psxhdrs/stdio/clearerr.c
Normal file
38
testsuites/psxtests/psxhdrs/stdio/clearerr.c
Normal file
@@ -0,0 +1,38 @@
|
|||||||
|
/**
|
||||||
|
* @file
|
||||||
|
* @brief clearerr() API Conformance Test
|
||||||
|
*/
|
||||||
|
|
||||||
|
/*
|
||||||
|
* COPYRIGHT (c) 2018.
|
||||||
|
* Himanshu Sekhar Nayak
|
||||||
|
*
|
||||||
|
* Permission to use, copy, modify, and/or distribute this software
|
||||||
|
* for any purpose with or without fee is hereby granted.
|
||||||
|
*
|
||||||
|
* THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL
|
||||||
|
* WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED
|
||||||
|
* WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR
|
||||||
|
* BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES
|
||||||
|
* OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
|
||||||
|
* WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
|
||||||
|
* ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifdef HAVE_CONFIG_H
|
||||||
|
#include "config.h"
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#include <stdio.h>
|
||||||
|
|
||||||
|
int test( void );
|
||||||
|
|
||||||
|
int test( void )
|
||||||
|
{
|
||||||
|
FILE *stream;
|
||||||
|
|
||||||
|
stream = fopen( "mylib/myfile", "r" );
|
||||||
|
clearerr( stream );
|
||||||
|
|
||||||
|
return ( stream != NULL );
|
||||||
|
}
|
||||||
39
testsuites/psxtests/psxhdrs/stdio/ctermid.c
Normal file
39
testsuites/psxtests/psxhdrs/stdio/ctermid.c
Normal file
@@ -0,0 +1,39 @@
|
|||||||
|
/**
|
||||||
|
* @file
|
||||||
|
* @brief ctermid() API Conformance Test
|
||||||
|
*/
|
||||||
|
|
||||||
|
/*
|
||||||
|
* COPYRIGHT (c) 2018.
|
||||||
|
* Himanshu Sekhar Nayak
|
||||||
|
*
|
||||||
|
* Permission to use, copy, modify, and/or distribute this software
|
||||||
|
* for any purpose with or without fee is hereby granted.
|
||||||
|
*
|
||||||
|
* THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL
|
||||||
|
* WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED
|
||||||
|
* WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR
|
||||||
|
* BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES
|
||||||
|
* OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
|
||||||
|
* WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
|
||||||
|
* ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifdef HAVE_CONFIG_H
|
||||||
|
#include "config.h"
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#include <stdio.h>
|
||||||
|
|
||||||
|
int test( void );
|
||||||
|
|
||||||
|
int test( void )
|
||||||
|
{
|
||||||
|
char termid[100];
|
||||||
|
char *ptr;
|
||||||
|
|
||||||
|
ptr = ctermid( termid );
|
||||||
|
(void) termid;
|
||||||
|
|
||||||
|
return ( ptr != NULL );
|
||||||
|
}
|
||||||
39
testsuites/psxtests/psxhdrs/stdio/dprintf.c
Normal file
39
testsuites/psxtests/psxhdrs/stdio/dprintf.c
Normal file
@@ -0,0 +1,39 @@
|
|||||||
|
/**
|
||||||
|
* @file
|
||||||
|
* @brief dprintf() API Conformance Test
|
||||||
|
*/
|
||||||
|
|
||||||
|
/*
|
||||||
|
* COPYRIGHT (c) 2018.
|
||||||
|
* Himanshu Sekhar Nayak
|
||||||
|
*
|
||||||
|
* Permission to use, copy, modify, and/or distribute this software
|
||||||
|
* for any purpose with or without fee is hereby granted.
|
||||||
|
*
|
||||||
|
* THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL
|
||||||
|
* WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED
|
||||||
|
* WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR
|
||||||
|
* BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES
|
||||||
|
* OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
|
||||||
|
* WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
|
||||||
|
* ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifdef HAVE_CONFIG_H
|
||||||
|
#include "config.h"
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#include <stdio.h>
|
||||||
|
|
||||||
|
int test( void );
|
||||||
|
|
||||||
|
int test( void )
|
||||||
|
{
|
||||||
|
int fd = 12;
|
||||||
|
char *format = "Hello World";
|
||||||
|
int result;
|
||||||
|
|
||||||
|
result = dprintf( fd, format );
|
||||||
|
|
||||||
|
return result;
|
||||||
|
}
|
||||||
37
testsuites/psxtests/psxhdrs/stdio/fclose.c
Normal file
37
testsuites/psxtests/psxhdrs/stdio/fclose.c
Normal file
@@ -0,0 +1,37 @@
|
|||||||
|
/**
|
||||||
|
* @file
|
||||||
|
* @brief fclose() API Conformance Test
|
||||||
|
*/
|
||||||
|
|
||||||
|
/*
|
||||||
|
* COPYRIGHT (c) 2018.
|
||||||
|
* Himanshu Sekhar Nayak
|
||||||
|
*
|
||||||
|
* Permission to use, copy, modify, and/or distribute this software
|
||||||
|
* for any purpose with or without fee is hereby granted.
|
||||||
|
*
|
||||||
|
* THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL
|
||||||
|
* WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED
|
||||||
|
* WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR
|
||||||
|
* BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES
|
||||||
|
* OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
|
||||||
|
* WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
|
||||||
|
* ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifdef HAVE_CONFIG_H
|
||||||
|
#include "config.h"
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#include <stdio.h>
|
||||||
|
|
||||||
|
int test( void );
|
||||||
|
|
||||||
|
int test( void )
|
||||||
|
{
|
||||||
|
FILE *stream;
|
||||||
|
|
||||||
|
stream = fopen( "mylib/myfile", "r" );
|
||||||
|
|
||||||
|
return ( stream != NULL );
|
||||||
|
}
|
||||||
38
testsuites/psxtests/psxhdrs/stdio/fdopen.c
Normal file
38
testsuites/psxtests/psxhdrs/stdio/fdopen.c
Normal file
@@ -0,0 +1,38 @@
|
|||||||
|
/**
|
||||||
|
* @file
|
||||||
|
* @brief fdopen() API Conformance Test
|
||||||
|
*/
|
||||||
|
|
||||||
|
/*
|
||||||
|
* COPYRIGHT (c) 2018.
|
||||||
|
* Himanshu Sekhar Nayak
|
||||||
|
*
|
||||||
|
* Permission to use, copy, modify, and/or distribute this software
|
||||||
|
* for any purpose with or without fee is hereby granted.
|
||||||
|
*
|
||||||
|
* THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL
|
||||||
|
* WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED
|
||||||
|
* WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR
|
||||||
|
* BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES
|
||||||
|
* OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
|
||||||
|
* WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
|
||||||
|
* ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifdef HAVE_CONFIG_H
|
||||||
|
#include "config.h"
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#include <stdio.h>
|
||||||
|
|
||||||
|
int test( void );
|
||||||
|
|
||||||
|
int test( void )
|
||||||
|
{
|
||||||
|
FILE *fp;
|
||||||
|
int fh = 2;
|
||||||
|
|
||||||
|
fp = fdopen( fh, "r");
|
||||||
|
|
||||||
|
return ( fp != NULL );
|
||||||
|
}
|
||||||
39
testsuites/psxtests/psxhdrs/stdio/feof.c
Normal file
39
testsuites/psxtests/psxhdrs/stdio/feof.c
Normal file
@@ -0,0 +1,39 @@
|
|||||||
|
/**
|
||||||
|
* @file
|
||||||
|
* @brief feof() API Conformance Test
|
||||||
|
*/
|
||||||
|
|
||||||
|
/*
|
||||||
|
* COPYRIGHT (c) 2018.
|
||||||
|
* Himanshu Sekhar Nayak
|
||||||
|
*
|
||||||
|
* Permission to use, copy, modify, and/or distribute this software
|
||||||
|
* for any purpose with or without fee is hereby granted.
|
||||||
|
*
|
||||||
|
* THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL
|
||||||
|
* WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED
|
||||||
|
* WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR
|
||||||
|
* BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES
|
||||||
|
* OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
|
||||||
|
* WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
|
||||||
|
* ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifdef HAVE_CONFIG_H
|
||||||
|
#include "config.h"
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#include <stdio.h>
|
||||||
|
|
||||||
|
int test( void );
|
||||||
|
|
||||||
|
int test( void )
|
||||||
|
{
|
||||||
|
FILE *stream;
|
||||||
|
int result;
|
||||||
|
|
||||||
|
stream = fopen( "mylib/myfile", "r" );
|
||||||
|
result = feof( stream );
|
||||||
|
|
||||||
|
return result;
|
||||||
|
}
|
||||||
39
testsuites/psxtests/psxhdrs/stdio/ferror.c
Normal file
39
testsuites/psxtests/psxhdrs/stdio/ferror.c
Normal file
@@ -0,0 +1,39 @@
|
|||||||
|
/**
|
||||||
|
* @file
|
||||||
|
* @brief ferror() API Conformance Test
|
||||||
|
*/
|
||||||
|
|
||||||
|
/*
|
||||||
|
* COPYRIGHT (c) 2018.
|
||||||
|
* Himanshu Sekhar Nayak
|
||||||
|
*
|
||||||
|
* Permission to use, copy, modify, and/or distribute this software
|
||||||
|
* for any purpose with or without fee is hereby granted.
|
||||||
|
*
|
||||||
|
* THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL
|
||||||
|
* WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED
|
||||||
|
* WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR
|
||||||
|
* BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES
|
||||||
|
* OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
|
||||||
|
* WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
|
||||||
|
* ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifdef HAVE_CONFIG_H
|
||||||
|
#include "config.h"
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#include <stdio.h>
|
||||||
|
|
||||||
|
int test( void );
|
||||||
|
|
||||||
|
int test( void )
|
||||||
|
{
|
||||||
|
FILE *stream;
|
||||||
|
int result;
|
||||||
|
|
||||||
|
stream = fopen( "mylib/myfile", "w" );
|
||||||
|
result = ferror( stream );
|
||||||
|
|
||||||
|
return result;
|
||||||
|
}
|
||||||
39
testsuites/psxtests/psxhdrs/stdio/fflush.c
Normal file
39
testsuites/psxtests/psxhdrs/stdio/fflush.c
Normal file
@@ -0,0 +1,39 @@
|
|||||||
|
/**
|
||||||
|
* @file
|
||||||
|
* @brief fflush() API Conformance Test
|
||||||
|
*/
|
||||||
|
|
||||||
|
/*
|
||||||
|
* COPYRIGHT (c) 2018.
|
||||||
|
* Himanshu Sekhar Nayak
|
||||||
|
*
|
||||||
|
* Permission to use, copy, modify, and/or distribute this software
|
||||||
|
* for any purpose with or without fee is hereby granted.
|
||||||
|
*
|
||||||
|
* THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL
|
||||||
|
* WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED
|
||||||
|
* WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR
|
||||||
|
* BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES
|
||||||
|
* OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
|
||||||
|
* WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
|
||||||
|
* ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifdef HAVE_CONFIG_H
|
||||||
|
#include "config.h"
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#include <stdio.h>
|
||||||
|
|
||||||
|
int test( void );
|
||||||
|
|
||||||
|
int test( void )
|
||||||
|
{
|
||||||
|
FILE *stream;
|
||||||
|
int result;
|
||||||
|
|
||||||
|
stream = fopen( "myfile.dat", "w" );
|
||||||
|
result = fflush( stream );
|
||||||
|
|
||||||
|
return result;
|
||||||
|
}
|
||||||
39
testsuites/psxtests/psxhdrs/stdio/fgetc.c
Normal file
39
testsuites/psxtests/psxhdrs/stdio/fgetc.c
Normal file
@@ -0,0 +1,39 @@
|
|||||||
|
/**
|
||||||
|
* @file
|
||||||
|
* @brief fgetc() API Conformance Test
|
||||||
|
*/
|
||||||
|
|
||||||
|
/*
|
||||||
|
* COPYRIGHT (c) 2018.
|
||||||
|
* Himanshu Sekhar Nayak
|
||||||
|
*
|
||||||
|
* Permission to use, copy, modify, and/or distribute this software
|
||||||
|
* for any purpose with or without fee is hereby granted.
|
||||||
|
*
|
||||||
|
* THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL
|
||||||
|
* WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED
|
||||||
|
* WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR
|
||||||
|
* BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES
|
||||||
|
* OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
|
||||||
|
* WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
|
||||||
|
* ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifdef HAVE_CONFIG_H
|
||||||
|
#include "config.h"
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#include <stdio.h>
|
||||||
|
|
||||||
|
int test( void );
|
||||||
|
|
||||||
|
int test( void )
|
||||||
|
{
|
||||||
|
FILE *stream;
|
||||||
|
int result;
|
||||||
|
|
||||||
|
stream = fopen( "myfile.dat", "w" );
|
||||||
|
result = fgetc( stream );
|
||||||
|
|
||||||
|
return result;
|
||||||
|
}
|
||||||
40
testsuites/psxtests/psxhdrs/stdio/fgetpos.c
Normal file
40
testsuites/psxtests/psxhdrs/stdio/fgetpos.c
Normal file
@@ -0,0 +1,40 @@
|
|||||||
|
/**
|
||||||
|
* @file
|
||||||
|
* @brief fgetpos() API Conformance Test
|
||||||
|
*/
|
||||||
|
|
||||||
|
/*
|
||||||
|
* COPYRIGHT (c) 2018.
|
||||||
|
* Himanshu Sekhar Nayak
|
||||||
|
*
|
||||||
|
* Permission to use, copy, modify, and/or distribute this software
|
||||||
|
* for any purpose with or without fee is hereby granted.
|
||||||
|
*
|
||||||
|
* THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL
|
||||||
|
* WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED
|
||||||
|
* WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR
|
||||||
|
* BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES
|
||||||
|
* OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
|
||||||
|
* WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
|
||||||
|
* ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifdef HAVE_CONFIG_H
|
||||||
|
#include "config.h"
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#include <stdio.h>
|
||||||
|
|
||||||
|
int test( void );
|
||||||
|
|
||||||
|
int test( void )
|
||||||
|
{
|
||||||
|
FILE *stream;
|
||||||
|
fpos_t pos;
|
||||||
|
int result;
|
||||||
|
|
||||||
|
stream = fopen( "myfile.dat", "w" );
|
||||||
|
result = fgetpos( stream, &pos );
|
||||||
|
|
||||||
|
return result;
|
||||||
|
}
|
||||||
42
testsuites/psxtests/psxhdrs/stdio/fgets.c
Normal file
42
testsuites/psxtests/psxhdrs/stdio/fgets.c
Normal file
@@ -0,0 +1,42 @@
|
|||||||
|
/**
|
||||||
|
* @file
|
||||||
|
* @brief fgets() API Conformance Test
|
||||||
|
*/
|
||||||
|
|
||||||
|
/*
|
||||||
|
* COPYRIGHT (c) 2018.
|
||||||
|
* Himanshu Sekhar Nayak
|
||||||
|
*
|
||||||
|
* Permission to use, copy, modify, and/or distribute this software
|
||||||
|
* for any purpose with or without fee is hereby granted.
|
||||||
|
*
|
||||||
|
* THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL
|
||||||
|
* WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED
|
||||||
|
* WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR
|
||||||
|
* BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES
|
||||||
|
* OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
|
||||||
|
* WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
|
||||||
|
* ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifdef HAVE_CONFIG_H
|
||||||
|
#include "config.h"
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#include <stdio.h>
|
||||||
|
|
||||||
|
#define MAX_LEN 100
|
||||||
|
|
||||||
|
int test( void );
|
||||||
|
|
||||||
|
int test( void )
|
||||||
|
{
|
||||||
|
FILE *stream;
|
||||||
|
char line[MAX_LEN];
|
||||||
|
char *result;
|
||||||
|
|
||||||
|
stream = fopen( "myfile.dat", "w" );
|
||||||
|
result = fgets( line, MAX_LEN, stream );
|
||||||
|
|
||||||
|
return ( result != NULL );
|
||||||
|
}
|
||||||
41
testsuites/psxtests/psxhdrs/stdio/fileno.c
Normal file
41
testsuites/psxtests/psxhdrs/stdio/fileno.c
Normal file
@@ -0,0 +1,41 @@
|
|||||||
|
/**
|
||||||
|
* @file
|
||||||
|
* @brief fileno() API Conformance Test
|
||||||
|
*/
|
||||||
|
|
||||||
|
/*
|
||||||
|
* COPYRIGHT (c) 2018.
|
||||||
|
* Himanshu Sekhar Nayak
|
||||||
|
*
|
||||||
|
* Permission to use, copy, modify, and/or distribute this software
|
||||||
|
* for any purpose with or without fee is hereby granted.
|
||||||
|
*
|
||||||
|
* THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL
|
||||||
|
* WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED
|
||||||
|
* WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR
|
||||||
|
* BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES
|
||||||
|
* OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
|
||||||
|
* WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
|
||||||
|
* ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifdef HAVE_CONFIG_H
|
||||||
|
#include "config.h"
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#include <stdio.h>
|
||||||
|
|
||||||
|
int test( void );
|
||||||
|
|
||||||
|
int test( void )
|
||||||
|
{
|
||||||
|
FILE *stream;
|
||||||
|
char hfs_file[]="./hfs_file";
|
||||||
|
int result;
|
||||||
|
|
||||||
|
stream = fopen( hfs_file, "w" );
|
||||||
|
(void) hfs_file;
|
||||||
|
result = fileno( stream );
|
||||||
|
|
||||||
|
return result;
|
||||||
|
}
|
||||||
38
testsuites/psxtests/psxhdrs/stdio/flockfile.c
Normal file
38
testsuites/psxtests/psxhdrs/stdio/flockfile.c
Normal file
@@ -0,0 +1,38 @@
|
|||||||
|
/**
|
||||||
|
* @file
|
||||||
|
* @brief flockfile() API Conformance Test
|
||||||
|
*/
|
||||||
|
|
||||||
|
/*
|
||||||
|
* COPYRIGHT (c) 2018.
|
||||||
|
* Himanshu Sekhar Nayak
|
||||||
|
*
|
||||||
|
* Permission to use, copy, modify, and/or distribute this software
|
||||||
|
* for any purpose with or without fee is hereby granted.
|
||||||
|
*
|
||||||
|
* THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL
|
||||||
|
* WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED
|
||||||
|
* WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR
|
||||||
|
* BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES
|
||||||
|
* OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
|
||||||
|
* WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
|
||||||
|
* ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifdef HAVE_CONFIG_H
|
||||||
|
#include "config.h"
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#include <stdio.h>
|
||||||
|
|
||||||
|
int test( void );
|
||||||
|
|
||||||
|
int test( void )
|
||||||
|
{
|
||||||
|
FILE *stream;
|
||||||
|
|
||||||
|
stream = fopen( "myfile.dat", "w" );
|
||||||
|
flockfile( stream );
|
||||||
|
|
||||||
|
return ( stream != NULL );
|
||||||
|
}
|
||||||
39
testsuites/psxtests/psxhdrs/stdio/fmemopen.c
Normal file
39
testsuites/psxtests/psxhdrs/stdio/fmemopen.c
Normal file
@@ -0,0 +1,39 @@
|
|||||||
|
/**
|
||||||
|
* @file
|
||||||
|
* @brief fmemopen() API Conformance Test
|
||||||
|
*/
|
||||||
|
|
||||||
|
/*
|
||||||
|
* COPYRIGHT (c) 2018.
|
||||||
|
* Himanshu Sekhar Nayak
|
||||||
|
*
|
||||||
|
* Permission to use, copy, modify, and/or distribute this software
|
||||||
|
* for any purpose with or without fee is hereby granted.
|
||||||
|
*
|
||||||
|
* THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL
|
||||||
|
* WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED
|
||||||
|
* WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR
|
||||||
|
* BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES
|
||||||
|
* OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
|
||||||
|
* WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
|
||||||
|
* ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifdef HAVE_CONFIG_H
|
||||||
|
#include "config.h"
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#include <stdio.h>
|
||||||
|
#include <string.h>
|
||||||
|
|
||||||
|
int test( void );
|
||||||
|
|
||||||
|
int test( void )
|
||||||
|
{
|
||||||
|
FILE *stream;
|
||||||
|
char buffer[] = "foobar";
|
||||||
|
|
||||||
|
stream = fmemopen( buffer, strlen( buffer ), "r" );
|
||||||
|
|
||||||
|
return ( stream != NULL );
|
||||||
|
}
|
||||||
37
testsuites/psxtests/psxhdrs/stdio/fopen.c
Normal file
37
testsuites/psxtests/psxhdrs/stdio/fopen.c
Normal file
@@ -0,0 +1,37 @@
|
|||||||
|
/**
|
||||||
|
* @file
|
||||||
|
* @brief fopen() API Conformance Test
|
||||||
|
*/
|
||||||
|
|
||||||
|
/*
|
||||||
|
* COPYRIGHT (c) 2018.
|
||||||
|
* Himanshu Sekhar Nayak
|
||||||
|
*
|
||||||
|
* Permission to use, copy, modify, and/or distribute this software
|
||||||
|
* for any purpose with or without fee is hereby granted.
|
||||||
|
*
|
||||||
|
* THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL
|
||||||
|
* WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED
|
||||||
|
* WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR
|
||||||
|
* BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES
|
||||||
|
* OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
|
||||||
|
* WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
|
||||||
|
* ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifdef HAVE_CONFIG_H
|
||||||
|
#include "config.h"
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#include <stdio.h>
|
||||||
|
|
||||||
|
int test( void );
|
||||||
|
|
||||||
|
int test( void )
|
||||||
|
{
|
||||||
|
FILE *stream;
|
||||||
|
|
||||||
|
stream = fopen( "myfile.dat", "w" );
|
||||||
|
|
||||||
|
return ( stream != NULL);
|
||||||
|
}
|
||||||
39
testsuites/psxtests/psxhdrs/stdio/fprintf.c
Normal file
39
testsuites/psxtests/psxhdrs/stdio/fprintf.c
Normal file
@@ -0,0 +1,39 @@
|
|||||||
|
/**
|
||||||
|
* @file
|
||||||
|
* @brief fprintf() API Conformance Test
|
||||||
|
*/
|
||||||
|
|
||||||
|
/*
|
||||||
|
* COPYRIGHT (c) 2018.
|
||||||
|
* Himanshu Sekhar Nayak
|
||||||
|
*
|
||||||
|
* Permission to use, copy, modify, and/or distribute this software
|
||||||
|
* for any purpose with or without fee is hereby granted.
|
||||||
|
*
|
||||||
|
* THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL
|
||||||
|
* WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED
|
||||||
|
* WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR
|
||||||
|
* BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES
|
||||||
|
* OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
|
||||||
|
* WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
|
||||||
|
* ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifdef HAVE_CONFIG_H
|
||||||
|
#include "config.h"
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#include <stdio.h>
|
||||||
|
|
||||||
|
int test( void );
|
||||||
|
|
||||||
|
int test( void )
|
||||||
|
{
|
||||||
|
FILE *stream;
|
||||||
|
int result;
|
||||||
|
|
||||||
|
stream = fopen( "myfile.dat", "w" );
|
||||||
|
result = fprintf( stream, "*" );
|
||||||
|
|
||||||
|
return result;
|
||||||
|
}
|
||||||
40
testsuites/psxtests/psxhdrs/stdio/fputc.c
Normal file
40
testsuites/psxtests/psxhdrs/stdio/fputc.c
Normal file
@@ -0,0 +1,40 @@
|
|||||||
|
/**
|
||||||
|
* @file
|
||||||
|
* @brief fputc() API Conformance Test
|
||||||
|
*/
|
||||||
|
|
||||||
|
/*
|
||||||
|
* COPYRIGHT (c) 2018.
|
||||||
|
* Himanshu Sekhar Nayak
|
||||||
|
*
|
||||||
|
* Permission to use, copy, modify, and/or distribute this software
|
||||||
|
* for any purpose with or without fee is hereby granted.
|
||||||
|
*
|
||||||
|
* THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL
|
||||||
|
* WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED
|
||||||
|
* WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR
|
||||||
|
* BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES
|
||||||
|
* OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
|
||||||
|
* WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
|
||||||
|
* ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifdef HAVE_CONFIG_H
|
||||||
|
#include "config.h"
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#include <stdio.h>
|
||||||
|
|
||||||
|
int test( void );
|
||||||
|
|
||||||
|
int test( void )
|
||||||
|
{
|
||||||
|
FILE *stream;
|
||||||
|
char buffer[] = "Hello world";
|
||||||
|
int result;
|
||||||
|
|
||||||
|
stream = fopen( "myfile.dat", "w" );
|
||||||
|
result = fputc( buffer[3], stream );
|
||||||
|
|
||||||
|
return result;
|
||||||
|
}
|
||||||
40
testsuites/psxtests/psxhdrs/stdio/fputs.c
Normal file
40
testsuites/psxtests/psxhdrs/stdio/fputs.c
Normal file
@@ -0,0 +1,40 @@
|
|||||||
|
/**
|
||||||
|
* @file
|
||||||
|
* @brief fputs() API Conformance Test
|
||||||
|
*/
|
||||||
|
|
||||||
|
/*
|
||||||
|
* COPYRIGHT (c) 2018.
|
||||||
|
* Himanshu Sekhar Nayak
|
||||||
|
*
|
||||||
|
* Permission to use, copy, modify, and/or distribute this software
|
||||||
|
* for any purpose with or without fee is hereby granted.
|
||||||
|
*
|
||||||
|
* THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL
|
||||||
|
* WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED
|
||||||
|
* WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR
|
||||||
|
* BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES
|
||||||
|
* OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
|
||||||
|
* WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
|
||||||
|
* ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifdef HAVE_CONFIG_H
|
||||||
|
#include "config.h"
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#include <stdio.h>
|
||||||
|
|
||||||
|
int test( void );
|
||||||
|
|
||||||
|
int test( void )
|
||||||
|
{
|
||||||
|
FILE *stream;
|
||||||
|
char buffer[] = "Hello World";
|
||||||
|
int result;
|
||||||
|
|
||||||
|
stream = fopen( "myfile.dat", "w" );
|
||||||
|
result = fputs( buffer, stream );
|
||||||
|
|
||||||
|
return result;
|
||||||
|
}
|
||||||
43
testsuites/psxtests/psxhdrs/stdio/fread.c
Normal file
43
testsuites/psxtests/psxhdrs/stdio/fread.c
Normal file
@@ -0,0 +1,43 @@
|
|||||||
|
/**
|
||||||
|
* @file
|
||||||
|
* @brief fread() API Conformance Test
|
||||||
|
*/
|
||||||
|
|
||||||
|
/*
|
||||||
|
* COPYRIGHT (c) 2018.
|
||||||
|
* Himanshu Sekhar Nayak
|
||||||
|
*
|
||||||
|
* Permission to use, copy, modify, and/or distribute this software
|
||||||
|
* for any purpose with or without fee is hereby granted.
|
||||||
|
*
|
||||||
|
* THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL
|
||||||
|
* WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED
|
||||||
|
* WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR
|
||||||
|
* BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES
|
||||||
|
* OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
|
||||||
|
* WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
|
||||||
|
* ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifdef HAVE_CONFIG_H
|
||||||
|
#include "config.h"
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#include <stdio.h>
|
||||||
|
|
||||||
|
int test( void );
|
||||||
|
|
||||||
|
#define NUM_ALPHA 26
|
||||||
|
|
||||||
|
int test( void )
|
||||||
|
{
|
||||||
|
FILE *stream;
|
||||||
|
int bytes_read;
|
||||||
|
char buffer[NUM_ALPHA + 1];
|
||||||
|
|
||||||
|
buffer[NUM_ALPHA] = '\0';
|
||||||
|
stream = fopen( "myfile.dat", "w" );
|
||||||
|
bytes_read = fread( buffer, sizeof( char ), NUM_ALPHA, stream );
|
||||||
|
|
||||||
|
return bytes_read;
|
||||||
|
}
|
||||||
39
testsuites/psxtests/psxhdrs/stdio/freopen.c
Normal file
39
testsuites/psxtests/psxhdrs/stdio/freopen.c
Normal file
@@ -0,0 +1,39 @@
|
|||||||
|
/**
|
||||||
|
* @file
|
||||||
|
* @brief freopen() API Conformance Test
|
||||||
|
*/
|
||||||
|
|
||||||
|
/*
|
||||||
|
* COPYRIGHT (c) 2018.
|
||||||
|
* Himanshu Sekhar Nayak
|
||||||
|
*
|
||||||
|
* Permission to use, copy, modify, and/or distribute this software
|
||||||
|
* for any purpose with or without fee is hereby granted.
|
||||||
|
*
|
||||||
|
* THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL
|
||||||
|
* WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED
|
||||||
|
* WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR
|
||||||
|
* BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES
|
||||||
|
* OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
|
||||||
|
* WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
|
||||||
|
* ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifdef HAVE_CONFIG_H
|
||||||
|
#include "config.h"
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#include <stdio.h>
|
||||||
|
|
||||||
|
int test( void );
|
||||||
|
|
||||||
|
int test( void )
|
||||||
|
{
|
||||||
|
FILE *stream, *stream1, *stream2;
|
||||||
|
|
||||||
|
stream = fopen( "myfile.dat", "w" );
|
||||||
|
stream1 = stream;
|
||||||
|
stream2 = freopen("", "w+", stream1);
|
||||||
|
|
||||||
|
return ( stream2 != NULL );
|
||||||
|
}
|
||||||
42
testsuites/psxtests/psxhdrs/stdio/fscanf.c
Normal file
42
testsuites/psxtests/psxhdrs/stdio/fscanf.c
Normal file
@@ -0,0 +1,42 @@
|
|||||||
|
/**
|
||||||
|
* @file
|
||||||
|
* @brief fscanf() API Conformance Test
|
||||||
|
*/
|
||||||
|
|
||||||
|
/*
|
||||||
|
* COPYRIGHT (c) 2018.
|
||||||
|
* Himanshu Sekhar Nayak
|
||||||
|
*
|
||||||
|
* Permission to use, copy, modify, and/or distribute this software
|
||||||
|
* for any purpose with or without fee is hereby granted.
|
||||||
|
*
|
||||||
|
* THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL
|
||||||
|
* WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED
|
||||||
|
* WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR
|
||||||
|
* BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES
|
||||||
|
* OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
|
||||||
|
* WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
|
||||||
|
* ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifdef HAVE_CONFIG_H
|
||||||
|
#include "config.h"
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#include <stdio.h>
|
||||||
|
|
||||||
|
#define MAX_LEN 80
|
||||||
|
|
||||||
|
int test( void );
|
||||||
|
|
||||||
|
int test( void )
|
||||||
|
{
|
||||||
|
FILE *stream;
|
||||||
|
char s[MAX_LEN + 1];
|
||||||
|
int result;
|
||||||
|
|
||||||
|
stream = fopen( "myfile.dat", "w" );
|
||||||
|
result = fscanf( stream, "%s", &s[0] );
|
||||||
|
|
||||||
|
return result;
|
||||||
|
}
|
||||||
39
testsuites/psxtests/psxhdrs/stdio/fseek.c
Normal file
39
testsuites/psxtests/psxhdrs/stdio/fseek.c
Normal file
@@ -0,0 +1,39 @@
|
|||||||
|
/**
|
||||||
|
* @file
|
||||||
|
* @brief fseek() API Conformance Test
|
||||||
|
*/
|
||||||
|
|
||||||
|
/*
|
||||||
|
* COPYRIGHT (c) 2018.
|
||||||
|
* Himanshu Sekhar Nayak
|
||||||
|
*
|
||||||
|
* Permission to use, copy, modify, and/or distribute this software
|
||||||
|
* for any purpose with or without fee is hereby granted.
|
||||||
|
*
|
||||||
|
* THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL
|
||||||
|
* WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED
|
||||||
|
* WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR
|
||||||
|
* BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES
|
||||||
|
* OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
|
||||||
|
* WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
|
||||||
|
* ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifdef HAVE_CONFIG_H
|
||||||
|
#include "config.h"
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#include <stdio.h>
|
||||||
|
|
||||||
|
int test( void );
|
||||||
|
|
||||||
|
int test( void )
|
||||||
|
{
|
||||||
|
FILE *stream;
|
||||||
|
int result;
|
||||||
|
|
||||||
|
stream = fopen( "myfile.dat", "w" );
|
||||||
|
result = fseek( stream, 0L, SEEK_SET );
|
||||||
|
|
||||||
|
return result;
|
||||||
|
}
|
||||||
39
testsuites/psxtests/psxhdrs/stdio/fseeko.c
Normal file
39
testsuites/psxtests/psxhdrs/stdio/fseeko.c
Normal file
@@ -0,0 +1,39 @@
|
|||||||
|
/**
|
||||||
|
* @file
|
||||||
|
* @brief fseeko() API Conformance Test
|
||||||
|
*/
|
||||||
|
|
||||||
|
/*
|
||||||
|
* COPYRIGHT (c) 2018.
|
||||||
|
* Himanshu Sekhar Nayak
|
||||||
|
*
|
||||||
|
* Permission to use, copy, modify, and/or distribute this software
|
||||||
|
* for any purpose with or without fee is hereby granted.
|
||||||
|
*
|
||||||
|
* THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL
|
||||||
|
* WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED
|
||||||
|
* WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR
|
||||||
|
* BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES
|
||||||
|
* OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
|
||||||
|
* WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
|
||||||
|
* ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifdef HAVE_CONFIG_H
|
||||||
|
#include "config.h"
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#include <stdio.h>
|
||||||
|
|
||||||
|
int test( void );
|
||||||
|
|
||||||
|
int test( void )
|
||||||
|
{
|
||||||
|
FILE *stream;
|
||||||
|
int result;
|
||||||
|
|
||||||
|
stream = fopen( "myfile.dat", "w" );
|
||||||
|
result = fseeko( stream, 0LL, SEEK_SET );
|
||||||
|
|
||||||
|
return result;
|
||||||
|
}
|
||||||
40
testsuites/psxtests/psxhdrs/stdio/fsetpos.c
Normal file
40
testsuites/psxtests/psxhdrs/stdio/fsetpos.c
Normal file
@@ -0,0 +1,40 @@
|
|||||||
|
/**
|
||||||
|
* @file
|
||||||
|
* @brief fsetpos() API Conformance Test
|
||||||
|
*/
|
||||||
|
|
||||||
|
/*
|
||||||
|
* COPYRIGHT (c) 2018.
|
||||||
|
* Himanshu Sekhar Nayak
|
||||||
|
*
|
||||||
|
* Permission to use, copy, modify, and/or distribute this software
|
||||||
|
* for any purpose with or without fee is hereby granted.
|
||||||
|
*
|
||||||
|
* THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL
|
||||||
|
* WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED
|
||||||
|
* WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR
|
||||||
|
* BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES
|
||||||
|
* OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
|
||||||
|
* WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
|
||||||
|
* ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifdef HAVE_CONFIG_H
|
||||||
|
#include "config.h"
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#include <stdio.h>
|
||||||
|
|
||||||
|
int test( void );
|
||||||
|
|
||||||
|
int test( void )
|
||||||
|
{
|
||||||
|
FILE *stream;
|
||||||
|
fpos_t pos;
|
||||||
|
int result;
|
||||||
|
|
||||||
|
stream = fopen( "myfile.dat", "w" );
|
||||||
|
result = fsetpos( stream, &pos );
|
||||||
|
|
||||||
|
return result;
|
||||||
|
}
|
||||||
39
testsuites/psxtests/psxhdrs/stdio/ftell.c
Normal file
39
testsuites/psxtests/psxhdrs/stdio/ftell.c
Normal file
@@ -0,0 +1,39 @@
|
|||||||
|
/**
|
||||||
|
* @file
|
||||||
|
* @brief ftell() API Conformance Test
|
||||||
|
*/
|
||||||
|
|
||||||
|
/*
|
||||||
|
* COPYRIGHT (c) 2018.
|
||||||
|
* Himanshu Sekhar Nayak
|
||||||
|
*
|
||||||
|
* Permission to use, copy, modify, and/or distribute this software
|
||||||
|
* for any purpose with or without fee is hereby granted.
|
||||||
|
*
|
||||||
|
* THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL
|
||||||
|
* WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED
|
||||||
|
* WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR
|
||||||
|
* BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES
|
||||||
|
* OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
|
||||||
|
* WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
|
||||||
|
* ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifdef HAVE_CONFIG_H
|
||||||
|
#include "config.h"
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#include <stdio.h>
|
||||||
|
|
||||||
|
int test( void );
|
||||||
|
|
||||||
|
int test( void )
|
||||||
|
{
|
||||||
|
FILE *stream;
|
||||||
|
int result;
|
||||||
|
|
||||||
|
stream = fopen( "myfile.dat", "w" );
|
||||||
|
result = ftell( stream );
|
||||||
|
|
||||||
|
return result;
|
||||||
|
}
|
||||||
39
testsuites/psxtests/psxhdrs/stdio/ftello.c
Normal file
39
testsuites/psxtests/psxhdrs/stdio/ftello.c
Normal file
@@ -0,0 +1,39 @@
|
|||||||
|
/**
|
||||||
|
* @file
|
||||||
|
* @brief ftello() API Conformance Test
|
||||||
|
*/
|
||||||
|
|
||||||
|
/*
|
||||||
|
* COPYRIGHT (c) 2018.
|
||||||
|
* Himanshu Sekhar Nayak
|
||||||
|
*
|
||||||
|
* Permission to use, copy, modify, and/or distribute this software
|
||||||
|
* for any purpose with or without fee is hereby granted.
|
||||||
|
*
|
||||||
|
* THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL
|
||||||
|
* WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED
|
||||||
|
* WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR
|
||||||
|
* BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES
|
||||||
|
* OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
|
||||||
|
* WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
|
||||||
|
* ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifdef HAVE_CONFIG_H
|
||||||
|
#include "config.h"
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#include <stdio.h>
|
||||||
|
|
||||||
|
int test( void );
|
||||||
|
|
||||||
|
int test( void )
|
||||||
|
{
|
||||||
|
FILE *stream;
|
||||||
|
off_t result;
|
||||||
|
|
||||||
|
stream = fopen( "myfile.dat", "w" );
|
||||||
|
result = ftello( stream );
|
||||||
|
|
||||||
|
return ( (int)result );
|
||||||
|
}
|
||||||
39
testsuites/psxtests/psxhdrs/stdio/ftrylockfile.c
Normal file
39
testsuites/psxtests/psxhdrs/stdio/ftrylockfile.c
Normal file
@@ -0,0 +1,39 @@
|
|||||||
|
/**
|
||||||
|
* @file
|
||||||
|
* @brief ftrylockfile() API Conformance Test
|
||||||
|
*/
|
||||||
|
|
||||||
|
/*
|
||||||
|
* COPYRIGHT (c) 2018.
|
||||||
|
* Himanshu Sekhar Nayak
|
||||||
|
*
|
||||||
|
* Permission to use, copy, modify, and/or distribute this software
|
||||||
|
* for any purpose with or without fee is hereby granted.
|
||||||
|
*
|
||||||
|
* THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL
|
||||||
|
* WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED
|
||||||
|
* WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR
|
||||||
|
* BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES
|
||||||
|
* OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
|
||||||
|
* WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
|
||||||
|
* ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifdef HAVE_CONFIG_H
|
||||||
|
#include "config.h"
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#include <stdio.h>
|
||||||
|
|
||||||
|
int test( void );
|
||||||
|
|
||||||
|
int test( void )
|
||||||
|
{
|
||||||
|
FILE *stream;
|
||||||
|
int result;
|
||||||
|
|
||||||
|
stream = fopen( "myfile.dat", "w" );
|
||||||
|
result = ftrylockfile( stream );
|
||||||
|
|
||||||
|
return result;
|
||||||
|
}
|
||||||
38
testsuites/psxtests/psxhdrs/stdio/funlockfile.c
Normal file
38
testsuites/psxtests/psxhdrs/stdio/funlockfile.c
Normal file
@@ -0,0 +1,38 @@
|
|||||||
|
/**
|
||||||
|
* @file
|
||||||
|
* @brief funlockfile() API Conformance Test
|
||||||
|
*/
|
||||||
|
|
||||||
|
/*
|
||||||
|
* COPYRIGHT (c) 2018.
|
||||||
|
* Himanshu Sekhar Nayak
|
||||||
|
*
|
||||||
|
* Permission to use, copy, modify, and/or distribute this software
|
||||||
|
* for any purpose with or without fee is hereby granted.
|
||||||
|
*
|
||||||
|
* THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL
|
||||||
|
* WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED
|
||||||
|
* WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR
|
||||||
|
* BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES
|
||||||
|
* OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
|
||||||
|
* WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
|
||||||
|
* ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifdef HAVE_CONFIG_H
|
||||||
|
#include "config.h"
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#include <stdio.h>
|
||||||
|
|
||||||
|
int test( void );
|
||||||
|
|
||||||
|
int test( void )
|
||||||
|
{
|
||||||
|
FILE *stream;
|
||||||
|
|
||||||
|
stream = fopen( "myfile.dat", "w" );
|
||||||
|
funlockfile( stream );
|
||||||
|
|
||||||
|
return ( stream != NULL );
|
||||||
|
}
|
||||||
40
testsuites/psxtests/psxhdrs/stdio/fwrite.c
Normal file
40
testsuites/psxtests/psxhdrs/stdio/fwrite.c
Normal file
@@ -0,0 +1,40 @@
|
|||||||
|
/**
|
||||||
|
* @file
|
||||||
|
* @brief fwrite() API Conformance Test
|
||||||
|
*/
|
||||||
|
|
||||||
|
/*
|
||||||
|
* COPYRIGHT (c) 2018.
|
||||||
|
* Himanshu Sekhar Nayak
|
||||||
|
*
|
||||||
|
* Permission to use, copy, modify, and/or distribute this software
|
||||||
|
* for any purpose with or without fee is hereby granted.
|
||||||
|
*
|
||||||
|
* THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL
|
||||||
|
* WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED
|
||||||
|
* WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR
|
||||||
|
* BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES
|
||||||
|
* OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
|
||||||
|
* WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
|
||||||
|
* ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifdef HAVE_CONFIG_H
|
||||||
|
#include "config.h"
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#include <stdio.h>
|
||||||
|
|
||||||
|
int test( void );
|
||||||
|
|
||||||
|
int test( void )
|
||||||
|
{
|
||||||
|
FILE *stream;
|
||||||
|
long list[] = {1,2,3,4,5};
|
||||||
|
int result;
|
||||||
|
|
||||||
|
stream = fopen( "myfile.dat", "w" );
|
||||||
|
result = fwrite( list, sizeof(long), 5, stream );
|
||||||
|
|
||||||
|
return result;
|
||||||
|
}
|
||||||
39
testsuites/psxtests/psxhdrs/stdio/getc.c
Normal file
39
testsuites/psxtests/psxhdrs/stdio/getc.c
Normal file
@@ -0,0 +1,39 @@
|
|||||||
|
/**
|
||||||
|
* @file
|
||||||
|
* @brief getc() API Conformance Test
|
||||||
|
*/
|
||||||
|
|
||||||
|
/*
|
||||||
|
* COPYRIGHT (c) 2018.
|
||||||
|
* Himanshu Sekhar Nayak
|
||||||
|
*
|
||||||
|
* Permission to use, copy, modify, and/or distribute this software
|
||||||
|
* for any purpose with or without fee is hereby granted.
|
||||||
|
*
|
||||||
|
* THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL
|
||||||
|
* WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED
|
||||||
|
* WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR
|
||||||
|
* BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES
|
||||||
|
* OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
|
||||||
|
* WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
|
||||||
|
* ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifdef HAVE_CONFIG_H
|
||||||
|
#include "config.h"
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#include <stdio.h>
|
||||||
|
|
||||||
|
int test( void );
|
||||||
|
|
||||||
|
int test( void )
|
||||||
|
{
|
||||||
|
FILE *stream;
|
||||||
|
int result;
|
||||||
|
|
||||||
|
stream = fopen( "myfile.dat", "w" );
|
||||||
|
result = getc( stream );
|
||||||
|
|
||||||
|
return result;
|
||||||
|
}
|
||||||
39
testsuites/psxtests/psxhdrs/stdio/getc_unlocked.c
Normal file
39
testsuites/psxtests/psxhdrs/stdio/getc_unlocked.c
Normal file
@@ -0,0 +1,39 @@
|
|||||||
|
/**
|
||||||
|
* @file
|
||||||
|
* @brief getc_unlocked() API Conformance Test
|
||||||
|
*/
|
||||||
|
|
||||||
|
/*
|
||||||
|
* COPYRIGHT (c) 2018.
|
||||||
|
* Himanshu Sekhar Nayak
|
||||||
|
*
|
||||||
|
* Permission to use, copy, modify, and/or distribute this software
|
||||||
|
* for any purpose with or without fee is hereby granted.
|
||||||
|
*
|
||||||
|
* THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL
|
||||||
|
* WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED
|
||||||
|
* WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR
|
||||||
|
* BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES
|
||||||
|
* OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
|
||||||
|
* WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
|
||||||
|
* ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifdef HAVE_CONFIG_H
|
||||||
|
#include "config.h"
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#include <stdio.h>
|
||||||
|
|
||||||
|
int test( void );
|
||||||
|
|
||||||
|
int test( void )
|
||||||
|
{
|
||||||
|
FILE *stream;
|
||||||
|
int result;
|
||||||
|
|
||||||
|
stream = fopen( "myfile.dat", "w" );
|
||||||
|
result = getc_unlocked( stream );
|
||||||
|
|
||||||
|
return result;
|
||||||
|
}
|
||||||
37
testsuites/psxtests/psxhdrs/stdio/getchar.c
Normal file
37
testsuites/psxtests/psxhdrs/stdio/getchar.c
Normal file
@@ -0,0 +1,37 @@
|
|||||||
|
/**
|
||||||
|
* @file
|
||||||
|
* @brief getchar() API Conformance Test
|
||||||
|
*/
|
||||||
|
|
||||||
|
/*
|
||||||
|
* COPYRIGHT (c) 2018.
|
||||||
|
* Himanshu Sekhar Nayak
|
||||||
|
*
|
||||||
|
* Permission to use, copy, modify, and/or distribute this software
|
||||||
|
* for any purpose with or without fee is hereby granted.
|
||||||
|
*
|
||||||
|
* THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL
|
||||||
|
* WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED
|
||||||
|
* WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR
|
||||||
|
* BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES
|
||||||
|
* OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
|
||||||
|
* WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
|
||||||
|
* ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifdef HAVE_CONFIG_H
|
||||||
|
#include "config.h"
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#include <stdio.h>
|
||||||
|
|
||||||
|
int test( void );
|
||||||
|
|
||||||
|
int test( void )
|
||||||
|
{
|
||||||
|
int result;
|
||||||
|
|
||||||
|
result = getchar();
|
||||||
|
|
||||||
|
return result;
|
||||||
|
}
|
||||||
37
testsuites/psxtests/psxhdrs/stdio/getchar_unlocked.c
Normal file
37
testsuites/psxtests/psxhdrs/stdio/getchar_unlocked.c
Normal file
@@ -0,0 +1,37 @@
|
|||||||
|
/**
|
||||||
|
* @file
|
||||||
|
* @brief getchar_unlocked() API Conformance Test
|
||||||
|
*/
|
||||||
|
|
||||||
|
/*
|
||||||
|
* COPYRIGHT (c) 2018.
|
||||||
|
* Himanshu Sekhar Nayak
|
||||||
|
*
|
||||||
|
* Permission to use, copy, modify, and/or distribute this software
|
||||||
|
* for any purpose with or without fee is hereby granted.
|
||||||
|
*
|
||||||
|
* THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL
|
||||||
|
* WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED
|
||||||
|
* WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR
|
||||||
|
* BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES
|
||||||
|
* OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
|
||||||
|
* WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
|
||||||
|
* ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifdef HAVE_CONFIG_H
|
||||||
|
#include "config.h"
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#include <stdio.h>
|
||||||
|
|
||||||
|
int test( void );
|
||||||
|
|
||||||
|
int test( void )
|
||||||
|
{
|
||||||
|
int result;
|
||||||
|
|
||||||
|
result = getchar_unlocked( );
|
||||||
|
|
||||||
|
return result;
|
||||||
|
}
|
||||||
42
testsuites/psxtests/psxhdrs/stdio/getdelim.c
Normal file
42
testsuites/psxtests/psxhdrs/stdio/getdelim.c
Normal file
@@ -0,0 +1,42 @@
|
|||||||
|
/**
|
||||||
|
* @file
|
||||||
|
* @brief getdelim() API Conformance Test
|
||||||
|
*/
|
||||||
|
|
||||||
|
/*
|
||||||
|
* COPYRIGHT (c) 2018.
|
||||||
|
* Himanshu Sekhar Nayak
|
||||||
|
*
|
||||||
|
* Permission to use, copy, modify, and/or distribute this software
|
||||||
|
* for any purpose with or without fee is hereby granted.
|
||||||
|
*
|
||||||
|
* THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL
|
||||||
|
* WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED
|
||||||
|
* WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR
|
||||||
|
* BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES
|
||||||
|
* OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
|
||||||
|
* WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
|
||||||
|
* ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifdef HAVE_CONFIG_H
|
||||||
|
#include "config.h"
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#define _POSIX_C_SOURCE 200809L
|
||||||
|
#include <stdio.h>
|
||||||
|
|
||||||
|
int test( void );
|
||||||
|
|
||||||
|
int test( void )
|
||||||
|
{
|
||||||
|
FILE *stream;
|
||||||
|
ssize_t read;
|
||||||
|
char *line = NULL;
|
||||||
|
size_t len = 0;
|
||||||
|
|
||||||
|
stream = fopen("/etc/motd", "r");
|
||||||
|
read = getdelim( &line, &len, 1, stream );
|
||||||
|
|
||||||
|
return read;
|
||||||
|
}
|
||||||
42
testsuites/psxtests/psxhdrs/stdio/getline.c
Normal file
42
testsuites/psxtests/psxhdrs/stdio/getline.c
Normal file
@@ -0,0 +1,42 @@
|
|||||||
|
/**
|
||||||
|
* @file
|
||||||
|
* @brief getline() API Conformance Test
|
||||||
|
*/
|
||||||
|
|
||||||
|
/*
|
||||||
|
* COPYRIGHT (c) 2018.
|
||||||
|
* Himanshu Sekhar Nayak
|
||||||
|
*
|
||||||
|
* Permission to use, copy, modify, and/or distribute this software
|
||||||
|
* for any purpose with or without fee is hereby granted.
|
||||||
|
*
|
||||||
|
* THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL
|
||||||
|
* WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED
|
||||||
|
* WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR
|
||||||
|
* BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES
|
||||||
|
* OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
|
||||||
|
* WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
|
||||||
|
* ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifdef HAVE_CONFIG_H
|
||||||
|
#include "config.h"
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#define _POSIX_C_SOURCE 200809L
|
||||||
|
#include <stdio.h>
|
||||||
|
|
||||||
|
int test( void );
|
||||||
|
|
||||||
|
int test( void )
|
||||||
|
{
|
||||||
|
FILE *stream;
|
||||||
|
ssize_t read;
|
||||||
|
char *line = NULL;
|
||||||
|
size_t len = 0;
|
||||||
|
|
||||||
|
stream = fopen( "/etc/motd", "r" );
|
||||||
|
read = getline( &line, &len, stream );
|
||||||
|
|
||||||
|
return read;
|
||||||
|
}
|
||||||
38
testsuites/psxtests/psxhdrs/stdio/gets.c
Normal file
38
testsuites/psxtests/psxhdrs/stdio/gets.c
Normal file
@@ -0,0 +1,38 @@
|
|||||||
|
/**
|
||||||
|
* @file
|
||||||
|
* @brief gets() API Conformance Test
|
||||||
|
*/
|
||||||
|
|
||||||
|
/*
|
||||||
|
* COPYRIGHT (c) 2018.
|
||||||
|
* Himanshu Sekhar Nayak
|
||||||
|
*
|
||||||
|
* Permission to use, copy, modify, and/or distribute this software
|
||||||
|
* for any purpose with or without fee is hereby granted.
|
||||||
|
*
|
||||||
|
* THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL
|
||||||
|
* WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED
|
||||||
|
* WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR
|
||||||
|
* BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES
|
||||||
|
* OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
|
||||||
|
* WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
|
||||||
|
* ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifdef HAVE_CONFIG_H
|
||||||
|
#include "config.h"
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#include <stdio.h>
|
||||||
|
|
||||||
|
int test( void );
|
||||||
|
|
||||||
|
int test( void )
|
||||||
|
{
|
||||||
|
char *s = "Hello";
|
||||||
|
char *result;
|
||||||
|
|
||||||
|
result = gets( s );
|
||||||
|
|
||||||
|
return ( result != NULL );
|
||||||
|
}
|
||||||
39
testsuites/psxtests/psxhdrs/stdio/open_memstream.c
Normal file
39
testsuites/psxtests/psxhdrs/stdio/open_memstream.c
Normal file
@@ -0,0 +1,39 @@
|
|||||||
|
/**
|
||||||
|
* @file
|
||||||
|
* @brief open_memstream() API Conformance Test
|
||||||
|
*/
|
||||||
|
|
||||||
|
/*
|
||||||
|
* COPYRIGHT (c) 2018.
|
||||||
|
* Himanshu Sekhar Nayak
|
||||||
|
*
|
||||||
|
* Permission to use, copy, modify, and/or distribute this software
|
||||||
|
* for any purpose with or without fee is hereby granted.
|
||||||
|
*
|
||||||
|
* THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL
|
||||||
|
* WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED
|
||||||
|
* WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR
|
||||||
|
* BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES
|
||||||
|
* OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
|
||||||
|
* WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
|
||||||
|
* ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifdef HAVE_CONFIG_H
|
||||||
|
#include "config.h"
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#include <stdio.h>
|
||||||
|
|
||||||
|
int test( void );
|
||||||
|
|
||||||
|
int test( void )
|
||||||
|
{
|
||||||
|
FILE *stream;
|
||||||
|
size_t len;
|
||||||
|
char *buf;
|
||||||
|
|
||||||
|
stream = open_memstream( &buf, &len );
|
||||||
|
|
||||||
|
return ( stream != NULL );
|
||||||
|
}
|
||||||
39
testsuites/psxtests/psxhdrs/stdio/pclose.c
Normal file
39
testsuites/psxtests/psxhdrs/stdio/pclose.c
Normal file
@@ -0,0 +1,39 @@
|
|||||||
|
/**
|
||||||
|
* @file
|
||||||
|
* @brief pclose() API Conformance Test
|
||||||
|
*/
|
||||||
|
|
||||||
|
/*
|
||||||
|
* COPYRIGHT (c) 2018.
|
||||||
|
* Himanshu Sekhar Nayak
|
||||||
|
*
|
||||||
|
* Permission to use, copy, modify, and/or distribute this software
|
||||||
|
* for any purpose with or without fee is hereby granted.
|
||||||
|
*
|
||||||
|
* THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL
|
||||||
|
* WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED
|
||||||
|
* WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR
|
||||||
|
* BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES
|
||||||
|
* OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
|
||||||
|
* WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
|
||||||
|
* ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifdef HAVE_CONFIG_H
|
||||||
|
#include "config.h"
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#include <stdio.h>
|
||||||
|
|
||||||
|
int test( void );
|
||||||
|
|
||||||
|
int test( void )
|
||||||
|
{
|
||||||
|
FILE *stream;
|
||||||
|
int result;
|
||||||
|
|
||||||
|
stream = fopen( "myfile.dat", "w" );
|
||||||
|
result = pclose( stream );
|
||||||
|
|
||||||
|
return result;
|
||||||
|
}
|
||||||
38
testsuites/psxtests/psxhdrs/stdio/perror.c
Normal file
38
testsuites/psxtests/psxhdrs/stdio/perror.c
Normal file
@@ -0,0 +1,38 @@
|
|||||||
|
/**
|
||||||
|
* @file
|
||||||
|
* @brief perror() API Conformance Test
|
||||||
|
*/
|
||||||
|
|
||||||
|
/*
|
||||||
|
* COPYRIGHT (c) 2018.
|
||||||
|
* Himanshu Sekhar Nayak
|
||||||
|
*
|
||||||
|
* Permission to use, copy, modify, and/or distribute this software
|
||||||
|
* for any purpose with or without fee is hereby granted.
|
||||||
|
*
|
||||||
|
* THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL
|
||||||
|
* WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED
|
||||||
|
* WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR
|
||||||
|
* BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES
|
||||||
|
* OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
|
||||||
|
* WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
|
||||||
|
* ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifdef HAVE_CONFIG_H
|
||||||
|
#include "config.h"
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#include <stdio.h>
|
||||||
|
|
||||||
|
int test( void );
|
||||||
|
|
||||||
|
int test( void )
|
||||||
|
{
|
||||||
|
FILE *stream;
|
||||||
|
|
||||||
|
stream = fopen( "myfile.dat", "w" );
|
||||||
|
perror("Can't Open data file");
|
||||||
|
|
||||||
|
return ( stream != NULL );
|
||||||
|
}
|
||||||
37
testsuites/psxtests/psxhdrs/stdio/popen.c
Normal file
37
testsuites/psxtests/psxhdrs/stdio/popen.c
Normal file
@@ -0,0 +1,37 @@
|
|||||||
|
/**
|
||||||
|
* @file
|
||||||
|
* @brief popen() API Conformance Test
|
||||||
|
*/
|
||||||
|
|
||||||
|
/*
|
||||||
|
* COPYRIGHT (c) 2018.
|
||||||
|
* Himanshu Sekhar Nayak
|
||||||
|
*
|
||||||
|
* Permission to use, copy, modify, and/or distribute this software
|
||||||
|
* for any purpose with or without fee is hereby granted.
|
||||||
|
*
|
||||||
|
* THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL
|
||||||
|
* WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED
|
||||||
|
* WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR
|
||||||
|
* BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES
|
||||||
|
* OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
|
||||||
|
* WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
|
||||||
|
* ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifdef HAVE_CONFIG_H
|
||||||
|
#include "config.h"
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#include <stdio.h>
|
||||||
|
|
||||||
|
int test( void );
|
||||||
|
|
||||||
|
int test( void )
|
||||||
|
{
|
||||||
|
FILE *stream;
|
||||||
|
|
||||||
|
stream = popen( "ls *", "r" );
|
||||||
|
|
||||||
|
return ( stream != NULL );
|
||||||
|
}
|
||||||
37
testsuites/psxtests/psxhdrs/stdio/printf.c
Normal file
37
testsuites/psxtests/psxhdrs/stdio/printf.c
Normal file
@@ -0,0 +1,37 @@
|
|||||||
|
/**
|
||||||
|
* @file
|
||||||
|
* @brief printf() API Conformance Test
|
||||||
|
*/
|
||||||
|
|
||||||
|
/*
|
||||||
|
* COPYRIGHT (c) 2018.
|
||||||
|
* Himanshu Sekhar Nayak
|
||||||
|
*
|
||||||
|
* Permission to use, copy, modify, and/or distribute this software
|
||||||
|
* for any purpose with or without fee is hereby granted.
|
||||||
|
*
|
||||||
|
* THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL
|
||||||
|
* WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED
|
||||||
|
* WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR
|
||||||
|
* BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES
|
||||||
|
* OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
|
||||||
|
* WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
|
||||||
|
* ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifdef HAVE_CONFIG_H
|
||||||
|
#include "config.h"
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#include <stdio.h>
|
||||||
|
|
||||||
|
int test( void );
|
||||||
|
|
||||||
|
int test( void )
|
||||||
|
{
|
||||||
|
int result;
|
||||||
|
|
||||||
|
result = printf( "Hello World" );
|
||||||
|
|
||||||
|
return result;
|
||||||
|
}
|
||||||
39
testsuites/psxtests/psxhdrs/stdio/putc.c
Normal file
39
testsuites/psxtests/psxhdrs/stdio/putc.c
Normal file
@@ -0,0 +1,39 @@
|
|||||||
|
/**
|
||||||
|
* @file
|
||||||
|
* @brief putc() API Conformance Test
|
||||||
|
*/
|
||||||
|
|
||||||
|
/*
|
||||||
|
* COPYRIGHT (c) 2018.
|
||||||
|
* Himanshu Sekhar Nayak
|
||||||
|
*
|
||||||
|
* Permission to use, copy, modify, and/or distribute this software
|
||||||
|
* for any purpose with or without fee is hereby granted.
|
||||||
|
*
|
||||||
|
* THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL
|
||||||
|
* WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED
|
||||||
|
* WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR
|
||||||
|
* BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES
|
||||||
|
* OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
|
||||||
|
* WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
|
||||||
|
* ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifdef HAVE_CONFIG_H
|
||||||
|
#include "config.h"
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#include <stdio.h>
|
||||||
|
|
||||||
|
int test( void );
|
||||||
|
|
||||||
|
int test( void )
|
||||||
|
{
|
||||||
|
FILE *stream;
|
||||||
|
int result;
|
||||||
|
|
||||||
|
stream = fopen( "myfile.dat", "w" );
|
||||||
|
result = putc( 3, stream );
|
||||||
|
|
||||||
|
return result;
|
||||||
|
}
|
||||||
39
testsuites/psxtests/psxhdrs/stdio/putc_unlocked.c
Normal file
39
testsuites/psxtests/psxhdrs/stdio/putc_unlocked.c
Normal file
@@ -0,0 +1,39 @@
|
|||||||
|
/**
|
||||||
|
* @file
|
||||||
|
* @brief putc_unlocked() API Conformance Test
|
||||||
|
*/
|
||||||
|
|
||||||
|
/*
|
||||||
|
* COPYRIGHT (c) 2018.
|
||||||
|
* Himanshu Sekhar Nayak
|
||||||
|
*
|
||||||
|
* Permission to use, copy, modify, and/or distribute this software
|
||||||
|
* for any purpose with or without fee is hereby granted.
|
||||||
|
*
|
||||||
|
* THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL
|
||||||
|
* WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED
|
||||||
|
* WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR
|
||||||
|
* BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES
|
||||||
|
* OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
|
||||||
|
* WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
|
||||||
|
* ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifdef HAVE_CONFIG_H
|
||||||
|
#include "config.h"
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#include <stdio.h>
|
||||||
|
|
||||||
|
int test( void );
|
||||||
|
|
||||||
|
int test( void )
|
||||||
|
{
|
||||||
|
FILE *stream;
|
||||||
|
int result;
|
||||||
|
|
||||||
|
stream = fopen( "myfile.dat", "w" );
|
||||||
|
result = putc_unlocked( 4, stream );
|
||||||
|
|
||||||
|
return result;
|
||||||
|
}
|
||||||
37
testsuites/psxtests/psxhdrs/stdio/putchar.c
Normal file
37
testsuites/psxtests/psxhdrs/stdio/putchar.c
Normal file
@@ -0,0 +1,37 @@
|
|||||||
|
/**
|
||||||
|
* @file
|
||||||
|
* @brief putchar() API Conformance Test
|
||||||
|
*/
|
||||||
|
|
||||||
|
/*
|
||||||
|
* COPYRIGHT (c) 2018.
|
||||||
|
* Himanshu Sekhar Nayak
|
||||||
|
*
|
||||||
|
* Permission to use, copy, modify, and/or distribute this software
|
||||||
|
* for any purpose with or without fee is hereby granted.
|
||||||
|
*
|
||||||
|
* THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL
|
||||||
|
* WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED
|
||||||
|
* WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR
|
||||||
|
* BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES
|
||||||
|
* OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
|
||||||
|
* WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
|
||||||
|
* ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifdef HAVE_CONFIG_H
|
||||||
|
#include "config.h"
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#include <stdio.h>
|
||||||
|
|
||||||
|
int test( void );
|
||||||
|
|
||||||
|
int test( void )
|
||||||
|
{
|
||||||
|
int result;
|
||||||
|
|
||||||
|
result = putchar( 4 );
|
||||||
|
|
||||||
|
return result;
|
||||||
|
}
|
||||||
37
testsuites/psxtests/psxhdrs/stdio/putchar_unlocked.c
Normal file
37
testsuites/psxtests/psxhdrs/stdio/putchar_unlocked.c
Normal file
@@ -0,0 +1,37 @@
|
|||||||
|
/**
|
||||||
|
* @file
|
||||||
|
* @brief putchar_unlocked() API Conformance Test
|
||||||
|
*/
|
||||||
|
|
||||||
|
/*
|
||||||
|
* COPYRIGHT (c) 2018.
|
||||||
|
* Himanshu Sekhar Nayak
|
||||||
|
*
|
||||||
|
* Permission to use, copy, modify, and/or distribute this software
|
||||||
|
* for any purpose with or without fee is hereby granted.
|
||||||
|
*
|
||||||
|
* THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL
|
||||||
|
* WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED
|
||||||
|
* WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR
|
||||||
|
* BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES
|
||||||
|
* OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
|
||||||
|
* WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
|
||||||
|
* ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifdef HAVE_CONFIG_H
|
||||||
|
#include "config.h"
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#include <stdio.h>
|
||||||
|
|
||||||
|
int test( void );
|
||||||
|
|
||||||
|
int test( void )
|
||||||
|
{
|
||||||
|
int result;
|
||||||
|
|
||||||
|
result = putchar_unlocked( 75 );
|
||||||
|
|
||||||
|
return result;
|
||||||
|
}
|
||||||
37
testsuites/psxtests/psxhdrs/stdio/puts.c
Normal file
37
testsuites/psxtests/psxhdrs/stdio/puts.c
Normal file
@@ -0,0 +1,37 @@
|
|||||||
|
/**
|
||||||
|
* @file
|
||||||
|
* @brief puts() API Conformance Test
|
||||||
|
*/
|
||||||
|
|
||||||
|
/*
|
||||||
|
* COPYRIGHT (c) 2018.
|
||||||
|
* Himanshu Sekhar Nayak
|
||||||
|
*
|
||||||
|
* Permission to use, copy, modify, and/or distribute this software
|
||||||
|
* for any purpose with or without fee is hereby granted.
|
||||||
|
*
|
||||||
|
* THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL
|
||||||
|
* WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED
|
||||||
|
* WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR
|
||||||
|
* BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES
|
||||||
|
* OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
|
||||||
|
* WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
|
||||||
|
* ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifdef HAVE_CONFIG_H
|
||||||
|
#include "config.h"
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#include <stdio.h>
|
||||||
|
|
||||||
|
int test( void );
|
||||||
|
|
||||||
|
int test( void )
|
||||||
|
{
|
||||||
|
int result;
|
||||||
|
|
||||||
|
result = puts( "Hello" );
|
||||||
|
|
||||||
|
return result;
|
||||||
|
}
|
||||||
37
testsuites/psxtests/psxhdrs/stdio/remove.c
Normal file
37
testsuites/psxtests/psxhdrs/stdio/remove.c
Normal file
@@ -0,0 +1,37 @@
|
|||||||
|
/**
|
||||||
|
* @file
|
||||||
|
* @brief remove() API Conformance Test
|
||||||
|
*/
|
||||||
|
|
||||||
|
/*
|
||||||
|
* COPYRIGHT (c) 2018.
|
||||||
|
* Himanshu Sekhar Nayak
|
||||||
|
*
|
||||||
|
* Permission to use, copy, modify, and/or distribute this software
|
||||||
|
* for any purpose with or without fee is hereby granted.
|
||||||
|
*
|
||||||
|
* THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL
|
||||||
|
* WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED
|
||||||
|
* WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR
|
||||||
|
* BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES
|
||||||
|
* OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
|
||||||
|
* WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
|
||||||
|
* ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifdef HAVE_CONFIG_H
|
||||||
|
#include "config.h"
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#include <stdio.h>
|
||||||
|
|
||||||
|
int test( void );
|
||||||
|
|
||||||
|
int test( void )
|
||||||
|
{
|
||||||
|
int result;
|
||||||
|
|
||||||
|
result = remove( "/home/cnd/old_mods" );
|
||||||
|
|
||||||
|
return result;
|
||||||
|
}
|
||||||
39
testsuites/psxtests/psxhdrs/stdio/rename.c
Normal file
39
testsuites/psxtests/psxhdrs/stdio/rename.c
Normal file
@@ -0,0 +1,39 @@
|
|||||||
|
/**
|
||||||
|
* @file
|
||||||
|
* @brief rename() API Conformance Test
|
||||||
|
*/
|
||||||
|
|
||||||
|
/*
|
||||||
|
* COPYRIGHT (c) 2018.
|
||||||
|
* Himanshu Sekhar Nayak
|
||||||
|
*
|
||||||
|
* Permission to use, copy, modify, and/or distribute this software
|
||||||
|
* for any purpose with or without fee is hereby granted.
|
||||||
|
*
|
||||||
|
* THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL
|
||||||
|
* WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED
|
||||||
|
* WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR
|
||||||
|
* BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES
|
||||||
|
* OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
|
||||||
|
* WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
|
||||||
|
* ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifdef HAVE_CONFIG_H
|
||||||
|
#include "config.h"
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#include <stdio.h>
|
||||||
|
|
||||||
|
int test( void );
|
||||||
|
|
||||||
|
int test( void )
|
||||||
|
{
|
||||||
|
char *old = "Hello";
|
||||||
|
char *new = "Hosts";
|
||||||
|
int result;
|
||||||
|
|
||||||
|
result = rename( old, new );
|
||||||
|
|
||||||
|
return result;
|
||||||
|
}
|
||||||
40
testsuites/psxtests/psxhdrs/stdio/renameat.c
Normal file
40
testsuites/psxtests/psxhdrs/stdio/renameat.c
Normal file
@@ -0,0 +1,40 @@
|
|||||||
|
/**
|
||||||
|
* @file
|
||||||
|
* @brief renameat() API Conformance Test
|
||||||
|
*/
|
||||||
|
|
||||||
|
/*
|
||||||
|
* COPYRIGHT (c) 2018.
|
||||||
|
* Himanshu Sekhar Nayak
|
||||||
|
*
|
||||||
|
* Permission to use, copy, modify, and/or distribute this software
|
||||||
|
* for any purpose with or without fee is hereby granted.
|
||||||
|
*
|
||||||
|
* THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL
|
||||||
|
* WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED
|
||||||
|
* WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR
|
||||||
|
* BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES
|
||||||
|
* OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
|
||||||
|
* WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
|
||||||
|
* ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifdef HAVE_CONFIG_H
|
||||||
|
#include "config.h"
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#define _POSIX_C_SOURCE 200809L
|
||||||
|
#include <stdio.h>
|
||||||
|
|
||||||
|
int test( void );
|
||||||
|
|
||||||
|
int test( void )
|
||||||
|
{
|
||||||
|
char *old = "Hello";
|
||||||
|
char *new = "Coats";
|
||||||
|
int result;
|
||||||
|
|
||||||
|
result = renameat( 2, old, 2, new );
|
||||||
|
|
||||||
|
return result;
|
||||||
|
}
|
||||||
39
testsuites/psxtests/psxhdrs/stdio/rewind.c
Normal file
39
testsuites/psxtests/psxhdrs/stdio/rewind.c
Normal file
@@ -0,0 +1,39 @@
|
|||||||
|
/**
|
||||||
|
* @file
|
||||||
|
* @brief rewind() API Conformance Test
|
||||||
|
*/
|
||||||
|
|
||||||
|
/*
|
||||||
|
* COPYRIGHT (c) 2018.
|
||||||
|
* Himanshu Sekhar Nayak
|
||||||
|
*
|
||||||
|
* Permission to use, copy, modify, and/or distribute this software
|
||||||
|
* for any purpose with or without fee is hereby granted.
|
||||||
|
*
|
||||||
|
* THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL
|
||||||
|
* WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED
|
||||||
|
* WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR
|
||||||
|
* BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES
|
||||||
|
* OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
|
||||||
|
* WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
|
||||||
|
* ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifdef HAVE_CONFIG_H
|
||||||
|
#include "config.h"
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#include <stdio.h>
|
||||||
|
#include <stdlib.h>
|
||||||
|
|
||||||
|
int test( void );
|
||||||
|
|
||||||
|
int test( void )
|
||||||
|
{
|
||||||
|
FILE *stream;
|
||||||
|
|
||||||
|
stream = fopen( "myfile.dat", "w" );
|
||||||
|
rewind( stream );
|
||||||
|
|
||||||
|
return ( stream != NULL );
|
||||||
|
}
|
||||||
38
testsuites/psxtests/psxhdrs/stdio/scanf.c
Normal file
38
testsuites/psxtests/psxhdrs/stdio/scanf.c
Normal file
@@ -0,0 +1,38 @@
|
|||||||
|
/**
|
||||||
|
* @file
|
||||||
|
* @brief scanf() API Conformance Test
|
||||||
|
*/
|
||||||
|
|
||||||
|
/*
|
||||||
|
* COPYRIGHT (c) 2018.
|
||||||
|
* Himanshu Sekhar Nayak
|
||||||
|
*
|
||||||
|
* Permission to use, copy, modify, and/or distribute this software
|
||||||
|
* for any purpose with or without fee is hereby granted.
|
||||||
|
*
|
||||||
|
* THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL
|
||||||
|
* WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED
|
||||||
|
* WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR
|
||||||
|
* BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES
|
||||||
|
* OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
|
||||||
|
* WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
|
||||||
|
* ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifdef HAVE_CONFIG_H
|
||||||
|
#include "config.h"
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#include <stdio.h>
|
||||||
|
|
||||||
|
int test( void );
|
||||||
|
|
||||||
|
int test( void )
|
||||||
|
{
|
||||||
|
char *p;
|
||||||
|
int result;
|
||||||
|
|
||||||
|
result = scanf( "%m[a-z]", &p );
|
||||||
|
|
||||||
|
return result;
|
||||||
|
}
|
||||||
41
testsuites/psxtests/psxhdrs/stdio/setbuf.c
Normal file
41
testsuites/psxtests/psxhdrs/stdio/setbuf.c
Normal file
@@ -0,0 +1,41 @@
|
|||||||
|
/**
|
||||||
|
* @file
|
||||||
|
* @brief setbuf() API Conformance Test
|
||||||
|
*/
|
||||||
|
|
||||||
|
/*
|
||||||
|
* COPYRIGHT (c) 2018.
|
||||||
|
* Himanshu Sekhar Nayak
|
||||||
|
*
|
||||||
|
* Permission to use, copy, modify, and/or distribute this software
|
||||||
|
* for any purpose with or without fee is hereby granted.
|
||||||
|
*
|
||||||
|
* THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL
|
||||||
|
* WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED
|
||||||
|
* WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR
|
||||||
|
* BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES
|
||||||
|
* OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
|
||||||
|
* WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
|
||||||
|
* ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifdef HAVE_CONFIG_H
|
||||||
|
#include "config.h"
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#include <stdio.h>
|
||||||
|
|
||||||
|
#define BUF_SIZE 1024
|
||||||
|
|
||||||
|
int test( void );
|
||||||
|
|
||||||
|
int test( void )
|
||||||
|
{
|
||||||
|
FILE *stream;
|
||||||
|
char buf[BUFSIZ];
|
||||||
|
|
||||||
|
stream = fopen( "myfile.dat", "w" );
|
||||||
|
setbuf( stream, buf );
|
||||||
|
|
||||||
|
return ( stream != NULL );
|
||||||
|
}
|
||||||
42
testsuites/psxtests/psxhdrs/stdio/setvbuf.c
Normal file
42
testsuites/psxtests/psxhdrs/stdio/setvbuf.c
Normal file
@@ -0,0 +1,42 @@
|
|||||||
|
/**
|
||||||
|
* @file
|
||||||
|
* @brief setvbuf() API Conformance Test
|
||||||
|
*/
|
||||||
|
|
||||||
|
/*
|
||||||
|
* COPYRIGHT (c) 2018.
|
||||||
|
* Himanshu Sekhar Nayak
|
||||||
|
*
|
||||||
|
* Permission to use, copy, modify, and/or distribute this software
|
||||||
|
* for any purpose with or without fee is hereby granted.
|
||||||
|
*
|
||||||
|
* THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL
|
||||||
|
* WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED
|
||||||
|
* WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR
|
||||||
|
* BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES
|
||||||
|
* OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
|
||||||
|
* WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
|
||||||
|
* ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifdef HAVE_CONFIG_H
|
||||||
|
#include "config.h"
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#include <stdio.h>
|
||||||
|
|
||||||
|
#define BUF_SIZE 1024
|
||||||
|
|
||||||
|
int test( void );
|
||||||
|
|
||||||
|
int test( void )
|
||||||
|
{
|
||||||
|
FILE *stream;
|
||||||
|
char buf[BUF_SIZE];
|
||||||
|
int result;
|
||||||
|
|
||||||
|
stream = fopen( "myfile.dat", "w" );
|
||||||
|
result = setvbuf( stream, buf, _IOFBF, sizeof(buf) );
|
||||||
|
|
||||||
|
return result;
|
||||||
|
}
|
||||||
39
testsuites/psxtests/psxhdrs/stdio/snprintf.c
Normal file
39
testsuites/psxtests/psxhdrs/stdio/snprintf.c
Normal file
@@ -0,0 +1,39 @@
|
|||||||
|
/**
|
||||||
|
* @file
|
||||||
|
* @brief snprintf() API Conformance Test
|
||||||
|
*/
|
||||||
|
|
||||||
|
/*
|
||||||
|
* COPYRIGHT (c) 2018.
|
||||||
|
* Himanshu Sekhar Nayak
|
||||||
|
*
|
||||||
|
* Permission to use, copy, modify, and/or distribute this software
|
||||||
|
* for any purpose with or without fee is hereby granted.
|
||||||
|
*
|
||||||
|
* THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL
|
||||||
|
* WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED
|
||||||
|
* WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR
|
||||||
|
* BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES
|
||||||
|
* OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
|
||||||
|
* WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
|
||||||
|
* ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifdef HAVE_CONFIG_H
|
||||||
|
#include "config.h"
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#include <stdio.h>
|
||||||
|
|
||||||
|
int test( void );
|
||||||
|
|
||||||
|
int test( void )
|
||||||
|
{
|
||||||
|
char *s = "geeksforgeeks";
|
||||||
|
char buffer[50];
|
||||||
|
int result;
|
||||||
|
|
||||||
|
result = snprintf( buffer, sizeof(buffer), "%s\n", s );
|
||||||
|
|
||||||
|
return result;
|
||||||
|
}
|
||||||
43
testsuites/psxtests/psxhdrs/stdio/sprintf.c
Normal file
43
testsuites/psxtests/psxhdrs/stdio/sprintf.c
Normal file
@@ -0,0 +1,43 @@
|
|||||||
|
/**
|
||||||
|
* @file
|
||||||
|
* @brief sprintf() API Conformance Test
|
||||||
|
*/
|
||||||
|
|
||||||
|
/*
|
||||||
|
* COPYRIGHT (c) 2018.
|
||||||
|
* Himanshu Sekhar Nayak
|
||||||
|
*
|
||||||
|
* Permission to use, copy, modify, and/or distribute this software
|
||||||
|
* for any purpose with or without fee is hereby granted.
|
||||||
|
*
|
||||||
|
* THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL
|
||||||
|
* WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED
|
||||||
|
* WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR
|
||||||
|
* BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES
|
||||||
|
* OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
|
||||||
|
* WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
|
||||||
|
* ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifdef HAVE_CONFIG_H
|
||||||
|
#include "config.h"
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#include <stdio.h>
|
||||||
|
|
||||||
|
int test( void );
|
||||||
|
|
||||||
|
int test( void )
|
||||||
|
{
|
||||||
|
char *format = "Sum of %d and %d is %d";
|
||||||
|
char buffer[200];
|
||||||
|
int a, b, c;
|
||||||
|
int result;
|
||||||
|
|
||||||
|
a = 10;
|
||||||
|
b = 20;
|
||||||
|
c = a + b;
|
||||||
|
result = sprintf( buffer, format, a, b, c );
|
||||||
|
|
||||||
|
return result;
|
||||||
|
}
|
||||||
41
testsuites/psxtests/psxhdrs/stdio/sscanf.c
Normal file
41
testsuites/psxtests/psxhdrs/stdio/sscanf.c
Normal file
@@ -0,0 +1,41 @@
|
|||||||
|
/**
|
||||||
|
* @file
|
||||||
|
* @brief sscanf() API Conformance Test
|
||||||
|
*/
|
||||||
|
|
||||||
|
/*
|
||||||
|
* COPYRIGHT (c) 2018.
|
||||||
|
* Himanshu Sekhar Nayak
|
||||||
|
*
|
||||||
|
* Permission to use, copy, modify, and/or distribute this software
|
||||||
|
* for any purpose with or without fee is hereby granted.
|
||||||
|
*
|
||||||
|
* THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL
|
||||||
|
* WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED
|
||||||
|
* WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR
|
||||||
|
* BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES
|
||||||
|
* OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
|
||||||
|
* WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
|
||||||
|
* ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifdef HAVE_CONFIG_H
|
||||||
|
#include "config.h"
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#include <stdio.h>
|
||||||
|
#include <stddef.h>
|
||||||
|
|
||||||
|
int test( void );
|
||||||
|
|
||||||
|
int test( void )
|
||||||
|
{
|
||||||
|
char *string = "ABC Z";
|
||||||
|
wchar_t ws[81];
|
||||||
|
wchar_t wc;
|
||||||
|
int result;
|
||||||
|
|
||||||
|
result = sscanf( string, "%ls %lc", ws, &wc );
|
||||||
|
|
||||||
|
return result;
|
||||||
|
}
|
||||||
37
testsuites/psxtests/psxhdrs/stdio/stderr.c
Normal file
37
testsuites/psxtests/psxhdrs/stdio/stderr.c
Normal file
@@ -0,0 +1,37 @@
|
|||||||
|
/**
|
||||||
|
* @file
|
||||||
|
* @brief stderr() API Conformance Test
|
||||||
|
*/
|
||||||
|
|
||||||
|
/*
|
||||||
|
* COPYRIGHT (c) 2018.
|
||||||
|
* Himanshu Sekhar Nayak
|
||||||
|
*
|
||||||
|
* Permission to use, copy, modify, and/or distribute this software
|
||||||
|
* for any purpose with or without fee is hereby granted.
|
||||||
|
*
|
||||||
|
* THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL
|
||||||
|
* WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED
|
||||||
|
* WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR
|
||||||
|
* BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES
|
||||||
|
* OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
|
||||||
|
* WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
|
||||||
|
* ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifdef HAVE_CONFIG_H
|
||||||
|
#include "config.h"
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#include <stdio.h>
|
||||||
|
|
||||||
|
int test( void );
|
||||||
|
|
||||||
|
int test( void )
|
||||||
|
{
|
||||||
|
int result;
|
||||||
|
|
||||||
|
result = fprintf( stderr, "HELP!" );
|
||||||
|
|
||||||
|
return result;
|
||||||
|
}
|
||||||
40
testsuites/psxtests/psxhdrs/stdio/stdin.c
Normal file
40
testsuites/psxtests/psxhdrs/stdio/stdin.c
Normal file
@@ -0,0 +1,40 @@
|
|||||||
|
/**
|
||||||
|
* @file
|
||||||
|
* @brief stdin() API Conformance Test
|
||||||
|
*/
|
||||||
|
|
||||||
|
/*
|
||||||
|
* COPYRIGHT (c) 2018.
|
||||||
|
* Himanshu Sekhar Nayak
|
||||||
|
*
|
||||||
|
* Permission to use, copy, modify, and/or distribute this software
|
||||||
|
* for any purpose with or without fee is hereby granted.
|
||||||
|
*
|
||||||
|
* THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL
|
||||||
|
* WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED
|
||||||
|
* WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR
|
||||||
|
* BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES
|
||||||
|
* OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
|
||||||
|
* WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
|
||||||
|
* ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifdef HAVE_CONFIG_H
|
||||||
|
#include "config.h"
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#include <stdio.h>
|
||||||
|
|
||||||
|
#define MAX 15
|
||||||
|
|
||||||
|
int test( void );
|
||||||
|
|
||||||
|
int test( void )
|
||||||
|
{
|
||||||
|
char buf[MAX];
|
||||||
|
char *result;
|
||||||
|
|
||||||
|
result = fgets( buf, MAX, stdin );
|
||||||
|
|
||||||
|
return ( result != NULL );
|
||||||
|
}
|
||||||
37
testsuites/psxtests/psxhdrs/stdio/stdout.c
Normal file
37
testsuites/psxtests/psxhdrs/stdio/stdout.c
Normal file
@@ -0,0 +1,37 @@
|
|||||||
|
/**
|
||||||
|
* @file
|
||||||
|
* @brief stdout() API Conformance Test
|
||||||
|
*/
|
||||||
|
|
||||||
|
/*
|
||||||
|
* COPYRIGHT (c) 2018.
|
||||||
|
* Himanshu Sekhar Nayak
|
||||||
|
*
|
||||||
|
* Permission to use, copy, modify, and/or distribute this software
|
||||||
|
* for any purpose with or without fee is hereby granted.
|
||||||
|
*
|
||||||
|
* THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL
|
||||||
|
* WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED
|
||||||
|
* WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR
|
||||||
|
* BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES
|
||||||
|
* OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
|
||||||
|
* WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
|
||||||
|
* ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifdef HAVE_CONFIG_H
|
||||||
|
#include "config.h"
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#include <stdio.h>
|
||||||
|
|
||||||
|
int test( void );
|
||||||
|
|
||||||
|
int test( void )
|
||||||
|
{
|
||||||
|
int result;
|
||||||
|
|
||||||
|
result = fputs( "Hello world", stdout );
|
||||||
|
|
||||||
|
return result;
|
||||||
|
}
|
||||||
39
testsuites/psxtests/psxhdrs/stdio/tempnam.c
Normal file
39
testsuites/psxtests/psxhdrs/stdio/tempnam.c
Normal file
@@ -0,0 +1,39 @@
|
|||||||
|
/**
|
||||||
|
* @file
|
||||||
|
* @brief tempnam() API Conformance Test
|
||||||
|
*/
|
||||||
|
|
||||||
|
/*
|
||||||
|
* COPYRIGHT (c) 2018.
|
||||||
|
* Himanshu Sekhar Nayak
|
||||||
|
*
|
||||||
|
* Permission to use, copy, modify, and/or distribute this software
|
||||||
|
* for any purpose with or without fee is hereby granted.
|
||||||
|
*
|
||||||
|
* THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL
|
||||||
|
* WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED
|
||||||
|
* WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR
|
||||||
|
* BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES
|
||||||
|
* OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
|
||||||
|
* WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
|
||||||
|
* ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifdef HAVE_CONFIG_H
|
||||||
|
#include "config.h"
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#include <stdio.h>
|
||||||
|
|
||||||
|
int test( void );
|
||||||
|
|
||||||
|
int test( void )
|
||||||
|
{
|
||||||
|
char *directory = "/tmp";
|
||||||
|
char *fileprefix = "file";
|
||||||
|
char *result;
|
||||||
|
|
||||||
|
result = tempnam( directory, fileprefix );
|
||||||
|
|
||||||
|
return ( result != NULL );
|
||||||
|
}
|
||||||
37
testsuites/psxtests/psxhdrs/stdio/tmpfile.c
Normal file
37
testsuites/psxtests/psxhdrs/stdio/tmpfile.c
Normal file
@@ -0,0 +1,37 @@
|
|||||||
|
/**
|
||||||
|
* @file
|
||||||
|
* @brief tmpfile() API Conformance Test
|
||||||
|
*/
|
||||||
|
|
||||||
|
/*
|
||||||
|
* COPYRIGHT (c) 2018.
|
||||||
|
* Himanshu Sekhar Nayak
|
||||||
|
*
|
||||||
|
* Permission to use, copy, modify, and/or distribute this software
|
||||||
|
* for any purpose with or without fee is hereby granted.
|
||||||
|
*
|
||||||
|
* THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL
|
||||||
|
* WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED
|
||||||
|
* WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR
|
||||||
|
* BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES
|
||||||
|
* OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
|
||||||
|
* WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
|
||||||
|
* ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifdef HAVE_CONFIG_H
|
||||||
|
#include "config.h"
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#include <stdio.h>
|
||||||
|
|
||||||
|
int test( void );
|
||||||
|
|
||||||
|
int test( void )
|
||||||
|
{
|
||||||
|
FILE *stream;
|
||||||
|
|
||||||
|
stream = tmpfile( );
|
||||||
|
|
||||||
|
return ( stream != NULL );
|
||||||
|
}
|
||||||
37
testsuites/psxtests/psxhdrs/stdio/tmpnam.c
Normal file
37
testsuites/psxtests/psxhdrs/stdio/tmpnam.c
Normal file
@@ -0,0 +1,37 @@
|
|||||||
|
/**
|
||||||
|
* @file
|
||||||
|
* @brief tmpnam() API Conformance Test
|
||||||
|
*/
|
||||||
|
|
||||||
|
/*
|
||||||
|
* COPYRIGHT (c) 2018.
|
||||||
|
* Himanshu Sekhar Nayak
|
||||||
|
*
|
||||||
|
* Permission to use, copy, modify, and/or distribute this software
|
||||||
|
* for any purpose with or without fee is hereby granted.
|
||||||
|
*
|
||||||
|
* THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL
|
||||||
|
* WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED
|
||||||
|
* WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR
|
||||||
|
* BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES
|
||||||
|
* OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
|
||||||
|
* WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
|
||||||
|
* ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifdef HAVE_CONFIG_H
|
||||||
|
#include "config.h"
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#include <stdio.h>
|
||||||
|
|
||||||
|
int test( void );
|
||||||
|
|
||||||
|
int test( void )
|
||||||
|
{
|
||||||
|
char *name1;
|
||||||
|
|
||||||
|
name1 = tmpnam( NULL );
|
||||||
|
|
||||||
|
return ( name1 != NULL );
|
||||||
|
}
|
||||||
40
testsuites/psxtests/psxhdrs/stdio/ungetc.c
Normal file
40
testsuites/psxtests/psxhdrs/stdio/ungetc.c
Normal file
@@ -0,0 +1,40 @@
|
|||||||
|
/**
|
||||||
|
* @file
|
||||||
|
* @brief ungetc() API Conformance Test
|
||||||
|
*/
|
||||||
|
|
||||||
|
/*
|
||||||
|
* COPYRIGHT (c) 2018.
|
||||||
|
* Himanshu Sekhar Nayak
|
||||||
|
*
|
||||||
|
* Permission to use, copy, modify, and/or distribute this software
|
||||||
|
* for any purpose with or without fee is hereby granted.
|
||||||
|
*
|
||||||
|
* THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL
|
||||||
|
* WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED
|
||||||
|
* WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR
|
||||||
|
* BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES
|
||||||
|
* OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
|
||||||
|
* WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
|
||||||
|
* ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifdef HAVE_CONFIG_H
|
||||||
|
#include "config.h"
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#include <stdio.h>
|
||||||
|
|
||||||
|
int test( void );
|
||||||
|
|
||||||
|
int test( void )
|
||||||
|
{
|
||||||
|
FILE *stream;
|
||||||
|
int result;
|
||||||
|
|
||||||
|
stream = fopen( "myfile.dat", "w" );
|
||||||
|
result = getc( stream );
|
||||||
|
result = ungetc( result, stream );
|
||||||
|
|
||||||
|
return result;
|
||||||
|
}
|
||||||
39
testsuites/psxtests/psxhdrs/stdio/vdprintf.c
Normal file
39
testsuites/psxtests/psxhdrs/stdio/vdprintf.c
Normal file
@@ -0,0 +1,39 @@
|
|||||||
|
/**
|
||||||
|
* @file
|
||||||
|
* @brief vdprintf() API Conformance Test
|
||||||
|
*/
|
||||||
|
|
||||||
|
/*
|
||||||
|
* COPYRIGHT (c) 2018.
|
||||||
|
* Himanshu Sekhar Nayak
|
||||||
|
*
|
||||||
|
* Permission to use, copy, modify, and/or distribute this software
|
||||||
|
* for any purpose with or without fee is hereby granted.
|
||||||
|
*
|
||||||
|
* THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL
|
||||||
|
* WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED
|
||||||
|
* WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR
|
||||||
|
* BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES
|
||||||
|
* OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
|
||||||
|
* WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
|
||||||
|
* ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifdef HAVE_CONFIG_H
|
||||||
|
#include "config.h"
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#include <stdio.h>
|
||||||
|
#include <stdarg.h>
|
||||||
|
|
||||||
|
int test( void );
|
||||||
|
|
||||||
|
int test( void )
|
||||||
|
{
|
||||||
|
char *fmt1 = "%d";
|
||||||
|
int result;
|
||||||
|
|
||||||
|
result = vdprintf( 2, fmt1, NULL );
|
||||||
|
|
||||||
|
return result;
|
||||||
|
}
|
||||||
41
testsuites/psxtests/psxhdrs/stdio/vfprintf.c
Normal file
41
testsuites/psxtests/psxhdrs/stdio/vfprintf.c
Normal file
@@ -0,0 +1,41 @@
|
|||||||
|
/**
|
||||||
|
* @file
|
||||||
|
* @brief vfprintf() API Conformance Test
|
||||||
|
*/
|
||||||
|
|
||||||
|
/*
|
||||||
|
* COPYRIGHT (c) 2018.
|
||||||
|
* Himanshu Sekhar Nayak
|
||||||
|
*
|
||||||
|
* Permission to use, copy, modify, and/or distribute this software
|
||||||
|
* for any purpose with or without fee is hereby granted.
|
||||||
|
*
|
||||||
|
* THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL
|
||||||
|
* WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED
|
||||||
|
* WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR
|
||||||
|
* BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES
|
||||||
|
* OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
|
||||||
|
* WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
|
||||||
|
* ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifdef HAVE_CONFIG_H
|
||||||
|
#include "config.h"
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#include <stdio.h>
|
||||||
|
#include <stdarg.h>
|
||||||
|
|
||||||
|
int test( void );
|
||||||
|
|
||||||
|
int test( void )
|
||||||
|
{
|
||||||
|
FILE *stream;
|
||||||
|
char *fmt1 = "%d";
|
||||||
|
int result;
|
||||||
|
|
||||||
|
stream = fopen( "myfile.dat", "w" );
|
||||||
|
result = vfprintf( stream, fmt1, NULL );
|
||||||
|
|
||||||
|
return result;
|
||||||
|
}
|
||||||
41
testsuites/psxtests/psxhdrs/stdio/vfscanf.c
Normal file
41
testsuites/psxtests/psxhdrs/stdio/vfscanf.c
Normal file
@@ -0,0 +1,41 @@
|
|||||||
|
/**
|
||||||
|
* @file
|
||||||
|
* @brief vfscanf() API Conformance Test
|
||||||
|
*/
|
||||||
|
|
||||||
|
/*
|
||||||
|
* COPYRIGHT (c) 2018.
|
||||||
|
* Himanshu Sekhar Nayak
|
||||||
|
*
|
||||||
|
* Permission to use, copy, modify, and/or distribute this software
|
||||||
|
* for any purpose with or without fee is hereby granted.
|
||||||
|
*
|
||||||
|
* THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL
|
||||||
|
* WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED
|
||||||
|
* WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR
|
||||||
|
* BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES
|
||||||
|
* OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
|
||||||
|
* WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
|
||||||
|
* ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifdef HAVE_CONFIG_H
|
||||||
|
#include "config.h"
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#include <stdio.h>
|
||||||
|
#include <stdarg.h>
|
||||||
|
|
||||||
|
int test( void );
|
||||||
|
|
||||||
|
int test( void )
|
||||||
|
{
|
||||||
|
FILE *stream;
|
||||||
|
char *fmt1 = " %d %99s ";
|
||||||
|
int result;
|
||||||
|
|
||||||
|
stream = fopen( "myfile.dat", "w" );
|
||||||
|
result = vfscanf( stream, fmt1, NULL );
|
||||||
|
|
||||||
|
return result;
|
||||||
|
}
|
||||||
39
testsuites/psxtests/psxhdrs/stdio/vprintf.c
Normal file
39
testsuites/psxtests/psxhdrs/stdio/vprintf.c
Normal file
@@ -0,0 +1,39 @@
|
|||||||
|
/**
|
||||||
|
* @file
|
||||||
|
* @brief vprintf() API Conformance Test
|
||||||
|
*/
|
||||||
|
|
||||||
|
/*
|
||||||
|
* COPYRIGHT (c) 2018.
|
||||||
|
* Himanshu Sekhar Nayak
|
||||||
|
*
|
||||||
|
* Permission to use, copy, modify, and/or distribute this software
|
||||||
|
* for any purpose with or without fee is hereby granted.
|
||||||
|
*
|
||||||
|
* THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL
|
||||||
|
* WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED
|
||||||
|
* WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR
|
||||||
|
* BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES
|
||||||
|
* OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
|
||||||
|
* WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
|
||||||
|
* ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifdef HAVE_CONFIG_H
|
||||||
|
#include "config.h"
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#include <stdio.h>
|
||||||
|
#include <stdarg.h>
|
||||||
|
|
||||||
|
int test( void );
|
||||||
|
|
||||||
|
int test( void )
|
||||||
|
{
|
||||||
|
char *fmt1 = " %d %99s ";
|
||||||
|
int result;
|
||||||
|
|
||||||
|
result = vprintf( fmt1, NULL );
|
||||||
|
|
||||||
|
return result;
|
||||||
|
}
|
||||||
39
testsuites/psxtests/psxhdrs/stdio/vscanf.c
Normal file
39
testsuites/psxtests/psxhdrs/stdio/vscanf.c
Normal file
@@ -0,0 +1,39 @@
|
|||||||
|
/**
|
||||||
|
* @file
|
||||||
|
* @brief vscanf() API Conformance Test
|
||||||
|
*/
|
||||||
|
|
||||||
|
/*
|
||||||
|
* COPYRIGHT (c) 2018.
|
||||||
|
* Himanshu Sekhar Nayak
|
||||||
|
*
|
||||||
|
* Permission to use, copy, modify, and/or distribute this software
|
||||||
|
* for any purpose with or without fee is hereby granted.
|
||||||
|
*
|
||||||
|
* THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL
|
||||||
|
* WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED
|
||||||
|
* WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR
|
||||||
|
* BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES
|
||||||
|
* OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
|
||||||
|
* WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
|
||||||
|
* ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifdef HAVE_CONFIG_H
|
||||||
|
#include "config.h"
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#include <stdio.h>
|
||||||
|
#include <stdarg.h>
|
||||||
|
|
||||||
|
int test( void );
|
||||||
|
|
||||||
|
int test( void )
|
||||||
|
{
|
||||||
|
char *fmt1 = " %d %99s ";
|
||||||
|
int result;
|
||||||
|
|
||||||
|
result = vscanf( fmt1, NULL );
|
||||||
|
|
||||||
|
return result;
|
||||||
|
}
|
||||||
40
testsuites/psxtests/psxhdrs/stdio/vsnprintf.c
Normal file
40
testsuites/psxtests/psxhdrs/stdio/vsnprintf.c
Normal file
@@ -0,0 +1,40 @@
|
|||||||
|
/**
|
||||||
|
* @file
|
||||||
|
* @brief vsnprintf() API Conformance Test
|
||||||
|
*/
|
||||||
|
|
||||||
|
/*
|
||||||
|
* COPYRIGHT (c) 2018.
|
||||||
|
* Himanshu Sekhar Nayak
|
||||||
|
*
|
||||||
|
* Permission to use, copy, modify, and/or distribute this software
|
||||||
|
* for any purpose with or without fee is hereby granted.
|
||||||
|
*
|
||||||
|
* THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL
|
||||||
|
* WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED
|
||||||
|
* WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR
|
||||||
|
* BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES
|
||||||
|
* OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
|
||||||
|
* WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
|
||||||
|
* ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifdef HAVE_CONFIG_H
|
||||||
|
#include "config.h"
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#include <stdio.h>
|
||||||
|
#include <stdarg.h>
|
||||||
|
|
||||||
|
int test( void );
|
||||||
|
|
||||||
|
int test( void )
|
||||||
|
{
|
||||||
|
char *fmt1 = " %d %99s ";
|
||||||
|
char string[128];
|
||||||
|
int result;
|
||||||
|
|
||||||
|
result = vsnprintf( string, sizeof(string), fmt1, NULL );
|
||||||
|
|
||||||
|
return result;
|
||||||
|
}
|
||||||
40
testsuites/psxtests/psxhdrs/stdio/vsprintf.c
Normal file
40
testsuites/psxtests/psxhdrs/stdio/vsprintf.c
Normal file
@@ -0,0 +1,40 @@
|
|||||||
|
/**
|
||||||
|
* @file
|
||||||
|
* @brief vsprintf() API Conformance Test
|
||||||
|
*/
|
||||||
|
|
||||||
|
/*
|
||||||
|
* COPYRIGHT (c) 2018.
|
||||||
|
* Himanshu Sekhar Nayak
|
||||||
|
*
|
||||||
|
* Permission to use, copy, modify, and/or distribute this software
|
||||||
|
* for any purpose with or without fee is hereby granted.
|
||||||
|
*
|
||||||
|
* THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL
|
||||||
|
* WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED
|
||||||
|
* WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR
|
||||||
|
* BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES
|
||||||
|
* OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
|
||||||
|
* WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
|
||||||
|
* ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifdef HAVE_CONFIG_H
|
||||||
|
#include "config.h"
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#include <stdio.h>
|
||||||
|
#include <stdarg.h>
|
||||||
|
|
||||||
|
int test( void );
|
||||||
|
|
||||||
|
int test( void )
|
||||||
|
{
|
||||||
|
char *fmt1 = " %d %99s ";
|
||||||
|
char string[128];
|
||||||
|
int result;
|
||||||
|
|
||||||
|
result = vsprintf( string, fmt1, NULL );
|
||||||
|
|
||||||
|
return result;
|
||||||
|
}
|
||||||
40
testsuites/psxtests/psxhdrs/stdio/vsscanf.c
Normal file
40
testsuites/psxtests/psxhdrs/stdio/vsscanf.c
Normal file
@@ -0,0 +1,40 @@
|
|||||||
|
/**
|
||||||
|
* @file
|
||||||
|
* @brief vsscanf() API Conformance Test
|
||||||
|
*/
|
||||||
|
|
||||||
|
/*
|
||||||
|
* COPYRIGHT (c) 2018.
|
||||||
|
* Himanshu Sekhar Nayak
|
||||||
|
*
|
||||||
|
* Permission to use, copy, modify, and/or distribute this software
|
||||||
|
* for any purpose with or without fee is hereby granted.
|
||||||
|
*
|
||||||
|
* THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL
|
||||||
|
* WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED
|
||||||
|
* WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR
|
||||||
|
* BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES
|
||||||
|
* OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
|
||||||
|
* WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
|
||||||
|
* ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifdef HAVE_CONFIG_H
|
||||||
|
#include "config.h"
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#include <stdio.h>
|
||||||
|
#include <stdarg.h>
|
||||||
|
|
||||||
|
int test( void );
|
||||||
|
|
||||||
|
int test( void )
|
||||||
|
{
|
||||||
|
char *tokenstring = "15 12 14";
|
||||||
|
char *fmt1 = " %d %99s ";
|
||||||
|
int result;
|
||||||
|
|
||||||
|
result = vsscanf( tokenstring, fmt1, NULL );
|
||||||
|
|
||||||
|
return result;
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user