diff options
Diffstat (limited to 'testsuites/psxtests/psxhdrs/strings')
-rw-r--r-- | testsuites/psxtests/psxhdrs/strings/bcmp.c | 56 | ||||
-rw-r--r-- | testsuites/psxtests/psxhdrs/strings/bcopy.c | 62 | ||||
-rw-r--r-- | testsuites/psxtests/psxhdrs/strings/ffs.c | 60 | ||||
-rw-r--r-- | testsuites/psxtests/psxhdrs/strings/index.c | 64 | ||||
-rw-r--r-- | testsuites/psxtests/psxhdrs/strings/rindex.c | 64 | ||||
-rw-r--r-- | testsuites/psxtests/psxhdrs/strings/strcasecmp.c | 60 | ||||
-rw-r--r-- | testsuites/psxtests/psxhdrs/strings/strcasecmp_l.c | 33 | ||||
-rw-r--r-- | testsuites/psxtests/psxhdrs/strings/strncasecmp.c | 60 | ||||
-rw-r--r-- | testsuites/psxtests/psxhdrs/strings/strncasecmp_l.c | 65 |
9 files changed, 315 insertions, 209 deletions
diff --git a/testsuites/psxtests/psxhdrs/strings/bcmp.c b/testsuites/psxtests/psxhdrs/strings/bcmp.c index 0e95a694f9..d86c05f878 100644 --- a/testsuites/psxtests/psxhdrs/strings/bcmp.c +++ b/testsuites/psxtests/psxhdrs/strings/bcmp.c @@ -2,35 +2,47 @@ * @file * @brief bcmp() API Conformance Test */ + /* - * COPYRIGHT (c) 2018. - * Himanshu Sekhar Nayak + * SPDX-License-Identifier: BSD-2-Clause + * + * 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. + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. * - * 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. + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" + * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE + * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. */ - #ifdef HAVE_CONFIG_H - #include "config.h" - #endif +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif - #include <strings.h> +#include <strings.h> - int test( void ); +int test( void ); - int test( void ) - { - int result; +int test( void ) +{ + int result; - result = bcmp( "Hello there", "Hello world", 6 ); + result = bcmp( "Hello there", "Hello world", 6 ); - return result; - } + return result; +} diff --git a/testsuites/psxtests/psxhdrs/strings/bcopy.c b/testsuites/psxtests/psxhdrs/strings/bcopy.c index 0a54f5a801..8f7f31db98 100644 --- a/testsuites/psxtests/psxhdrs/strings/bcopy.c +++ b/testsuites/psxtests/psxhdrs/strings/bcopy.c @@ -2,39 +2,51 @@ * @file * @brief bcopy() API Conformance Test */ + /* - * COPYRIGHT (c) 2018. - * Himanshu Sekhar Nayak + * SPDX-License-Identifier: BSD-2-Clause + * + * 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. + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. * - * 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. + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" + * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE + * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. */ - #ifdef HAVE_CONFIG_H - #include "config.h" - #endif +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif - #include <strings.h> +#include <strings.h> - int test( void ); +int test( void ); - int result = 1; +int result = 1; - int test( void ) - { - auto char buffer[50]; +int test( void ) +{ + auto char buffer[50]; - bcopy( "Hello ", buffer, 6 ); - bcopy( "world", &buffer[6], 6 ); - result = 0; + bcopy( "Hello ", buffer, 6 ); + bcopy( "world", &buffer[6], 6 ); + result = 0; - return result; - } + return result; +} diff --git a/testsuites/psxtests/psxhdrs/strings/ffs.c b/testsuites/psxtests/psxhdrs/strings/ffs.c index e4b212d9f5..3a7985aae8 100644 --- a/testsuites/psxtests/psxhdrs/strings/ffs.c +++ b/testsuites/psxtests/psxhdrs/strings/ffs.c @@ -2,38 +2,50 @@ * @file * @brief ffs() API Conformance Test */ + /* - * COPYRIGHT (c) 2018. - * Himanshu Sekhar Nayak + * SPDX-License-Identifier: BSD-2-Clause + * + * 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. + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. * - * 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. + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" + * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE + * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. */ - #ifdef HAVE_CONFIG_H - #include "config.h" - #endif +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif - #include <strings.h> +#include <strings.h> - int test( void ); +int test( void ); - int test( void ) - { - int i; - int result; +int test( void ) +{ + int i; + int result; - i = 64; + i = 64; - result = ffs( i ); + result = ffs( i ); - return result; - } + return result; +} diff --git a/testsuites/psxtests/psxhdrs/strings/index.c b/testsuites/psxtests/psxhdrs/strings/index.c index b4dbc32aaf..557a97760c 100644 --- a/testsuites/psxtests/psxhdrs/strings/index.c +++ b/testsuites/psxtests/psxhdrs/strings/index.c @@ -2,40 +2,52 @@ * @file * @brief index() API Conformance Test */ + /* - * COPYRIGHT (c) 2018. - * Himanshu Sekhar Nayak + * SPDX-License-Identifier: BSD-2-Clause + * + * 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. + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. * - * 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. + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" + * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE + * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. */ - #ifdef HAVE_CONFIG_H - #include "config.h" - #endif +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif - #include <strings.h> +#include <strings.h> - int test( void ); +int test( void ); - int result = 1; +int result = 1; - int test( void ) - { - char *p; - char *string = "This is a string for testing"; +int test( void ) +{ + char *p; + char *string = "This is a string for testing"; - p = index( string, 'i' ); - (void) p; - result = 0; + p = index( string, 'i' ); + (void) p; + result = 0; - return result; - } + return result; +} diff --git a/testsuites/psxtests/psxhdrs/strings/rindex.c b/testsuites/psxtests/psxhdrs/strings/rindex.c index 220a6553d4..e8e53940ef 100644 --- a/testsuites/psxtests/psxhdrs/strings/rindex.c +++ b/testsuites/psxtests/psxhdrs/strings/rindex.c @@ -2,40 +2,52 @@ * @file * @brief rindex() API Conformance Test */ + /* - * COPYRIGHT (c) 2018. - * Himanshu Sekhar Nayak + * SPDX-License-Identifier: BSD-2-Clause + * + * 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. + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. * - * 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. + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" + * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE + * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. */ - #ifdef HAVE_CONFIG_H - #include "config.h" - #endif +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif - #include <strings.h> +#include <strings.h> - int test( void ); +int test( void ); - int result = 1; +int result = 1; - int test( void ) - { - char *p; - char *string = "This is a string for testing"; +int test( void ) +{ + char *p; + char *string = "This is a string for testing"; - p = rindex( string, 'i' ); - (void) p; - result = 0; + p = rindex( string, 'i' ); + (void) p; + result = 0; - return result; - } + return result; +} diff --git a/testsuites/psxtests/psxhdrs/strings/strcasecmp.c b/testsuites/psxtests/psxhdrs/strings/strcasecmp.c index 3ed4b511e7..40040bdaa4 100644 --- a/testsuites/psxtests/psxhdrs/strings/strcasecmp.c +++ b/testsuites/psxtests/psxhdrs/strings/strcasecmp.c @@ -2,37 +2,49 @@ * @file * @brief strcasecmp() API Conformance Test */ + /* - * COPYRIGHT (c) 2018. - * Himanshu Sekhar Nayak + * SPDX-License-Identifier: BSD-2-Clause + * + * 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. + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. * - * 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. + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" + * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE + * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. */ - #ifdef HAVE_CONFIG_H - #include "config.h" - #endif +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif - #include <strings.h> +#include <strings.h> - int test( void ); +int test( void ); - int test( void ) - { - char *string1 = "STRING"; - char *string2 = "string"; - int result; +int test( void ) +{ + char *string1 = "STRING"; + char *string2 = "string"; + int result; - result = strcasecmp( string1, string2 ); + result = strcasecmp( string1, string2 ); - return result; - } + return result; +} diff --git a/testsuites/psxtests/psxhdrs/strings/strcasecmp_l.c b/testsuites/psxtests/psxhdrs/strings/strcasecmp_l.c index b1a4c8dcf3..01342d3f3b 100644 --- a/testsuites/psxtests/psxhdrs/strings/strcasecmp_l.c +++ b/testsuites/psxtests/psxhdrs/strings/strcasecmp_l.c @@ -4,19 +4,30 @@ */ /* - * COPYRIGHT (c) 2018. - * Himanshu Sekhar Nayak + * SPDX-License-Identifier: BSD-2-Clause * - * Permission to use, copy, modify, and/or distribute this software - * for any purpose with or without fee is hereby granted. + * Copyright (C) 2018, Himanshu Sekhar Nayak * - * 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. + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" + * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE + * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. */ #ifdef HAVE_CONFIG_H diff --git a/testsuites/psxtests/psxhdrs/strings/strncasecmp.c b/testsuites/psxtests/psxhdrs/strings/strncasecmp.c index 26899f73a7..076ca6d684 100644 --- a/testsuites/psxtests/psxhdrs/strings/strncasecmp.c +++ b/testsuites/psxtests/psxhdrs/strings/strncasecmp.c @@ -2,37 +2,49 @@ * @file * @brief strncasecmp() API Conformance Test */ + /* - * COPYRIGHT (c) 2018. - * Himanshu Sekhar Nayak + * SPDX-License-Identifier: BSD-2-Clause + * + * 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. + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. * - * 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. + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" + * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE + * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. */ - #ifdef HAVE_CONFIG_H - #include "config.h" - #endif +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif - #include <strings.h> +#include <strings.h> - int test( void ); +int test( void ); - int test( void ) - { - char *string1 = "STRING ONE"; - char *string2 = "string TWO"; - int result; +int test( void ) +{ + char *string1 = "STRING ONE"; + char *string2 = "string TWO"; + int result; - result = strncasecmp( string1, string2, 6 ); + result = strncasecmp( string1, string2, 6 ); - return result; - } + return result; +} diff --git a/testsuites/psxtests/psxhdrs/strings/strncasecmp_l.c b/testsuites/psxtests/psxhdrs/strings/strncasecmp_l.c index 19d9629661..c8e0c84621 100644 --- a/testsuites/psxtests/psxhdrs/strings/strncasecmp_l.c +++ b/testsuites/psxtests/psxhdrs/strings/strncasecmp_l.c @@ -1,41 +1,52 @@ /** * @file - * @brief strcasecmp_l() API Conformance Test + * @brief strncasecmp_l() API Conformance Test */ /* - * COPYRIGHT (c) 2018. - * Himanshu Sekhar Nayak + * SPDX-License-Identifier: BSD-2-Clause * - * Permission to use, copy, modify, and/or distribute this software - * for any purpose with or without fee is hereby granted. + * Copyright (C) 2018, Himanshu Sekhar Nayak * - * 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. + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" + * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE + * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. */ - #ifdef HAVE_CONFIG_H - #include "config.h" - #endif +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif - #include <strings.h> - #include <locale.h> +#include <strings.h> +#include <locale.h> - int test( void ); +int test( void ); - int test( void ) - { - char *string1 = "STRING"; - char *string2 = "string"; - locale_t locale = NULL; - int result; +int test( void ) +{ + char *string1 = "STRING"; + char *string2 = "string"; + locale_t locale = NULL; + int result; - result = strncasecmp_l( string1, string2, 6, locale ); + result = strncasecmp_l( string1, string2, 6, locale ); - return result; - } + return result; +} |